// source: spine/web/keeping_up.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 spine_client_subscription_pb = require('../../spine/client/subscription_pb.js');
goog.object.extend(proto, spine_client_subscription_pb);
var spine_core_response_pb = require('../../spine/core/response_pb.js');
goog.object.extend(proto, spine_core_response_pb);
goog.exportSymbol('proto.spine.web.Responses', null, global);
goog.exportSymbol('proto.spine.web.Subscriptions', 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.web.Subscriptions = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.web.Subscriptions.repeatedFields_, null);
};
goog.inherits(proto.spine.web.Subscriptions, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.web.Subscriptions.displayName = 'proto.spine.web.Subscriptions';
}
/**
* 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.web.Responses = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.spine.web.Responses.repeatedFields_, null);
};
goog.inherits(proto.spine.web.Responses, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.spine.web.Responses.displayName = 'proto.spine.web.Responses';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.spine.web.Subscriptions.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.spine.web.Subscriptions.prototype.toObject = function(opt_includeInstance) {
return proto.spine.web.Subscriptions.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.web.Subscriptions} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.web.Subscriptions.toObject = function(includeInstance, msg) {
var f, obj = {
subscriptionList: jspb.Message.toObjectList(msg.getSubscriptionList(),
spine_client_subscription_pb.Subscription.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.spine.web.Subscriptions}
*/
proto.spine.web.Subscriptions.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.web.Subscriptions;
return proto.spine.web.Subscriptions.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.web.Subscriptions} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.web.Subscriptions}
*/
proto.spine.web.Subscriptions.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new spine_client_subscription_pb.Subscription;
reader.readMessage(value,spine_client_subscription_pb.Subscription.deserializeBinaryFromReader);
msg.addSubscription(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.web.Subscriptions.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.web.Subscriptions.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.web.Subscriptions} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.web.Subscriptions.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSubscriptionList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
spine_client_subscription_pb.Subscription.serializeBinaryToWriter
);
}
};
/**
* repeated spine.client.Subscription subscription = 1;
* @return {!Array<!proto.spine.client.Subscription>}
*/
proto.spine.web.Subscriptions.prototype.getSubscriptionList = function() {
return /** @type{!Array<!proto.spine.client.Subscription>} */ (
jspb.Message.getRepeatedWrapperField(this, spine_client_subscription_pb.Subscription, 1));
};
/**
* @param {!Array<!proto.spine.client.Subscription>} value
* @return {!proto.spine.web.Subscriptions} returns this
*/
proto.spine.web.Subscriptions.prototype.setSubscriptionList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.spine.client.Subscription=} opt_value
* @param {number=} opt_index
* @return {!proto.spine.client.Subscription}
*/
proto.spine.web.Subscriptions.prototype.addSubscription = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.client.Subscription, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.spine.web.Subscriptions} returns this
*/
proto.spine.web.Subscriptions.prototype.clearSubscriptionList = function() {
return this.setSubscriptionList([]);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.spine.web.Responses.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.spine.web.Responses.prototype.toObject = function(opt_includeInstance) {
return proto.spine.web.Responses.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.web.Responses} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.web.Responses.toObject = function(includeInstance, msg) {
var f, obj = {
responseList: jspb.Message.toObjectList(msg.getResponseList(),
spine_core_response_pb.Response.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.spine.web.Responses}
*/
proto.spine.web.Responses.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.spine.web.Responses;
return proto.spine.web.Responses.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.spine.web.Responses} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.spine.web.Responses}
*/
proto.spine.web.Responses.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new spine_core_response_pb.Response;
reader.readMessage(value,spine_core_response_pb.Response.deserializeBinaryFromReader);
msg.addResponse(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.spine.web.Responses.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.spine.web.Responses.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.web.Responses} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.spine.web.Responses.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getResponseList();
if (f.length > 0) {
writer.writeRepeatedMessage(
1,
f,
spine_core_response_pb.Response.serializeBinaryToWriter
);
}
};
/**
* repeated spine.core.Response response = 1;
* @return {!Array<!proto.spine.core.Response>}
*/
proto.spine.web.Responses.prototype.getResponseList = function() {
return /** @type{!Array<!proto.spine.core.Response>} */ (
jspb.Message.getRepeatedWrapperField(this, spine_core_response_pb.Response, 1));
};
/**
* @param {!Array<!proto.spine.core.Response>} value
* @return {!proto.spine.web.Responses} returns this
*/
proto.spine.web.Responses.prototype.setResponseList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 1, value);
};
/**
* @param {!proto.spine.core.Response=} opt_value
* @param {number=} opt_index
* @return {!proto.spine.core.Response}
*/
proto.spine.web.Responses.prototype.addResponse = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.spine.core.Response, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.spine.web.Responses} returns this
*/
proto.spine.web.Responses.prototype.clearResponseList = function() {
return this.setResponseList([]);
};
goog.object.extend(exports, proto.spine.web);
// 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.web.Responses.Parser = function() {
ObjectParser.call(this);
};
proto.spine.web.Responses.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.web.Responses.Parser.prototype.constructor = proto.spine.web.Responses.Parser;
proto.spine.web.Responses.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.web.Responses();
if (obj.response !== undefined && obj.response !== null) {
obj.response.forEach(
(listItem, index, array) => {
if (listItem === null) {
msg.addResponse(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.core.Response').fromObject(listItem);
msg.addResponse(value);
}
}
);
}
return msg;
};
proto.spine.web.Subscriptions.Parser = function() {
ObjectParser.call(this);
};
proto.spine.web.Subscriptions.Parser.prototype = Object.create(ObjectParser.prototype);
proto.spine.web.Subscriptions.Parser.prototype.constructor = proto.spine.web.Subscriptions.Parser;
proto.spine.web.Subscriptions.Parser.prototype.fromObject = function(obj) {
if (obj === null) {
return null;
}
let msg = new proto.spine.web.Subscriptions();
if (obj.subscription !== undefined && obj.subscription !== null) {
obj.subscription.forEach(
(listItem, index, array) => {
if (listItem === null) {
msg.addSubscription(null);
} else {
let value = TypeParsers.parserFor('type.spine.io/spine.client.Subscription').fromObject(listItem);
msg.addSubscription(value);
}
}
);
}
return msg;
};
// Generated by Spine ProtoJs Plugin
proto.spine.web.Responses.typeUrl = function() {
return 'type.spine.io/spine.web.Responses';
};
// Generated by Spine ProtoJs Plugin
proto.spine.web.Subscriptions.typeUrl = function() {
return 'type.spine.io/spine.web.Subscriptions';
};