@google-cloud/spanner 8.0.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/build/protos/google/spanner/admin/database/v1/spanner_database_admin.proto +35 -0
- package/build/protos/google/spanner/v1/change_stream.proto +451 -0
- package/build/protos/google/spanner/v1/commit_response.proto +9 -4
- package/build/protos/google/spanner/v1/transaction.proto +40 -356
- package/build/protos/protos.d.ts +1521 -0
- package/build/protos/protos.js +3906 -0
- package/build/protos/protos.json +317 -1
- package/build/src/batch-transaction.js +2 -2
- package/build/src/codec.js +20 -21
- package/build/src/common-grpc/service.js +10 -10
- package/build/src/common.d.ts +1 -0
- package/build/src/common.js +9 -1
- package/build/src/database.d.ts +1 -0
- package/build/src/database.js +2 -0
- package/build/src/helper.d.ts +90 -0
- package/build/src/helper.js +154 -0
- package/build/src/index.d.ts +33 -0
- package/build/src/index.js +178 -8
- package/build/src/instrument.js +3 -2
- package/build/src/metrics/constants.d.ts +36 -0
- package/build/src/metrics/constants.js +106 -0
- package/build/src/metrics/external-types.d.ts +20 -0
- package/build/src/metrics/external-types.js +32 -0
- package/build/src/metrics/interceptor.d.ts +13 -0
- package/build/src/metrics/interceptor.js +87 -0
- package/build/src/metrics/metrics-tracer-factory.d.ts +165 -0
- package/build/src/metrics/metrics-tracer-factory.js +389 -0
- package/build/src/metrics/metrics-tracer.d.ts +204 -0
- package/build/src/metrics/metrics-tracer.js +371 -0
- package/build/src/metrics/spanner-metrics-exporter.d.ts +35 -0
- package/build/src/metrics/spanner-metrics-exporter.js +119 -0
- package/build/src/metrics/transform.d.ts +144 -0
- package/build/src/metrics/transform.js +272 -0
- package/build/src/partial-result-stream.js +9 -5
- package/build/src/session-factory.d.ts +34 -0
- package/build/src/session-factory.js +30 -0
- package/build/src/session-pool.js +1 -2
- package/build/src/transaction-runner.d.ts +1 -0
- package/build/src/transaction-runner.js +6 -0
- package/build/src/transaction.d.ts +42 -1
- package/build/src/transaction.js +192 -42
- package/build/src/v1/database_admin_client.d.ts +34 -0
- package/build/src/v1/database_admin_client.js +167 -1
- package/build/src/v1/database_admin_client_config.json +4 -0
- package/build/src/v1/instance_admin_client.d.ts +120 -0
- package/build/src/v1/instance_admin_client.js +312 -13
- package/build/src/v1/spanner_client.js +108 -0
- package/build/src/v1/spanner_proto_list.json +1 -0
- package/package.json +12 -5
package/build/protos/protos.js
CHANGED
|
@@ -26984,6 +26984,39 @@
|
|
|
26984
26984
|
* @variation 2
|
|
26985
26985
|
*/
|
|
26986
26986
|
|
|
26987
|
+
/**
|
|
26988
|
+
* Callback as used by {@link google.spanner.admin.database.v1.DatabaseAdmin|internalUpdateGraphOperation}.
|
|
26989
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
26990
|
+
* @typedef InternalUpdateGraphOperationCallback
|
|
26991
|
+
* @type {function}
|
|
26992
|
+
* @param {Error|null} error Error, if any
|
|
26993
|
+
* @param {google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} [response] InternalUpdateGraphOperationResponse
|
|
26994
|
+
*/
|
|
26995
|
+
|
|
26996
|
+
/**
|
|
26997
|
+
* Calls InternalUpdateGraphOperation.
|
|
26998
|
+
* @function internalUpdateGraphOperation
|
|
26999
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
27000
|
+
* @instance
|
|
27001
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest} request InternalUpdateGraphOperationRequest message or plain object
|
|
27002
|
+
* @param {google.spanner.admin.database.v1.DatabaseAdmin.InternalUpdateGraphOperationCallback} callback Node-style callback called with the error, if any, and InternalUpdateGraphOperationResponse
|
|
27003
|
+
* @returns {undefined}
|
|
27004
|
+
* @variation 1
|
|
27005
|
+
*/
|
|
27006
|
+
Object.defineProperty(DatabaseAdmin.prototype.internalUpdateGraphOperation = function internalUpdateGraphOperation(request, callback) {
|
|
27007
|
+
return this.rpcCall(internalUpdateGraphOperation, $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest, $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse, request, callback);
|
|
27008
|
+
}, "name", { value: "InternalUpdateGraphOperation" });
|
|
27009
|
+
|
|
27010
|
+
/**
|
|
27011
|
+
* Calls InternalUpdateGraphOperation.
|
|
27012
|
+
* @function internalUpdateGraphOperation
|
|
27013
|
+
* @memberof google.spanner.admin.database.v1.DatabaseAdmin
|
|
27014
|
+
* @instance
|
|
27015
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest} request InternalUpdateGraphOperationRequest message or plain object
|
|
27016
|
+
* @returns {Promise<google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse>} Promise
|
|
27017
|
+
* @variation 2
|
|
27018
|
+
*/
|
|
27019
|
+
|
|
26987
27020
|
return DatabaseAdmin;
|
|
26988
27021
|
})();
|
|
26989
27022
|
|
|
@@ -29635,6 +29668,7 @@
|
|
|
29635
29668
|
* @property {Array.<string>|null} [statements] UpdateDatabaseDdlRequest statements
|
|
29636
29669
|
* @property {string|null} [operationId] UpdateDatabaseDdlRequest operationId
|
|
29637
29670
|
* @property {Uint8Array|null} [protoDescriptors] UpdateDatabaseDdlRequest protoDescriptors
|
|
29671
|
+
* @property {boolean|null} [throughputMode] UpdateDatabaseDdlRequest throughputMode
|
|
29638
29672
|
*/
|
|
29639
29673
|
|
|
29640
29674
|
/**
|
|
@@ -29685,6 +29719,14 @@
|
|
|
29685
29719
|
*/
|
|
29686
29720
|
UpdateDatabaseDdlRequest.prototype.protoDescriptors = $util.newBuffer([]);
|
|
29687
29721
|
|
|
29722
|
+
/**
|
|
29723
|
+
* UpdateDatabaseDdlRequest throughputMode.
|
|
29724
|
+
* @member {boolean} throughputMode
|
|
29725
|
+
* @memberof google.spanner.admin.database.v1.UpdateDatabaseDdlRequest
|
|
29726
|
+
* @instance
|
|
29727
|
+
*/
|
|
29728
|
+
UpdateDatabaseDdlRequest.prototype.throughputMode = false;
|
|
29729
|
+
|
|
29688
29730
|
/**
|
|
29689
29731
|
* Creates a new UpdateDatabaseDdlRequest instance using the specified properties.
|
|
29690
29732
|
* @function create
|
|
@@ -29718,6 +29760,8 @@
|
|
|
29718
29760
|
writer.uint32(/* id 3, wireType 2 =*/26).string(message.operationId);
|
|
29719
29761
|
if (message.protoDescriptors != null && Object.hasOwnProperty.call(message, "protoDescriptors"))
|
|
29720
29762
|
writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.protoDescriptors);
|
|
29763
|
+
if (message.throughputMode != null && Object.hasOwnProperty.call(message, "throughputMode"))
|
|
29764
|
+
writer.uint32(/* id 5, wireType 0 =*/40).bool(message.throughputMode);
|
|
29721
29765
|
return writer;
|
|
29722
29766
|
};
|
|
29723
29767
|
|
|
@@ -29772,6 +29816,10 @@
|
|
|
29772
29816
|
message.protoDescriptors = reader.bytes();
|
|
29773
29817
|
break;
|
|
29774
29818
|
}
|
|
29819
|
+
case 5: {
|
|
29820
|
+
message.throughputMode = reader.bool();
|
|
29821
|
+
break;
|
|
29822
|
+
}
|
|
29775
29823
|
default:
|
|
29776
29824
|
reader.skipType(tag & 7);
|
|
29777
29825
|
break;
|
|
@@ -29823,6 +29871,9 @@
|
|
|
29823
29871
|
if (message.protoDescriptors != null && message.hasOwnProperty("protoDescriptors"))
|
|
29824
29872
|
if (!(message.protoDescriptors && typeof message.protoDescriptors.length === "number" || $util.isString(message.protoDescriptors)))
|
|
29825
29873
|
return "protoDescriptors: buffer expected";
|
|
29874
|
+
if (message.throughputMode != null && message.hasOwnProperty("throughputMode"))
|
|
29875
|
+
if (typeof message.throughputMode !== "boolean")
|
|
29876
|
+
return "throughputMode: boolean expected";
|
|
29826
29877
|
return null;
|
|
29827
29878
|
};
|
|
29828
29879
|
|
|
@@ -29854,6 +29905,8 @@
|
|
|
29854
29905
|
$util.base64.decode(object.protoDescriptors, message.protoDescriptors = $util.newBuffer($util.base64.length(object.protoDescriptors)), 0);
|
|
29855
29906
|
else if (object.protoDescriptors.length >= 0)
|
|
29856
29907
|
message.protoDescriptors = object.protoDescriptors;
|
|
29908
|
+
if (object.throughputMode != null)
|
|
29909
|
+
message.throughputMode = Boolean(object.throughputMode);
|
|
29857
29910
|
return message;
|
|
29858
29911
|
};
|
|
29859
29912
|
|
|
@@ -29882,6 +29935,7 @@
|
|
|
29882
29935
|
if (options.bytes !== Array)
|
|
29883
29936
|
object.protoDescriptors = $util.newBuffer(object.protoDescriptors);
|
|
29884
29937
|
}
|
|
29938
|
+
object.throughputMode = false;
|
|
29885
29939
|
}
|
|
29886
29940
|
if (message.database != null && message.hasOwnProperty("database"))
|
|
29887
29941
|
object.database = message.database;
|
|
@@ -29894,6 +29948,8 @@
|
|
|
29894
29948
|
object.operationId = message.operationId;
|
|
29895
29949
|
if (message.protoDescriptors != null && message.hasOwnProperty("protoDescriptors"))
|
|
29896
29950
|
object.protoDescriptors = options.bytes === String ? $util.base64.encode(message.protoDescriptors, 0, message.protoDescriptors.length) : options.bytes === Array ? Array.prototype.slice.call(message.protoDescriptors) : message.protoDescriptors;
|
|
29951
|
+
if (message.throughputMode != null && message.hasOwnProperty("throughputMode"))
|
|
29952
|
+
object.throughputMode = message.throughputMode;
|
|
29897
29953
|
return object;
|
|
29898
29954
|
};
|
|
29899
29955
|
|
|
@@ -34694,6 +34750,486 @@
|
|
|
34694
34750
|
return SplitPoints;
|
|
34695
34751
|
})();
|
|
34696
34752
|
|
|
34753
|
+
v1.InternalUpdateGraphOperationRequest = (function() {
|
|
34754
|
+
|
|
34755
|
+
/**
|
|
34756
|
+
* Properties of an InternalUpdateGraphOperationRequest.
|
|
34757
|
+
* @memberof google.spanner.admin.database.v1
|
|
34758
|
+
* @interface IInternalUpdateGraphOperationRequest
|
|
34759
|
+
* @property {string|null} [database] InternalUpdateGraphOperationRequest database
|
|
34760
|
+
* @property {string|null} [operationId] InternalUpdateGraphOperationRequest operationId
|
|
34761
|
+
* @property {string|null} [vmIdentityToken] InternalUpdateGraphOperationRequest vmIdentityToken
|
|
34762
|
+
* @property {number|null} [progress] InternalUpdateGraphOperationRequest progress
|
|
34763
|
+
* @property {google.rpc.IStatus|null} [status] InternalUpdateGraphOperationRequest status
|
|
34764
|
+
*/
|
|
34765
|
+
|
|
34766
|
+
/**
|
|
34767
|
+
* Constructs a new InternalUpdateGraphOperationRequest.
|
|
34768
|
+
* @memberof google.spanner.admin.database.v1
|
|
34769
|
+
* @classdesc Represents an InternalUpdateGraphOperationRequest.
|
|
34770
|
+
* @implements IInternalUpdateGraphOperationRequest
|
|
34771
|
+
* @constructor
|
|
34772
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest=} [properties] Properties to set
|
|
34773
|
+
*/
|
|
34774
|
+
function InternalUpdateGraphOperationRequest(properties) {
|
|
34775
|
+
if (properties)
|
|
34776
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
34777
|
+
if (properties[keys[i]] != null)
|
|
34778
|
+
this[keys[i]] = properties[keys[i]];
|
|
34779
|
+
}
|
|
34780
|
+
|
|
34781
|
+
/**
|
|
34782
|
+
* InternalUpdateGraphOperationRequest database.
|
|
34783
|
+
* @member {string} database
|
|
34784
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34785
|
+
* @instance
|
|
34786
|
+
*/
|
|
34787
|
+
InternalUpdateGraphOperationRequest.prototype.database = "";
|
|
34788
|
+
|
|
34789
|
+
/**
|
|
34790
|
+
* InternalUpdateGraphOperationRequest operationId.
|
|
34791
|
+
* @member {string} operationId
|
|
34792
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34793
|
+
* @instance
|
|
34794
|
+
*/
|
|
34795
|
+
InternalUpdateGraphOperationRequest.prototype.operationId = "";
|
|
34796
|
+
|
|
34797
|
+
/**
|
|
34798
|
+
* InternalUpdateGraphOperationRequest vmIdentityToken.
|
|
34799
|
+
* @member {string} vmIdentityToken
|
|
34800
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34801
|
+
* @instance
|
|
34802
|
+
*/
|
|
34803
|
+
InternalUpdateGraphOperationRequest.prototype.vmIdentityToken = "";
|
|
34804
|
+
|
|
34805
|
+
/**
|
|
34806
|
+
* InternalUpdateGraphOperationRequest progress.
|
|
34807
|
+
* @member {number} progress
|
|
34808
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34809
|
+
* @instance
|
|
34810
|
+
*/
|
|
34811
|
+
InternalUpdateGraphOperationRequest.prototype.progress = 0;
|
|
34812
|
+
|
|
34813
|
+
/**
|
|
34814
|
+
* InternalUpdateGraphOperationRequest status.
|
|
34815
|
+
* @member {google.rpc.IStatus|null|undefined} status
|
|
34816
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34817
|
+
* @instance
|
|
34818
|
+
*/
|
|
34819
|
+
InternalUpdateGraphOperationRequest.prototype.status = null;
|
|
34820
|
+
|
|
34821
|
+
/**
|
|
34822
|
+
* Creates a new InternalUpdateGraphOperationRequest instance using the specified properties.
|
|
34823
|
+
* @function create
|
|
34824
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34825
|
+
* @static
|
|
34826
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest=} [properties] Properties to set
|
|
34827
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} InternalUpdateGraphOperationRequest instance
|
|
34828
|
+
*/
|
|
34829
|
+
InternalUpdateGraphOperationRequest.create = function create(properties) {
|
|
34830
|
+
return new InternalUpdateGraphOperationRequest(properties);
|
|
34831
|
+
};
|
|
34832
|
+
|
|
34833
|
+
/**
|
|
34834
|
+
* Encodes the specified InternalUpdateGraphOperationRequest message. Does not implicitly {@link google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest.verify|verify} messages.
|
|
34835
|
+
* @function encode
|
|
34836
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34837
|
+
* @static
|
|
34838
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest} message InternalUpdateGraphOperationRequest message or plain object to encode
|
|
34839
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
34840
|
+
* @returns {$protobuf.Writer} Writer
|
|
34841
|
+
*/
|
|
34842
|
+
InternalUpdateGraphOperationRequest.encode = function encode(message, writer) {
|
|
34843
|
+
if (!writer)
|
|
34844
|
+
writer = $Writer.create();
|
|
34845
|
+
if (message.database != null && Object.hasOwnProperty.call(message, "database"))
|
|
34846
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.database);
|
|
34847
|
+
if (message.operationId != null && Object.hasOwnProperty.call(message, "operationId"))
|
|
34848
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.operationId);
|
|
34849
|
+
if (message.progress != null && Object.hasOwnProperty.call(message, "progress"))
|
|
34850
|
+
writer.uint32(/* id 3, wireType 1 =*/25).double(message.progress);
|
|
34851
|
+
if (message.vmIdentityToken != null && Object.hasOwnProperty.call(message, "vmIdentityToken"))
|
|
34852
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.vmIdentityToken);
|
|
34853
|
+
if (message.status != null && Object.hasOwnProperty.call(message, "status"))
|
|
34854
|
+
$root.google.rpc.Status.encode(message.status, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
34855
|
+
return writer;
|
|
34856
|
+
};
|
|
34857
|
+
|
|
34858
|
+
/**
|
|
34859
|
+
* Encodes the specified InternalUpdateGraphOperationRequest message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest.verify|verify} messages.
|
|
34860
|
+
* @function encodeDelimited
|
|
34861
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34862
|
+
* @static
|
|
34863
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationRequest} message InternalUpdateGraphOperationRequest message or plain object to encode
|
|
34864
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
34865
|
+
* @returns {$protobuf.Writer} Writer
|
|
34866
|
+
*/
|
|
34867
|
+
InternalUpdateGraphOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
|
|
34868
|
+
return this.encode(message, writer).ldelim();
|
|
34869
|
+
};
|
|
34870
|
+
|
|
34871
|
+
/**
|
|
34872
|
+
* Decodes an InternalUpdateGraphOperationRequest message from the specified reader or buffer.
|
|
34873
|
+
* @function decode
|
|
34874
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34875
|
+
* @static
|
|
34876
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
34877
|
+
* @param {number} [length] Message length if known beforehand
|
|
34878
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} InternalUpdateGraphOperationRequest
|
|
34879
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
34880
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
34881
|
+
*/
|
|
34882
|
+
InternalUpdateGraphOperationRequest.decode = function decode(reader, length, error) {
|
|
34883
|
+
if (!(reader instanceof $Reader))
|
|
34884
|
+
reader = $Reader.create(reader);
|
|
34885
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest();
|
|
34886
|
+
while (reader.pos < end) {
|
|
34887
|
+
var tag = reader.uint32();
|
|
34888
|
+
if (tag === error)
|
|
34889
|
+
break;
|
|
34890
|
+
switch (tag >>> 3) {
|
|
34891
|
+
case 1: {
|
|
34892
|
+
message.database = reader.string();
|
|
34893
|
+
break;
|
|
34894
|
+
}
|
|
34895
|
+
case 2: {
|
|
34896
|
+
message.operationId = reader.string();
|
|
34897
|
+
break;
|
|
34898
|
+
}
|
|
34899
|
+
case 5: {
|
|
34900
|
+
message.vmIdentityToken = reader.string();
|
|
34901
|
+
break;
|
|
34902
|
+
}
|
|
34903
|
+
case 3: {
|
|
34904
|
+
message.progress = reader.double();
|
|
34905
|
+
break;
|
|
34906
|
+
}
|
|
34907
|
+
case 6: {
|
|
34908
|
+
message.status = $root.google.rpc.Status.decode(reader, reader.uint32());
|
|
34909
|
+
break;
|
|
34910
|
+
}
|
|
34911
|
+
default:
|
|
34912
|
+
reader.skipType(tag & 7);
|
|
34913
|
+
break;
|
|
34914
|
+
}
|
|
34915
|
+
}
|
|
34916
|
+
return message;
|
|
34917
|
+
};
|
|
34918
|
+
|
|
34919
|
+
/**
|
|
34920
|
+
* Decodes an InternalUpdateGraphOperationRequest message from the specified reader or buffer, length delimited.
|
|
34921
|
+
* @function decodeDelimited
|
|
34922
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34923
|
+
* @static
|
|
34924
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
34925
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} InternalUpdateGraphOperationRequest
|
|
34926
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
34927
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
34928
|
+
*/
|
|
34929
|
+
InternalUpdateGraphOperationRequest.decodeDelimited = function decodeDelimited(reader) {
|
|
34930
|
+
if (!(reader instanceof $Reader))
|
|
34931
|
+
reader = new $Reader(reader);
|
|
34932
|
+
return this.decode(reader, reader.uint32());
|
|
34933
|
+
};
|
|
34934
|
+
|
|
34935
|
+
/**
|
|
34936
|
+
* Verifies an InternalUpdateGraphOperationRequest message.
|
|
34937
|
+
* @function verify
|
|
34938
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34939
|
+
* @static
|
|
34940
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
34941
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
34942
|
+
*/
|
|
34943
|
+
InternalUpdateGraphOperationRequest.verify = function verify(message) {
|
|
34944
|
+
if (typeof message !== "object" || message === null)
|
|
34945
|
+
return "object expected";
|
|
34946
|
+
if (message.database != null && message.hasOwnProperty("database"))
|
|
34947
|
+
if (!$util.isString(message.database))
|
|
34948
|
+
return "database: string expected";
|
|
34949
|
+
if (message.operationId != null && message.hasOwnProperty("operationId"))
|
|
34950
|
+
if (!$util.isString(message.operationId))
|
|
34951
|
+
return "operationId: string expected";
|
|
34952
|
+
if (message.vmIdentityToken != null && message.hasOwnProperty("vmIdentityToken"))
|
|
34953
|
+
if (!$util.isString(message.vmIdentityToken))
|
|
34954
|
+
return "vmIdentityToken: string expected";
|
|
34955
|
+
if (message.progress != null && message.hasOwnProperty("progress"))
|
|
34956
|
+
if (typeof message.progress !== "number")
|
|
34957
|
+
return "progress: number expected";
|
|
34958
|
+
if (message.status != null && message.hasOwnProperty("status")) {
|
|
34959
|
+
var error = $root.google.rpc.Status.verify(message.status);
|
|
34960
|
+
if (error)
|
|
34961
|
+
return "status." + error;
|
|
34962
|
+
}
|
|
34963
|
+
return null;
|
|
34964
|
+
};
|
|
34965
|
+
|
|
34966
|
+
/**
|
|
34967
|
+
* Creates an InternalUpdateGraphOperationRequest message from a plain object. Also converts values to their respective internal types.
|
|
34968
|
+
* @function fromObject
|
|
34969
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34970
|
+
* @static
|
|
34971
|
+
* @param {Object.<string,*>} object Plain object
|
|
34972
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} InternalUpdateGraphOperationRequest
|
|
34973
|
+
*/
|
|
34974
|
+
InternalUpdateGraphOperationRequest.fromObject = function fromObject(object) {
|
|
34975
|
+
if (object instanceof $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest)
|
|
34976
|
+
return object;
|
|
34977
|
+
var message = new $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest();
|
|
34978
|
+
if (object.database != null)
|
|
34979
|
+
message.database = String(object.database);
|
|
34980
|
+
if (object.operationId != null)
|
|
34981
|
+
message.operationId = String(object.operationId);
|
|
34982
|
+
if (object.vmIdentityToken != null)
|
|
34983
|
+
message.vmIdentityToken = String(object.vmIdentityToken);
|
|
34984
|
+
if (object.progress != null)
|
|
34985
|
+
message.progress = Number(object.progress);
|
|
34986
|
+
if (object.status != null) {
|
|
34987
|
+
if (typeof object.status !== "object")
|
|
34988
|
+
throw TypeError(".google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest.status: object expected");
|
|
34989
|
+
message.status = $root.google.rpc.Status.fromObject(object.status);
|
|
34990
|
+
}
|
|
34991
|
+
return message;
|
|
34992
|
+
};
|
|
34993
|
+
|
|
34994
|
+
/**
|
|
34995
|
+
* Creates a plain object from an InternalUpdateGraphOperationRequest message. Also converts values to other types if specified.
|
|
34996
|
+
* @function toObject
|
|
34997
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
34998
|
+
* @static
|
|
34999
|
+
* @param {google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest} message InternalUpdateGraphOperationRequest
|
|
35000
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
35001
|
+
* @returns {Object.<string,*>} Plain object
|
|
35002
|
+
*/
|
|
35003
|
+
InternalUpdateGraphOperationRequest.toObject = function toObject(message, options) {
|
|
35004
|
+
if (!options)
|
|
35005
|
+
options = {};
|
|
35006
|
+
var object = {};
|
|
35007
|
+
if (options.defaults) {
|
|
35008
|
+
object.database = "";
|
|
35009
|
+
object.operationId = "";
|
|
35010
|
+
object.progress = 0;
|
|
35011
|
+
object.vmIdentityToken = "";
|
|
35012
|
+
object.status = null;
|
|
35013
|
+
}
|
|
35014
|
+
if (message.database != null && message.hasOwnProperty("database"))
|
|
35015
|
+
object.database = message.database;
|
|
35016
|
+
if (message.operationId != null && message.hasOwnProperty("operationId"))
|
|
35017
|
+
object.operationId = message.operationId;
|
|
35018
|
+
if (message.progress != null && message.hasOwnProperty("progress"))
|
|
35019
|
+
object.progress = options.json && !isFinite(message.progress) ? String(message.progress) : message.progress;
|
|
35020
|
+
if (message.vmIdentityToken != null && message.hasOwnProperty("vmIdentityToken"))
|
|
35021
|
+
object.vmIdentityToken = message.vmIdentityToken;
|
|
35022
|
+
if (message.status != null && message.hasOwnProperty("status"))
|
|
35023
|
+
object.status = $root.google.rpc.Status.toObject(message.status, options);
|
|
35024
|
+
return object;
|
|
35025
|
+
};
|
|
35026
|
+
|
|
35027
|
+
/**
|
|
35028
|
+
* Converts this InternalUpdateGraphOperationRequest to JSON.
|
|
35029
|
+
* @function toJSON
|
|
35030
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
35031
|
+
* @instance
|
|
35032
|
+
* @returns {Object.<string,*>} JSON object
|
|
35033
|
+
*/
|
|
35034
|
+
InternalUpdateGraphOperationRequest.prototype.toJSON = function toJSON() {
|
|
35035
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
35036
|
+
};
|
|
35037
|
+
|
|
35038
|
+
/**
|
|
35039
|
+
* Gets the default type url for InternalUpdateGraphOperationRequest
|
|
35040
|
+
* @function getTypeUrl
|
|
35041
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest
|
|
35042
|
+
* @static
|
|
35043
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
35044
|
+
* @returns {string} The default type url
|
|
35045
|
+
*/
|
|
35046
|
+
InternalUpdateGraphOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
35047
|
+
if (typeUrlPrefix === undefined) {
|
|
35048
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
35049
|
+
}
|
|
35050
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.InternalUpdateGraphOperationRequest";
|
|
35051
|
+
};
|
|
35052
|
+
|
|
35053
|
+
return InternalUpdateGraphOperationRequest;
|
|
35054
|
+
})();
|
|
35055
|
+
|
|
35056
|
+
v1.InternalUpdateGraphOperationResponse = (function() {
|
|
35057
|
+
|
|
35058
|
+
/**
|
|
35059
|
+
* Properties of an InternalUpdateGraphOperationResponse.
|
|
35060
|
+
* @memberof google.spanner.admin.database.v1
|
|
35061
|
+
* @interface IInternalUpdateGraphOperationResponse
|
|
35062
|
+
*/
|
|
35063
|
+
|
|
35064
|
+
/**
|
|
35065
|
+
* Constructs a new InternalUpdateGraphOperationResponse.
|
|
35066
|
+
* @memberof google.spanner.admin.database.v1
|
|
35067
|
+
* @classdesc Represents an InternalUpdateGraphOperationResponse.
|
|
35068
|
+
* @implements IInternalUpdateGraphOperationResponse
|
|
35069
|
+
* @constructor
|
|
35070
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse=} [properties] Properties to set
|
|
35071
|
+
*/
|
|
35072
|
+
function InternalUpdateGraphOperationResponse(properties) {
|
|
35073
|
+
if (properties)
|
|
35074
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
35075
|
+
if (properties[keys[i]] != null)
|
|
35076
|
+
this[keys[i]] = properties[keys[i]];
|
|
35077
|
+
}
|
|
35078
|
+
|
|
35079
|
+
/**
|
|
35080
|
+
* Creates a new InternalUpdateGraphOperationResponse instance using the specified properties.
|
|
35081
|
+
* @function create
|
|
35082
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35083
|
+
* @static
|
|
35084
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse=} [properties] Properties to set
|
|
35085
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} InternalUpdateGraphOperationResponse instance
|
|
35086
|
+
*/
|
|
35087
|
+
InternalUpdateGraphOperationResponse.create = function create(properties) {
|
|
35088
|
+
return new InternalUpdateGraphOperationResponse(properties);
|
|
35089
|
+
};
|
|
35090
|
+
|
|
35091
|
+
/**
|
|
35092
|
+
* Encodes the specified InternalUpdateGraphOperationResponse message. Does not implicitly {@link google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse.verify|verify} messages.
|
|
35093
|
+
* @function encode
|
|
35094
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35095
|
+
* @static
|
|
35096
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse} message InternalUpdateGraphOperationResponse message or plain object to encode
|
|
35097
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
35098
|
+
* @returns {$protobuf.Writer} Writer
|
|
35099
|
+
*/
|
|
35100
|
+
InternalUpdateGraphOperationResponse.encode = function encode(message, writer) {
|
|
35101
|
+
if (!writer)
|
|
35102
|
+
writer = $Writer.create();
|
|
35103
|
+
return writer;
|
|
35104
|
+
};
|
|
35105
|
+
|
|
35106
|
+
/**
|
|
35107
|
+
* Encodes the specified InternalUpdateGraphOperationResponse message, length delimited. Does not implicitly {@link google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse.verify|verify} messages.
|
|
35108
|
+
* @function encodeDelimited
|
|
35109
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35110
|
+
* @static
|
|
35111
|
+
* @param {google.spanner.admin.database.v1.IInternalUpdateGraphOperationResponse} message InternalUpdateGraphOperationResponse message or plain object to encode
|
|
35112
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
35113
|
+
* @returns {$protobuf.Writer} Writer
|
|
35114
|
+
*/
|
|
35115
|
+
InternalUpdateGraphOperationResponse.encodeDelimited = function encodeDelimited(message, writer) {
|
|
35116
|
+
return this.encode(message, writer).ldelim();
|
|
35117
|
+
};
|
|
35118
|
+
|
|
35119
|
+
/**
|
|
35120
|
+
* Decodes an InternalUpdateGraphOperationResponse message from the specified reader or buffer.
|
|
35121
|
+
* @function decode
|
|
35122
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35123
|
+
* @static
|
|
35124
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
35125
|
+
* @param {number} [length] Message length if known beforehand
|
|
35126
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} InternalUpdateGraphOperationResponse
|
|
35127
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
35128
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
35129
|
+
*/
|
|
35130
|
+
InternalUpdateGraphOperationResponse.decode = function decode(reader, length, error) {
|
|
35131
|
+
if (!(reader instanceof $Reader))
|
|
35132
|
+
reader = $Reader.create(reader);
|
|
35133
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse();
|
|
35134
|
+
while (reader.pos < end) {
|
|
35135
|
+
var tag = reader.uint32();
|
|
35136
|
+
if (tag === error)
|
|
35137
|
+
break;
|
|
35138
|
+
switch (tag >>> 3) {
|
|
35139
|
+
default:
|
|
35140
|
+
reader.skipType(tag & 7);
|
|
35141
|
+
break;
|
|
35142
|
+
}
|
|
35143
|
+
}
|
|
35144
|
+
return message;
|
|
35145
|
+
};
|
|
35146
|
+
|
|
35147
|
+
/**
|
|
35148
|
+
* Decodes an InternalUpdateGraphOperationResponse message from the specified reader or buffer, length delimited.
|
|
35149
|
+
* @function decodeDelimited
|
|
35150
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35151
|
+
* @static
|
|
35152
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
35153
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} InternalUpdateGraphOperationResponse
|
|
35154
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
35155
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
35156
|
+
*/
|
|
35157
|
+
InternalUpdateGraphOperationResponse.decodeDelimited = function decodeDelimited(reader) {
|
|
35158
|
+
if (!(reader instanceof $Reader))
|
|
35159
|
+
reader = new $Reader(reader);
|
|
35160
|
+
return this.decode(reader, reader.uint32());
|
|
35161
|
+
};
|
|
35162
|
+
|
|
35163
|
+
/**
|
|
35164
|
+
* Verifies an InternalUpdateGraphOperationResponse message.
|
|
35165
|
+
* @function verify
|
|
35166
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35167
|
+
* @static
|
|
35168
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
35169
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
35170
|
+
*/
|
|
35171
|
+
InternalUpdateGraphOperationResponse.verify = function verify(message) {
|
|
35172
|
+
if (typeof message !== "object" || message === null)
|
|
35173
|
+
return "object expected";
|
|
35174
|
+
return null;
|
|
35175
|
+
};
|
|
35176
|
+
|
|
35177
|
+
/**
|
|
35178
|
+
* Creates an InternalUpdateGraphOperationResponse message from a plain object. Also converts values to their respective internal types.
|
|
35179
|
+
* @function fromObject
|
|
35180
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35181
|
+
* @static
|
|
35182
|
+
* @param {Object.<string,*>} object Plain object
|
|
35183
|
+
* @returns {google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} InternalUpdateGraphOperationResponse
|
|
35184
|
+
*/
|
|
35185
|
+
InternalUpdateGraphOperationResponse.fromObject = function fromObject(object) {
|
|
35186
|
+
if (object instanceof $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse)
|
|
35187
|
+
return object;
|
|
35188
|
+
return new $root.google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse();
|
|
35189
|
+
};
|
|
35190
|
+
|
|
35191
|
+
/**
|
|
35192
|
+
* Creates a plain object from an InternalUpdateGraphOperationResponse message. Also converts values to other types if specified.
|
|
35193
|
+
* @function toObject
|
|
35194
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35195
|
+
* @static
|
|
35196
|
+
* @param {google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse} message InternalUpdateGraphOperationResponse
|
|
35197
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
35198
|
+
* @returns {Object.<string,*>} Plain object
|
|
35199
|
+
*/
|
|
35200
|
+
InternalUpdateGraphOperationResponse.toObject = function toObject() {
|
|
35201
|
+
return {};
|
|
35202
|
+
};
|
|
35203
|
+
|
|
35204
|
+
/**
|
|
35205
|
+
* Converts this InternalUpdateGraphOperationResponse to JSON.
|
|
35206
|
+
* @function toJSON
|
|
35207
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35208
|
+
* @instance
|
|
35209
|
+
* @returns {Object.<string,*>} JSON object
|
|
35210
|
+
*/
|
|
35211
|
+
InternalUpdateGraphOperationResponse.prototype.toJSON = function toJSON() {
|
|
35212
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
35213
|
+
};
|
|
35214
|
+
|
|
35215
|
+
/**
|
|
35216
|
+
* Gets the default type url for InternalUpdateGraphOperationResponse
|
|
35217
|
+
* @function getTypeUrl
|
|
35218
|
+
* @memberof google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse
|
|
35219
|
+
* @static
|
|
35220
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
35221
|
+
* @returns {string} The default type url
|
|
35222
|
+
*/
|
|
35223
|
+
InternalUpdateGraphOperationResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
35224
|
+
if (typeUrlPrefix === undefined) {
|
|
35225
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
35226
|
+
}
|
|
35227
|
+
return typeUrlPrefix + "/google.spanner.admin.database.v1.InternalUpdateGraphOperationResponse";
|
|
35228
|
+
};
|
|
35229
|
+
|
|
35230
|
+
return InternalUpdateGraphOperationResponse;
|
|
35231
|
+
})();
|
|
35232
|
+
|
|
34697
35233
|
return v1;
|
|
34698
35234
|
})();
|
|
34699
35235
|
|
|
@@ -83122,6 +83658,7 @@
|
|
|
83122
83658
|
* @property {google.protobuf.ITimestamp|null} [commitTimestamp] CommitResponse commitTimestamp
|
|
83123
83659
|
* @property {google.spanner.v1.CommitResponse.ICommitStats|null} [commitStats] CommitResponse commitStats
|
|
83124
83660
|
* @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] CommitResponse precommitToken
|
|
83661
|
+
* @property {google.protobuf.ITimestamp|null} [snapshotTimestamp] CommitResponse snapshotTimestamp
|
|
83125
83662
|
*/
|
|
83126
83663
|
|
|
83127
83664
|
/**
|
|
@@ -83163,6 +83700,14 @@
|
|
|
83163
83700
|
*/
|
|
83164
83701
|
CommitResponse.prototype.precommitToken = null;
|
|
83165
83702
|
|
|
83703
|
+
/**
|
|
83704
|
+
* CommitResponse snapshotTimestamp.
|
|
83705
|
+
* @member {google.protobuf.ITimestamp|null|undefined} snapshotTimestamp
|
|
83706
|
+
* @memberof google.spanner.v1.CommitResponse
|
|
83707
|
+
* @instance
|
|
83708
|
+
*/
|
|
83709
|
+
CommitResponse.prototype.snapshotTimestamp = null;
|
|
83710
|
+
|
|
83166
83711
|
// OneOf field names bound to virtual getters and setters
|
|
83167
83712
|
var $oneOfFields;
|
|
83168
83713
|
|
|
@@ -83207,6 +83752,8 @@
|
|
|
83207
83752
|
$root.google.spanner.v1.CommitResponse.CommitStats.encode(message.commitStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
83208
83753
|
if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken"))
|
|
83209
83754
|
$root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
83755
|
+
if (message.snapshotTimestamp != null && Object.hasOwnProperty.call(message, "snapshotTimestamp"))
|
|
83756
|
+
$root.google.protobuf.Timestamp.encode(message.snapshotTimestamp, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
83210
83757
|
return writer;
|
|
83211
83758
|
};
|
|
83212
83759
|
|
|
@@ -83255,6 +83802,10 @@
|
|
|
83255
83802
|
message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32());
|
|
83256
83803
|
break;
|
|
83257
83804
|
}
|
|
83805
|
+
case 5: {
|
|
83806
|
+
message.snapshotTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
83807
|
+
break;
|
|
83808
|
+
}
|
|
83258
83809
|
default:
|
|
83259
83810
|
reader.skipType(tag & 7);
|
|
83260
83811
|
break;
|
|
@@ -83309,6 +83860,11 @@
|
|
|
83309
83860
|
return "precommitToken." + error;
|
|
83310
83861
|
}
|
|
83311
83862
|
}
|
|
83863
|
+
if (message.snapshotTimestamp != null && message.hasOwnProperty("snapshotTimestamp")) {
|
|
83864
|
+
var error = $root.google.protobuf.Timestamp.verify(message.snapshotTimestamp);
|
|
83865
|
+
if (error)
|
|
83866
|
+
return "snapshotTimestamp." + error;
|
|
83867
|
+
}
|
|
83312
83868
|
return null;
|
|
83313
83869
|
};
|
|
83314
83870
|
|
|
@@ -83339,6 +83895,11 @@
|
|
|
83339
83895
|
throw TypeError(".google.spanner.v1.CommitResponse.precommitToken: object expected");
|
|
83340
83896
|
message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken);
|
|
83341
83897
|
}
|
|
83898
|
+
if (object.snapshotTimestamp != null) {
|
|
83899
|
+
if (typeof object.snapshotTimestamp !== "object")
|
|
83900
|
+
throw TypeError(".google.spanner.v1.CommitResponse.snapshotTimestamp: object expected");
|
|
83901
|
+
message.snapshotTimestamp = $root.google.protobuf.Timestamp.fromObject(object.snapshotTimestamp);
|
|
83902
|
+
}
|
|
83342
83903
|
return message;
|
|
83343
83904
|
};
|
|
83344
83905
|
|
|
@@ -83358,6 +83919,7 @@
|
|
|
83358
83919
|
if (options.defaults) {
|
|
83359
83920
|
object.commitTimestamp = null;
|
|
83360
83921
|
object.commitStats = null;
|
|
83922
|
+
object.snapshotTimestamp = null;
|
|
83361
83923
|
}
|
|
83362
83924
|
if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp"))
|
|
83363
83925
|
object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options);
|
|
@@ -83368,6 +83930,8 @@
|
|
|
83368
83930
|
if (options.oneofs)
|
|
83369
83931
|
object.MultiplexedSessionRetry = "precommitToken";
|
|
83370
83932
|
}
|
|
83933
|
+
if (message.snapshotTimestamp != null && message.hasOwnProperty("snapshotTimestamp"))
|
|
83934
|
+
object.snapshotTimestamp = $root.google.protobuf.Timestamp.toObject(message.snapshotTimestamp, options);
|
|
83371
83935
|
return object;
|
|
83372
83936
|
};
|
|
83373
83937
|
|
|
@@ -90599,6 +91163,3348 @@
|
|
|
90599
91163
|
return values;
|
|
90600
91164
|
})();
|
|
90601
91165
|
|
|
91166
|
+
v1.ChangeStreamRecord = (function() {
|
|
91167
|
+
|
|
91168
|
+
/**
|
|
91169
|
+
* Properties of a ChangeStreamRecord.
|
|
91170
|
+
* @memberof google.spanner.v1
|
|
91171
|
+
* @interface IChangeStreamRecord
|
|
91172
|
+
* @property {google.spanner.v1.ChangeStreamRecord.IDataChangeRecord|null} [dataChangeRecord] ChangeStreamRecord dataChangeRecord
|
|
91173
|
+
* @property {google.spanner.v1.ChangeStreamRecord.IHeartbeatRecord|null} [heartbeatRecord] ChangeStreamRecord heartbeatRecord
|
|
91174
|
+
* @property {google.spanner.v1.ChangeStreamRecord.IPartitionStartRecord|null} [partitionStartRecord] ChangeStreamRecord partitionStartRecord
|
|
91175
|
+
* @property {google.spanner.v1.ChangeStreamRecord.IPartitionEndRecord|null} [partitionEndRecord] ChangeStreamRecord partitionEndRecord
|
|
91176
|
+
* @property {google.spanner.v1.ChangeStreamRecord.IPartitionEventRecord|null} [partitionEventRecord] ChangeStreamRecord partitionEventRecord
|
|
91177
|
+
*/
|
|
91178
|
+
|
|
91179
|
+
/**
|
|
91180
|
+
* Constructs a new ChangeStreamRecord.
|
|
91181
|
+
* @memberof google.spanner.v1
|
|
91182
|
+
* @classdesc Represents a ChangeStreamRecord.
|
|
91183
|
+
* @implements IChangeStreamRecord
|
|
91184
|
+
* @constructor
|
|
91185
|
+
* @param {google.spanner.v1.IChangeStreamRecord=} [properties] Properties to set
|
|
91186
|
+
*/
|
|
91187
|
+
function ChangeStreamRecord(properties) {
|
|
91188
|
+
if (properties)
|
|
91189
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
91190
|
+
if (properties[keys[i]] != null)
|
|
91191
|
+
this[keys[i]] = properties[keys[i]];
|
|
91192
|
+
}
|
|
91193
|
+
|
|
91194
|
+
/**
|
|
91195
|
+
* ChangeStreamRecord dataChangeRecord.
|
|
91196
|
+
* @member {google.spanner.v1.ChangeStreamRecord.IDataChangeRecord|null|undefined} dataChangeRecord
|
|
91197
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91198
|
+
* @instance
|
|
91199
|
+
*/
|
|
91200
|
+
ChangeStreamRecord.prototype.dataChangeRecord = null;
|
|
91201
|
+
|
|
91202
|
+
/**
|
|
91203
|
+
* ChangeStreamRecord heartbeatRecord.
|
|
91204
|
+
* @member {google.spanner.v1.ChangeStreamRecord.IHeartbeatRecord|null|undefined} heartbeatRecord
|
|
91205
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91206
|
+
* @instance
|
|
91207
|
+
*/
|
|
91208
|
+
ChangeStreamRecord.prototype.heartbeatRecord = null;
|
|
91209
|
+
|
|
91210
|
+
/**
|
|
91211
|
+
* ChangeStreamRecord partitionStartRecord.
|
|
91212
|
+
* @member {google.spanner.v1.ChangeStreamRecord.IPartitionStartRecord|null|undefined} partitionStartRecord
|
|
91213
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91214
|
+
* @instance
|
|
91215
|
+
*/
|
|
91216
|
+
ChangeStreamRecord.prototype.partitionStartRecord = null;
|
|
91217
|
+
|
|
91218
|
+
/**
|
|
91219
|
+
* ChangeStreamRecord partitionEndRecord.
|
|
91220
|
+
* @member {google.spanner.v1.ChangeStreamRecord.IPartitionEndRecord|null|undefined} partitionEndRecord
|
|
91221
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91222
|
+
* @instance
|
|
91223
|
+
*/
|
|
91224
|
+
ChangeStreamRecord.prototype.partitionEndRecord = null;
|
|
91225
|
+
|
|
91226
|
+
/**
|
|
91227
|
+
* ChangeStreamRecord partitionEventRecord.
|
|
91228
|
+
* @member {google.spanner.v1.ChangeStreamRecord.IPartitionEventRecord|null|undefined} partitionEventRecord
|
|
91229
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91230
|
+
* @instance
|
|
91231
|
+
*/
|
|
91232
|
+
ChangeStreamRecord.prototype.partitionEventRecord = null;
|
|
91233
|
+
|
|
91234
|
+
// OneOf field names bound to virtual getters and setters
|
|
91235
|
+
var $oneOfFields;
|
|
91236
|
+
|
|
91237
|
+
/**
|
|
91238
|
+
* ChangeStreamRecord record.
|
|
91239
|
+
* @member {"dataChangeRecord"|"heartbeatRecord"|"partitionStartRecord"|"partitionEndRecord"|"partitionEventRecord"|undefined} record
|
|
91240
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91241
|
+
* @instance
|
|
91242
|
+
*/
|
|
91243
|
+
Object.defineProperty(ChangeStreamRecord.prototype, "record", {
|
|
91244
|
+
get: $util.oneOfGetter($oneOfFields = ["dataChangeRecord", "heartbeatRecord", "partitionStartRecord", "partitionEndRecord", "partitionEventRecord"]),
|
|
91245
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
91246
|
+
});
|
|
91247
|
+
|
|
91248
|
+
/**
|
|
91249
|
+
* Creates a new ChangeStreamRecord instance using the specified properties.
|
|
91250
|
+
* @function create
|
|
91251
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91252
|
+
* @static
|
|
91253
|
+
* @param {google.spanner.v1.IChangeStreamRecord=} [properties] Properties to set
|
|
91254
|
+
* @returns {google.spanner.v1.ChangeStreamRecord} ChangeStreamRecord instance
|
|
91255
|
+
*/
|
|
91256
|
+
ChangeStreamRecord.create = function create(properties) {
|
|
91257
|
+
return new ChangeStreamRecord(properties);
|
|
91258
|
+
};
|
|
91259
|
+
|
|
91260
|
+
/**
|
|
91261
|
+
* Encodes the specified ChangeStreamRecord message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.verify|verify} messages.
|
|
91262
|
+
* @function encode
|
|
91263
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91264
|
+
* @static
|
|
91265
|
+
* @param {google.spanner.v1.IChangeStreamRecord} message ChangeStreamRecord message or plain object to encode
|
|
91266
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
91267
|
+
* @returns {$protobuf.Writer} Writer
|
|
91268
|
+
*/
|
|
91269
|
+
ChangeStreamRecord.encode = function encode(message, writer) {
|
|
91270
|
+
if (!writer)
|
|
91271
|
+
writer = $Writer.create();
|
|
91272
|
+
if (message.dataChangeRecord != null && Object.hasOwnProperty.call(message, "dataChangeRecord"))
|
|
91273
|
+
$root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.encode(message.dataChangeRecord, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
91274
|
+
if (message.heartbeatRecord != null && Object.hasOwnProperty.call(message, "heartbeatRecord"))
|
|
91275
|
+
$root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.encode(message.heartbeatRecord, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
91276
|
+
if (message.partitionStartRecord != null && Object.hasOwnProperty.call(message, "partitionStartRecord"))
|
|
91277
|
+
$root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.encode(message.partitionStartRecord, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
91278
|
+
if (message.partitionEndRecord != null && Object.hasOwnProperty.call(message, "partitionEndRecord"))
|
|
91279
|
+
$root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.encode(message.partitionEndRecord, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
91280
|
+
if (message.partitionEventRecord != null && Object.hasOwnProperty.call(message, "partitionEventRecord"))
|
|
91281
|
+
$root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.encode(message.partitionEventRecord, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
91282
|
+
return writer;
|
|
91283
|
+
};
|
|
91284
|
+
|
|
91285
|
+
/**
|
|
91286
|
+
* Encodes the specified ChangeStreamRecord message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.verify|verify} messages.
|
|
91287
|
+
* @function encodeDelimited
|
|
91288
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91289
|
+
* @static
|
|
91290
|
+
* @param {google.spanner.v1.IChangeStreamRecord} message ChangeStreamRecord message or plain object to encode
|
|
91291
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
91292
|
+
* @returns {$protobuf.Writer} Writer
|
|
91293
|
+
*/
|
|
91294
|
+
ChangeStreamRecord.encodeDelimited = function encodeDelimited(message, writer) {
|
|
91295
|
+
return this.encode(message, writer).ldelim();
|
|
91296
|
+
};
|
|
91297
|
+
|
|
91298
|
+
/**
|
|
91299
|
+
* Decodes a ChangeStreamRecord message from the specified reader or buffer.
|
|
91300
|
+
* @function decode
|
|
91301
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91302
|
+
* @static
|
|
91303
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
91304
|
+
* @param {number} [length] Message length if known beforehand
|
|
91305
|
+
* @returns {google.spanner.v1.ChangeStreamRecord} ChangeStreamRecord
|
|
91306
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
91307
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
91308
|
+
*/
|
|
91309
|
+
ChangeStreamRecord.decode = function decode(reader, length, error) {
|
|
91310
|
+
if (!(reader instanceof $Reader))
|
|
91311
|
+
reader = $Reader.create(reader);
|
|
91312
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord();
|
|
91313
|
+
while (reader.pos < end) {
|
|
91314
|
+
var tag = reader.uint32();
|
|
91315
|
+
if (tag === error)
|
|
91316
|
+
break;
|
|
91317
|
+
switch (tag >>> 3) {
|
|
91318
|
+
case 1: {
|
|
91319
|
+
message.dataChangeRecord = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.decode(reader, reader.uint32());
|
|
91320
|
+
break;
|
|
91321
|
+
}
|
|
91322
|
+
case 2: {
|
|
91323
|
+
message.heartbeatRecord = $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.decode(reader, reader.uint32());
|
|
91324
|
+
break;
|
|
91325
|
+
}
|
|
91326
|
+
case 3: {
|
|
91327
|
+
message.partitionStartRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.decode(reader, reader.uint32());
|
|
91328
|
+
break;
|
|
91329
|
+
}
|
|
91330
|
+
case 4: {
|
|
91331
|
+
message.partitionEndRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.decode(reader, reader.uint32());
|
|
91332
|
+
break;
|
|
91333
|
+
}
|
|
91334
|
+
case 5: {
|
|
91335
|
+
message.partitionEventRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.decode(reader, reader.uint32());
|
|
91336
|
+
break;
|
|
91337
|
+
}
|
|
91338
|
+
default:
|
|
91339
|
+
reader.skipType(tag & 7);
|
|
91340
|
+
break;
|
|
91341
|
+
}
|
|
91342
|
+
}
|
|
91343
|
+
return message;
|
|
91344
|
+
};
|
|
91345
|
+
|
|
91346
|
+
/**
|
|
91347
|
+
* Decodes a ChangeStreamRecord message from the specified reader or buffer, length delimited.
|
|
91348
|
+
* @function decodeDelimited
|
|
91349
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91350
|
+
* @static
|
|
91351
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
91352
|
+
* @returns {google.spanner.v1.ChangeStreamRecord} ChangeStreamRecord
|
|
91353
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
91354
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
91355
|
+
*/
|
|
91356
|
+
ChangeStreamRecord.decodeDelimited = function decodeDelimited(reader) {
|
|
91357
|
+
if (!(reader instanceof $Reader))
|
|
91358
|
+
reader = new $Reader(reader);
|
|
91359
|
+
return this.decode(reader, reader.uint32());
|
|
91360
|
+
};
|
|
91361
|
+
|
|
91362
|
+
/**
|
|
91363
|
+
* Verifies a ChangeStreamRecord message.
|
|
91364
|
+
* @function verify
|
|
91365
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91366
|
+
* @static
|
|
91367
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
91368
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
91369
|
+
*/
|
|
91370
|
+
ChangeStreamRecord.verify = function verify(message) {
|
|
91371
|
+
if (typeof message !== "object" || message === null)
|
|
91372
|
+
return "object expected";
|
|
91373
|
+
var properties = {};
|
|
91374
|
+
if (message.dataChangeRecord != null && message.hasOwnProperty("dataChangeRecord")) {
|
|
91375
|
+
properties.record = 1;
|
|
91376
|
+
{
|
|
91377
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.verify(message.dataChangeRecord);
|
|
91378
|
+
if (error)
|
|
91379
|
+
return "dataChangeRecord." + error;
|
|
91380
|
+
}
|
|
91381
|
+
}
|
|
91382
|
+
if (message.heartbeatRecord != null && message.hasOwnProperty("heartbeatRecord")) {
|
|
91383
|
+
if (properties.record === 1)
|
|
91384
|
+
return "record: multiple values";
|
|
91385
|
+
properties.record = 1;
|
|
91386
|
+
{
|
|
91387
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.verify(message.heartbeatRecord);
|
|
91388
|
+
if (error)
|
|
91389
|
+
return "heartbeatRecord." + error;
|
|
91390
|
+
}
|
|
91391
|
+
}
|
|
91392
|
+
if (message.partitionStartRecord != null && message.hasOwnProperty("partitionStartRecord")) {
|
|
91393
|
+
if (properties.record === 1)
|
|
91394
|
+
return "record: multiple values";
|
|
91395
|
+
properties.record = 1;
|
|
91396
|
+
{
|
|
91397
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.verify(message.partitionStartRecord);
|
|
91398
|
+
if (error)
|
|
91399
|
+
return "partitionStartRecord." + error;
|
|
91400
|
+
}
|
|
91401
|
+
}
|
|
91402
|
+
if (message.partitionEndRecord != null && message.hasOwnProperty("partitionEndRecord")) {
|
|
91403
|
+
if (properties.record === 1)
|
|
91404
|
+
return "record: multiple values";
|
|
91405
|
+
properties.record = 1;
|
|
91406
|
+
{
|
|
91407
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.verify(message.partitionEndRecord);
|
|
91408
|
+
if (error)
|
|
91409
|
+
return "partitionEndRecord." + error;
|
|
91410
|
+
}
|
|
91411
|
+
}
|
|
91412
|
+
if (message.partitionEventRecord != null && message.hasOwnProperty("partitionEventRecord")) {
|
|
91413
|
+
if (properties.record === 1)
|
|
91414
|
+
return "record: multiple values";
|
|
91415
|
+
properties.record = 1;
|
|
91416
|
+
{
|
|
91417
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.verify(message.partitionEventRecord);
|
|
91418
|
+
if (error)
|
|
91419
|
+
return "partitionEventRecord." + error;
|
|
91420
|
+
}
|
|
91421
|
+
}
|
|
91422
|
+
return null;
|
|
91423
|
+
};
|
|
91424
|
+
|
|
91425
|
+
/**
|
|
91426
|
+
* Creates a ChangeStreamRecord message from a plain object. Also converts values to their respective internal types.
|
|
91427
|
+
* @function fromObject
|
|
91428
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91429
|
+
* @static
|
|
91430
|
+
* @param {Object.<string,*>} object Plain object
|
|
91431
|
+
* @returns {google.spanner.v1.ChangeStreamRecord} ChangeStreamRecord
|
|
91432
|
+
*/
|
|
91433
|
+
ChangeStreamRecord.fromObject = function fromObject(object) {
|
|
91434
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord)
|
|
91435
|
+
return object;
|
|
91436
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord();
|
|
91437
|
+
if (object.dataChangeRecord != null) {
|
|
91438
|
+
if (typeof object.dataChangeRecord !== "object")
|
|
91439
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.dataChangeRecord: object expected");
|
|
91440
|
+
message.dataChangeRecord = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.fromObject(object.dataChangeRecord);
|
|
91441
|
+
}
|
|
91442
|
+
if (object.heartbeatRecord != null) {
|
|
91443
|
+
if (typeof object.heartbeatRecord !== "object")
|
|
91444
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.heartbeatRecord: object expected");
|
|
91445
|
+
message.heartbeatRecord = $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.fromObject(object.heartbeatRecord);
|
|
91446
|
+
}
|
|
91447
|
+
if (object.partitionStartRecord != null) {
|
|
91448
|
+
if (typeof object.partitionStartRecord !== "object")
|
|
91449
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.partitionStartRecord: object expected");
|
|
91450
|
+
message.partitionStartRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.fromObject(object.partitionStartRecord);
|
|
91451
|
+
}
|
|
91452
|
+
if (object.partitionEndRecord != null) {
|
|
91453
|
+
if (typeof object.partitionEndRecord !== "object")
|
|
91454
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.partitionEndRecord: object expected");
|
|
91455
|
+
message.partitionEndRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.fromObject(object.partitionEndRecord);
|
|
91456
|
+
}
|
|
91457
|
+
if (object.partitionEventRecord != null) {
|
|
91458
|
+
if (typeof object.partitionEventRecord !== "object")
|
|
91459
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.partitionEventRecord: object expected");
|
|
91460
|
+
message.partitionEventRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.fromObject(object.partitionEventRecord);
|
|
91461
|
+
}
|
|
91462
|
+
return message;
|
|
91463
|
+
};
|
|
91464
|
+
|
|
91465
|
+
/**
|
|
91466
|
+
* Creates a plain object from a ChangeStreamRecord message. Also converts values to other types if specified.
|
|
91467
|
+
* @function toObject
|
|
91468
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91469
|
+
* @static
|
|
91470
|
+
* @param {google.spanner.v1.ChangeStreamRecord} message ChangeStreamRecord
|
|
91471
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
91472
|
+
* @returns {Object.<string,*>} Plain object
|
|
91473
|
+
*/
|
|
91474
|
+
ChangeStreamRecord.toObject = function toObject(message, options) {
|
|
91475
|
+
if (!options)
|
|
91476
|
+
options = {};
|
|
91477
|
+
var object = {};
|
|
91478
|
+
if (message.dataChangeRecord != null && message.hasOwnProperty("dataChangeRecord")) {
|
|
91479
|
+
object.dataChangeRecord = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.toObject(message.dataChangeRecord, options);
|
|
91480
|
+
if (options.oneofs)
|
|
91481
|
+
object.record = "dataChangeRecord";
|
|
91482
|
+
}
|
|
91483
|
+
if (message.heartbeatRecord != null && message.hasOwnProperty("heartbeatRecord")) {
|
|
91484
|
+
object.heartbeatRecord = $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.toObject(message.heartbeatRecord, options);
|
|
91485
|
+
if (options.oneofs)
|
|
91486
|
+
object.record = "heartbeatRecord";
|
|
91487
|
+
}
|
|
91488
|
+
if (message.partitionStartRecord != null && message.hasOwnProperty("partitionStartRecord")) {
|
|
91489
|
+
object.partitionStartRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.toObject(message.partitionStartRecord, options);
|
|
91490
|
+
if (options.oneofs)
|
|
91491
|
+
object.record = "partitionStartRecord";
|
|
91492
|
+
}
|
|
91493
|
+
if (message.partitionEndRecord != null && message.hasOwnProperty("partitionEndRecord")) {
|
|
91494
|
+
object.partitionEndRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.toObject(message.partitionEndRecord, options);
|
|
91495
|
+
if (options.oneofs)
|
|
91496
|
+
object.record = "partitionEndRecord";
|
|
91497
|
+
}
|
|
91498
|
+
if (message.partitionEventRecord != null && message.hasOwnProperty("partitionEventRecord")) {
|
|
91499
|
+
object.partitionEventRecord = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.toObject(message.partitionEventRecord, options);
|
|
91500
|
+
if (options.oneofs)
|
|
91501
|
+
object.record = "partitionEventRecord";
|
|
91502
|
+
}
|
|
91503
|
+
return object;
|
|
91504
|
+
};
|
|
91505
|
+
|
|
91506
|
+
/**
|
|
91507
|
+
* Converts this ChangeStreamRecord to JSON.
|
|
91508
|
+
* @function toJSON
|
|
91509
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91510
|
+
* @instance
|
|
91511
|
+
* @returns {Object.<string,*>} JSON object
|
|
91512
|
+
*/
|
|
91513
|
+
ChangeStreamRecord.prototype.toJSON = function toJSON() {
|
|
91514
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
91515
|
+
};
|
|
91516
|
+
|
|
91517
|
+
/**
|
|
91518
|
+
* Gets the default type url for ChangeStreamRecord
|
|
91519
|
+
* @function getTypeUrl
|
|
91520
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91521
|
+
* @static
|
|
91522
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
91523
|
+
* @returns {string} The default type url
|
|
91524
|
+
*/
|
|
91525
|
+
ChangeStreamRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
91526
|
+
if (typeUrlPrefix === undefined) {
|
|
91527
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
91528
|
+
}
|
|
91529
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord";
|
|
91530
|
+
};
|
|
91531
|
+
|
|
91532
|
+
ChangeStreamRecord.DataChangeRecord = (function() {
|
|
91533
|
+
|
|
91534
|
+
/**
|
|
91535
|
+
* Properties of a DataChangeRecord.
|
|
91536
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91537
|
+
* @interface IDataChangeRecord
|
|
91538
|
+
* @property {google.protobuf.ITimestamp|null} [commitTimestamp] DataChangeRecord commitTimestamp
|
|
91539
|
+
* @property {string|null} [recordSequence] DataChangeRecord recordSequence
|
|
91540
|
+
* @property {string|null} [serverTransactionId] DataChangeRecord serverTransactionId
|
|
91541
|
+
* @property {boolean|null} [isLastRecordInTransactionInPartition] DataChangeRecord isLastRecordInTransactionInPartition
|
|
91542
|
+
* @property {string|null} [table] DataChangeRecord table
|
|
91543
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IColumnMetadata>|null} [columnMetadata] DataChangeRecord columnMetadata
|
|
91544
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IMod>|null} [mods] DataChangeRecord mods
|
|
91545
|
+
* @property {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType|null} [modType] DataChangeRecord modType
|
|
91546
|
+
* @property {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType|null} [valueCaptureType] DataChangeRecord valueCaptureType
|
|
91547
|
+
* @property {number|null} [numberOfRecordsInTransaction] DataChangeRecord numberOfRecordsInTransaction
|
|
91548
|
+
* @property {number|null} [numberOfPartitionsInTransaction] DataChangeRecord numberOfPartitionsInTransaction
|
|
91549
|
+
* @property {string|null} [transactionTag] DataChangeRecord transactionTag
|
|
91550
|
+
* @property {boolean|null} [isSystemTransaction] DataChangeRecord isSystemTransaction
|
|
91551
|
+
*/
|
|
91552
|
+
|
|
91553
|
+
/**
|
|
91554
|
+
* Constructs a new DataChangeRecord.
|
|
91555
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
91556
|
+
* @classdesc Represents a DataChangeRecord.
|
|
91557
|
+
* @implements IDataChangeRecord
|
|
91558
|
+
* @constructor
|
|
91559
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IDataChangeRecord=} [properties] Properties to set
|
|
91560
|
+
*/
|
|
91561
|
+
function DataChangeRecord(properties) {
|
|
91562
|
+
this.columnMetadata = [];
|
|
91563
|
+
this.mods = [];
|
|
91564
|
+
if (properties)
|
|
91565
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
91566
|
+
if (properties[keys[i]] != null)
|
|
91567
|
+
this[keys[i]] = properties[keys[i]];
|
|
91568
|
+
}
|
|
91569
|
+
|
|
91570
|
+
/**
|
|
91571
|
+
* DataChangeRecord commitTimestamp.
|
|
91572
|
+
* @member {google.protobuf.ITimestamp|null|undefined} commitTimestamp
|
|
91573
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91574
|
+
* @instance
|
|
91575
|
+
*/
|
|
91576
|
+
DataChangeRecord.prototype.commitTimestamp = null;
|
|
91577
|
+
|
|
91578
|
+
/**
|
|
91579
|
+
* DataChangeRecord recordSequence.
|
|
91580
|
+
* @member {string} recordSequence
|
|
91581
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91582
|
+
* @instance
|
|
91583
|
+
*/
|
|
91584
|
+
DataChangeRecord.prototype.recordSequence = "";
|
|
91585
|
+
|
|
91586
|
+
/**
|
|
91587
|
+
* DataChangeRecord serverTransactionId.
|
|
91588
|
+
* @member {string} serverTransactionId
|
|
91589
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91590
|
+
* @instance
|
|
91591
|
+
*/
|
|
91592
|
+
DataChangeRecord.prototype.serverTransactionId = "";
|
|
91593
|
+
|
|
91594
|
+
/**
|
|
91595
|
+
* DataChangeRecord isLastRecordInTransactionInPartition.
|
|
91596
|
+
* @member {boolean} isLastRecordInTransactionInPartition
|
|
91597
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91598
|
+
* @instance
|
|
91599
|
+
*/
|
|
91600
|
+
DataChangeRecord.prototype.isLastRecordInTransactionInPartition = false;
|
|
91601
|
+
|
|
91602
|
+
/**
|
|
91603
|
+
* DataChangeRecord table.
|
|
91604
|
+
* @member {string} table
|
|
91605
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91606
|
+
* @instance
|
|
91607
|
+
*/
|
|
91608
|
+
DataChangeRecord.prototype.table = "";
|
|
91609
|
+
|
|
91610
|
+
/**
|
|
91611
|
+
* DataChangeRecord columnMetadata.
|
|
91612
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IColumnMetadata>} columnMetadata
|
|
91613
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91614
|
+
* @instance
|
|
91615
|
+
*/
|
|
91616
|
+
DataChangeRecord.prototype.columnMetadata = $util.emptyArray;
|
|
91617
|
+
|
|
91618
|
+
/**
|
|
91619
|
+
* DataChangeRecord mods.
|
|
91620
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IMod>} mods
|
|
91621
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91622
|
+
* @instance
|
|
91623
|
+
*/
|
|
91624
|
+
DataChangeRecord.prototype.mods = $util.emptyArray;
|
|
91625
|
+
|
|
91626
|
+
/**
|
|
91627
|
+
* DataChangeRecord modType.
|
|
91628
|
+
* @member {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType} modType
|
|
91629
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91630
|
+
* @instance
|
|
91631
|
+
*/
|
|
91632
|
+
DataChangeRecord.prototype.modType = 0;
|
|
91633
|
+
|
|
91634
|
+
/**
|
|
91635
|
+
* DataChangeRecord valueCaptureType.
|
|
91636
|
+
* @member {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType} valueCaptureType
|
|
91637
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91638
|
+
* @instance
|
|
91639
|
+
*/
|
|
91640
|
+
DataChangeRecord.prototype.valueCaptureType = 0;
|
|
91641
|
+
|
|
91642
|
+
/**
|
|
91643
|
+
* DataChangeRecord numberOfRecordsInTransaction.
|
|
91644
|
+
* @member {number} numberOfRecordsInTransaction
|
|
91645
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91646
|
+
* @instance
|
|
91647
|
+
*/
|
|
91648
|
+
DataChangeRecord.prototype.numberOfRecordsInTransaction = 0;
|
|
91649
|
+
|
|
91650
|
+
/**
|
|
91651
|
+
* DataChangeRecord numberOfPartitionsInTransaction.
|
|
91652
|
+
* @member {number} numberOfPartitionsInTransaction
|
|
91653
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91654
|
+
* @instance
|
|
91655
|
+
*/
|
|
91656
|
+
DataChangeRecord.prototype.numberOfPartitionsInTransaction = 0;
|
|
91657
|
+
|
|
91658
|
+
/**
|
|
91659
|
+
* DataChangeRecord transactionTag.
|
|
91660
|
+
* @member {string} transactionTag
|
|
91661
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91662
|
+
* @instance
|
|
91663
|
+
*/
|
|
91664
|
+
DataChangeRecord.prototype.transactionTag = "";
|
|
91665
|
+
|
|
91666
|
+
/**
|
|
91667
|
+
* DataChangeRecord isSystemTransaction.
|
|
91668
|
+
* @member {boolean} isSystemTransaction
|
|
91669
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91670
|
+
* @instance
|
|
91671
|
+
*/
|
|
91672
|
+
DataChangeRecord.prototype.isSystemTransaction = false;
|
|
91673
|
+
|
|
91674
|
+
/**
|
|
91675
|
+
* Creates a new DataChangeRecord instance using the specified properties.
|
|
91676
|
+
* @function create
|
|
91677
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91678
|
+
* @static
|
|
91679
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IDataChangeRecord=} [properties] Properties to set
|
|
91680
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord} DataChangeRecord instance
|
|
91681
|
+
*/
|
|
91682
|
+
DataChangeRecord.create = function create(properties) {
|
|
91683
|
+
return new DataChangeRecord(properties);
|
|
91684
|
+
};
|
|
91685
|
+
|
|
91686
|
+
/**
|
|
91687
|
+
* Encodes the specified DataChangeRecord message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.verify|verify} messages.
|
|
91688
|
+
* @function encode
|
|
91689
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91690
|
+
* @static
|
|
91691
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IDataChangeRecord} message DataChangeRecord message or plain object to encode
|
|
91692
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
91693
|
+
* @returns {$protobuf.Writer} Writer
|
|
91694
|
+
*/
|
|
91695
|
+
DataChangeRecord.encode = function encode(message, writer) {
|
|
91696
|
+
if (!writer)
|
|
91697
|
+
writer = $Writer.create();
|
|
91698
|
+
if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp"))
|
|
91699
|
+
$root.google.protobuf.Timestamp.encode(message.commitTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
91700
|
+
if (message.recordSequence != null && Object.hasOwnProperty.call(message, "recordSequence"))
|
|
91701
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recordSequence);
|
|
91702
|
+
if (message.serverTransactionId != null && Object.hasOwnProperty.call(message, "serverTransactionId"))
|
|
91703
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.serverTransactionId);
|
|
91704
|
+
if (message.isLastRecordInTransactionInPartition != null && Object.hasOwnProperty.call(message, "isLastRecordInTransactionInPartition"))
|
|
91705
|
+
writer.uint32(/* id 4, wireType 0 =*/32).bool(message.isLastRecordInTransactionInPartition);
|
|
91706
|
+
if (message.table != null && Object.hasOwnProperty.call(message, "table"))
|
|
91707
|
+
writer.uint32(/* id 5, wireType 2 =*/42).string(message.table);
|
|
91708
|
+
if (message.columnMetadata != null && message.columnMetadata.length)
|
|
91709
|
+
for (var i = 0; i < message.columnMetadata.length; ++i)
|
|
91710
|
+
$root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.encode(message.columnMetadata[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
|
|
91711
|
+
if (message.mods != null && message.mods.length)
|
|
91712
|
+
for (var i = 0; i < message.mods.length; ++i)
|
|
91713
|
+
$root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.encode(message.mods[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
|
|
91714
|
+
if (message.modType != null && Object.hasOwnProperty.call(message, "modType"))
|
|
91715
|
+
writer.uint32(/* id 8, wireType 0 =*/64).int32(message.modType);
|
|
91716
|
+
if (message.valueCaptureType != null && Object.hasOwnProperty.call(message, "valueCaptureType"))
|
|
91717
|
+
writer.uint32(/* id 9, wireType 0 =*/72).int32(message.valueCaptureType);
|
|
91718
|
+
if (message.numberOfRecordsInTransaction != null && Object.hasOwnProperty.call(message, "numberOfRecordsInTransaction"))
|
|
91719
|
+
writer.uint32(/* id 10, wireType 0 =*/80).int32(message.numberOfRecordsInTransaction);
|
|
91720
|
+
if (message.numberOfPartitionsInTransaction != null && Object.hasOwnProperty.call(message, "numberOfPartitionsInTransaction"))
|
|
91721
|
+
writer.uint32(/* id 11, wireType 0 =*/88).int32(message.numberOfPartitionsInTransaction);
|
|
91722
|
+
if (message.transactionTag != null && Object.hasOwnProperty.call(message, "transactionTag"))
|
|
91723
|
+
writer.uint32(/* id 12, wireType 2 =*/98).string(message.transactionTag);
|
|
91724
|
+
if (message.isSystemTransaction != null && Object.hasOwnProperty.call(message, "isSystemTransaction"))
|
|
91725
|
+
writer.uint32(/* id 13, wireType 0 =*/104).bool(message.isSystemTransaction);
|
|
91726
|
+
return writer;
|
|
91727
|
+
};
|
|
91728
|
+
|
|
91729
|
+
/**
|
|
91730
|
+
* Encodes the specified DataChangeRecord message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.verify|verify} messages.
|
|
91731
|
+
* @function encodeDelimited
|
|
91732
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91733
|
+
* @static
|
|
91734
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IDataChangeRecord} message DataChangeRecord message or plain object to encode
|
|
91735
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
91736
|
+
* @returns {$protobuf.Writer} Writer
|
|
91737
|
+
*/
|
|
91738
|
+
DataChangeRecord.encodeDelimited = function encodeDelimited(message, writer) {
|
|
91739
|
+
return this.encode(message, writer).ldelim();
|
|
91740
|
+
};
|
|
91741
|
+
|
|
91742
|
+
/**
|
|
91743
|
+
* Decodes a DataChangeRecord message from the specified reader or buffer.
|
|
91744
|
+
* @function decode
|
|
91745
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91746
|
+
* @static
|
|
91747
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
91748
|
+
* @param {number} [length] Message length if known beforehand
|
|
91749
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord} DataChangeRecord
|
|
91750
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
91751
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
91752
|
+
*/
|
|
91753
|
+
DataChangeRecord.decode = function decode(reader, length, error) {
|
|
91754
|
+
if (!(reader instanceof $Reader))
|
|
91755
|
+
reader = $Reader.create(reader);
|
|
91756
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord();
|
|
91757
|
+
while (reader.pos < end) {
|
|
91758
|
+
var tag = reader.uint32();
|
|
91759
|
+
if (tag === error)
|
|
91760
|
+
break;
|
|
91761
|
+
switch (tag >>> 3) {
|
|
91762
|
+
case 1: {
|
|
91763
|
+
message.commitTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
91764
|
+
break;
|
|
91765
|
+
}
|
|
91766
|
+
case 2: {
|
|
91767
|
+
message.recordSequence = reader.string();
|
|
91768
|
+
break;
|
|
91769
|
+
}
|
|
91770
|
+
case 3: {
|
|
91771
|
+
message.serverTransactionId = reader.string();
|
|
91772
|
+
break;
|
|
91773
|
+
}
|
|
91774
|
+
case 4: {
|
|
91775
|
+
message.isLastRecordInTransactionInPartition = reader.bool();
|
|
91776
|
+
break;
|
|
91777
|
+
}
|
|
91778
|
+
case 5: {
|
|
91779
|
+
message.table = reader.string();
|
|
91780
|
+
break;
|
|
91781
|
+
}
|
|
91782
|
+
case 6: {
|
|
91783
|
+
if (!(message.columnMetadata && message.columnMetadata.length))
|
|
91784
|
+
message.columnMetadata = [];
|
|
91785
|
+
message.columnMetadata.push($root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.decode(reader, reader.uint32()));
|
|
91786
|
+
break;
|
|
91787
|
+
}
|
|
91788
|
+
case 7: {
|
|
91789
|
+
if (!(message.mods && message.mods.length))
|
|
91790
|
+
message.mods = [];
|
|
91791
|
+
message.mods.push($root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.decode(reader, reader.uint32()));
|
|
91792
|
+
break;
|
|
91793
|
+
}
|
|
91794
|
+
case 8: {
|
|
91795
|
+
message.modType = reader.int32();
|
|
91796
|
+
break;
|
|
91797
|
+
}
|
|
91798
|
+
case 9: {
|
|
91799
|
+
message.valueCaptureType = reader.int32();
|
|
91800
|
+
break;
|
|
91801
|
+
}
|
|
91802
|
+
case 10: {
|
|
91803
|
+
message.numberOfRecordsInTransaction = reader.int32();
|
|
91804
|
+
break;
|
|
91805
|
+
}
|
|
91806
|
+
case 11: {
|
|
91807
|
+
message.numberOfPartitionsInTransaction = reader.int32();
|
|
91808
|
+
break;
|
|
91809
|
+
}
|
|
91810
|
+
case 12: {
|
|
91811
|
+
message.transactionTag = reader.string();
|
|
91812
|
+
break;
|
|
91813
|
+
}
|
|
91814
|
+
case 13: {
|
|
91815
|
+
message.isSystemTransaction = reader.bool();
|
|
91816
|
+
break;
|
|
91817
|
+
}
|
|
91818
|
+
default:
|
|
91819
|
+
reader.skipType(tag & 7);
|
|
91820
|
+
break;
|
|
91821
|
+
}
|
|
91822
|
+
}
|
|
91823
|
+
return message;
|
|
91824
|
+
};
|
|
91825
|
+
|
|
91826
|
+
/**
|
|
91827
|
+
* Decodes a DataChangeRecord message from the specified reader or buffer, length delimited.
|
|
91828
|
+
* @function decodeDelimited
|
|
91829
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91830
|
+
* @static
|
|
91831
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
91832
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord} DataChangeRecord
|
|
91833
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
91834
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
91835
|
+
*/
|
|
91836
|
+
DataChangeRecord.decodeDelimited = function decodeDelimited(reader) {
|
|
91837
|
+
if (!(reader instanceof $Reader))
|
|
91838
|
+
reader = new $Reader(reader);
|
|
91839
|
+
return this.decode(reader, reader.uint32());
|
|
91840
|
+
};
|
|
91841
|
+
|
|
91842
|
+
/**
|
|
91843
|
+
* Verifies a DataChangeRecord message.
|
|
91844
|
+
* @function verify
|
|
91845
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91846
|
+
* @static
|
|
91847
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
91848
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
91849
|
+
*/
|
|
91850
|
+
DataChangeRecord.verify = function verify(message) {
|
|
91851
|
+
if (typeof message !== "object" || message === null)
|
|
91852
|
+
return "object expected";
|
|
91853
|
+
if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) {
|
|
91854
|
+
var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp);
|
|
91855
|
+
if (error)
|
|
91856
|
+
return "commitTimestamp." + error;
|
|
91857
|
+
}
|
|
91858
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
91859
|
+
if (!$util.isString(message.recordSequence))
|
|
91860
|
+
return "recordSequence: string expected";
|
|
91861
|
+
if (message.serverTransactionId != null && message.hasOwnProperty("serverTransactionId"))
|
|
91862
|
+
if (!$util.isString(message.serverTransactionId))
|
|
91863
|
+
return "serverTransactionId: string expected";
|
|
91864
|
+
if (message.isLastRecordInTransactionInPartition != null && message.hasOwnProperty("isLastRecordInTransactionInPartition"))
|
|
91865
|
+
if (typeof message.isLastRecordInTransactionInPartition !== "boolean")
|
|
91866
|
+
return "isLastRecordInTransactionInPartition: boolean expected";
|
|
91867
|
+
if (message.table != null && message.hasOwnProperty("table"))
|
|
91868
|
+
if (!$util.isString(message.table))
|
|
91869
|
+
return "table: string expected";
|
|
91870
|
+
if (message.columnMetadata != null && message.hasOwnProperty("columnMetadata")) {
|
|
91871
|
+
if (!Array.isArray(message.columnMetadata))
|
|
91872
|
+
return "columnMetadata: array expected";
|
|
91873
|
+
for (var i = 0; i < message.columnMetadata.length; ++i) {
|
|
91874
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.verify(message.columnMetadata[i]);
|
|
91875
|
+
if (error)
|
|
91876
|
+
return "columnMetadata." + error;
|
|
91877
|
+
}
|
|
91878
|
+
}
|
|
91879
|
+
if (message.mods != null && message.hasOwnProperty("mods")) {
|
|
91880
|
+
if (!Array.isArray(message.mods))
|
|
91881
|
+
return "mods: array expected";
|
|
91882
|
+
for (var i = 0; i < message.mods.length; ++i) {
|
|
91883
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.verify(message.mods[i]);
|
|
91884
|
+
if (error)
|
|
91885
|
+
return "mods." + error;
|
|
91886
|
+
}
|
|
91887
|
+
}
|
|
91888
|
+
if (message.modType != null && message.hasOwnProperty("modType"))
|
|
91889
|
+
switch (message.modType) {
|
|
91890
|
+
default:
|
|
91891
|
+
return "modType: enum value expected";
|
|
91892
|
+
case 0:
|
|
91893
|
+
case 10:
|
|
91894
|
+
case 20:
|
|
91895
|
+
case 30:
|
|
91896
|
+
break;
|
|
91897
|
+
}
|
|
91898
|
+
if (message.valueCaptureType != null && message.hasOwnProperty("valueCaptureType"))
|
|
91899
|
+
switch (message.valueCaptureType) {
|
|
91900
|
+
default:
|
|
91901
|
+
return "valueCaptureType: enum value expected";
|
|
91902
|
+
case 0:
|
|
91903
|
+
case 10:
|
|
91904
|
+
case 20:
|
|
91905
|
+
case 30:
|
|
91906
|
+
case 40:
|
|
91907
|
+
break;
|
|
91908
|
+
}
|
|
91909
|
+
if (message.numberOfRecordsInTransaction != null && message.hasOwnProperty("numberOfRecordsInTransaction"))
|
|
91910
|
+
if (!$util.isInteger(message.numberOfRecordsInTransaction))
|
|
91911
|
+
return "numberOfRecordsInTransaction: integer expected";
|
|
91912
|
+
if (message.numberOfPartitionsInTransaction != null && message.hasOwnProperty("numberOfPartitionsInTransaction"))
|
|
91913
|
+
if (!$util.isInteger(message.numberOfPartitionsInTransaction))
|
|
91914
|
+
return "numberOfPartitionsInTransaction: integer expected";
|
|
91915
|
+
if (message.transactionTag != null && message.hasOwnProperty("transactionTag"))
|
|
91916
|
+
if (!$util.isString(message.transactionTag))
|
|
91917
|
+
return "transactionTag: string expected";
|
|
91918
|
+
if (message.isSystemTransaction != null && message.hasOwnProperty("isSystemTransaction"))
|
|
91919
|
+
if (typeof message.isSystemTransaction !== "boolean")
|
|
91920
|
+
return "isSystemTransaction: boolean expected";
|
|
91921
|
+
return null;
|
|
91922
|
+
};
|
|
91923
|
+
|
|
91924
|
+
/**
|
|
91925
|
+
* Creates a DataChangeRecord message from a plain object. Also converts values to their respective internal types.
|
|
91926
|
+
* @function fromObject
|
|
91927
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
91928
|
+
* @static
|
|
91929
|
+
* @param {Object.<string,*>} object Plain object
|
|
91930
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord} DataChangeRecord
|
|
91931
|
+
*/
|
|
91932
|
+
DataChangeRecord.fromObject = function fromObject(object) {
|
|
91933
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord)
|
|
91934
|
+
return object;
|
|
91935
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord();
|
|
91936
|
+
if (object.commitTimestamp != null) {
|
|
91937
|
+
if (typeof object.commitTimestamp !== "object")
|
|
91938
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.commitTimestamp: object expected");
|
|
91939
|
+
message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp);
|
|
91940
|
+
}
|
|
91941
|
+
if (object.recordSequence != null)
|
|
91942
|
+
message.recordSequence = String(object.recordSequence);
|
|
91943
|
+
if (object.serverTransactionId != null)
|
|
91944
|
+
message.serverTransactionId = String(object.serverTransactionId);
|
|
91945
|
+
if (object.isLastRecordInTransactionInPartition != null)
|
|
91946
|
+
message.isLastRecordInTransactionInPartition = Boolean(object.isLastRecordInTransactionInPartition);
|
|
91947
|
+
if (object.table != null)
|
|
91948
|
+
message.table = String(object.table);
|
|
91949
|
+
if (object.columnMetadata) {
|
|
91950
|
+
if (!Array.isArray(object.columnMetadata))
|
|
91951
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.columnMetadata: array expected");
|
|
91952
|
+
message.columnMetadata = [];
|
|
91953
|
+
for (var i = 0; i < object.columnMetadata.length; ++i) {
|
|
91954
|
+
if (typeof object.columnMetadata[i] !== "object")
|
|
91955
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.columnMetadata: object expected");
|
|
91956
|
+
message.columnMetadata[i] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.fromObject(object.columnMetadata[i]);
|
|
91957
|
+
}
|
|
91958
|
+
}
|
|
91959
|
+
if (object.mods) {
|
|
91960
|
+
if (!Array.isArray(object.mods))
|
|
91961
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods: array expected");
|
|
91962
|
+
message.mods = [];
|
|
91963
|
+
for (var i = 0; i < object.mods.length; ++i) {
|
|
91964
|
+
if (typeof object.mods[i] !== "object")
|
|
91965
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods: object expected");
|
|
91966
|
+
message.mods[i] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.fromObject(object.mods[i]);
|
|
91967
|
+
}
|
|
91968
|
+
}
|
|
91969
|
+
switch (object.modType) {
|
|
91970
|
+
default:
|
|
91971
|
+
if (typeof object.modType === "number") {
|
|
91972
|
+
message.modType = object.modType;
|
|
91973
|
+
break;
|
|
91974
|
+
}
|
|
91975
|
+
break;
|
|
91976
|
+
case "MOD_TYPE_UNSPECIFIED":
|
|
91977
|
+
case 0:
|
|
91978
|
+
message.modType = 0;
|
|
91979
|
+
break;
|
|
91980
|
+
case "INSERT":
|
|
91981
|
+
case 10:
|
|
91982
|
+
message.modType = 10;
|
|
91983
|
+
break;
|
|
91984
|
+
case "UPDATE":
|
|
91985
|
+
case 20:
|
|
91986
|
+
message.modType = 20;
|
|
91987
|
+
break;
|
|
91988
|
+
case "DELETE":
|
|
91989
|
+
case 30:
|
|
91990
|
+
message.modType = 30;
|
|
91991
|
+
break;
|
|
91992
|
+
}
|
|
91993
|
+
switch (object.valueCaptureType) {
|
|
91994
|
+
default:
|
|
91995
|
+
if (typeof object.valueCaptureType === "number") {
|
|
91996
|
+
message.valueCaptureType = object.valueCaptureType;
|
|
91997
|
+
break;
|
|
91998
|
+
}
|
|
91999
|
+
break;
|
|
92000
|
+
case "VALUE_CAPTURE_TYPE_UNSPECIFIED":
|
|
92001
|
+
case 0:
|
|
92002
|
+
message.valueCaptureType = 0;
|
|
92003
|
+
break;
|
|
92004
|
+
case "OLD_AND_NEW_VALUES":
|
|
92005
|
+
case 10:
|
|
92006
|
+
message.valueCaptureType = 10;
|
|
92007
|
+
break;
|
|
92008
|
+
case "NEW_VALUES":
|
|
92009
|
+
case 20:
|
|
92010
|
+
message.valueCaptureType = 20;
|
|
92011
|
+
break;
|
|
92012
|
+
case "NEW_ROW":
|
|
92013
|
+
case 30:
|
|
92014
|
+
message.valueCaptureType = 30;
|
|
92015
|
+
break;
|
|
92016
|
+
case "NEW_ROW_AND_OLD_VALUES":
|
|
92017
|
+
case 40:
|
|
92018
|
+
message.valueCaptureType = 40;
|
|
92019
|
+
break;
|
|
92020
|
+
}
|
|
92021
|
+
if (object.numberOfRecordsInTransaction != null)
|
|
92022
|
+
message.numberOfRecordsInTransaction = object.numberOfRecordsInTransaction | 0;
|
|
92023
|
+
if (object.numberOfPartitionsInTransaction != null)
|
|
92024
|
+
message.numberOfPartitionsInTransaction = object.numberOfPartitionsInTransaction | 0;
|
|
92025
|
+
if (object.transactionTag != null)
|
|
92026
|
+
message.transactionTag = String(object.transactionTag);
|
|
92027
|
+
if (object.isSystemTransaction != null)
|
|
92028
|
+
message.isSystemTransaction = Boolean(object.isSystemTransaction);
|
|
92029
|
+
return message;
|
|
92030
|
+
};
|
|
92031
|
+
|
|
92032
|
+
/**
|
|
92033
|
+
* Creates a plain object from a DataChangeRecord message. Also converts values to other types if specified.
|
|
92034
|
+
* @function toObject
|
|
92035
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92036
|
+
* @static
|
|
92037
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord} message DataChangeRecord
|
|
92038
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
92039
|
+
* @returns {Object.<string,*>} Plain object
|
|
92040
|
+
*/
|
|
92041
|
+
DataChangeRecord.toObject = function toObject(message, options) {
|
|
92042
|
+
if (!options)
|
|
92043
|
+
options = {};
|
|
92044
|
+
var object = {};
|
|
92045
|
+
if (options.arrays || options.defaults) {
|
|
92046
|
+
object.columnMetadata = [];
|
|
92047
|
+
object.mods = [];
|
|
92048
|
+
}
|
|
92049
|
+
if (options.defaults) {
|
|
92050
|
+
object.commitTimestamp = null;
|
|
92051
|
+
object.recordSequence = "";
|
|
92052
|
+
object.serverTransactionId = "";
|
|
92053
|
+
object.isLastRecordInTransactionInPartition = false;
|
|
92054
|
+
object.table = "";
|
|
92055
|
+
object.modType = options.enums === String ? "MOD_TYPE_UNSPECIFIED" : 0;
|
|
92056
|
+
object.valueCaptureType = options.enums === String ? "VALUE_CAPTURE_TYPE_UNSPECIFIED" : 0;
|
|
92057
|
+
object.numberOfRecordsInTransaction = 0;
|
|
92058
|
+
object.numberOfPartitionsInTransaction = 0;
|
|
92059
|
+
object.transactionTag = "";
|
|
92060
|
+
object.isSystemTransaction = false;
|
|
92061
|
+
}
|
|
92062
|
+
if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp"))
|
|
92063
|
+
object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options);
|
|
92064
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
92065
|
+
object.recordSequence = message.recordSequence;
|
|
92066
|
+
if (message.serverTransactionId != null && message.hasOwnProperty("serverTransactionId"))
|
|
92067
|
+
object.serverTransactionId = message.serverTransactionId;
|
|
92068
|
+
if (message.isLastRecordInTransactionInPartition != null && message.hasOwnProperty("isLastRecordInTransactionInPartition"))
|
|
92069
|
+
object.isLastRecordInTransactionInPartition = message.isLastRecordInTransactionInPartition;
|
|
92070
|
+
if (message.table != null && message.hasOwnProperty("table"))
|
|
92071
|
+
object.table = message.table;
|
|
92072
|
+
if (message.columnMetadata && message.columnMetadata.length) {
|
|
92073
|
+
object.columnMetadata = [];
|
|
92074
|
+
for (var j = 0; j < message.columnMetadata.length; ++j)
|
|
92075
|
+
object.columnMetadata[j] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.toObject(message.columnMetadata[j], options);
|
|
92076
|
+
}
|
|
92077
|
+
if (message.mods && message.mods.length) {
|
|
92078
|
+
object.mods = [];
|
|
92079
|
+
for (var j = 0; j < message.mods.length; ++j)
|
|
92080
|
+
object.mods[j] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.toObject(message.mods[j], options);
|
|
92081
|
+
}
|
|
92082
|
+
if (message.modType != null && message.hasOwnProperty("modType"))
|
|
92083
|
+
object.modType = options.enums === String ? $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType[message.modType] === undefined ? message.modType : $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType[message.modType] : message.modType;
|
|
92084
|
+
if (message.valueCaptureType != null && message.hasOwnProperty("valueCaptureType"))
|
|
92085
|
+
object.valueCaptureType = options.enums === String ? $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType[message.valueCaptureType] === undefined ? message.valueCaptureType : $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType[message.valueCaptureType] : message.valueCaptureType;
|
|
92086
|
+
if (message.numberOfRecordsInTransaction != null && message.hasOwnProperty("numberOfRecordsInTransaction"))
|
|
92087
|
+
object.numberOfRecordsInTransaction = message.numberOfRecordsInTransaction;
|
|
92088
|
+
if (message.numberOfPartitionsInTransaction != null && message.hasOwnProperty("numberOfPartitionsInTransaction"))
|
|
92089
|
+
object.numberOfPartitionsInTransaction = message.numberOfPartitionsInTransaction;
|
|
92090
|
+
if (message.transactionTag != null && message.hasOwnProperty("transactionTag"))
|
|
92091
|
+
object.transactionTag = message.transactionTag;
|
|
92092
|
+
if (message.isSystemTransaction != null && message.hasOwnProperty("isSystemTransaction"))
|
|
92093
|
+
object.isSystemTransaction = message.isSystemTransaction;
|
|
92094
|
+
return object;
|
|
92095
|
+
};
|
|
92096
|
+
|
|
92097
|
+
/**
|
|
92098
|
+
* Converts this DataChangeRecord to JSON.
|
|
92099
|
+
* @function toJSON
|
|
92100
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92101
|
+
* @instance
|
|
92102
|
+
* @returns {Object.<string,*>} JSON object
|
|
92103
|
+
*/
|
|
92104
|
+
DataChangeRecord.prototype.toJSON = function toJSON() {
|
|
92105
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
92106
|
+
};
|
|
92107
|
+
|
|
92108
|
+
/**
|
|
92109
|
+
* Gets the default type url for DataChangeRecord
|
|
92110
|
+
* @function getTypeUrl
|
|
92111
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92112
|
+
* @static
|
|
92113
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
92114
|
+
* @returns {string} The default type url
|
|
92115
|
+
*/
|
|
92116
|
+
DataChangeRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
92117
|
+
if (typeUrlPrefix === undefined) {
|
|
92118
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
92119
|
+
}
|
|
92120
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.DataChangeRecord";
|
|
92121
|
+
};
|
|
92122
|
+
|
|
92123
|
+
DataChangeRecord.ColumnMetadata = (function() {
|
|
92124
|
+
|
|
92125
|
+
/**
|
|
92126
|
+
* Properties of a ColumnMetadata.
|
|
92127
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92128
|
+
* @interface IColumnMetadata
|
|
92129
|
+
* @property {string|null} [name] ColumnMetadata name
|
|
92130
|
+
* @property {google.spanner.v1.IType|null} [type] ColumnMetadata type
|
|
92131
|
+
* @property {boolean|null} [isPrimaryKey] ColumnMetadata isPrimaryKey
|
|
92132
|
+
* @property {number|Long|null} [ordinalPosition] ColumnMetadata ordinalPosition
|
|
92133
|
+
*/
|
|
92134
|
+
|
|
92135
|
+
/**
|
|
92136
|
+
* Constructs a new ColumnMetadata.
|
|
92137
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92138
|
+
* @classdesc Represents a ColumnMetadata.
|
|
92139
|
+
* @implements IColumnMetadata
|
|
92140
|
+
* @constructor
|
|
92141
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IColumnMetadata=} [properties] Properties to set
|
|
92142
|
+
*/
|
|
92143
|
+
function ColumnMetadata(properties) {
|
|
92144
|
+
if (properties)
|
|
92145
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
92146
|
+
if (properties[keys[i]] != null)
|
|
92147
|
+
this[keys[i]] = properties[keys[i]];
|
|
92148
|
+
}
|
|
92149
|
+
|
|
92150
|
+
/**
|
|
92151
|
+
* ColumnMetadata name.
|
|
92152
|
+
* @member {string} name
|
|
92153
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92154
|
+
* @instance
|
|
92155
|
+
*/
|
|
92156
|
+
ColumnMetadata.prototype.name = "";
|
|
92157
|
+
|
|
92158
|
+
/**
|
|
92159
|
+
* ColumnMetadata type.
|
|
92160
|
+
* @member {google.spanner.v1.IType|null|undefined} type
|
|
92161
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92162
|
+
* @instance
|
|
92163
|
+
*/
|
|
92164
|
+
ColumnMetadata.prototype.type = null;
|
|
92165
|
+
|
|
92166
|
+
/**
|
|
92167
|
+
* ColumnMetadata isPrimaryKey.
|
|
92168
|
+
* @member {boolean} isPrimaryKey
|
|
92169
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92170
|
+
* @instance
|
|
92171
|
+
*/
|
|
92172
|
+
ColumnMetadata.prototype.isPrimaryKey = false;
|
|
92173
|
+
|
|
92174
|
+
/**
|
|
92175
|
+
* ColumnMetadata ordinalPosition.
|
|
92176
|
+
* @member {number|Long} ordinalPosition
|
|
92177
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92178
|
+
* @instance
|
|
92179
|
+
*/
|
|
92180
|
+
ColumnMetadata.prototype.ordinalPosition = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
|
|
92181
|
+
|
|
92182
|
+
/**
|
|
92183
|
+
* Creates a new ColumnMetadata instance using the specified properties.
|
|
92184
|
+
* @function create
|
|
92185
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92186
|
+
* @static
|
|
92187
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IColumnMetadata=} [properties] Properties to set
|
|
92188
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} ColumnMetadata instance
|
|
92189
|
+
*/
|
|
92190
|
+
ColumnMetadata.create = function create(properties) {
|
|
92191
|
+
return new ColumnMetadata(properties);
|
|
92192
|
+
};
|
|
92193
|
+
|
|
92194
|
+
/**
|
|
92195
|
+
* Encodes the specified ColumnMetadata message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.verify|verify} messages.
|
|
92196
|
+
* @function encode
|
|
92197
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92198
|
+
* @static
|
|
92199
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IColumnMetadata} message ColumnMetadata message or plain object to encode
|
|
92200
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
92201
|
+
* @returns {$protobuf.Writer} Writer
|
|
92202
|
+
*/
|
|
92203
|
+
ColumnMetadata.encode = function encode(message, writer) {
|
|
92204
|
+
if (!writer)
|
|
92205
|
+
writer = $Writer.create();
|
|
92206
|
+
if (message.name != null && Object.hasOwnProperty.call(message, "name"))
|
|
92207
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
|
|
92208
|
+
if (message.type != null && Object.hasOwnProperty.call(message, "type"))
|
|
92209
|
+
$root.google.spanner.v1.Type.encode(message.type, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
92210
|
+
if (message.isPrimaryKey != null && Object.hasOwnProperty.call(message, "isPrimaryKey"))
|
|
92211
|
+
writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isPrimaryKey);
|
|
92212
|
+
if (message.ordinalPosition != null && Object.hasOwnProperty.call(message, "ordinalPosition"))
|
|
92213
|
+
writer.uint32(/* id 4, wireType 0 =*/32).int64(message.ordinalPosition);
|
|
92214
|
+
return writer;
|
|
92215
|
+
};
|
|
92216
|
+
|
|
92217
|
+
/**
|
|
92218
|
+
* Encodes the specified ColumnMetadata message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.verify|verify} messages.
|
|
92219
|
+
* @function encodeDelimited
|
|
92220
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92221
|
+
* @static
|
|
92222
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IColumnMetadata} message ColumnMetadata message or plain object to encode
|
|
92223
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
92224
|
+
* @returns {$protobuf.Writer} Writer
|
|
92225
|
+
*/
|
|
92226
|
+
ColumnMetadata.encodeDelimited = function encodeDelimited(message, writer) {
|
|
92227
|
+
return this.encode(message, writer).ldelim();
|
|
92228
|
+
};
|
|
92229
|
+
|
|
92230
|
+
/**
|
|
92231
|
+
* Decodes a ColumnMetadata message from the specified reader or buffer.
|
|
92232
|
+
* @function decode
|
|
92233
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92234
|
+
* @static
|
|
92235
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
92236
|
+
* @param {number} [length] Message length if known beforehand
|
|
92237
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} ColumnMetadata
|
|
92238
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
92239
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
92240
|
+
*/
|
|
92241
|
+
ColumnMetadata.decode = function decode(reader, length, error) {
|
|
92242
|
+
if (!(reader instanceof $Reader))
|
|
92243
|
+
reader = $Reader.create(reader);
|
|
92244
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata();
|
|
92245
|
+
while (reader.pos < end) {
|
|
92246
|
+
var tag = reader.uint32();
|
|
92247
|
+
if (tag === error)
|
|
92248
|
+
break;
|
|
92249
|
+
switch (tag >>> 3) {
|
|
92250
|
+
case 1: {
|
|
92251
|
+
message.name = reader.string();
|
|
92252
|
+
break;
|
|
92253
|
+
}
|
|
92254
|
+
case 2: {
|
|
92255
|
+
message.type = $root.google.spanner.v1.Type.decode(reader, reader.uint32());
|
|
92256
|
+
break;
|
|
92257
|
+
}
|
|
92258
|
+
case 3: {
|
|
92259
|
+
message.isPrimaryKey = reader.bool();
|
|
92260
|
+
break;
|
|
92261
|
+
}
|
|
92262
|
+
case 4: {
|
|
92263
|
+
message.ordinalPosition = reader.int64();
|
|
92264
|
+
break;
|
|
92265
|
+
}
|
|
92266
|
+
default:
|
|
92267
|
+
reader.skipType(tag & 7);
|
|
92268
|
+
break;
|
|
92269
|
+
}
|
|
92270
|
+
}
|
|
92271
|
+
return message;
|
|
92272
|
+
};
|
|
92273
|
+
|
|
92274
|
+
/**
|
|
92275
|
+
* Decodes a ColumnMetadata message from the specified reader or buffer, length delimited.
|
|
92276
|
+
* @function decodeDelimited
|
|
92277
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92278
|
+
* @static
|
|
92279
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
92280
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} ColumnMetadata
|
|
92281
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
92282
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
92283
|
+
*/
|
|
92284
|
+
ColumnMetadata.decodeDelimited = function decodeDelimited(reader) {
|
|
92285
|
+
if (!(reader instanceof $Reader))
|
|
92286
|
+
reader = new $Reader(reader);
|
|
92287
|
+
return this.decode(reader, reader.uint32());
|
|
92288
|
+
};
|
|
92289
|
+
|
|
92290
|
+
/**
|
|
92291
|
+
* Verifies a ColumnMetadata message.
|
|
92292
|
+
* @function verify
|
|
92293
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92294
|
+
* @static
|
|
92295
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
92296
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
92297
|
+
*/
|
|
92298
|
+
ColumnMetadata.verify = function verify(message) {
|
|
92299
|
+
if (typeof message !== "object" || message === null)
|
|
92300
|
+
return "object expected";
|
|
92301
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
92302
|
+
if (!$util.isString(message.name))
|
|
92303
|
+
return "name: string expected";
|
|
92304
|
+
if (message.type != null && message.hasOwnProperty("type")) {
|
|
92305
|
+
var error = $root.google.spanner.v1.Type.verify(message.type);
|
|
92306
|
+
if (error)
|
|
92307
|
+
return "type." + error;
|
|
92308
|
+
}
|
|
92309
|
+
if (message.isPrimaryKey != null && message.hasOwnProperty("isPrimaryKey"))
|
|
92310
|
+
if (typeof message.isPrimaryKey !== "boolean")
|
|
92311
|
+
return "isPrimaryKey: boolean expected";
|
|
92312
|
+
if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition"))
|
|
92313
|
+
if (!$util.isInteger(message.ordinalPosition) && !(message.ordinalPosition && $util.isInteger(message.ordinalPosition.low) && $util.isInteger(message.ordinalPosition.high)))
|
|
92314
|
+
return "ordinalPosition: integer|Long expected";
|
|
92315
|
+
return null;
|
|
92316
|
+
};
|
|
92317
|
+
|
|
92318
|
+
/**
|
|
92319
|
+
* Creates a ColumnMetadata message from a plain object. Also converts values to their respective internal types.
|
|
92320
|
+
* @function fromObject
|
|
92321
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92322
|
+
* @static
|
|
92323
|
+
* @param {Object.<string,*>} object Plain object
|
|
92324
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} ColumnMetadata
|
|
92325
|
+
*/
|
|
92326
|
+
ColumnMetadata.fromObject = function fromObject(object) {
|
|
92327
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata)
|
|
92328
|
+
return object;
|
|
92329
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata();
|
|
92330
|
+
if (object.name != null)
|
|
92331
|
+
message.name = String(object.name);
|
|
92332
|
+
if (object.type != null) {
|
|
92333
|
+
if (typeof object.type !== "object")
|
|
92334
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.type: object expected");
|
|
92335
|
+
message.type = $root.google.spanner.v1.Type.fromObject(object.type);
|
|
92336
|
+
}
|
|
92337
|
+
if (object.isPrimaryKey != null)
|
|
92338
|
+
message.isPrimaryKey = Boolean(object.isPrimaryKey);
|
|
92339
|
+
if (object.ordinalPosition != null)
|
|
92340
|
+
if ($util.Long)
|
|
92341
|
+
(message.ordinalPosition = $util.Long.fromValue(object.ordinalPosition)).unsigned = false;
|
|
92342
|
+
else if (typeof object.ordinalPosition === "string")
|
|
92343
|
+
message.ordinalPosition = parseInt(object.ordinalPosition, 10);
|
|
92344
|
+
else if (typeof object.ordinalPosition === "number")
|
|
92345
|
+
message.ordinalPosition = object.ordinalPosition;
|
|
92346
|
+
else if (typeof object.ordinalPosition === "object")
|
|
92347
|
+
message.ordinalPosition = new $util.LongBits(object.ordinalPosition.low >>> 0, object.ordinalPosition.high >>> 0).toNumber();
|
|
92348
|
+
return message;
|
|
92349
|
+
};
|
|
92350
|
+
|
|
92351
|
+
/**
|
|
92352
|
+
* Creates a plain object from a ColumnMetadata message. Also converts values to other types if specified.
|
|
92353
|
+
* @function toObject
|
|
92354
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92355
|
+
* @static
|
|
92356
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} message ColumnMetadata
|
|
92357
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
92358
|
+
* @returns {Object.<string,*>} Plain object
|
|
92359
|
+
*/
|
|
92360
|
+
ColumnMetadata.toObject = function toObject(message, options) {
|
|
92361
|
+
if (!options)
|
|
92362
|
+
options = {};
|
|
92363
|
+
var object = {};
|
|
92364
|
+
if (options.defaults) {
|
|
92365
|
+
object.name = "";
|
|
92366
|
+
object.type = null;
|
|
92367
|
+
object.isPrimaryKey = false;
|
|
92368
|
+
if ($util.Long) {
|
|
92369
|
+
var long = new $util.Long(0, 0, false);
|
|
92370
|
+
object.ordinalPosition = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
|
|
92371
|
+
} else
|
|
92372
|
+
object.ordinalPosition = options.longs === String ? "0" : 0;
|
|
92373
|
+
}
|
|
92374
|
+
if (message.name != null && message.hasOwnProperty("name"))
|
|
92375
|
+
object.name = message.name;
|
|
92376
|
+
if (message.type != null && message.hasOwnProperty("type"))
|
|
92377
|
+
object.type = $root.google.spanner.v1.Type.toObject(message.type, options);
|
|
92378
|
+
if (message.isPrimaryKey != null && message.hasOwnProperty("isPrimaryKey"))
|
|
92379
|
+
object.isPrimaryKey = message.isPrimaryKey;
|
|
92380
|
+
if (message.ordinalPosition != null && message.hasOwnProperty("ordinalPosition"))
|
|
92381
|
+
if (typeof message.ordinalPosition === "number")
|
|
92382
|
+
object.ordinalPosition = options.longs === String ? String(message.ordinalPosition) : message.ordinalPosition;
|
|
92383
|
+
else
|
|
92384
|
+
object.ordinalPosition = options.longs === String ? $util.Long.prototype.toString.call(message.ordinalPosition) : options.longs === Number ? new $util.LongBits(message.ordinalPosition.low >>> 0, message.ordinalPosition.high >>> 0).toNumber() : message.ordinalPosition;
|
|
92385
|
+
return object;
|
|
92386
|
+
};
|
|
92387
|
+
|
|
92388
|
+
/**
|
|
92389
|
+
* Converts this ColumnMetadata to JSON.
|
|
92390
|
+
* @function toJSON
|
|
92391
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92392
|
+
* @instance
|
|
92393
|
+
* @returns {Object.<string,*>} JSON object
|
|
92394
|
+
*/
|
|
92395
|
+
ColumnMetadata.prototype.toJSON = function toJSON() {
|
|
92396
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
92397
|
+
};
|
|
92398
|
+
|
|
92399
|
+
/**
|
|
92400
|
+
* Gets the default type url for ColumnMetadata
|
|
92401
|
+
* @function getTypeUrl
|
|
92402
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
|
|
92403
|
+
* @static
|
|
92404
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
92405
|
+
* @returns {string} The default type url
|
|
92406
|
+
*/
|
|
92407
|
+
ColumnMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
92408
|
+
if (typeUrlPrefix === undefined) {
|
|
92409
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
92410
|
+
}
|
|
92411
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata";
|
|
92412
|
+
};
|
|
92413
|
+
|
|
92414
|
+
return ColumnMetadata;
|
|
92415
|
+
})();
|
|
92416
|
+
|
|
92417
|
+
DataChangeRecord.ModValue = (function() {
|
|
92418
|
+
|
|
92419
|
+
/**
|
|
92420
|
+
* Properties of a ModValue.
|
|
92421
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92422
|
+
* @interface IModValue
|
|
92423
|
+
* @property {number|null} [columnMetadataIndex] ModValue columnMetadataIndex
|
|
92424
|
+
* @property {google.protobuf.IValue|null} [value] ModValue value
|
|
92425
|
+
*/
|
|
92426
|
+
|
|
92427
|
+
/**
|
|
92428
|
+
* Constructs a new ModValue.
|
|
92429
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92430
|
+
* @classdesc Represents a ModValue.
|
|
92431
|
+
* @implements IModValue
|
|
92432
|
+
* @constructor
|
|
92433
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue=} [properties] Properties to set
|
|
92434
|
+
*/
|
|
92435
|
+
function ModValue(properties) {
|
|
92436
|
+
if (properties)
|
|
92437
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
92438
|
+
if (properties[keys[i]] != null)
|
|
92439
|
+
this[keys[i]] = properties[keys[i]];
|
|
92440
|
+
}
|
|
92441
|
+
|
|
92442
|
+
/**
|
|
92443
|
+
* ModValue columnMetadataIndex.
|
|
92444
|
+
* @member {number} columnMetadataIndex
|
|
92445
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92446
|
+
* @instance
|
|
92447
|
+
*/
|
|
92448
|
+
ModValue.prototype.columnMetadataIndex = 0;
|
|
92449
|
+
|
|
92450
|
+
/**
|
|
92451
|
+
* ModValue value.
|
|
92452
|
+
* @member {google.protobuf.IValue|null|undefined} value
|
|
92453
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92454
|
+
* @instance
|
|
92455
|
+
*/
|
|
92456
|
+
ModValue.prototype.value = null;
|
|
92457
|
+
|
|
92458
|
+
/**
|
|
92459
|
+
* Creates a new ModValue instance using the specified properties.
|
|
92460
|
+
* @function create
|
|
92461
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92462
|
+
* @static
|
|
92463
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue=} [properties] Properties to set
|
|
92464
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} ModValue instance
|
|
92465
|
+
*/
|
|
92466
|
+
ModValue.create = function create(properties) {
|
|
92467
|
+
return new ModValue(properties);
|
|
92468
|
+
};
|
|
92469
|
+
|
|
92470
|
+
/**
|
|
92471
|
+
* Encodes the specified ModValue message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.verify|verify} messages.
|
|
92472
|
+
* @function encode
|
|
92473
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92474
|
+
* @static
|
|
92475
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue} message ModValue message or plain object to encode
|
|
92476
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
92477
|
+
* @returns {$protobuf.Writer} Writer
|
|
92478
|
+
*/
|
|
92479
|
+
ModValue.encode = function encode(message, writer) {
|
|
92480
|
+
if (!writer)
|
|
92481
|
+
writer = $Writer.create();
|
|
92482
|
+
if (message.columnMetadataIndex != null && Object.hasOwnProperty.call(message, "columnMetadataIndex"))
|
|
92483
|
+
writer.uint32(/* id 1, wireType 0 =*/8).int32(message.columnMetadataIndex);
|
|
92484
|
+
if (message.value != null && Object.hasOwnProperty.call(message, "value"))
|
|
92485
|
+
$root.google.protobuf.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
92486
|
+
return writer;
|
|
92487
|
+
};
|
|
92488
|
+
|
|
92489
|
+
/**
|
|
92490
|
+
* Encodes the specified ModValue message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.verify|verify} messages.
|
|
92491
|
+
* @function encodeDelimited
|
|
92492
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92493
|
+
* @static
|
|
92494
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue} message ModValue message or plain object to encode
|
|
92495
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
92496
|
+
* @returns {$protobuf.Writer} Writer
|
|
92497
|
+
*/
|
|
92498
|
+
ModValue.encodeDelimited = function encodeDelimited(message, writer) {
|
|
92499
|
+
return this.encode(message, writer).ldelim();
|
|
92500
|
+
};
|
|
92501
|
+
|
|
92502
|
+
/**
|
|
92503
|
+
* Decodes a ModValue message from the specified reader or buffer.
|
|
92504
|
+
* @function decode
|
|
92505
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92506
|
+
* @static
|
|
92507
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
92508
|
+
* @param {number} [length] Message length if known beforehand
|
|
92509
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} ModValue
|
|
92510
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
92511
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
92512
|
+
*/
|
|
92513
|
+
ModValue.decode = function decode(reader, length, error) {
|
|
92514
|
+
if (!(reader instanceof $Reader))
|
|
92515
|
+
reader = $Reader.create(reader);
|
|
92516
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue();
|
|
92517
|
+
while (reader.pos < end) {
|
|
92518
|
+
var tag = reader.uint32();
|
|
92519
|
+
if (tag === error)
|
|
92520
|
+
break;
|
|
92521
|
+
switch (tag >>> 3) {
|
|
92522
|
+
case 1: {
|
|
92523
|
+
message.columnMetadataIndex = reader.int32();
|
|
92524
|
+
break;
|
|
92525
|
+
}
|
|
92526
|
+
case 2: {
|
|
92527
|
+
message.value = $root.google.protobuf.Value.decode(reader, reader.uint32());
|
|
92528
|
+
break;
|
|
92529
|
+
}
|
|
92530
|
+
default:
|
|
92531
|
+
reader.skipType(tag & 7);
|
|
92532
|
+
break;
|
|
92533
|
+
}
|
|
92534
|
+
}
|
|
92535
|
+
return message;
|
|
92536
|
+
};
|
|
92537
|
+
|
|
92538
|
+
/**
|
|
92539
|
+
* Decodes a ModValue message from the specified reader or buffer, length delimited.
|
|
92540
|
+
* @function decodeDelimited
|
|
92541
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92542
|
+
* @static
|
|
92543
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
92544
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} ModValue
|
|
92545
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
92546
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
92547
|
+
*/
|
|
92548
|
+
ModValue.decodeDelimited = function decodeDelimited(reader) {
|
|
92549
|
+
if (!(reader instanceof $Reader))
|
|
92550
|
+
reader = new $Reader(reader);
|
|
92551
|
+
return this.decode(reader, reader.uint32());
|
|
92552
|
+
};
|
|
92553
|
+
|
|
92554
|
+
/**
|
|
92555
|
+
* Verifies a ModValue message.
|
|
92556
|
+
* @function verify
|
|
92557
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92558
|
+
* @static
|
|
92559
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
92560
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
92561
|
+
*/
|
|
92562
|
+
ModValue.verify = function verify(message) {
|
|
92563
|
+
if (typeof message !== "object" || message === null)
|
|
92564
|
+
return "object expected";
|
|
92565
|
+
if (message.columnMetadataIndex != null && message.hasOwnProperty("columnMetadataIndex"))
|
|
92566
|
+
if (!$util.isInteger(message.columnMetadataIndex))
|
|
92567
|
+
return "columnMetadataIndex: integer expected";
|
|
92568
|
+
if (message.value != null && message.hasOwnProperty("value")) {
|
|
92569
|
+
var error = $root.google.protobuf.Value.verify(message.value);
|
|
92570
|
+
if (error)
|
|
92571
|
+
return "value." + error;
|
|
92572
|
+
}
|
|
92573
|
+
return null;
|
|
92574
|
+
};
|
|
92575
|
+
|
|
92576
|
+
/**
|
|
92577
|
+
* Creates a ModValue message from a plain object. Also converts values to their respective internal types.
|
|
92578
|
+
* @function fromObject
|
|
92579
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92580
|
+
* @static
|
|
92581
|
+
* @param {Object.<string,*>} object Plain object
|
|
92582
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} ModValue
|
|
92583
|
+
*/
|
|
92584
|
+
ModValue.fromObject = function fromObject(object) {
|
|
92585
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue)
|
|
92586
|
+
return object;
|
|
92587
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue();
|
|
92588
|
+
if (object.columnMetadataIndex != null)
|
|
92589
|
+
message.columnMetadataIndex = object.columnMetadataIndex | 0;
|
|
92590
|
+
if (object.value != null) {
|
|
92591
|
+
if (typeof object.value !== "object")
|
|
92592
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.value: object expected");
|
|
92593
|
+
message.value = $root.google.protobuf.Value.fromObject(object.value);
|
|
92594
|
+
}
|
|
92595
|
+
return message;
|
|
92596
|
+
};
|
|
92597
|
+
|
|
92598
|
+
/**
|
|
92599
|
+
* Creates a plain object from a ModValue message. Also converts values to other types if specified.
|
|
92600
|
+
* @function toObject
|
|
92601
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92602
|
+
* @static
|
|
92603
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} message ModValue
|
|
92604
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
92605
|
+
* @returns {Object.<string,*>} Plain object
|
|
92606
|
+
*/
|
|
92607
|
+
ModValue.toObject = function toObject(message, options) {
|
|
92608
|
+
if (!options)
|
|
92609
|
+
options = {};
|
|
92610
|
+
var object = {};
|
|
92611
|
+
if (options.defaults) {
|
|
92612
|
+
object.columnMetadataIndex = 0;
|
|
92613
|
+
object.value = null;
|
|
92614
|
+
}
|
|
92615
|
+
if (message.columnMetadataIndex != null && message.hasOwnProperty("columnMetadataIndex"))
|
|
92616
|
+
object.columnMetadataIndex = message.columnMetadataIndex;
|
|
92617
|
+
if (message.value != null && message.hasOwnProperty("value"))
|
|
92618
|
+
object.value = $root.google.protobuf.Value.toObject(message.value, options);
|
|
92619
|
+
return object;
|
|
92620
|
+
};
|
|
92621
|
+
|
|
92622
|
+
/**
|
|
92623
|
+
* Converts this ModValue to JSON.
|
|
92624
|
+
* @function toJSON
|
|
92625
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92626
|
+
* @instance
|
|
92627
|
+
* @returns {Object.<string,*>} JSON object
|
|
92628
|
+
*/
|
|
92629
|
+
ModValue.prototype.toJSON = function toJSON() {
|
|
92630
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
92631
|
+
};
|
|
92632
|
+
|
|
92633
|
+
/**
|
|
92634
|
+
* Gets the default type url for ModValue
|
|
92635
|
+
* @function getTypeUrl
|
|
92636
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
|
|
92637
|
+
* @static
|
|
92638
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
92639
|
+
* @returns {string} The default type url
|
|
92640
|
+
*/
|
|
92641
|
+
ModValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
92642
|
+
if (typeUrlPrefix === undefined) {
|
|
92643
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
92644
|
+
}
|
|
92645
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue";
|
|
92646
|
+
};
|
|
92647
|
+
|
|
92648
|
+
return ModValue;
|
|
92649
|
+
})();
|
|
92650
|
+
|
|
92651
|
+
DataChangeRecord.Mod = (function() {
|
|
92652
|
+
|
|
92653
|
+
/**
|
|
92654
|
+
* Properties of a Mod.
|
|
92655
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92656
|
+
* @interface IMod
|
|
92657
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue>|null} [keys] Mod keys
|
|
92658
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue>|null} [oldValues] Mod oldValues
|
|
92659
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue>|null} [newValues] Mod newValues
|
|
92660
|
+
*/
|
|
92661
|
+
|
|
92662
|
+
/**
|
|
92663
|
+
* Constructs a new Mod.
|
|
92664
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord
|
|
92665
|
+
* @classdesc Represents a Mod.
|
|
92666
|
+
* @implements IMod
|
|
92667
|
+
* @constructor
|
|
92668
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IMod=} [properties] Properties to set
|
|
92669
|
+
*/
|
|
92670
|
+
function Mod(properties) {
|
|
92671
|
+
this.keys = [];
|
|
92672
|
+
this.oldValues = [];
|
|
92673
|
+
this.newValues = [];
|
|
92674
|
+
if (properties)
|
|
92675
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
92676
|
+
if (properties[keys[i]] != null)
|
|
92677
|
+
this[keys[i]] = properties[keys[i]];
|
|
92678
|
+
}
|
|
92679
|
+
|
|
92680
|
+
/**
|
|
92681
|
+
* Mod keys.
|
|
92682
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue>} keys
|
|
92683
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92684
|
+
* @instance
|
|
92685
|
+
*/
|
|
92686
|
+
Mod.prototype.keys = $util.emptyArray;
|
|
92687
|
+
|
|
92688
|
+
/**
|
|
92689
|
+
* Mod oldValues.
|
|
92690
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue>} oldValues
|
|
92691
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92692
|
+
* @instance
|
|
92693
|
+
*/
|
|
92694
|
+
Mod.prototype.oldValues = $util.emptyArray;
|
|
92695
|
+
|
|
92696
|
+
/**
|
|
92697
|
+
* Mod newValues.
|
|
92698
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IModValue>} newValues
|
|
92699
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92700
|
+
* @instance
|
|
92701
|
+
*/
|
|
92702
|
+
Mod.prototype.newValues = $util.emptyArray;
|
|
92703
|
+
|
|
92704
|
+
/**
|
|
92705
|
+
* Creates a new Mod instance using the specified properties.
|
|
92706
|
+
* @function create
|
|
92707
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92708
|
+
* @static
|
|
92709
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IMod=} [properties] Properties to set
|
|
92710
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} Mod instance
|
|
92711
|
+
*/
|
|
92712
|
+
Mod.create = function create(properties) {
|
|
92713
|
+
return new Mod(properties);
|
|
92714
|
+
};
|
|
92715
|
+
|
|
92716
|
+
/**
|
|
92717
|
+
* Encodes the specified Mod message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.verify|verify} messages.
|
|
92718
|
+
* @function encode
|
|
92719
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92720
|
+
* @static
|
|
92721
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IMod} message Mod message or plain object to encode
|
|
92722
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
92723
|
+
* @returns {$protobuf.Writer} Writer
|
|
92724
|
+
*/
|
|
92725
|
+
Mod.encode = function encode(message, writer) {
|
|
92726
|
+
if (!writer)
|
|
92727
|
+
writer = $Writer.create();
|
|
92728
|
+
if (message.keys != null && message.keys.length)
|
|
92729
|
+
for (var i = 0; i < message.keys.length; ++i)
|
|
92730
|
+
$root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
92731
|
+
if (message.oldValues != null && message.oldValues.length)
|
|
92732
|
+
for (var i = 0; i < message.oldValues.length; ++i)
|
|
92733
|
+
$root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.encode(message.oldValues[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
|
|
92734
|
+
if (message.newValues != null && message.newValues.length)
|
|
92735
|
+
for (var i = 0; i < message.newValues.length; ++i)
|
|
92736
|
+
$root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.encode(message.newValues[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
|
|
92737
|
+
return writer;
|
|
92738
|
+
};
|
|
92739
|
+
|
|
92740
|
+
/**
|
|
92741
|
+
* Encodes the specified Mod message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.verify|verify} messages.
|
|
92742
|
+
* @function encodeDelimited
|
|
92743
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92744
|
+
* @static
|
|
92745
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.IMod} message Mod message or plain object to encode
|
|
92746
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
92747
|
+
* @returns {$protobuf.Writer} Writer
|
|
92748
|
+
*/
|
|
92749
|
+
Mod.encodeDelimited = function encodeDelimited(message, writer) {
|
|
92750
|
+
return this.encode(message, writer).ldelim();
|
|
92751
|
+
};
|
|
92752
|
+
|
|
92753
|
+
/**
|
|
92754
|
+
* Decodes a Mod message from the specified reader or buffer.
|
|
92755
|
+
* @function decode
|
|
92756
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92757
|
+
* @static
|
|
92758
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
92759
|
+
* @param {number} [length] Message length if known beforehand
|
|
92760
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} Mod
|
|
92761
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
92762
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
92763
|
+
*/
|
|
92764
|
+
Mod.decode = function decode(reader, length, error) {
|
|
92765
|
+
if (!(reader instanceof $Reader))
|
|
92766
|
+
reader = $Reader.create(reader);
|
|
92767
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod();
|
|
92768
|
+
while (reader.pos < end) {
|
|
92769
|
+
var tag = reader.uint32();
|
|
92770
|
+
if (tag === error)
|
|
92771
|
+
break;
|
|
92772
|
+
switch (tag >>> 3) {
|
|
92773
|
+
case 1: {
|
|
92774
|
+
if (!(message.keys && message.keys.length))
|
|
92775
|
+
message.keys = [];
|
|
92776
|
+
message.keys.push($root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.decode(reader, reader.uint32()));
|
|
92777
|
+
break;
|
|
92778
|
+
}
|
|
92779
|
+
case 2: {
|
|
92780
|
+
if (!(message.oldValues && message.oldValues.length))
|
|
92781
|
+
message.oldValues = [];
|
|
92782
|
+
message.oldValues.push($root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.decode(reader, reader.uint32()));
|
|
92783
|
+
break;
|
|
92784
|
+
}
|
|
92785
|
+
case 3: {
|
|
92786
|
+
if (!(message.newValues && message.newValues.length))
|
|
92787
|
+
message.newValues = [];
|
|
92788
|
+
message.newValues.push($root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.decode(reader, reader.uint32()));
|
|
92789
|
+
break;
|
|
92790
|
+
}
|
|
92791
|
+
default:
|
|
92792
|
+
reader.skipType(tag & 7);
|
|
92793
|
+
break;
|
|
92794
|
+
}
|
|
92795
|
+
}
|
|
92796
|
+
return message;
|
|
92797
|
+
};
|
|
92798
|
+
|
|
92799
|
+
/**
|
|
92800
|
+
* Decodes a Mod message from the specified reader or buffer, length delimited.
|
|
92801
|
+
* @function decodeDelimited
|
|
92802
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92803
|
+
* @static
|
|
92804
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
92805
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} Mod
|
|
92806
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
92807
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
92808
|
+
*/
|
|
92809
|
+
Mod.decodeDelimited = function decodeDelimited(reader) {
|
|
92810
|
+
if (!(reader instanceof $Reader))
|
|
92811
|
+
reader = new $Reader(reader);
|
|
92812
|
+
return this.decode(reader, reader.uint32());
|
|
92813
|
+
};
|
|
92814
|
+
|
|
92815
|
+
/**
|
|
92816
|
+
* Verifies a Mod message.
|
|
92817
|
+
* @function verify
|
|
92818
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92819
|
+
* @static
|
|
92820
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
92821
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
92822
|
+
*/
|
|
92823
|
+
Mod.verify = function verify(message) {
|
|
92824
|
+
if (typeof message !== "object" || message === null)
|
|
92825
|
+
return "object expected";
|
|
92826
|
+
if (message.keys != null && message.hasOwnProperty("keys")) {
|
|
92827
|
+
if (!Array.isArray(message.keys))
|
|
92828
|
+
return "keys: array expected";
|
|
92829
|
+
for (var i = 0; i < message.keys.length; ++i) {
|
|
92830
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.verify(message.keys[i]);
|
|
92831
|
+
if (error)
|
|
92832
|
+
return "keys." + error;
|
|
92833
|
+
}
|
|
92834
|
+
}
|
|
92835
|
+
if (message.oldValues != null && message.hasOwnProperty("oldValues")) {
|
|
92836
|
+
if (!Array.isArray(message.oldValues))
|
|
92837
|
+
return "oldValues: array expected";
|
|
92838
|
+
for (var i = 0; i < message.oldValues.length; ++i) {
|
|
92839
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.verify(message.oldValues[i]);
|
|
92840
|
+
if (error)
|
|
92841
|
+
return "oldValues." + error;
|
|
92842
|
+
}
|
|
92843
|
+
}
|
|
92844
|
+
if (message.newValues != null && message.hasOwnProperty("newValues")) {
|
|
92845
|
+
if (!Array.isArray(message.newValues))
|
|
92846
|
+
return "newValues: array expected";
|
|
92847
|
+
for (var i = 0; i < message.newValues.length; ++i) {
|
|
92848
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.verify(message.newValues[i]);
|
|
92849
|
+
if (error)
|
|
92850
|
+
return "newValues." + error;
|
|
92851
|
+
}
|
|
92852
|
+
}
|
|
92853
|
+
return null;
|
|
92854
|
+
};
|
|
92855
|
+
|
|
92856
|
+
/**
|
|
92857
|
+
* Creates a Mod message from a plain object. Also converts values to their respective internal types.
|
|
92858
|
+
* @function fromObject
|
|
92859
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92860
|
+
* @static
|
|
92861
|
+
* @param {Object.<string,*>} object Plain object
|
|
92862
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} Mod
|
|
92863
|
+
*/
|
|
92864
|
+
Mod.fromObject = function fromObject(object) {
|
|
92865
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod)
|
|
92866
|
+
return object;
|
|
92867
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod();
|
|
92868
|
+
if (object.keys) {
|
|
92869
|
+
if (!Array.isArray(object.keys))
|
|
92870
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.keys: array expected");
|
|
92871
|
+
message.keys = [];
|
|
92872
|
+
for (var i = 0; i < object.keys.length; ++i) {
|
|
92873
|
+
if (typeof object.keys[i] !== "object")
|
|
92874
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.keys: object expected");
|
|
92875
|
+
message.keys[i] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.fromObject(object.keys[i]);
|
|
92876
|
+
}
|
|
92877
|
+
}
|
|
92878
|
+
if (object.oldValues) {
|
|
92879
|
+
if (!Array.isArray(object.oldValues))
|
|
92880
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.oldValues: array expected");
|
|
92881
|
+
message.oldValues = [];
|
|
92882
|
+
for (var i = 0; i < object.oldValues.length; ++i) {
|
|
92883
|
+
if (typeof object.oldValues[i] !== "object")
|
|
92884
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.oldValues: object expected");
|
|
92885
|
+
message.oldValues[i] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.fromObject(object.oldValues[i]);
|
|
92886
|
+
}
|
|
92887
|
+
}
|
|
92888
|
+
if (object.newValues) {
|
|
92889
|
+
if (!Array.isArray(object.newValues))
|
|
92890
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.newValues: array expected");
|
|
92891
|
+
message.newValues = [];
|
|
92892
|
+
for (var i = 0; i < object.newValues.length; ++i) {
|
|
92893
|
+
if (typeof object.newValues[i] !== "object")
|
|
92894
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.newValues: object expected");
|
|
92895
|
+
message.newValues[i] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.fromObject(object.newValues[i]);
|
|
92896
|
+
}
|
|
92897
|
+
}
|
|
92898
|
+
return message;
|
|
92899
|
+
};
|
|
92900
|
+
|
|
92901
|
+
/**
|
|
92902
|
+
* Creates a plain object from a Mod message. Also converts values to other types if specified.
|
|
92903
|
+
* @function toObject
|
|
92904
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92905
|
+
* @static
|
|
92906
|
+
* @param {google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} message Mod
|
|
92907
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
92908
|
+
* @returns {Object.<string,*>} Plain object
|
|
92909
|
+
*/
|
|
92910
|
+
Mod.toObject = function toObject(message, options) {
|
|
92911
|
+
if (!options)
|
|
92912
|
+
options = {};
|
|
92913
|
+
var object = {};
|
|
92914
|
+
if (options.arrays || options.defaults) {
|
|
92915
|
+
object.keys = [];
|
|
92916
|
+
object.oldValues = [];
|
|
92917
|
+
object.newValues = [];
|
|
92918
|
+
}
|
|
92919
|
+
if (message.keys && message.keys.length) {
|
|
92920
|
+
object.keys = [];
|
|
92921
|
+
for (var j = 0; j < message.keys.length; ++j)
|
|
92922
|
+
object.keys[j] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.toObject(message.keys[j], options);
|
|
92923
|
+
}
|
|
92924
|
+
if (message.oldValues && message.oldValues.length) {
|
|
92925
|
+
object.oldValues = [];
|
|
92926
|
+
for (var j = 0; j < message.oldValues.length; ++j)
|
|
92927
|
+
object.oldValues[j] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.toObject(message.oldValues[j], options);
|
|
92928
|
+
}
|
|
92929
|
+
if (message.newValues && message.newValues.length) {
|
|
92930
|
+
object.newValues = [];
|
|
92931
|
+
for (var j = 0; j < message.newValues.length; ++j)
|
|
92932
|
+
object.newValues[j] = $root.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.toObject(message.newValues[j], options);
|
|
92933
|
+
}
|
|
92934
|
+
return object;
|
|
92935
|
+
};
|
|
92936
|
+
|
|
92937
|
+
/**
|
|
92938
|
+
* Converts this Mod to JSON.
|
|
92939
|
+
* @function toJSON
|
|
92940
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92941
|
+
* @instance
|
|
92942
|
+
* @returns {Object.<string,*>} JSON object
|
|
92943
|
+
*/
|
|
92944
|
+
Mod.prototype.toJSON = function toJSON() {
|
|
92945
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
92946
|
+
};
|
|
92947
|
+
|
|
92948
|
+
/**
|
|
92949
|
+
* Gets the default type url for Mod
|
|
92950
|
+
* @function getTypeUrl
|
|
92951
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
|
|
92952
|
+
* @static
|
|
92953
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
92954
|
+
* @returns {string} The default type url
|
|
92955
|
+
*/
|
|
92956
|
+
Mod.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
92957
|
+
if (typeUrlPrefix === undefined) {
|
|
92958
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
92959
|
+
}
|
|
92960
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod";
|
|
92961
|
+
};
|
|
92962
|
+
|
|
92963
|
+
return Mod;
|
|
92964
|
+
})();
|
|
92965
|
+
|
|
92966
|
+
/**
|
|
92967
|
+
* ModType enum.
|
|
92968
|
+
* @name google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType
|
|
92969
|
+
* @enum {number}
|
|
92970
|
+
* @property {number} MOD_TYPE_UNSPECIFIED=0 MOD_TYPE_UNSPECIFIED value
|
|
92971
|
+
* @property {number} INSERT=10 INSERT value
|
|
92972
|
+
* @property {number} UPDATE=20 UPDATE value
|
|
92973
|
+
* @property {number} DELETE=30 DELETE value
|
|
92974
|
+
*/
|
|
92975
|
+
DataChangeRecord.ModType = (function() {
|
|
92976
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
92977
|
+
values[valuesById[0] = "MOD_TYPE_UNSPECIFIED"] = 0;
|
|
92978
|
+
values[valuesById[10] = "INSERT"] = 10;
|
|
92979
|
+
values[valuesById[20] = "UPDATE"] = 20;
|
|
92980
|
+
values[valuesById[30] = "DELETE"] = 30;
|
|
92981
|
+
return values;
|
|
92982
|
+
})();
|
|
92983
|
+
|
|
92984
|
+
/**
|
|
92985
|
+
* ValueCaptureType enum.
|
|
92986
|
+
* @name google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
|
|
92987
|
+
* @enum {number}
|
|
92988
|
+
* @property {number} VALUE_CAPTURE_TYPE_UNSPECIFIED=0 VALUE_CAPTURE_TYPE_UNSPECIFIED value
|
|
92989
|
+
* @property {number} OLD_AND_NEW_VALUES=10 OLD_AND_NEW_VALUES value
|
|
92990
|
+
* @property {number} NEW_VALUES=20 NEW_VALUES value
|
|
92991
|
+
* @property {number} NEW_ROW=30 NEW_ROW value
|
|
92992
|
+
* @property {number} NEW_ROW_AND_OLD_VALUES=40 NEW_ROW_AND_OLD_VALUES value
|
|
92993
|
+
*/
|
|
92994
|
+
DataChangeRecord.ValueCaptureType = (function() {
|
|
92995
|
+
var valuesById = {}, values = Object.create(valuesById);
|
|
92996
|
+
values[valuesById[0] = "VALUE_CAPTURE_TYPE_UNSPECIFIED"] = 0;
|
|
92997
|
+
values[valuesById[10] = "OLD_AND_NEW_VALUES"] = 10;
|
|
92998
|
+
values[valuesById[20] = "NEW_VALUES"] = 20;
|
|
92999
|
+
values[valuesById[30] = "NEW_ROW"] = 30;
|
|
93000
|
+
values[valuesById[40] = "NEW_ROW_AND_OLD_VALUES"] = 40;
|
|
93001
|
+
return values;
|
|
93002
|
+
})();
|
|
93003
|
+
|
|
93004
|
+
return DataChangeRecord;
|
|
93005
|
+
})();
|
|
93006
|
+
|
|
93007
|
+
ChangeStreamRecord.HeartbeatRecord = (function() {
|
|
93008
|
+
|
|
93009
|
+
/**
|
|
93010
|
+
* Properties of a HeartbeatRecord.
|
|
93011
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93012
|
+
* @interface IHeartbeatRecord
|
|
93013
|
+
* @property {google.protobuf.ITimestamp|null} [timestamp] HeartbeatRecord timestamp
|
|
93014
|
+
*/
|
|
93015
|
+
|
|
93016
|
+
/**
|
|
93017
|
+
* Constructs a new HeartbeatRecord.
|
|
93018
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93019
|
+
* @classdesc Represents a HeartbeatRecord.
|
|
93020
|
+
* @implements IHeartbeatRecord
|
|
93021
|
+
* @constructor
|
|
93022
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IHeartbeatRecord=} [properties] Properties to set
|
|
93023
|
+
*/
|
|
93024
|
+
function HeartbeatRecord(properties) {
|
|
93025
|
+
if (properties)
|
|
93026
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
93027
|
+
if (properties[keys[i]] != null)
|
|
93028
|
+
this[keys[i]] = properties[keys[i]];
|
|
93029
|
+
}
|
|
93030
|
+
|
|
93031
|
+
/**
|
|
93032
|
+
* HeartbeatRecord timestamp.
|
|
93033
|
+
* @member {google.protobuf.ITimestamp|null|undefined} timestamp
|
|
93034
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93035
|
+
* @instance
|
|
93036
|
+
*/
|
|
93037
|
+
HeartbeatRecord.prototype.timestamp = null;
|
|
93038
|
+
|
|
93039
|
+
/**
|
|
93040
|
+
* Creates a new HeartbeatRecord instance using the specified properties.
|
|
93041
|
+
* @function create
|
|
93042
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93043
|
+
* @static
|
|
93044
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IHeartbeatRecord=} [properties] Properties to set
|
|
93045
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} HeartbeatRecord instance
|
|
93046
|
+
*/
|
|
93047
|
+
HeartbeatRecord.create = function create(properties) {
|
|
93048
|
+
return new HeartbeatRecord(properties);
|
|
93049
|
+
};
|
|
93050
|
+
|
|
93051
|
+
/**
|
|
93052
|
+
* Encodes the specified HeartbeatRecord message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.verify|verify} messages.
|
|
93053
|
+
* @function encode
|
|
93054
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93055
|
+
* @static
|
|
93056
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IHeartbeatRecord} message HeartbeatRecord message or plain object to encode
|
|
93057
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93058
|
+
* @returns {$protobuf.Writer} Writer
|
|
93059
|
+
*/
|
|
93060
|
+
HeartbeatRecord.encode = function encode(message, writer) {
|
|
93061
|
+
if (!writer)
|
|
93062
|
+
writer = $Writer.create();
|
|
93063
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
93064
|
+
$root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
93065
|
+
return writer;
|
|
93066
|
+
};
|
|
93067
|
+
|
|
93068
|
+
/**
|
|
93069
|
+
* Encodes the specified HeartbeatRecord message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.verify|verify} messages.
|
|
93070
|
+
* @function encodeDelimited
|
|
93071
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93072
|
+
* @static
|
|
93073
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IHeartbeatRecord} message HeartbeatRecord message or plain object to encode
|
|
93074
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93075
|
+
* @returns {$protobuf.Writer} Writer
|
|
93076
|
+
*/
|
|
93077
|
+
HeartbeatRecord.encodeDelimited = function encodeDelimited(message, writer) {
|
|
93078
|
+
return this.encode(message, writer).ldelim();
|
|
93079
|
+
};
|
|
93080
|
+
|
|
93081
|
+
/**
|
|
93082
|
+
* Decodes a HeartbeatRecord message from the specified reader or buffer.
|
|
93083
|
+
* @function decode
|
|
93084
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93085
|
+
* @static
|
|
93086
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93087
|
+
* @param {number} [length] Message length if known beforehand
|
|
93088
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} HeartbeatRecord
|
|
93089
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93090
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93091
|
+
*/
|
|
93092
|
+
HeartbeatRecord.decode = function decode(reader, length, error) {
|
|
93093
|
+
if (!(reader instanceof $Reader))
|
|
93094
|
+
reader = $Reader.create(reader);
|
|
93095
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord();
|
|
93096
|
+
while (reader.pos < end) {
|
|
93097
|
+
var tag = reader.uint32();
|
|
93098
|
+
if (tag === error)
|
|
93099
|
+
break;
|
|
93100
|
+
switch (tag >>> 3) {
|
|
93101
|
+
case 1: {
|
|
93102
|
+
message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
93103
|
+
break;
|
|
93104
|
+
}
|
|
93105
|
+
default:
|
|
93106
|
+
reader.skipType(tag & 7);
|
|
93107
|
+
break;
|
|
93108
|
+
}
|
|
93109
|
+
}
|
|
93110
|
+
return message;
|
|
93111
|
+
};
|
|
93112
|
+
|
|
93113
|
+
/**
|
|
93114
|
+
* Decodes a HeartbeatRecord message from the specified reader or buffer, length delimited.
|
|
93115
|
+
* @function decodeDelimited
|
|
93116
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93117
|
+
* @static
|
|
93118
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93119
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} HeartbeatRecord
|
|
93120
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93121
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93122
|
+
*/
|
|
93123
|
+
HeartbeatRecord.decodeDelimited = function decodeDelimited(reader) {
|
|
93124
|
+
if (!(reader instanceof $Reader))
|
|
93125
|
+
reader = new $Reader(reader);
|
|
93126
|
+
return this.decode(reader, reader.uint32());
|
|
93127
|
+
};
|
|
93128
|
+
|
|
93129
|
+
/**
|
|
93130
|
+
* Verifies a HeartbeatRecord message.
|
|
93131
|
+
* @function verify
|
|
93132
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93133
|
+
* @static
|
|
93134
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
93135
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
93136
|
+
*/
|
|
93137
|
+
HeartbeatRecord.verify = function verify(message) {
|
|
93138
|
+
if (typeof message !== "object" || message === null)
|
|
93139
|
+
return "object expected";
|
|
93140
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
93141
|
+
var error = $root.google.protobuf.Timestamp.verify(message.timestamp);
|
|
93142
|
+
if (error)
|
|
93143
|
+
return "timestamp." + error;
|
|
93144
|
+
}
|
|
93145
|
+
return null;
|
|
93146
|
+
};
|
|
93147
|
+
|
|
93148
|
+
/**
|
|
93149
|
+
* Creates a HeartbeatRecord message from a plain object. Also converts values to their respective internal types.
|
|
93150
|
+
* @function fromObject
|
|
93151
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93152
|
+
* @static
|
|
93153
|
+
* @param {Object.<string,*>} object Plain object
|
|
93154
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} HeartbeatRecord
|
|
93155
|
+
*/
|
|
93156
|
+
HeartbeatRecord.fromObject = function fromObject(object) {
|
|
93157
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord)
|
|
93158
|
+
return object;
|
|
93159
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord();
|
|
93160
|
+
if (object.timestamp != null) {
|
|
93161
|
+
if (typeof object.timestamp !== "object")
|
|
93162
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.timestamp: object expected");
|
|
93163
|
+
message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp);
|
|
93164
|
+
}
|
|
93165
|
+
return message;
|
|
93166
|
+
};
|
|
93167
|
+
|
|
93168
|
+
/**
|
|
93169
|
+
* Creates a plain object from a HeartbeatRecord message. Also converts values to other types if specified.
|
|
93170
|
+
* @function toObject
|
|
93171
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93172
|
+
* @static
|
|
93173
|
+
* @param {google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} message HeartbeatRecord
|
|
93174
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
93175
|
+
* @returns {Object.<string,*>} Plain object
|
|
93176
|
+
*/
|
|
93177
|
+
HeartbeatRecord.toObject = function toObject(message, options) {
|
|
93178
|
+
if (!options)
|
|
93179
|
+
options = {};
|
|
93180
|
+
var object = {};
|
|
93181
|
+
if (options.defaults)
|
|
93182
|
+
object.timestamp = null;
|
|
93183
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp"))
|
|
93184
|
+
object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options);
|
|
93185
|
+
return object;
|
|
93186
|
+
};
|
|
93187
|
+
|
|
93188
|
+
/**
|
|
93189
|
+
* Converts this HeartbeatRecord to JSON.
|
|
93190
|
+
* @function toJSON
|
|
93191
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93192
|
+
* @instance
|
|
93193
|
+
* @returns {Object.<string,*>} JSON object
|
|
93194
|
+
*/
|
|
93195
|
+
HeartbeatRecord.prototype.toJSON = function toJSON() {
|
|
93196
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
93197
|
+
};
|
|
93198
|
+
|
|
93199
|
+
/**
|
|
93200
|
+
* Gets the default type url for HeartbeatRecord
|
|
93201
|
+
* @function getTypeUrl
|
|
93202
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.HeartbeatRecord
|
|
93203
|
+
* @static
|
|
93204
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
93205
|
+
* @returns {string} The default type url
|
|
93206
|
+
*/
|
|
93207
|
+
HeartbeatRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
93208
|
+
if (typeUrlPrefix === undefined) {
|
|
93209
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
93210
|
+
}
|
|
93211
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.HeartbeatRecord";
|
|
93212
|
+
};
|
|
93213
|
+
|
|
93214
|
+
return HeartbeatRecord;
|
|
93215
|
+
})();
|
|
93216
|
+
|
|
93217
|
+
ChangeStreamRecord.PartitionStartRecord = (function() {
|
|
93218
|
+
|
|
93219
|
+
/**
|
|
93220
|
+
* Properties of a PartitionStartRecord.
|
|
93221
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93222
|
+
* @interface IPartitionStartRecord
|
|
93223
|
+
* @property {google.protobuf.ITimestamp|null} [startTimestamp] PartitionStartRecord startTimestamp
|
|
93224
|
+
* @property {string|null} [recordSequence] PartitionStartRecord recordSequence
|
|
93225
|
+
* @property {Array.<string>|null} [partitionTokens] PartitionStartRecord partitionTokens
|
|
93226
|
+
*/
|
|
93227
|
+
|
|
93228
|
+
/**
|
|
93229
|
+
* Constructs a new PartitionStartRecord.
|
|
93230
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93231
|
+
* @classdesc Represents a PartitionStartRecord.
|
|
93232
|
+
* @implements IPartitionStartRecord
|
|
93233
|
+
* @constructor
|
|
93234
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionStartRecord=} [properties] Properties to set
|
|
93235
|
+
*/
|
|
93236
|
+
function PartitionStartRecord(properties) {
|
|
93237
|
+
this.partitionTokens = [];
|
|
93238
|
+
if (properties)
|
|
93239
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
93240
|
+
if (properties[keys[i]] != null)
|
|
93241
|
+
this[keys[i]] = properties[keys[i]];
|
|
93242
|
+
}
|
|
93243
|
+
|
|
93244
|
+
/**
|
|
93245
|
+
* PartitionStartRecord startTimestamp.
|
|
93246
|
+
* @member {google.protobuf.ITimestamp|null|undefined} startTimestamp
|
|
93247
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93248
|
+
* @instance
|
|
93249
|
+
*/
|
|
93250
|
+
PartitionStartRecord.prototype.startTimestamp = null;
|
|
93251
|
+
|
|
93252
|
+
/**
|
|
93253
|
+
* PartitionStartRecord recordSequence.
|
|
93254
|
+
* @member {string} recordSequence
|
|
93255
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93256
|
+
* @instance
|
|
93257
|
+
*/
|
|
93258
|
+
PartitionStartRecord.prototype.recordSequence = "";
|
|
93259
|
+
|
|
93260
|
+
/**
|
|
93261
|
+
* PartitionStartRecord partitionTokens.
|
|
93262
|
+
* @member {Array.<string>} partitionTokens
|
|
93263
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93264
|
+
* @instance
|
|
93265
|
+
*/
|
|
93266
|
+
PartitionStartRecord.prototype.partitionTokens = $util.emptyArray;
|
|
93267
|
+
|
|
93268
|
+
/**
|
|
93269
|
+
* Creates a new PartitionStartRecord instance using the specified properties.
|
|
93270
|
+
* @function create
|
|
93271
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93272
|
+
* @static
|
|
93273
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionStartRecord=} [properties] Properties to set
|
|
93274
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} PartitionStartRecord instance
|
|
93275
|
+
*/
|
|
93276
|
+
PartitionStartRecord.create = function create(properties) {
|
|
93277
|
+
return new PartitionStartRecord(properties);
|
|
93278
|
+
};
|
|
93279
|
+
|
|
93280
|
+
/**
|
|
93281
|
+
* Encodes the specified PartitionStartRecord message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.verify|verify} messages.
|
|
93282
|
+
* @function encode
|
|
93283
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93284
|
+
* @static
|
|
93285
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionStartRecord} message PartitionStartRecord message or plain object to encode
|
|
93286
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93287
|
+
* @returns {$protobuf.Writer} Writer
|
|
93288
|
+
*/
|
|
93289
|
+
PartitionStartRecord.encode = function encode(message, writer) {
|
|
93290
|
+
if (!writer)
|
|
93291
|
+
writer = $Writer.create();
|
|
93292
|
+
if (message.startTimestamp != null && Object.hasOwnProperty.call(message, "startTimestamp"))
|
|
93293
|
+
$root.google.protobuf.Timestamp.encode(message.startTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
93294
|
+
if (message.recordSequence != null && Object.hasOwnProperty.call(message, "recordSequence"))
|
|
93295
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recordSequence);
|
|
93296
|
+
if (message.partitionTokens != null && message.partitionTokens.length)
|
|
93297
|
+
for (var i = 0; i < message.partitionTokens.length; ++i)
|
|
93298
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.partitionTokens[i]);
|
|
93299
|
+
return writer;
|
|
93300
|
+
};
|
|
93301
|
+
|
|
93302
|
+
/**
|
|
93303
|
+
* Encodes the specified PartitionStartRecord message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.verify|verify} messages.
|
|
93304
|
+
* @function encodeDelimited
|
|
93305
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93306
|
+
* @static
|
|
93307
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionStartRecord} message PartitionStartRecord message or plain object to encode
|
|
93308
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93309
|
+
* @returns {$protobuf.Writer} Writer
|
|
93310
|
+
*/
|
|
93311
|
+
PartitionStartRecord.encodeDelimited = function encodeDelimited(message, writer) {
|
|
93312
|
+
return this.encode(message, writer).ldelim();
|
|
93313
|
+
};
|
|
93314
|
+
|
|
93315
|
+
/**
|
|
93316
|
+
* Decodes a PartitionStartRecord message from the specified reader or buffer.
|
|
93317
|
+
* @function decode
|
|
93318
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93319
|
+
* @static
|
|
93320
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93321
|
+
* @param {number} [length] Message length if known beforehand
|
|
93322
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} PartitionStartRecord
|
|
93323
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93324
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93325
|
+
*/
|
|
93326
|
+
PartitionStartRecord.decode = function decode(reader, length, error) {
|
|
93327
|
+
if (!(reader instanceof $Reader))
|
|
93328
|
+
reader = $Reader.create(reader);
|
|
93329
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord();
|
|
93330
|
+
while (reader.pos < end) {
|
|
93331
|
+
var tag = reader.uint32();
|
|
93332
|
+
if (tag === error)
|
|
93333
|
+
break;
|
|
93334
|
+
switch (tag >>> 3) {
|
|
93335
|
+
case 1: {
|
|
93336
|
+
message.startTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
93337
|
+
break;
|
|
93338
|
+
}
|
|
93339
|
+
case 2: {
|
|
93340
|
+
message.recordSequence = reader.string();
|
|
93341
|
+
break;
|
|
93342
|
+
}
|
|
93343
|
+
case 3: {
|
|
93344
|
+
if (!(message.partitionTokens && message.partitionTokens.length))
|
|
93345
|
+
message.partitionTokens = [];
|
|
93346
|
+
message.partitionTokens.push(reader.string());
|
|
93347
|
+
break;
|
|
93348
|
+
}
|
|
93349
|
+
default:
|
|
93350
|
+
reader.skipType(tag & 7);
|
|
93351
|
+
break;
|
|
93352
|
+
}
|
|
93353
|
+
}
|
|
93354
|
+
return message;
|
|
93355
|
+
};
|
|
93356
|
+
|
|
93357
|
+
/**
|
|
93358
|
+
* Decodes a PartitionStartRecord message from the specified reader or buffer, length delimited.
|
|
93359
|
+
* @function decodeDelimited
|
|
93360
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93361
|
+
* @static
|
|
93362
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93363
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} PartitionStartRecord
|
|
93364
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93365
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93366
|
+
*/
|
|
93367
|
+
PartitionStartRecord.decodeDelimited = function decodeDelimited(reader) {
|
|
93368
|
+
if (!(reader instanceof $Reader))
|
|
93369
|
+
reader = new $Reader(reader);
|
|
93370
|
+
return this.decode(reader, reader.uint32());
|
|
93371
|
+
};
|
|
93372
|
+
|
|
93373
|
+
/**
|
|
93374
|
+
* Verifies a PartitionStartRecord message.
|
|
93375
|
+
* @function verify
|
|
93376
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93377
|
+
* @static
|
|
93378
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
93379
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
93380
|
+
*/
|
|
93381
|
+
PartitionStartRecord.verify = function verify(message) {
|
|
93382
|
+
if (typeof message !== "object" || message === null)
|
|
93383
|
+
return "object expected";
|
|
93384
|
+
if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp")) {
|
|
93385
|
+
var error = $root.google.protobuf.Timestamp.verify(message.startTimestamp);
|
|
93386
|
+
if (error)
|
|
93387
|
+
return "startTimestamp." + error;
|
|
93388
|
+
}
|
|
93389
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
93390
|
+
if (!$util.isString(message.recordSequence))
|
|
93391
|
+
return "recordSequence: string expected";
|
|
93392
|
+
if (message.partitionTokens != null && message.hasOwnProperty("partitionTokens")) {
|
|
93393
|
+
if (!Array.isArray(message.partitionTokens))
|
|
93394
|
+
return "partitionTokens: array expected";
|
|
93395
|
+
for (var i = 0; i < message.partitionTokens.length; ++i)
|
|
93396
|
+
if (!$util.isString(message.partitionTokens[i]))
|
|
93397
|
+
return "partitionTokens: string[] expected";
|
|
93398
|
+
}
|
|
93399
|
+
return null;
|
|
93400
|
+
};
|
|
93401
|
+
|
|
93402
|
+
/**
|
|
93403
|
+
* Creates a PartitionStartRecord message from a plain object. Also converts values to their respective internal types.
|
|
93404
|
+
* @function fromObject
|
|
93405
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93406
|
+
* @static
|
|
93407
|
+
* @param {Object.<string,*>} object Plain object
|
|
93408
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} PartitionStartRecord
|
|
93409
|
+
*/
|
|
93410
|
+
PartitionStartRecord.fromObject = function fromObject(object) {
|
|
93411
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord)
|
|
93412
|
+
return object;
|
|
93413
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord();
|
|
93414
|
+
if (object.startTimestamp != null) {
|
|
93415
|
+
if (typeof object.startTimestamp !== "object")
|
|
93416
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.startTimestamp: object expected");
|
|
93417
|
+
message.startTimestamp = $root.google.protobuf.Timestamp.fromObject(object.startTimestamp);
|
|
93418
|
+
}
|
|
93419
|
+
if (object.recordSequence != null)
|
|
93420
|
+
message.recordSequence = String(object.recordSequence);
|
|
93421
|
+
if (object.partitionTokens) {
|
|
93422
|
+
if (!Array.isArray(object.partitionTokens))
|
|
93423
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.partitionTokens: array expected");
|
|
93424
|
+
message.partitionTokens = [];
|
|
93425
|
+
for (var i = 0; i < object.partitionTokens.length; ++i)
|
|
93426
|
+
message.partitionTokens[i] = String(object.partitionTokens[i]);
|
|
93427
|
+
}
|
|
93428
|
+
return message;
|
|
93429
|
+
};
|
|
93430
|
+
|
|
93431
|
+
/**
|
|
93432
|
+
* Creates a plain object from a PartitionStartRecord message. Also converts values to other types if specified.
|
|
93433
|
+
* @function toObject
|
|
93434
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93435
|
+
* @static
|
|
93436
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} message PartitionStartRecord
|
|
93437
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
93438
|
+
* @returns {Object.<string,*>} Plain object
|
|
93439
|
+
*/
|
|
93440
|
+
PartitionStartRecord.toObject = function toObject(message, options) {
|
|
93441
|
+
if (!options)
|
|
93442
|
+
options = {};
|
|
93443
|
+
var object = {};
|
|
93444
|
+
if (options.arrays || options.defaults)
|
|
93445
|
+
object.partitionTokens = [];
|
|
93446
|
+
if (options.defaults) {
|
|
93447
|
+
object.startTimestamp = null;
|
|
93448
|
+
object.recordSequence = "";
|
|
93449
|
+
}
|
|
93450
|
+
if (message.startTimestamp != null && message.hasOwnProperty("startTimestamp"))
|
|
93451
|
+
object.startTimestamp = $root.google.protobuf.Timestamp.toObject(message.startTimestamp, options);
|
|
93452
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
93453
|
+
object.recordSequence = message.recordSequence;
|
|
93454
|
+
if (message.partitionTokens && message.partitionTokens.length) {
|
|
93455
|
+
object.partitionTokens = [];
|
|
93456
|
+
for (var j = 0; j < message.partitionTokens.length; ++j)
|
|
93457
|
+
object.partitionTokens[j] = message.partitionTokens[j];
|
|
93458
|
+
}
|
|
93459
|
+
return object;
|
|
93460
|
+
};
|
|
93461
|
+
|
|
93462
|
+
/**
|
|
93463
|
+
* Converts this PartitionStartRecord to JSON.
|
|
93464
|
+
* @function toJSON
|
|
93465
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93466
|
+
* @instance
|
|
93467
|
+
* @returns {Object.<string,*>} JSON object
|
|
93468
|
+
*/
|
|
93469
|
+
PartitionStartRecord.prototype.toJSON = function toJSON() {
|
|
93470
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
93471
|
+
};
|
|
93472
|
+
|
|
93473
|
+
/**
|
|
93474
|
+
* Gets the default type url for PartitionStartRecord
|
|
93475
|
+
* @function getTypeUrl
|
|
93476
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
|
|
93477
|
+
* @static
|
|
93478
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
93479
|
+
* @returns {string} The default type url
|
|
93480
|
+
*/
|
|
93481
|
+
PartitionStartRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
93482
|
+
if (typeUrlPrefix === undefined) {
|
|
93483
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
93484
|
+
}
|
|
93485
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.PartitionStartRecord";
|
|
93486
|
+
};
|
|
93487
|
+
|
|
93488
|
+
return PartitionStartRecord;
|
|
93489
|
+
})();
|
|
93490
|
+
|
|
93491
|
+
ChangeStreamRecord.PartitionEndRecord = (function() {
|
|
93492
|
+
|
|
93493
|
+
/**
|
|
93494
|
+
* Properties of a PartitionEndRecord.
|
|
93495
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93496
|
+
* @interface IPartitionEndRecord
|
|
93497
|
+
* @property {google.protobuf.ITimestamp|null} [endTimestamp] PartitionEndRecord endTimestamp
|
|
93498
|
+
* @property {string|null} [recordSequence] PartitionEndRecord recordSequence
|
|
93499
|
+
* @property {string|null} [partitionToken] PartitionEndRecord partitionToken
|
|
93500
|
+
*/
|
|
93501
|
+
|
|
93502
|
+
/**
|
|
93503
|
+
* Constructs a new PartitionEndRecord.
|
|
93504
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93505
|
+
* @classdesc Represents a PartitionEndRecord.
|
|
93506
|
+
* @implements IPartitionEndRecord
|
|
93507
|
+
* @constructor
|
|
93508
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEndRecord=} [properties] Properties to set
|
|
93509
|
+
*/
|
|
93510
|
+
function PartitionEndRecord(properties) {
|
|
93511
|
+
if (properties)
|
|
93512
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
93513
|
+
if (properties[keys[i]] != null)
|
|
93514
|
+
this[keys[i]] = properties[keys[i]];
|
|
93515
|
+
}
|
|
93516
|
+
|
|
93517
|
+
/**
|
|
93518
|
+
* PartitionEndRecord endTimestamp.
|
|
93519
|
+
* @member {google.protobuf.ITimestamp|null|undefined} endTimestamp
|
|
93520
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93521
|
+
* @instance
|
|
93522
|
+
*/
|
|
93523
|
+
PartitionEndRecord.prototype.endTimestamp = null;
|
|
93524
|
+
|
|
93525
|
+
/**
|
|
93526
|
+
* PartitionEndRecord recordSequence.
|
|
93527
|
+
* @member {string} recordSequence
|
|
93528
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93529
|
+
* @instance
|
|
93530
|
+
*/
|
|
93531
|
+
PartitionEndRecord.prototype.recordSequence = "";
|
|
93532
|
+
|
|
93533
|
+
/**
|
|
93534
|
+
* PartitionEndRecord partitionToken.
|
|
93535
|
+
* @member {string} partitionToken
|
|
93536
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93537
|
+
* @instance
|
|
93538
|
+
*/
|
|
93539
|
+
PartitionEndRecord.prototype.partitionToken = "";
|
|
93540
|
+
|
|
93541
|
+
/**
|
|
93542
|
+
* Creates a new PartitionEndRecord instance using the specified properties.
|
|
93543
|
+
* @function create
|
|
93544
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93545
|
+
* @static
|
|
93546
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEndRecord=} [properties] Properties to set
|
|
93547
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} PartitionEndRecord instance
|
|
93548
|
+
*/
|
|
93549
|
+
PartitionEndRecord.create = function create(properties) {
|
|
93550
|
+
return new PartitionEndRecord(properties);
|
|
93551
|
+
};
|
|
93552
|
+
|
|
93553
|
+
/**
|
|
93554
|
+
* Encodes the specified PartitionEndRecord message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.verify|verify} messages.
|
|
93555
|
+
* @function encode
|
|
93556
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93557
|
+
* @static
|
|
93558
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEndRecord} message PartitionEndRecord message or plain object to encode
|
|
93559
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93560
|
+
* @returns {$protobuf.Writer} Writer
|
|
93561
|
+
*/
|
|
93562
|
+
PartitionEndRecord.encode = function encode(message, writer) {
|
|
93563
|
+
if (!writer)
|
|
93564
|
+
writer = $Writer.create();
|
|
93565
|
+
if (message.endTimestamp != null && Object.hasOwnProperty.call(message, "endTimestamp"))
|
|
93566
|
+
$root.google.protobuf.Timestamp.encode(message.endTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
93567
|
+
if (message.recordSequence != null && Object.hasOwnProperty.call(message, "recordSequence"))
|
|
93568
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recordSequence);
|
|
93569
|
+
if (message.partitionToken != null && Object.hasOwnProperty.call(message, "partitionToken"))
|
|
93570
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.partitionToken);
|
|
93571
|
+
return writer;
|
|
93572
|
+
};
|
|
93573
|
+
|
|
93574
|
+
/**
|
|
93575
|
+
* Encodes the specified PartitionEndRecord message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.verify|verify} messages.
|
|
93576
|
+
* @function encodeDelimited
|
|
93577
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93578
|
+
* @static
|
|
93579
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEndRecord} message PartitionEndRecord message or plain object to encode
|
|
93580
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93581
|
+
* @returns {$protobuf.Writer} Writer
|
|
93582
|
+
*/
|
|
93583
|
+
PartitionEndRecord.encodeDelimited = function encodeDelimited(message, writer) {
|
|
93584
|
+
return this.encode(message, writer).ldelim();
|
|
93585
|
+
};
|
|
93586
|
+
|
|
93587
|
+
/**
|
|
93588
|
+
* Decodes a PartitionEndRecord message from the specified reader or buffer.
|
|
93589
|
+
* @function decode
|
|
93590
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93591
|
+
* @static
|
|
93592
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93593
|
+
* @param {number} [length] Message length if known beforehand
|
|
93594
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} PartitionEndRecord
|
|
93595
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93596
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93597
|
+
*/
|
|
93598
|
+
PartitionEndRecord.decode = function decode(reader, length, error) {
|
|
93599
|
+
if (!(reader instanceof $Reader))
|
|
93600
|
+
reader = $Reader.create(reader);
|
|
93601
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord();
|
|
93602
|
+
while (reader.pos < end) {
|
|
93603
|
+
var tag = reader.uint32();
|
|
93604
|
+
if (tag === error)
|
|
93605
|
+
break;
|
|
93606
|
+
switch (tag >>> 3) {
|
|
93607
|
+
case 1: {
|
|
93608
|
+
message.endTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
93609
|
+
break;
|
|
93610
|
+
}
|
|
93611
|
+
case 2: {
|
|
93612
|
+
message.recordSequence = reader.string();
|
|
93613
|
+
break;
|
|
93614
|
+
}
|
|
93615
|
+
case 3: {
|
|
93616
|
+
message.partitionToken = reader.string();
|
|
93617
|
+
break;
|
|
93618
|
+
}
|
|
93619
|
+
default:
|
|
93620
|
+
reader.skipType(tag & 7);
|
|
93621
|
+
break;
|
|
93622
|
+
}
|
|
93623
|
+
}
|
|
93624
|
+
return message;
|
|
93625
|
+
};
|
|
93626
|
+
|
|
93627
|
+
/**
|
|
93628
|
+
* Decodes a PartitionEndRecord message from the specified reader or buffer, length delimited.
|
|
93629
|
+
* @function decodeDelimited
|
|
93630
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93631
|
+
* @static
|
|
93632
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93633
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} PartitionEndRecord
|
|
93634
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93635
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93636
|
+
*/
|
|
93637
|
+
PartitionEndRecord.decodeDelimited = function decodeDelimited(reader) {
|
|
93638
|
+
if (!(reader instanceof $Reader))
|
|
93639
|
+
reader = new $Reader(reader);
|
|
93640
|
+
return this.decode(reader, reader.uint32());
|
|
93641
|
+
};
|
|
93642
|
+
|
|
93643
|
+
/**
|
|
93644
|
+
* Verifies a PartitionEndRecord message.
|
|
93645
|
+
* @function verify
|
|
93646
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93647
|
+
* @static
|
|
93648
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
93649
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
93650
|
+
*/
|
|
93651
|
+
PartitionEndRecord.verify = function verify(message) {
|
|
93652
|
+
if (typeof message !== "object" || message === null)
|
|
93653
|
+
return "object expected";
|
|
93654
|
+
if (message.endTimestamp != null && message.hasOwnProperty("endTimestamp")) {
|
|
93655
|
+
var error = $root.google.protobuf.Timestamp.verify(message.endTimestamp);
|
|
93656
|
+
if (error)
|
|
93657
|
+
return "endTimestamp." + error;
|
|
93658
|
+
}
|
|
93659
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
93660
|
+
if (!$util.isString(message.recordSequence))
|
|
93661
|
+
return "recordSequence: string expected";
|
|
93662
|
+
if (message.partitionToken != null && message.hasOwnProperty("partitionToken"))
|
|
93663
|
+
if (!$util.isString(message.partitionToken))
|
|
93664
|
+
return "partitionToken: string expected";
|
|
93665
|
+
return null;
|
|
93666
|
+
};
|
|
93667
|
+
|
|
93668
|
+
/**
|
|
93669
|
+
* Creates a PartitionEndRecord message from a plain object. Also converts values to their respective internal types.
|
|
93670
|
+
* @function fromObject
|
|
93671
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93672
|
+
* @static
|
|
93673
|
+
* @param {Object.<string,*>} object Plain object
|
|
93674
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} PartitionEndRecord
|
|
93675
|
+
*/
|
|
93676
|
+
PartitionEndRecord.fromObject = function fromObject(object) {
|
|
93677
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord)
|
|
93678
|
+
return object;
|
|
93679
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord();
|
|
93680
|
+
if (object.endTimestamp != null) {
|
|
93681
|
+
if (typeof object.endTimestamp !== "object")
|
|
93682
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.endTimestamp: object expected");
|
|
93683
|
+
message.endTimestamp = $root.google.protobuf.Timestamp.fromObject(object.endTimestamp);
|
|
93684
|
+
}
|
|
93685
|
+
if (object.recordSequence != null)
|
|
93686
|
+
message.recordSequence = String(object.recordSequence);
|
|
93687
|
+
if (object.partitionToken != null)
|
|
93688
|
+
message.partitionToken = String(object.partitionToken);
|
|
93689
|
+
return message;
|
|
93690
|
+
};
|
|
93691
|
+
|
|
93692
|
+
/**
|
|
93693
|
+
* Creates a plain object from a PartitionEndRecord message. Also converts values to other types if specified.
|
|
93694
|
+
* @function toObject
|
|
93695
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93696
|
+
* @static
|
|
93697
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} message PartitionEndRecord
|
|
93698
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
93699
|
+
* @returns {Object.<string,*>} Plain object
|
|
93700
|
+
*/
|
|
93701
|
+
PartitionEndRecord.toObject = function toObject(message, options) {
|
|
93702
|
+
if (!options)
|
|
93703
|
+
options = {};
|
|
93704
|
+
var object = {};
|
|
93705
|
+
if (options.defaults) {
|
|
93706
|
+
object.endTimestamp = null;
|
|
93707
|
+
object.recordSequence = "";
|
|
93708
|
+
object.partitionToken = "";
|
|
93709
|
+
}
|
|
93710
|
+
if (message.endTimestamp != null && message.hasOwnProperty("endTimestamp"))
|
|
93711
|
+
object.endTimestamp = $root.google.protobuf.Timestamp.toObject(message.endTimestamp, options);
|
|
93712
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
93713
|
+
object.recordSequence = message.recordSequence;
|
|
93714
|
+
if (message.partitionToken != null && message.hasOwnProperty("partitionToken"))
|
|
93715
|
+
object.partitionToken = message.partitionToken;
|
|
93716
|
+
return object;
|
|
93717
|
+
};
|
|
93718
|
+
|
|
93719
|
+
/**
|
|
93720
|
+
* Converts this PartitionEndRecord to JSON.
|
|
93721
|
+
* @function toJSON
|
|
93722
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93723
|
+
* @instance
|
|
93724
|
+
* @returns {Object.<string,*>} JSON object
|
|
93725
|
+
*/
|
|
93726
|
+
PartitionEndRecord.prototype.toJSON = function toJSON() {
|
|
93727
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
93728
|
+
};
|
|
93729
|
+
|
|
93730
|
+
/**
|
|
93731
|
+
* Gets the default type url for PartitionEndRecord
|
|
93732
|
+
* @function getTypeUrl
|
|
93733
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
|
|
93734
|
+
* @static
|
|
93735
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
93736
|
+
* @returns {string} The default type url
|
|
93737
|
+
*/
|
|
93738
|
+
PartitionEndRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
93739
|
+
if (typeUrlPrefix === undefined) {
|
|
93740
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
93741
|
+
}
|
|
93742
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.PartitionEndRecord";
|
|
93743
|
+
};
|
|
93744
|
+
|
|
93745
|
+
return PartitionEndRecord;
|
|
93746
|
+
})();
|
|
93747
|
+
|
|
93748
|
+
ChangeStreamRecord.PartitionEventRecord = (function() {
|
|
93749
|
+
|
|
93750
|
+
/**
|
|
93751
|
+
* Properties of a PartitionEventRecord.
|
|
93752
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93753
|
+
* @interface IPartitionEventRecord
|
|
93754
|
+
* @property {google.protobuf.ITimestamp|null} [commitTimestamp] PartitionEventRecord commitTimestamp
|
|
93755
|
+
* @property {string|null} [recordSequence] PartitionEventRecord recordSequence
|
|
93756
|
+
* @property {string|null} [partitionToken] PartitionEventRecord partitionToken
|
|
93757
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveInEvent>|null} [moveInEvents] PartitionEventRecord moveInEvents
|
|
93758
|
+
* @property {Array.<google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveOutEvent>|null} [moveOutEvents] PartitionEventRecord moveOutEvents
|
|
93759
|
+
*/
|
|
93760
|
+
|
|
93761
|
+
/**
|
|
93762
|
+
* Constructs a new PartitionEventRecord.
|
|
93763
|
+
* @memberof google.spanner.v1.ChangeStreamRecord
|
|
93764
|
+
* @classdesc Represents a PartitionEventRecord.
|
|
93765
|
+
* @implements IPartitionEventRecord
|
|
93766
|
+
* @constructor
|
|
93767
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEventRecord=} [properties] Properties to set
|
|
93768
|
+
*/
|
|
93769
|
+
function PartitionEventRecord(properties) {
|
|
93770
|
+
this.moveInEvents = [];
|
|
93771
|
+
this.moveOutEvents = [];
|
|
93772
|
+
if (properties)
|
|
93773
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
93774
|
+
if (properties[keys[i]] != null)
|
|
93775
|
+
this[keys[i]] = properties[keys[i]];
|
|
93776
|
+
}
|
|
93777
|
+
|
|
93778
|
+
/**
|
|
93779
|
+
* PartitionEventRecord commitTimestamp.
|
|
93780
|
+
* @member {google.protobuf.ITimestamp|null|undefined} commitTimestamp
|
|
93781
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93782
|
+
* @instance
|
|
93783
|
+
*/
|
|
93784
|
+
PartitionEventRecord.prototype.commitTimestamp = null;
|
|
93785
|
+
|
|
93786
|
+
/**
|
|
93787
|
+
* PartitionEventRecord recordSequence.
|
|
93788
|
+
* @member {string} recordSequence
|
|
93789
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93790
|
+
* @instance
|
|
93791
|
+
*/
|
|
93792
|
+
PartitionEventRecord.prototype.recordSequence = "";
|
|
93793
|
+
|
|
93794
|
+
/**
|
|
93795
|
+
* PartitionEventRecord partitionToken.
|
|
93796
|
+
* @member {string} partitionToken
|
|
93797
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93798
|
+
* @instance
|
|
93799
|
+
*/
|
|
93800
|
+
PartitionEventRecord.prototype.partitionToken = "";
|
|
93801
|
+
|
|
93802
|
+
/**
|
|
93803
|
+
* PartitionEventRecord moveInEvents.
|
|
93804
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveInEvent>} moveInEvents
|
|
93805
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93806
|
+
* @instance
|
|
93807
|
+
*/
|
|
93808
|
+
PartitionEventRecord.prototype.moveInEvents = $util.emptyArray;
|
|
93809
|
+
|
|
93810
|
+
/**
|
|
93811
|
+
* PartitionEventRecord moveOutEvents.
|
|
93812
|
+
* @member {Array.<google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveOutEvent>} moveOutEvents
|
|
93813
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93814
|
+
* @instance
|
|
93815
|
+
*/
|
|
93816
|
+
PartitionEventRecord.prototype.moveOutEvents = $util.emptyArray;
|
|
93817
|
+
|
|
93818
|
+
/**
|
|
93819
|
+
* Creates a new PartitionEventRecord instance using the specified properties.
|
|
93820
|
+
* @function create
|
|
93821
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93822
|
+
* @static
|
|
93823
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEventRecord=} [properties] Properties to set
|
|
93824
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} PartitionEventRecord instance
|
|
93825
|
+
*/
|
|
93826
|
+
PartitionEventRecord.create = function create(properties) {
|
|
93827
|
+
return new PartitionEventRecord(properties);
|
|
93828
|
+
};
|
|
93829
|
+
|
|
93830
|
+
/**
|
|
93831
|
+
* Encodes the specified PartitionEventRecord message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.verify|verify} messages.
|
|
93832
|
+
* @function encode
|
|
93833
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93834
|
+
* @static
|
|
93835
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEventRecord} message PartitionEventRecord message or plain object to encode
|
|
93836
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93837
|
+
* @returns {$protobuf.Writer} Writer
|
|
93838
|
+
*/
|
|
93839
|
+
PartitionEventRecord.encode = function encode(message, writer) {
|
|
93840
|
+
if (!writer)
|
|
93841
|
+
writer = $Writer.create();
|
|
93842
|
+
if (message.commitTimestamp != null && Object.hasOwnProperty.call(message, "commitTimestamp"))
|
|
93843
|
+
$root.google.protobuf.Timestamp.encode(message.commitTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
|
|
93844
|
+
if (message.recordSequence != null && Object.hasOwnProperty.call(message, "recordSequence"))
|
|
93845
|
+
writer.uint32(/* id 2, wireType 2 =*/18).string(message.recordSequence);
|
|
93846
|
+
if (message.partitionToken != null && Object.hasOwnProperty.call(message, "partitionToken"))
|
|
93847
|
+
writer.uint32(/* id 3, wireType 2 =*/26).string(message.partitionToken);
|
|
93848
|
+
if (message.moveInEvents != null && message.moveInEvents.length)
|
|
93849
|
+
for (var i = 0; i < message.moveInEvents.length; ++i)
|
|
93850
|
+
$root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.encode(message.moveInEvents[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
|
|
93851
|
+
if (message.moveOutEvents != null && message.moveOutEvents.length)
|
|
93852
|
+
for (var i = 0; i < message.moveOutEvents.length; ++i)
|
|
93853
|
+
$root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.encode(message.moveOutEvents[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
|
|
93854
|
+
return writer;
|
|
93855
|
+
};
|
|
93856
|
+
|
|
93857
|
+
/**
|
|
93858
|
+
* Encodes the specified PartitionEventRecord message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.verify|verify} messages.
|
|
93859
|
+
* @function encodeDelimited
|
|
93860
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93861
|
+
* @static
|
|
93862
|
+
* @param {google.spanner.v1.ChangeStreamRecord.IPartitionEventRecord} message PartitionEventRecord message or plain object to encode
|
|
93863
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
93864
|
+
* @returns {$protobuf.Writer} Writer
|
|
93865
|
+
*/
|
|
93866
|
+
PartitionEventRecord.encodeDelimited = function encodeDelimited(message, writer) {
|
|
93867
|
+
return this.encode(message, writer).ldelim();
|
|
93868
|
+
};
|
|
93869
|
+
|
|
93870
|
+
/**
|
|
93871
|
+
* Decodes a PartitionEventRecord message from the specified reader or buffer.
|
|
93872
|
+
* @function decode
|
|
93873
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93874
|
+
* @static
|
|
93875
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93876
|
+
* @param {number} [length] Message length if known beforehand
|
|
93877
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} PartitionEventRecord
|
|
93878
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93879
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93880
|
+
*/
|
|
93881
|
+
PartitionEventRecord.decode = function decode(reader, length, error) {
|
|
93882
|
+
if (!(reader instanceof $Reader))
|
|
93883
|
+
reader = $Reader.create(reader);
|
|
93884
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord();
|
|
93885
|
+
while (reader.pos < end) {
|
|
93886
|
+
var tag = reader.uint32();
|
|
93887
|
+
if (tag === error)
|
|
93888
|
+
break;
|
|
93889
|
+
switch (tag >>> 3) {
|
|
93890
|
+
case 1: {
|
|
93891
|
+
message.commitTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
|
|
93892
|
+
break;
|
|
93893
|
+
}
|
|
93894
|
+
case 2: {
|
|
93895
|
+
message.recordSequence = reader.string();
|
|
93896
|
+
break;
|
|
93897
|
+
}
|
|
93898
|
+
case 3: {
|
|
93899
|
+
message.partitionToken = reader.string();
|
|
93900
|
+
break;
|
|
93901
|
+
}
|
|
93902
|
+
case 4: {
|
|
93903
|
+
if (!(message.moveInEvents && message.moveInEvents.length))
|
|
93904
|
+
message.moveInEvents = [];
|
|
93905
|
+
message.moveInEvents.push($root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.decode(reader, reader.uint32()));
|
|
93906
|
+
break;
|
|
93907
|
+
}
|
|
93908
|
+
case 5: {
|
|
93909
|
+
if (!(message.moveOutEvents && message.moveOutEvents.length))
|
|
93910
|
+
message.moveOutEvents = [];
|
|
93911
|
+
message.moveOutEvents.push($root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.decode(reader, reader.uint32()));
|
|
93912
|
+
break;
|
|
93913
|
+
}
|
|
93914
|
+
default:
|
|
93915
|
+
reader.skipType(tag & 7);
|
|
93916
|
+
break;
|
|
93917
|
+
}
|
|
93918
|
+
}
|
|
93919
|
+
return message;
|
|
93920
|
+
};
|
|
93921
|
+
|
|
93922
|
+
/**
|
|
93923
|
+
* Decodes a PartitionEventRecord message from the specified reader or buffer, length delimited.
|
|
93924
|
+
* @function decodeDelimited
|
|
93925
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93926
|
+
* @static
|
|
93927
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
93928
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} PartitionEventRecord
|
|
93929
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
93930
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
93931
|
+
*/
|
|
93932
|
+
PartitionEventRecord.decodeDelimited = function decodeDelimited(reader) {
|
|
93933
|
+
if (!(reader instanceof $Reader))
|
|
93934
|
+
reader = new $Reader(reader);
|
|
93935
|
+
return this.decode(reader, reader.uint32());
|
|
93936
|
+
};
|
|
93937
|
+
|
|
93938
|
+
/**
|
|
93939
|
+
* Verifies a PartitionEventRecord message.
|
|
93940
|
+
* @function verify
|
|
93941
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93942
|
+
* @static
|
|
93943
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
93944
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
93945
|
+
*/
|
|
93946
|
+
PartitionEventRecord.verify = function verify(message) {
|
|
93947
|
+
if (typeof message !== "object" || message === null)
|
|
93948
|
+
return "object expected";
|
|
93949
|
+
if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) {
|
|
93950
|
+
var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp);
|
|
93951
|
+
if (error)
|
|
93952
|
+
return "commitTimestamp." + error;
|
|
93953
|
+
}
|
|
93954
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
93955
|
+
if (!$util.isString(message.recordSequence))
|
|
93956
|
+
return "recordSequence: string expected";
|
|
93957
|
+
if (message.partitionToken != null && message.hasOwnProperty("partitionToken"))
|
|
93958
|
+
if (!$util.isString(message.partitionToken))
|
|
93959
|
+
return "partitionToken: string expected";
|
|
93960
|
+
if (message.moveInEvents != null && message.hasOwnProperty("moveInEvents")) {
|
|
93961
|
+
if (!Array.isArray(message.moveInEvents))
|
|
93962
|
+
return "moveInEvents: array expected";
|
|
93963
|
+
for (var i = 0; i < message.moveInEvents.length; ++i) {
|
|
93964
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.verify(message.moveInEvents[i]);
|
|
93965
|
+
if (error)
|
|
93966
|
+
return "moveInEvents." + error;
|
|
93967
|
+
}
|
|
93968
|
+
}
|
|
93969
|
+
if (message.moveOutEvents != null && message.hasOwnProperty("moveOutEvents")) {
|
|
93970
|
+
if (!Array.isArray(message.moveOutEvents))
|
|
93971
|
+
return "moveOutEvents: array expected";
|
|
93972
|
+
for (var i = 0; i < message.moveOutEvents.length; ++i) {
|
|
93973
|
+
var error = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.verify(message.moveOutEvents[i]);
|
|
93974
|
+
if (error)
|
|
93975
|
+
return "moveOutEvents." + error;
|
|
93976
|
+
}
|
|
93977
|
+
}
|
|
93978
|
+
return null;
|
|
93979
|
+
};
|
|
93980
|
+
|
|
93981
|
+
/**
|
|
93982
|
+
* Creates a PartitionEventRecord message from a plain object. Also converts values to their respective internal types.
|
|
93983
|
+
* @function fromObject
|
|
93984
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
93985
|
+
* @static
|
|
93986
|
+
* @param {Object.<string,*>} object Plain object
|
|
93987
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} PartitionEventRecord
|
|
93988
|
+
*/
|
|
93989
|
+
PartitionEventRecord.fromObject = function fromObject(object) {
|
|
93990
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord)
|
|
93991
|
+
return object;
|
|
93992
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord();
|
|
93993
|
+
if (object.commitTimestamp != null) {
|
|
93994
|
+
if (typeof object.commitTimestamp !== "object")
|
|
93995
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.commitTimestamp: object expected");
|
|
93996
|
+
message.commitTimestamp = $root.google.protobuf.Timestamp.fromObject(object.commitTimestamp);
|
|
93997
|
+
}
|
|
93998
|
+
if (object.recordSequence != null)
|
|
93999
|
+
message.recordSequence = String(object.recordSequence);
|
|
94000
|
+
if (object.partitionToken != null)
|
|
94001
|
+
message.partitionToken = String(object.partitionToken);
|
|
94002
|
+
if (object.moveInEvents) {
|
|
94003
|
+
if (!Array.isArray(object.moveInEvents))
|
|
94004
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.moveInEvents: array expected");
|
|
94005
|
+
message.moveInEvents = [];
|
|
94006
|
+
for (var i = 0; i < object.moveInEvents.length; ++i) {
|
|
94007
|
+
if (typeof object.moveInEvents[i] !== "object")
|
|
94008
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.moveInEvents: object expected");
|
|
94009
|
+
message.moveInEvents[i] = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.fromObject(object.moveInEvents[i]);
|
|
94010
|
+
}
|
|
94011
|
+
}
|
|
94012
|
+
if (object.moveOutEvents) {
|
|
94013
|
+
if (!Array.isArray(object.moveOutEvents))
|
|
94014
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.moveOutEvents: array expected");
|
|
94015
|
+
message.moveOutEvents = [];
|
|
94016
|
+
for (var i = 0; i < object.moveOutEvents.length; ++i) {
|
|
94017
|
+
if (typeof object.moveOutEvents[i] !== "object")
|
|
94018
|
+
throw TypeError(".google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.moveOutEvents: object expected");
|
|
94019
|
+
message.moveOutEvents[i] = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.fromObject(object.moveOutEvents[i]);
|
|
94020
|
+
}
|
|
94021
|
+
}
|
|
94022
|
+
return message;
|
|
94023
|
+
};
|
|
94024
|
+
|
|
94025
|
+
/**
|
|
94026
|
+
* Creates a plain object from a PartitionEventRecord message. Also converts values to other types if specified.
|
|
94027
|
+
* @function toObject
|
|
94028
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94029
|
+
* @static
|
|
94030
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} message PartitionEventRecord
|
|
94031
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
94032
|
+
* @returns {Object.<string,*>} Plain object
|
|
94033
|
+
*/
|
|
94034
|
+
PartitionEventRecord.toObject = function toObject(message, options) {
|
|
94035
|
+
if (!options)
|
|
94036
|
+
options = {};
|
|
94037
|
+
var object = {};
|
|
94038
|
+
if (options.arrays || options.defaults) {
|
|
94039
|
+
object.moveInEvents = [];
|
|
94040
|
+
object.moveOutEvents = [];
|
|
94041
|
+
}
|
|
94042
|
+
if (options.defaults) {
|
|
94043
|
+
object.commitTimestamp = null;
|
|
94044
|
+
object.recordSequence = "";
|
|
94045
|
+
object.partitionToken = "";
|
|
94046
|
+
}
|
|
94047
|
+
if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp"))
|
|
94048
|
+
object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options);
|
|
94049
|
+
if (message.recordSequence != null && message.hasOwnProperty("recordSequence"))
|
|
94050
|
+
object.recordSequence = message.recordSequence;
|
|
94051
|
+
if (message.partitionToken != null && message.hasOwnProperty("partitionToken"))
|
|
94052
|
+
object.partitionToken = message.partitionToken;
|
|
94053
|
+
if (message.moveInEvents && message.moveInEvents.length) {
|
|
94054
|
+
object.moveInEvents = [];
|
|
94055
|
+
for (var j = 0; j < message.moveInEvents.length; ++j)
|
|
94056
|
+
object.moveInEvents[j] = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.toObject(message.moveInEvents[j], options);
|
|
94057
|
+
}
|
|
94058
|
+
if (message.moveOutEvents && message.moveOutEvents.length) {
|
|
94059
|
+
object.moveOutEvents = [];
|
|
94060
|
+
for (var j = 0; j < message.moveOutEvents.length; ++j)
|
|
94061
|
+
object.moveOutEvents[j] = $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.toObject(message.moveOutEvents[j], options);
|
|
94062
|
+
}
|
|
94063
|
+
return object;
|
|
94064
|
+
};
|
|
94065
|
+
|
|
94066
|
+
/**
|
|
94067
|
+
* Converts this PartitionEventRecord to JSON.
|
|
94068
|
+
* @function toJSON
|
|
94069
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94070
|
+
* @instance
|
|
94071
|
+
* @returns {Object.<string,*>} JSON object
|
|
94072
|
+
*/
|
|
94073
|
+
PartitionEventRecord.prototype.toJSON = function toJSON() {
|
|
94074
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
94075
|
+
};
|
|
94076
|
+
|
|
94077
|
+
/**
|
|
94078
|
+
* Gets the default type url for PartitionEventRecord
|
|
94079
|
+
* @function getTypeUrl
|
|
94080
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94081
|
+
* @static
|
|
94082
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
94083
|
+
* @returns {string} The default type url
|
|
94084
|
+
*/
|
|
94085
|
+
PartitionEventRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
94086
|
+
if (typeUrlPrefix === undefined) {
|
|
94087
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
94088
|
+
}
|
|
94089
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.PartitionEventRecord";
|
|
94090
|
+
};
|
|
94091
|
+
|
|
94092
|
+
PartitionEventRecord.MoveInEvent = (function() {
|
|
94093
|
+
|
|
94094
|
+
/**
|
|
94095
|
+
* Properties of a MoveInEvent.
|
|
94096
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94097
|
+
* @interface IMoveInEvent
|
|
94098
|
+
* @property {string|null} [sourcePartitionToken] MoveInEvent sourcePartitionToken
|
|
94099
|
+
*/
|
|
94100
|
+
|
|
94101
|
+
/**
|
|
94102
|
+
* Constructs a new MoveInEvent.
|
|
94103
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94104
|
+
* @classdesc Represents a MoveInEvent.
|
|
94105
|
+
* @implements IMoveInEvent
|
|
94106
|
+
* @constructor
|
|
94107
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveInEvent=} [properties] Properties to set
|
|
94108
|
+
*/
|
|
94109
|
+
function MoveInEvent(properties) {
|
|
94110
|
+
if (properties)
|
|
94111
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
94112
|
+
if (properties[keys[i]] != null)
|
|
94113
|
+
this[keys[i]] = properties[keys[i]];
|
|
94114
|
+
}
|
|
94115
|
+
|
|
94116
|
+
/**
|
|
94117
|
+
* MoveInEvent sourcePartitionToken.
|
|
94118
|
+
* @member {string} sourcePartitionToken
|
|
94119
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94120
|
+
* @instance
|
|
94121
|
+
*/
|
|
94122
|
+
MoveInEvent.prototype.sourcePartitionToken = "";
|
|
94123
|
+
|
|
94124
|
+
/**
|
|
94125
|
+
* Creates a new MoveInEvent instance using the specified properties.
|
|
94126
|
+
* @function create
|
|
94127
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94128
|
+
* @static
|
|
94129
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveInEvent=} [properties] Properties to set
|
|
94130
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} MoveInEvent instance
|
|
94131
|
+
*/
|
|
94132
|
+
MoveInEvent.create = function create(properties) {
|
|
94133
|
+
return new MoveInEvent(properties);
|
|
94134
|
+
};
|
|
94135
|
+
|
|
94136
|
+
/**
|
|
94137
|
+
* Encodes the specified MoveInEvent message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.verify|verify} messages.
|
|
94138
|
+
* @function encode
|
|
94139
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94140
|
+
* @static
|
|
94141
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveInEvent} message MoveInEvent message or plain object to encode
|
|
94142
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
94143
|
+
* @returns {$protobuf.Writer} Writer
|
|
94144
|
+
*/
|
|
94145
|
+
MoveInEvent.encode = function encode(message, writer) {
|
|
94146
|
+
if (!writer)
|
|
94147
|
+
writer = $Writer.create();
|
|
94148
|
+
if (message.sourcePartitionToken != null && Object.hasOwnProperty.call(message, "sourcePartitionToken"))
|
|
94149
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.sourcePartitionToken);
|
|
94150
|
+
return writer;
|
|
94151
|
+
};
|
|
94152
|
+
|
|
94153
|
+
/**
|
|
94154
|
+
* Encodes the specified MoveInEvent message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.verify|verify} messages.
|
|
94155
|
+
* @function encodeDelimited
|
|
94156
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94157
|
+
* @static
|
|
94158
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveInEvent} message MoveInEvent message or plain object to encode
|
|
94159
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
94160
|
+
* @returns {$protobuf.Writer} Writer
|
|
94161
|
+
*/
|
|
94162
|
+
MoveInEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
|
94163
|
+
return this.encode(message, writer).ldelim();
|
|
94164
|
+
};
|
|
94165
|
+
|
|
94166
|
+
/**
|
|
94167
|
+
* Decodes a MoveInEvent message from the specified reader or buffer.
|
|
94168
|
+
* @function decode
|
|
94169
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94170
|
+
* @static
|
|
94171
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
94172
|
+
* @param {number} [length] Message length if known beforehand
|
|
94173
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} MoveInEvent
|
|
94174
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
94175
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
94176
|
+
*/
|
|
94177
|
+
MoveInEvent.decode = function decode(reader, length, error) {
|
|
94178
|
+
if (!(reader instanceof $Reader))
|
|
94179
|
+
reader = $Reader.create(reader);
|
|
94180
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent();
|
|
94181
|
+
while (reader.pos < end) {
|
|
94182
|
+
var tag = reader.uint32();
|
|
94183
|
+
if (tag === error)
|
|
94184
|
+
break;
|
|
94185
|
+
switch (tag >>> 3) {
|
|
94186
|
+
case 1: {
|
|
94187
|
+
message.sourcePartitionToken = reader.string();
|
|
94188
|
+
break;
|
|
94189
|
+
}
|
|
94190
|
+
default:
|
|
94191
|
+
reader.skipType(tag & 7);
|
|
94192
|
+
break;
|
|
94193
|
+
}
|
|
94194
|
+
}
|
|
94195
|
+
return message;
|
|
94196
|
+
};
|
|
94197
|
+
|
|
94198
|
+
/**
|
|
94199
|
+
* Decodes a MoveInEvent message from the specified reader or buffer, length delimited.
|
|
94200
|
+
* @function decodeDelimited
|
|
94201
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94202
|
+
* @static
|
|
94203
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
94204
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} MoveInEvent
|
|
94205
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
94206
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
94207
|
+
*/
|
|
94208
|
+
MoveInEvent.decodeDelimited = function decodeDelimited(reader) {
|
|
94209
|
+
if (!(reader instanceof $Reader))
|
|
94210
|
+
reader = new $Reader(reader);
|
|
94211
|
+
return this.decode(reader, reader.uint32());
|
|
94212
|
+
};
|
|
94213
|
+
|
|
94214
|
+
/**
|
|
94215
|
+
* Verifies a MoveInEvent message.
|
|
94216
|
+
* @function verify
|
|
94217
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94218
|
+
* @static
|
|
94219
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
94220
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
94221
|
+
*/
|
|
94222
|
+
MoveInEvent.verify = function verify(message) {
|
|
94223
|
+
if (typeof message !== "object" || message === null)
|
|
94224
|
+
return "object expected";
|
|
94225
|
+
if (message.sourcePartitionToken != null && message.hasOwnProperty("sourcePartitionToken"))
|
|
94226
|
+
if (!$util.isString(message.sourcePartitionToken))
|
|
94227
|
+
return "sourcePartitionToken: string expected";
|
|
94228
|
+
return null;
|
|
94229
|
+
};
|
|
94230
|
+
|
|
94231
|
+
/**
|
|
94232
|
+
* Creates a MoveInEvent message from a plain object. Also converts values to their respective internal types.
|
|
94233
|
+
* @function fromObject
|
|
94234
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94235
|
+
* @static
|
|
94236
|
+
* @param {Object.<string,*>} object Plain object
|
|
94237
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} MoveInEvent
|
|
94238
|
+
*/
|
|
94239
|
+
MoveInEvent.fromObject = function fromObject(object) {
|
|
94240
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent)
|
|
94241
|
+
return object;
|
|
94242
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent();
|
|
94243
|
+
if (object.sourcePartitionToken != null)
|
|
94244
|
+
message.sourcePartitionToken = String(object.sourcePartitionToken);
|
|
94245
|
+
return message;
|
|
94246
|
+
};
|
|
94247
|
+
|
|
94248
|
+
/**
|
|
94249
|
+
* Creates a plain object from a MoveInEvent message. Also converts values to other types if specified.
|
|
94250
|
+
* @function toObject
|
|
94251
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94252
|
+
* @static
|
|
94253
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} message MoveInEvent
|
|
94254
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
94255
|
+
* @returns {Object.<string,*>} Plain object
|
|
94256
|
+
*/
|
|
94257
|
+
MoveInEvent.toObject = function toObject(message, options) {
|
|
94258
|
+
if (!options)
|
|
94259
|
+
options = {};
|
|
94260
|
+
var object = {};
|
|
94261
|
+
if (options.defaults)
|
|
94262
|
+
object.sourcePartitionToken = "";
|
|
94263
|
+
if (message.sourcePartitionToken != null && message.hasOwnProperty("sourcePartitionToken"))
|
|
94264
|
+
object.sourcePartitionToken = message.sourcePartitionToken;
|
|
94265
|
+
return object;
|
|
94266
|
+
};
|
|
94267
|
+
|
|
94268
|
+
/**
|
|
94269
|
+
* Converts this MoveInEvent to JSON.
|
|
94270
|
+
* @function toJSON
|
|
94271
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94272
|
+
* @instance
|
|
94273
|
+
* @returns {Object.<string,*>} JSON object
|
|
94274
|
+
*/
|
|
94275
|
+
MoveInEvent.prototype.toJSON = function toJSON() {
|
|
94276
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
94277
|
+
};
|
|
94278
|
+
|
|
94279
|
+
/**
|
|
94280
|
+
* Gets the default type url for MoveInEvent
|
|
94281
|
+
* @function getTypeUrl
|
|
94282
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
|
|
94283
|
+
* @static
|
|
94284
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
94285
|
+
* @returns {string} The default type url
|
|
94286
|
+
*/
|
|
94287
|
+
MoveInEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
94288
|
+
if (typeUrlPrefix === undefined) {
|
|
94289
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
94290
|
+
}
|
|
94291
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent";
|
|
94292
|
+
};
|
|
94293
|
+
|
|
94294
|
+
return MoveInEvent;
|
|
94295
|
+
})();
|
|
94296
|
+
|
|
94297
|
+
PartitionEventRecord.MoveOutEvent = (function() {
|
|
94298
|
+
|
|
94299
|
+
/**
|
|
94300
|
+
* Properties of a MoveOutEvent.
|
|
94301
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94302
|
+
* @interface IMoveOutEvent
|
|
94303
|
+
* @property {string|null} [destinationPartitionToken] MoveOutEvent destinationPartitionToken
|
|
94304
|
+
*/
|
|
94305
|
+
|
|
94306
|
+
/**
|
|
94307
|
+
* Constructs a new MoveOutEvent.
|
|
94308
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
|
|
94309
|
+
* @classdesc Represents a MoveOutEvent.
|
|
94310
|
+
* @implements IMoveOutEvent
|
|
94311
|
+
* @constructor
|
|
94312
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveOutEvent=} [properties] Properties to set
|
|
94313
|
+
*/
|
|
94314
|
+
function MoveOutEvent(properties) {
|
|
94315
|
+
if (properties)
|
|
94316
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
94317
|
+
if (properties[keys[i]] != null)
|
|
94318
|
+
this[keys[i]] = properties[keys[i]];
|
|
94319
|
+
}
|
|
94320
|
+
|
|
94321
|
+
/**
|
|
94322
|
+
* MoveOutEvent destinationPartitionToken.
|
|
94323
|
+
* @member {string} destinationPartitionToken
|
|
94324
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94325
|
+
* @instance
|
|
94326
|
+
*/
|
|
94327
|
+
MoveOutEvent.prototype.destinationPartitionToken = "";
|
|
94328
|
+
|
|
94329
|
+
/**
|
|
94330
|
+
* Creates a new MoveOutEvent instance using the specified properties.
|
|
94331
|
+
* @function create
|
|
94332
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94333
|
+
* @static
|
|
94334
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveOutEvent=} [properties] Properties to set
|
|
94335
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} MoveOutEvent instance
|
|
94336
|
+
*/
|
|
94337
|
+
MoveOutEvent.create = function create(properties) {
|
|
94338
|
+
return new MoveOutEvent(properties);
|
|
94339
|
+
};
|
|
94340
|
+
|
|
94341
|
+
/**
|
|
94342
|
+
* Encodes the specified MoveOutEvent message. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.verify|verify} messages.
|
|
94343
|
+
* @function encode
|
|
94344
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94345
|
+
* @static
|
|
94346
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveOutEvent} message MoveOutEvent message or plain object to encode
|
|
94347
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
94348
|
+
* @returns {$protobuf.Writer} Writer
|
|
94349
|
+
*/
|
|
94350
|
+
MoveOutEvent.encode = function encode(message, writer) {
|
|
94351
|
+
if (!writer)
|
|
94352
|
+
writer = $Writer.create();
|
|
94353
|
+
if (message.destinationPartitionToken != null && Object.hasOwnProperty.call(message, "destinationPartitionToken"))
|
|
94354
|
+
writer.uint32(/* id 1, wireType 2 =*/10).string(message.destinationPartitionToken);
|
|
94355
|
+
return writer;
|
|
94356
|
+
};
|
|
94357
|
+
|
|
94358
|
+
/**
|
|
94359
|
+
* Encodes the specified MoveOutEvent message, length delimited. Does not implicitly {@link google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.verify|verify} messages.
|
|
94360
|
+
* @function encodeDelimited
|
|
94361
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94362
|
+
* @static
|
|
94363
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.IMoveOutEvent} message MoveOutEvent message or plain object to encode
|
|
94364
|
+
* @param {$protobuf.Writer} [writer] Writer to encode to
|
|
94365
|
+
* @returns {$protobuf.Writer} Writer
|
|
94366
|
+
*/
|
|
94367
|
+
MoveOutEvent.encodeDelimited = function encodeDelimited(message, writer) {
|
|
94368
|
+
return this.encode(message, writer).ldelim();
|
|
94369
|
+
};
|
|
94370
|
+
|
|
94371
|
+
/**
|
|
94372
|
+
* Decodes a MoveOutEvent message from the specified reader or buffer.
|
|
94373
|
+
* @function decode
|
|
94374
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94375
|
+
* @static
|
|
94376
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
94377
|
+
* @param {number} [length] Message length if known beforehand
|
|
94378
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} MoveOutEvent
|
|
94379
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
94380
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
94381
|
+
*/
|
|
94382
|
+
MoveOutEvent.decode = function decode(reader, length, error) {
|
|
94383
|
+
if (!(reader instanceof $Reader))
|
|
94384
|
+
reader = $Reader.create(reader);
|
|
94385
|
+
var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent();
|
|
94386
|
+
while (reader.pos < end) {
|
|
94387
|
+
var tag = reader.uint32();
|
|
94388
|
+
if (tag === error)
|
|
94389
|
+
break;
|
|
94390
|
+
switch (tag >>> 3) {
|
|
94391
|
+
case 1: {
|
|
94392
|
+
message.destinationPartitionToken = reader.string();
|
|
94393
|
+
break;
|
|
94394
|
+
}
|
|
94395
|
+
default:
|
|
94396
|
+
reader.skipType(tag & 7);
|
|
94397
|
+
break;
|
|
94398
|
+
}
|
|
94399
|
+
}
|
|
94400
|
+
return message;
|
|
94401
|
+
};
|
|
94402
|
+
|
|
94403
|
+
/**
|
|
94404
|
+
* Decodes a MoveOutEvent message from the specified reader or buffer, length delimited.
|
|
94405
|
+
* @function decodeDelimited
|
|
94406
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94407
|
+
* @static
|
|
94408
|
+
* @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
|
|
94409
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} MoveOutEvent
|
|
94410
|
+
* @throws {Error} If the payload is not a reader or valid buffer
|
|
94411
|
+
* @throws {$protobuf.util.ProtocolError} If required fields are missing
|
|
94412
|
+
*/
|
|
94413
|
+
MoveOutEvent.decodeDelimited = function decodeDelimited(reader) {
|
|
94414
|
+
if (!(reader instanceof $Reader))
|
|
94415
|
+
reader = new $Reader(reader);
|
|
94416
|
+
return this.decode(reader, reader.uint32());
|
|
94417
|
+
};
|
|
94418
|
+
|
|
94419
|
+
/**
|
|
94420
|
+
* Verifies a MoveOutEvent message.
|
|
94421
|
+
* @function verify
|
|
94422
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94423
|
+
* @static
|
|
94424
|
+
* @param {Object.<string,*>} message Plain object to verify
|
|
94425
|
+
* @returns {string|null} `null` if valid, otherwise the reason why it is not
|
|
94426
|
+
*/
|
|
94427
|
+
MoveOutEvent.verify = function verify(message) {
|
|
94428
|
+
if (typeof message !== "object" || message === null)
|
|
94429
|
+
return "object expected";
|
|
94430
|
+
if (message.destinationPartitionToken != null && message.hasOwnProperty("destinationPartitionToken"))
|
|
94431
|
+
if (!$util.isString(message.destinationPartitionToken))
|
|
94432
|
+
return "destinationPartitionToken: string expected";
|
|
94433
|
+
return null;
|
|
94434
|
+
};
|
|
94435
|
+
|
|
94436
|
+
/**
|
|
94437
|
+
* Creates a MoveOutEvent message from a plain object. Also converts values to their respective internal types.
|
|
94438
|
+
* @function fromObject
|
|
94439
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94440
|
+
* @static
|
|
94441
|
+
* @param {Object.<string,*>} object Plain object
|
|
94442
|
+
* @returns {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} MoveOutEvent
|
|
94443
|
+
*/
|
|
94444
|
+
MoveOutEvent.fromObject = function fromObject(object) {
|
|
94445
|
+
if (object instanceof $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent)
|
|
94446
|
+
return object;
|
|
94447
|
+
var message = new $root.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent();
|
|
94448
|
+
if (object.destinationPartitionToken != null)
|
|
94449
|
+
message.destinationPartitionToken = String(object.destinationPartitionToken);
|
|
94450
|
+
return message;
|
|
94451
|
+
};
|
|
94452
|
+
|
|
94453
|
+
/**
|
|
94454
|
+
* Creates a plain object from a MoveOutEvent message. Also converts values to other types if specified.
|
|
94455
|
+
* @function toObject
|
|
94456
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94457
|
+
* @static
|
|
94458
|
+
* @param {google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} message MoveOutEvent
|
|
94459
|
+
* @param {$protobuf.IConversionOptions} [options] Conversion options
|
|
94460
|
+
* @returns {Object.<string,*>} Plain object
|
|
94461
|
+
*/
|
|
94462
|
+
MoveOutEvent.toObject = function toObject(message, options) {
|
|
94463
|
+
if (!options)
|
|
94464
|
+
options = {};
|
|
94465
|
+
var object = {};
|
|
94466
|
+
if (options.defaults)
|
|
94467
|
+
object.destinationPartitionToken = "";
|
|
94468
|
+
if (message.destinationPartitionToken != null && message.hasOwnProperty("destinationPartitionToken"))
|
|
94469
|
+
object.destinationPartitionToken = message.destinationPartitionToken;
|
|
94470
|
+
return object;
|
|
94471
|
+
};
|
|
94472
|
+
|
|
94473
|
+
/**
|
|
94474
|
+
* Converts this MoveOutEvent to JSON.
|
|
94475
|
+
* @function toJSON
|
|
94476
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94477
|
+
* @instance
|
|
94478
|
+
* @returns {Object.<string,*>} JSON object
|
|
94479
|
+
*/
|
|
94480
|
+
MoveOutEvent.prototype.toJSON = function toJSON() {
|
|
94481
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
94482
|
+
};
|
|
94483
|
+
|
|
94484
|
+
/**
|
|
94485
|
+
* Gets the default type url for MoveOutEvent
|
|
94486
|
+
* @function getTypeUrl
|
|
94487
|
+
* @memberof google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
|
|
94488
|
+
* @static
|
|
94489
|
+
* @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
|
|
94490
|
+
* @returns {string} The default type url
|
|
94491
|
+
*/
|
|
94492
|
+
MoveOutEvent.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
94493
|
+
if (typeUrlPrefix === undefined) {
|
|
94494
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
94495
|
+
}
|
|
94496
|
+
return typeUrlPrefix + "/google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent";
|
|
94497
|
+
};
|
|
94498
|
+
|
|
94499
|
+
return MoveOutEvent;
|
|
94500
|
+
})();
|
|
94501
|
+
|
|
94502
|
+
return PartitionEventRecord;
|
|
94503
|
+
})();
|
|
94504
|
+
|
|
94505
|
+
return ChangeStreamRecord;
|
|
94506
|
+
})();
|
|
94507
|
+
|
|
90602
94508
|
return v1;
|
|
90603
94509
|
})();
|
|
90604
94510
|
|