// source: spine/server/event/event_stream_query.proto
/**
* @fileoverview
* @enhanceable
* @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!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var spine_options_pb = require('../../../spine/options_pb.js');
goog.object.extend(proto, spine_options_pb);
var google_protobuf_timestamp_pb = require('../../../google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
var spine_server_event_event_filter_pb = require('../../../spine/server/event/event_filter_pb.js');
goog.object.extend(proto, spine_server_event_event_filter_pb);
goog.exportSymbol('proto.spine.server.event.EventStreamQuery', null, global);
goog.exportSymbol('proto.spine.server.event.EventStreamQuery.Limit', 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.spine.server.event.EventStreamQuery = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.server.event.EventStreamQuery.repeatedFields_, null);
};
goog.inherits(proto.spine.server.event.EventStreamQuery, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.server.event.EventStreamQuery.displayName = 'proto.spine.server.event.EventStreamQuery';
}
/**
* 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.spine.server.event.EventStreamQuery.Limit = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.spine.server.event.EventStreamQuery.Limit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.server.event.EventStreamQuery.Limit.displayName = 'proto.spine.server.event.EventStreamQuery.Limit';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.spine.server.event.EventStreamQuery.repeatedFields_ = [3];
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.spine.server.event.EventStreamQuery.prototype.toObject = function(opt_includeInstance) {
return proto.spine.server.event.EventStreamQuery.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.spine.server.event.EventStreamQuery} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.server.event.EventStreamQuery.toObject = function(includeInstance, msg) {
var f, obj = {
after: (f = msg.getAfter()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
before: (f = msg.getBefore()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
filterList: jspb.Message.toObjectList(msg.getFilterList(),
spine_server_event_event_filter_pb.EventFilter.toObject, includeInstance),
limit: (f = msg.getLimit()) && proto.spine.server.event.EventStreamQuery.Limit.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.spine.server.event.EventStreamQuery}
*/
proto.spine.server.event.EventStreamQuery.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.server.event.EventStreamQuery;
return proto.spine.server.event.EventStreamQuery.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.server.event.EventStreamQuery} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.server.event.EventStreamQuery}
*/
proto.spine.server.event.EventStreamQuery.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setAfter(value);
break;
case 2:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setBefore(value);
break;
case 3:
var value = new spine_server_event_event_filter_pb.EventFilter;
reader.readMessage(value,spine_server_event_event_filter_pb.EventFilter.deserializeBinaryFromReader);
msg.addFilter(value);
break;
case 4:
var value = new proto.spine.server.event.EventStreamQuery.Limit;
reader.readMessage(value,proto.spine.server.event.EventStreamQuery.Limit.deserializeBinaryFromReader);
msg.setLimit(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.server.event.EventStreamQuery.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.server.event.EventStreamQuery.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.spine.server.event.EventStreamQuery} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.server.event.EventStreamQuery.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAfter();
if (f != null) {
writer.writeMessage(
1,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getBefore();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getFilterList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
spine_server_event_event_filter_pb.EventFilter.serializeBinaryToWriter
);
}
f = message.getLimit();
if (f != null) {
writer.writeMessage(
4,
f,
proto.spine.server.event.EventStreamQuery.Limit.serializeBinaryToWriter
);
}
};
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.spine.server.event.EventStreamQuery.Limit.prototype.toObject = function(opt_includeInstance) {
return proto.spine.server.event.EventStreamQuery.Limit.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.spine.server.event.EventStreamQuery.Limit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.server.event.EventStreamQuery.Limit.toObject = function(includeInstance, msg) {
var f, obj = {
value: jspb.Message.getFieldWithDefault(msg, 1, 0)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.spine.server.event.EventStreamQuery.Limit}
*/
proto.spine.server.event.EventStreamQuery.Limit.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.server.event.EventStreamQuery.Limit;
return proto.spine.server.event.EventStreamQuery.Limit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.server.event.EventStreamQuery.Limit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.server.event.EventStreamQuery.Limit}
*/
proto.spine.server.event.EventStreamQuery.Limit.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setValue(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.server.event.EventStreamQuery.Limit.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.server.event.EventStreamQuery.Limit.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.spine.server.event.EventStreamQuery.Limit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.server.event.EventStreamQuery.Limit.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValue();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
};
/**
* optional int32 value = 1;
* @return {number}
*/
proto.spine.server.event.EventStreamQuery.Limit.prototype.getValue = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.spine.server.event.EventStreamQuery.Limit} returns this
*/
proto.spine.server.event.EventStreamQuery.Limit.prototype.setValue = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional google.protobuf.Timestamp after = 1;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.spine.server.event.EventStreamQuery.prototype.getAfter = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.setAfter = function(value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.clearAfter = function() {
return this.setAfter(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.server.event.EventStreamQuery.prototype.hasAfter = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional google.protobuf.Timestamp before = 2;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.spine.server.event.EventStreamQuery.prototype.getBefore = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.setBefore = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.clearBefore = function() {
return this.setBefore(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.server.event.EventStreamQuery.prototype.hasBefore = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated EventFilter filter = 3;
* @return {!Array<!proto.spine.server.event.EventFilter>}
*/
proto.spine.server.event.EventStreamQuery.prototype.getFilterList = function() {
return /** @type{!Array<!proto.spine.server.event.EventFilter>} */ (
jspb.Message.getRepeatedWrapperField(this, spine_server_event_event_filter_pb.EventFilter, 3));
};
/**
* @param {!Array<!proto.spine.server.event.EventFilter>} value
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.setFilterList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.spine.server.event.EventFilter=} opt_value
* @param {number=} opt_index
* @return {!proto.spine.server.event.EventFilter}
*/
proto.spine.server.event.EventStreamQuery.prototype.addFilter = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.spine.server.event.EventFilter, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.clearFilterList = function() {
return this.setFilterList([]);
};
/**
* optional Limit limit = 4;
* @return {?proto.spine.server.event.EventStreamQuery.Limit}
*/
proto.spine.server.event.EventStreamQuery.prototype.getLimit = function() {
return /** @type{?proto.spine.server.event.EventStreamQuery.Limit} */ (
jspb.Message.getWrapperField(this, proto.spine.server.event.EventStreamQuery.Limit, 4));
};
/**
* @param {?proto.spine.server.event.EventStreamQuery.Limit|undefined} value
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.setLimit = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.spine.server.event.EventStreamQuery} returns this
*/
proto.spine.server.event.EventStreamQuery.prototype.clearLimit = function() {
return this.setLimit(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.spine.server.event.EventStreamQuery.prototype.hasLimit = function() {
return jspb.Message.getField(this, 4) != null;
};
goog.object.extend(exports, proto.spine.server.event);
// Generated by Spine ProtoJs Plugin
let ObjectParser = require('../../../../client/parser/object-parser.js').default;
let TypeParsers = require('../../../../client/parser/type-parsers.js').default;
proto.spine.server.event.EventStreamQuery.Limit.Parser = function() {
ObjectParser.call(this);
};
proto.spine.server.event.EventStreamQuery.Limit.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.event.EventStreamQuery.Limit.Parser.prototype.constructor = proto.spine.server.event.EventStreamQuery.Limit.Parser;
proto.spine.server.event.EventStreamQuery.Limit.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.server.event.EventStreamQuery.Limit();
if (obj.value !== undefined) {
if (obj.value !== null) {
let value = obj.value;
msg.setValue(value);
}
}
return msg;
};
proto.spine.server.event.EventStreamQuery.Parser = function() {
ObjectParser.call(this);
};
proto.spine.server.event.EventStreamQuery.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.server.event.EventStreamQuery.Parser.prototype.constructor = proto.spine.server.event.EventStreamQuery.Parser;
proto.spine.server.event.EventStreamQuery.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.server.event.EventStreamQuery();
if (obj.after !== undefined) {
if (obj.after === null) {
msg.setAfter(null);
} else {
let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Timestamp').fromObject(obj.after);
msg.setAfter(value);
}
}
if (obj.before !== undefined) {
if (obj.before === null) {
msg.setBefore(null);
} else {
let value = TypeParsers.parserFor('type.googleapis.com/google.protobuf.Timestamp').fromObject(obj.before);
msg.setBefore(value);
}
}
if (obj.filter !== undefined && obj.filter !== null) {
obj.filter.forEach(
(listItem, index, array) => {
if (listItem === null) {
msg.addFilter(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.server.event.EventFilter').fromObject(listItem);
msg.addFilter(value);
}
}
);
}
if (obj.limit !== undefined) {
if (obj.limit === null) {
msg.setLimit(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.server.event.EventStreamQuery.Limit').fromObject(obj.limit);
msg.setLimit(value);
}
}
return msg;
};
// Generated by Spine ProtoJs Plugin
proto.spine.server.event.EventStreamQuery.Limit.typeUrl = function() {
return 'type.spine.io/spine.server.event.EventStreamQuery.Limit';
};
// Generated by Spine ProtoJs Plugin
proto.spine.server.event.EventStreamQuery.typeUrl = function() {
return 'type.spine.io/spine.server.event.EventStreamQuery';
};