@kurrent/kurrentdb-client
Version:
KurrentDB gRPC NodeJS Client SDK
1,302 lines (1,115 loc) • 41.8 kB
JavaScript
// source: kurrentdb/protocols/v2/core.proto
/**
* @fileoverview
* @enhanceable
* @suppress {missingRequire} reports error on implicit type usages.
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!
/* eslint-disable */
// @ts-nocheck
var jspb = require('google-protobuf');
var goog = jspb;
var global = (function() {
if (this) { return this; }
if (typeof window !== 'undefined') { return window; }
if (typeof global !== 'undefined') { return global; }
if (typeof self !== 'undefined') { return self; }
return Function('return this')();
}.call(null));
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
goog.object.extend(proto, google_protobuf_duration_pb);
var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_pb.js');
goog.object.extend(proto, google_protobuf_struct_pb);
var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js');
goog.object.extend(proto, google_protobuf_descriptor_pb);
goog.exportSymbol('proto.kurrentdb.protocol.DynamicValue', null, global);
goog.exportSymbol('proto.kurrentdb.protocol.DynamicValue.KindCase', null, global);
goog.exportSymbol('proto.kurrentdb.protocol.DynamicValueList', null, global);
goog.exportSymbol('proto.kurrentdb.protocol.DynamicValueMap', null, global);
goog.exportSymbol('proto.kurrentdb.protocol.ErrorAnnotations', null, global);
goog.exportSymbol('proto.kurrentdb.protocol.ErrorAnnotations.Severity', null, global);
goog.exportSymbol('proto.kurrentdb.protocol.errorInfo', null, global);
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.kurrentdb.protocol.ErrorAnnotations = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.kurrentdb.protocol.ErrorAnnotations, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.kurrentdb.protocol.ErrorAnnotations.displayName = 'proto.kurrentdb.protocol.ErrorAnnotations';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.kurrentdb.protocol.DynamicValueList = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.kurrentdb.protocol.DynamicValueList.repeatedFields_, null);
};
goog.inherits(proto.kurrentdb.protocol.DynamicValueList, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.kurrentdb.protocol.DynamicValueList.displayName = 'proto.kurrentdb.protocol.DynamicValueList';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.kurrentdb.protocol.DynamicValueMap = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.kurrentdb.protocol.DynamicValueMap, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.kurrentdb.protocol.DynamicValueMap.displayName = 'proto.kurrentdb.protocol.DynamicValueMap';
}
/**
* Generated by JsPbCodeGenerator.
* @param {Array=} opt_data Optional initial data array, typically from a
* server response, or constructed directly in Javascript. The array is used
* in place and becomes part of the constructed object. It is not cloned.
* If no data is provided, the constructed object will be empty, but still
* valid.
* @extends {jspb.Message}
* @constructor
*/
proto.kurrentdb.protocol.DynamicValue = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.kurrentdb.protocol.DynamicValue.oneofGroups_);
};
goog.inherits(proto.kurrentdb.protocol.DynamicValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.kurrentdb.protocol.DynamicValue.displayName = 'proto.kurrentdb.protocol.DynamicValue';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.toObject = function(opt_includeInstance) {
return proto.kurrentdb.protocol.ErrorAnnotations.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.kurrentdb.protocol.ErrorAnnotations} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.ErrorAnnotations.toObject = function(includeInstance, msg) {
var f, obj = {
code: jspb.Message.getFieldWithDefault(msg, 1, ""),
severity: jspb.Message.getFieldWithDefault(msg, 2, 0),
message: jspb.Message.getFieldWithDefault(msg, 3, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.kurrentdb.protocol.ErrorAnnotations}
*/
proto.kurrentdb.protocol.ErrorAnnotations.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.kurrentdb.protocol.ErrorAnnotations;
return proto.kurrentdb.protocol.ErrorAnnotations.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.kurrentdb.protocol.ErrorAnnotations} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.kurrentdb.protocol.ErrorAnnotations}
*/
proto.kurrentdb.protocol.ErrorAnnotations.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {string} */ (reader.readString());
msg.setCode(value);
break;
case 2:
var value = /** @type {!proto.kurrentdb.protocol.ErrorAnnotations.Severity} */ (reader.readEnum());
msg.setSeverity(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.kurrentdb.protocol.ErrorAnnotations.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.kurrentdb.protocol.ErrorAnnotations} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.ErrorAnnotations.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCode();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSeverity();
if (f !== 0.0) {
writer.writeEnum(
2,
f
);
}
f = /** @type {string} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeString(
3,
f
);
}
};
/**
* @enum {number}
*/
proto.kurrentdb.protocol.ErrorAnnotations.Severity = {
RECOVERABLE: 0,
FATAL: 1
};
/**
* optional string code = 1;
* @return {string}
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.getCode = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.kurrentdb.protocol.ErrorAnnotations} returns this
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.setCode = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Severity severity = 2;
* @return {!proto.kurrentdb.protocol.ErrorAnnotations.Severity}
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.getSeverity = function() {
return /** @type {!proto.kurrentdb.protocol.ErrorAnnotations.Severity} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {!proto.kurrentdb.protocol.ErrorAnnotations.Severity} value
* @return {!proto.kurrentdb.protocol.ErrorAnnotations} returns this
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.setSeverity = function(value) {
return jspb.Message.setProto3EnumField(this, 2, value);
};
/**
* optional string message = 3;
* @return {string}
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.kurrentdb.protocol.ErrorAnnotations} returns this
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.setMessage = function(value) {
return jspb.Message.setField(this, 3, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.ErrorAnnotations} returns this
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.clearMessage = function() {
return jspb.Message.setField(this, 3, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.ErrorAnnotations.prototype.hasMessage = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.kurrentdb.protocol.DynamicValueList.repeatedFields_ = [1];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.kurrentdb.protocol.DynamicValueList.prototype.toObject = function(opt_includeInstance) {
return proto.kurrentdb.protocol.DynamicValueList.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.kurrentdb.protocol.DynamicValueList} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.DynamicValueList.toObject = function(includeInstance, msg) {
var f, obj = {
valuesList: jspb.Message.toObjectList(msg.getValuesList(),
proto.kurrentdb.protocol.DynamicValue.toObject, includeInstance)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.kurrentdb.protocol.DynamicValueList}
*/
proto.kurrentdb.protocol.DynamicValueList.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.kurrentdb.protocol.DynamicValueList;
return proto.kurrentdb.protocol.DynamicValueList.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.kurrentdb.protocol.DynamicValueList} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.kurrentdb.protocol.DynamicValueList}
*/
proto.kurrentdb.protocol.DynamicValueList.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.kurrentdb.protocol.DynamicValue;
reader.readMessage(value,proto.kurrentdb.protocol.DynamicValue.deserializeBinaryFromReader);
msg.addValues(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.kurrentdb.protocol.DynamicValueList.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.kurrentdb.protocol.DynamicValueList.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.kurrentdb.protocol.DynamicValueList} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.DynamicValueList.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValuesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
proto.kurrentdb.protocol.DynamicValue.serializeBinaryToWriter
);
}
};
/**
* repeated DynamicValue values = 1;
* @return {!Array<!proto.kurrentdb.protocol.DynamicValue>}
*/
proto.kurrentdb.protocol.DynamicValueList.prototype.getValuesList = function() {
return /** @type{!Array<!proto.kurrentdb.protocol.DynamicValue>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.kurrentdb.protocol.DynamicValue, 1));
};
/**
* @param {!Array<!proto.kurrentdb.protocol.DynamicValue>} value
* @return {!proto.kurrentdb.protocol.DynamicValueList} returns this
*/
proto.kurrentdb.protocol.DynamicValueList.prototype.setValuesList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.kurrentdb.protocol.DynamicValue=} opt_value
* @param {number=} opt_index
* @return {!proto.kurrentdb.protocol.DynamicValue}
*/
proto.kurrentdb.protocol.DynamicValueList.prototype.addValues = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.kurrentdb.protocol.DynamicValue, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.kurrentdb.protocol.DynamicValueList} returns this
*/
proto.kurrentdb.protocol.DynamicValueList.prototype.clearValuesList = function() {
return this.setValuesList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.kurrentdb.protocol.DynamicValueMap.prototype.toObject = function(opt_includeInstance) {
return proto.kurrentdb.protocol.DynamicValueMap.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.kurrentdb.protocol.DynamicValueMap} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.DynamicValueMap.toObject = function(includeInstance, msg) {
var f, obj = {
valuesMap: (f = msg.getValuesMap()) ? f.toObject(includeInstance, proto.kurrentdb.protocol.DynamicValue.toObject) : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.kurrentdb.protocol.DynamicValueMap}
*/
proto.kurrentdb.protocol.DynamicValueMap.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.kurrentdb.protocol.DynamicValueMap;
return proto.kurrentdb.protocol.DynamicValueMap.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.kurrentdb.protocol.DynamicValueMap} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.kurrentdb.protocol.DynamicValueMap}
*/
proto.kurrentdb.protocol.DynamicValueMap.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = msg.getValuesMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readMessage, proto.kurrentdb.protocol.DynamicValue.deserializeBinaryFromReader, "", new proto.kurrentdb.protocol.DynamicValue());
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.kurrentdb.protocol.DynamicValueMap.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.kurrentdb.protocol.DynamicValueMap.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.kurrentdb.protocol.DynamicValueMap} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.DynamicValueMap.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValuesMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeMessage, proto.kurrentdb.protocol.DynamicValue.serializeBinaryToWriter);
}
};
/**
* map<string, DynamicValue> values = 1;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,!proto.kurrentdb.protocol.DynamicValue>}
*/
proto.kurrentdb.protocol.DynamicValueMap.prototype.getValuesMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,!proto.kurrentdb.protocol.DynamicValue>} */ (
jspb.Message.getMapField(this, 1, opt_noLazyCreate,
proto.kurrentdb.protocol.DynamicValue));
};
/**
* Clears values from the map. The map will be non-null.
* @return {!proto.kurrentdb.protocol.DynamicValueMap} returns this
*/
proto.kurrentdb.protocol.DynamicValueMap.prototype.clearValuesMap = function() {
this.getValuesMap().clear();
return this;};
/**
* Oneof group definitions for this message. Each group defines the field
* numbers belonging to that group. When of these fields' value is set, all
* other fields in the group are cleared. During deserialization, if multiple
* fields are encountered for a group, only the last value seen will be kept.
* @private {!Array<!Array<number>>}
* @const
*/
proto.kurrentdb.protocol.DynamicValue.oneofGroups_ = [[1,2,3,4,5,6,7,8,9,10]];
/**
* @enum {number}
*/
proto.kurrentdb.protocol.DynamicValue.KindCase = {
KIND_NOT_SET: 0,
NULL_VALUE: 1,
INT32_VALUE: 2,
INT64_VALUE: 3,
BYTES_VALUE: 4,
DOUBLE_VALUE: 5,
FLOAT_VALUE: 6,
STRING_VALUE: 7,
BOOLEAN_VALUE: 8,
TIMESTAMP_VALUE: 9,
DURATION_VALUE: 10
};
/**
* @return {proto.kurrentdb.protocol.DynamicValue.KindCase}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getKindCase = function() {
return /** @type {proto.kurrentdb.protocol.DynamicValue.KindCase} */(jspb.Message.computeOneofCase(this, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0]));
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.toObject = function(opt_includeInstance) {
return proto.kurrentdb.protocol.DynamicValue.toObject(opt_includeInstance, this);
};
/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
* the JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.kurrentdb.protocol.DynamicValue} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.DynamicValue.toObject = function(includeInstance, msg) {
var f, obj = {
nullValue: jspb.Message.getFieldWithDefault(msg, 1, 0),
int32Value: jspb.Message.getFieldWithDefault(msg, 2, 0),
int64Value: jspb.Message.getFieldWithDefault(msg, 3, 0),
bytesValue: msg.getBytesValue_asB64(),
doubleValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
floatValue: jspb.Message.getFloatingPointFieldWithDefault(msg, 6, 0.0),
stringValue: jspb.Message.getFieldWithDefault(msg, 7, ""),
booleanValue: jspb.Message.getBooleanFieldWithDefault(msg, 8, false),
timestampValue: (f = msg.getTimestampValue()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
durationValue: (f = msg.getDurationValue()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.kurrentdb.protocol.DynamicValue}
*/
proto.kurrentdb.protocol.DynamicValue.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.kurrentdb.protocol.DynamicValue;
return proto.kurrentdb.protocol.DynamicValue.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.kurrentdb.protocol.DynamicValue} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.kurrentdb.protocol.DynamicValue}
*/
proto.kurrentdb.protocol.DynamicValue.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.google.protobuf.NullValue} */ (reader.readEnum());
msg.setNullValue(value);
break;
case 2:
var value = /** @type {number} */ (reader.readSint32());
msg.setInt32Value(value);
break;
case 3:
var value = /** @type {number} */ (reader.readSint64());
msg.setInt64Value(value);
break;
case 4:
var value = /** @type {!Uint8Array} */ (reader.readBytes());
msg.setBytesValue(value);
break;
case 5:
var value = /** @type {number} */ (reader.readDouble());
msg.setDoubleValue(value);
break;
case 6:
var value = /** @type {number} */ (reader.readFloat());
msg.setFloatValue(value);
break;
case 7:
var value = /** @type {string} */ (reader.readString());
msg.setStringValue(value);
break;
case 8:
var value = /** @type {boolean} */ (reader.readBool());
msg.setBooleanValue(value);
break;
case 9:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTimestampValue(value);
break;
case 10:
var value = new google_protobuf_duration_pb.Duration;
reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader);
msg.setDurationValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.kurrentdb.protocol.DynamicValue.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.kurrentdb.protocol.DynamicValue} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.kurrentdb.protocol.DynamicValue.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeEnum(
1,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeSint32(
2,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeSint64(
3,
f
);
}
f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 4));
if (f != null) {
writer.writeBytes(
4,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 5));
if (f != null) {
writer.writeDouble(
5,
f
);
}
f = /** @type {number} */ (jspb.Message.getField(message, 6));
if (f != null) {
writer.writeFloat(
6,
f
);
}
f = /** @type {string} */ (jspb.Message.getField(message, 7));
if (f != null) {
writer.writeString(
7,
f
);
}
f = /** @type {boolean} */ (jspb.Message.getField(message, 8));
if (f != null) {
writer.writeBool(
8,
f
);
}
f = message.getTimestampValue();
if (f != null) {
writer.writeMessage(
9,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getDurationValue();
if (f != null) {
writer.writeMessage(
10,
f,
google_protobuf_duration_pb.Duration.serializeBinaryToWriter
);
}
};
/**
* optional google.protobuf.NullValue null_value = 1;
* @return {!proto.google.protobuf.NullValue}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getNullValue = function() {
return /** @type {!proto.google.protobuf.NullValue} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.google.protobuf.NullValue} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setNullValue = function(value) {
return jspb.Message.setOneofField(this, 1, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearNullValue = function() {
return jspb.Message.setOneofField(this, 1, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasNullValue = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional sint32 int32_value = 2;
* @return {number}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getInt32Value = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setInt32Value = function(value) {
return jspb.Message.setOneofField(this, 2, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearInt32Value = function() {
return jspb.Message.setOneofField(this, 2, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasInt32Value = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional sint64 int64_value = 3;
* @return {number}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getInt64Value = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/**
* @param {number} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setInt64Value = function(value) {
return jspb.Message.setOneofField(this, 3, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearInt64Value = function() {
return jspb.Message.setOneofField(this, 3, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasInt64Value = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional bytes bytes_value = 4;
* @return {!(string|Uint8Array)}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getBytesValue = function() {
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* optional bytes bytes_value = 4;
* This is a type-conversion wrapper around `getBytesValue()`
* @return {string}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getBytesValue_asB64 = function() {
return /** @type {string} */ (jspb.Message.bytesAsB64(
this.getBytesValue()));
};
/**
* optional bytes bytes_value = 4;
* Note that Uint8Array is not supported on all browsers.
* @see http://caniuse.com/Uint8Array
* This is a type-conversion wrapper around `getBytesValue()`
* @return {!Uint8Array}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getBytesValue_asU8 = function() {
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
this.getBytesValue()));
};
/**
* @param {!(string|Uint8Array)} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setBytesValue = function(value) {
return jspb.Message.setOneofField(this, 4, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearBytesValue = function() {
return jspb.Message.setOneofField(this, 4, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasBytesValue = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional double double_value = 5;
* @return {number}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getDoubleValue = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
};
/**
* @param {number} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setDoubleValue = function(value) {
return jspb.Message.setOneofField(this, 5, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearDoubleValue = function() {
return jspb.Message.setOneofField(this, 5, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasDoubleValue = function() {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional float float_value = 6;
* @return {number}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getFloatValue = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 6, 0.0));
};
/**
* @param {number} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setFloatValue = function(value) {
return jspb.Message.setOneofField(this, 6, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearFloatValue = function() {
return jspb.Message.setOneofField(this, 6, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasFloatValue = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* optional string string_value = 7;
* @return {string}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getStringValue = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, ""));
};
/**
* @param {string} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setStringValue = function(value) {
return jspb.Message.setOneofField(this, 7, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearStringValue = function() {
return jspb.Message.setOneofField(this, 7, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasStringValue = function() {
return jspb.Message.getField(this, 7) != null;
};
/**
* optional bool boolean_value = 8;
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getBooleanValue = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false));
};
/**
* @param {boolean} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setBooleanValue = function(value) {
return jspb.Message.setOneofField(this, 8, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearBooleanValue = function() {
return jspb.Message.setOneofField(this, 8, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasBooleanValue = function() {
return jspb.Message.getField(this, 8) != null;
};
/**
* optional google.protobuf.Timestamp timestamp_value = 9;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getTimestampValue = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 9));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setTimestampValue = function(value) {
return jspb.Message.setOneofWrapperField(this, 9, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearTimestampValue = function() {
return this.setTimestampValue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasTimestampValue = function() {
return jspb.Message.getField(this, 9) != null;
};
/**
* optional google.protobuf.Duration duration_value = 10;
* @return {?proto.google.protobuf.Duration}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.getDurationValue = function() {
return /** @type{?proto.google.protobuf.Duration} */ (
jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 10));
};
/**
* @param {?proto.google.protobuf.Duration|undefined} value
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.setDurationValue = function(value) {
return jspb.Message.setOneofWrapperField(this, 10, proto.kurrentdb.protocol.DynamicValue.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.kurrentdb.protocol.DynamicValue} returns this
*/
proto.kurrentdb.protocol.DynamicValue.prototype.clearDurationValue = function() {
return this.setDurationValue(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.kurrentdb.protocol.DynamicValue.prototype.hasDurationValue = function() {
return jspb.Message.getField(this, 10) != null;
};
/**
* A tuple of {field number, class constructor} for the extension
* field named `errorInfo`.
* @type {!jspb.ExtensionFieldInfo<!proto.kurrentdb.protocol.ErrorAnnotations>}
*/
proto.kurrentdb.protocol.errorInfo = new jspb.ExtensionFieldInfo(
50000,
{errorInfo: 0},
proto.kurrentdb.protocol.ErrorAnnotations,
/** @type {?function((boolean|undefined),!jspb.Message=): !Object} */ (
proto.kurrentdb.protocol.ErrorAnnotations.toObject),
0);
google_protobuf_descriptor_pb.MessageOptions.extensionsBinary[50000] = new jspb.ExtensionFieldBinaryInfo(
proto.kurrentdb.protocol.errorInfo,
jspb.BinaryReader.prototype.readMessage,
jspb.BinaryWriter.prototype.writeMessage,
proto.kurrentdb.protocol.ErrorAnnotations.serializeBinaryToWriter,
proto.kurrentdb.protocol.ErrorAnnotations.deserializeBinaryFromReader,
false);
// This registers the extension field with the extended class, so that
// toObject() will function correctly.
google_protobuf_descriptor_pb.MessageOptions.extensions[50000] = proto.kurrentdb.protocol.errorInfo;
goog.object.extend(exports, proto.kurrentdb.protocol);