Skip to content

Instantly share code, notes, and snippets.

@cap10morgan
Created August 28, 2019 20:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cap10morgan/2d29db3e9a3f8326dde71a56a21c6d7d to your computer and use it in GitHub Desktop.
Save cap10morgan/2d29db3e9a3f8326dde71a56a21c6d7d to your computer and use it in GitHub Desktop.
not working but safe(r)
// source: game.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 proto = {};
goog.exportSymbol('game.ChatMessage', null, proto);
goog.exportSymbol('game.CommandReceived', null, proto);
goog.exportSymbol('game.CommandUpdate', null, proto);
goog.exportSymbol('game.Exit', null, proto);
goog.exportSymbol('game.Location', null, proto);
goog.exportSymbol('game.MessageToUser', null, proto);
goog.exportSymbol('game.OpenPortalMessage', null, proto);
goog.exportSymbol('game.OpenPortalResponseMessage', null, proto);
goog.exportSymbol('game.Player', null, proto);
goog.exportSymbol('game.Portal', null, proto);
goog.exportSymbol('game.RequestObjectTransferMessage', null, proto);
goog.exportSymbol('game.Session', null, proto);
goog.exportSymbol('game.ShoutMessage', null, proto);
goog.exportSymbol('game.Stats', null, proto);
goog.exportSymbol('game.TransferredObjectMessage', null, proto);
goog.exportSymbol('game.UserInput', null, proto);
goog.exportSymbol('game.UserInterfaceMessage', null, proto);
goog.exportSymbol('game.UserInterfaceMessage.UiMessageCase', null, proto);
/**
* 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.game.UserInput = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.UserInput, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.UserInput.displayName = 'proto.game.UserInput';
}
/**
* 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.game.MessageToUser = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.MessageToUser, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.MessageToUser.displayName = 'proto.game.MessageToUser';
}
/**
* 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.game.CommandUpdate = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.game.CommandUpdate.repeatedFields_, null);
};
goog.inherits(proto.game.CommandUpdate, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.CommandUpdate.displayName = 'proto.game.CommandUpdate';
}
/**
* 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.game.Stats = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.Stats, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.Stats.displayName = 'proto.game.Stats';
}
/**
* 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.game.UserInterfaceMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.game.UserInterfaceMessage.oneofGroups_);
};
goog.inherits(proto.game.UserInterfaceMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.UserInterfaceMessage.displayName = 'proto.game.UserInterfaceMessage';
}
/**
* 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.game.Exit = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.Exit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.Exit.displayName = 'proto.game.Exit';
}
/**
* 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.game.Location = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.Location, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.Location.displayName = 'proto.game.Location';
}
/**
* 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.game.Player = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.Player, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.Player.displayName = 'proto.game.Player';
}
/**
* 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.game.Portal = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.Portal, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.Portal.displayName = 'proto.game.Portal';
}
/**
* 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.game.CommandReceived = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.CommandReceived, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.CommandReceived.displayName = 'proto.game.CommandReceived';
}
/**
* 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.game.Session = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.Session, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.Session.displayName = 'proto.game.Session';
}
/**
* 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.game.ChatMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.ChatMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.ChatMessage.displayName = 'proto.game.ChatMessage';
}
/**
* 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.game.ShoutMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.ShoutMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.ShoutMessage.displayName = 'proto.game.ShoutMessage';
}
/**
* 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.game.OpenPortalMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.OpenPortalMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.OpenPortalMessage.displayName = 'proto.game.OpenPortalMessage';
}
/**
* 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.game.OpenPortalResponseMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.OpenPortalResponseMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.OpenPortalResponseMessage.displayName = 'proto.game.OpenPortalResponseMessage';
}
/**
* 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.game.TransferredObjectMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.TransferredObjectMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.TransferredObjectMessage.displayName = 'proto.game.TransferredObjectMessage';
}
/**
* 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.game.RequestObjectTransferMessage = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.game.RequestObjectTransferMessage, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.game.RequestObjectTransferMessage.displayName = 'proto.game.RequestObjectTransferMessage';
}
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.game.UserInput.prototype.toObject = function(opt_includeInstance) {
return proto.game.UserInput.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.game.UserInput} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.UserInput.toObject = function(includeInstance, msg) {
var f, obj = {
message: jspb.Message.getFieldWithDefault(msg, 1, ""),
session: (f = msg.getSession()) && proto.game.Session.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.game.UserInput}
*/
proto.game.UserInput.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.UserInput;
return proto.game.UserInput.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.UserInput} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.UserInput}
*/
proto.game.UserInput.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.setMessage(value);
break;
case 2:
var value = new proto.game.Session;
reader.readMessage(value,proto.game.Session.deserializeBinaryFromReader);
msg.setSession(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.UserInput.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.UserInput.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.UserInput} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.UserInput.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getSession();
if (f != null) {
writer.writeMessage(
2,
f,
proto.game.Session.serializeBinaryToWriter
);
}
};
/**
* optional string message = 1;
* @return {string}
*/
proto.game.UserInput.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.UserInput.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Session session = 2;
* @return {?proto.game.Session}
*/
proto.game.UserInput.prototype.getSession = function() {
return /** @type{?proto.game.Session} */ (
jspb.Message.getWrapperField(this, proto.game.Session, 2));
};
/** @param {?proto.game.Session|undefined} value */
proto.game.UserInput.prototype.setSession = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
*/
proto.game.UserInput.prototype.clearSession = function() {
this.setSession(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.game.UserInput.prototype.hasSession = function() {
return jspb.Message.getField(this, 2) != null;
};
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.game.MessageToUser.prototype.toObject = function(opt_includeInstance) {
return proto.game.MessageToUser.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.game.MessageToUser} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.MessageToUser.toObject = function(includeInstance, msg) {
var f, obj = {
message: jspb.Message.getFieldWithDefault(msg, 1, ""),
location: (f = msg.getLocation()) && proto.game.Location.toObject(includeInstance, f),
sequence: jspb.Message.getFieldWithDefault(msg, 3, 0),
heartbeat: jspb.Message.getBooleanFieldWithDefault(msg, 4, false)
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.MessageToUser}
*/
proto.game.MessageToUser.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.MessageToUser;
return proto.game.MessageToUser.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.MessageToUser} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.MessageToUser}
*/
proto.game.MessageToUser.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.setMessage(value);
break;
case 2:
var value = new proto.game.Location;
reader.readMessage(value,proto.game.Location.deserializeBinaryFromReader);
msg.setLocation(value);
break;
case 3:
var value = /** @type {number} */ (reader.readUint64());
msg.setSequence(value);
break;
case 4:
var value = /** @type {boolean} */ (reader.readBool());
msg.setHeartbeat(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.MessageToUser.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.MessageToUser.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.MessageToUser} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.MessageToUser.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getLocation();
if (f != null) {
writer.writeMessage(
2,
f,
proto.game.Location.serializeBinaryToWriter
);
}
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
3,
f
);
}
f = message.getHeartbeat();
if (f) {
writer.writeBool(
4,
f
);
}
};
/**
* optional string message = 1;
* @return {string}
*/
proto.game.MessageToUser.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.MessageToUser.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional Location location = 2;
* @return {?proto.game.Location}
*/
proto.game.MessageToUser.prototype.getLocation = function() {
return /** @type{?proto.game.Location} */ (
jspb.Message.getWrapperField(this, proto.game.Location, 2));
};
/** @param {?proto.game.Location|undefined} value */
proto.game.MessageToUser.prototype.setLocation = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
*/
proto.game.MessageToUser.prototype.clearLocation = function() {
this.setLocation(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.game.MessageToUser.prototype.hasLocation = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional uint64 sequence = 3;
* @return {number}
*/
proto.game.MessageToUser.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.game.MessageToUser.prototype.setSequence = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional bool heartbeat = 4;
* @return {boolean}
*/
proto.game.MessageToUser.prototype.getHeartbeat = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false));
};
/** @param {boolean} value */
proto.game.MessageToUser.prototype.setHeartbeat = function(value) {
jspb.Message.setProto3BooleanField(this, 4, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.game.CommandUpdate.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.game.CommandUpdate.prototype.toObject = function(opt_includeInstance) {
return proto.game.CommandUpdate.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.game.CommandUpdate} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.CommandUpdate.toObject = function(includeInstance, msg) {
var f, obj = {
commandsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f,
location: (f = msg.getLocation()) && proto.game.Location.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.game.CommandUpdate}
*/
proto.game.CommandUpdate.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.CommandUpdate;
return proto.game.CommandUpdate.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.CommandUpdate} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.CommandUpdate}
*/
proto.game.CommandUpdate.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.addCommands(value);
break;
case 2:
var value = new proto.game.Location;
reader.readMessage(value,proto.game.Location.deserializeBinaryFromReader);
msg.setLocation(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.CommandUpdate.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.CommandUpdate.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.CommandUpdate} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.CommandUpdate.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCommandsList();
if (f.length > 0) {
writer.writeRepeatedString(
1,
f
);
}
f = message.getLocation();
if (f != null) {
writer.writeMessage(
2,
f,
proto.game.Location.serializeBinaryToWriter
);
}
};
/**
* repeated string commands = 1;
* @return {!Array<string>}
*/
proto.game.CommandUpdate.prototype.getCommandsList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
};
/** @param {!Array<string>} value */
proto.game.CommandUpdate.prototype.setCommandsList = function(value) {
jspb.Message.setField(this, 1, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
*/
proto.game.CommandUpdate.prototype.addCommands = function(value, opt_index) {
jspb.Message.addToRepeatedField(this, 1, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
*/
proto.game.CommandUpdate.prototype.clearCommandsList = function() {
this.setCommandsList([]);
};
/**
* optional Location location = 2;
* @return {?proto.game.Location}
*/
proto.game.CommandUpdate.prototype.getLocation = function() {
return /** @type{?proto.game.Location} */ (
jspb.Message.getWrapperField(this, proto.game.Location, 2));
};
/** @param {?proto.game.Location|undefined} value */
proto.game.CommandUpdate.prototype.setLocation = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
*/
proto.game.CommandUpdate.prototype.clearLocation = function() {
this.setLocation(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.game.CommandUpdate.prototype.hasLocation = function() {
return jspb.Message.getField(this, 2) != null;
};
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.game.Stats.prototype.toObject = function(opt_includeInstance) {
return proto.game.Stats.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.game.Stats} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Stats.toObject = function(includeInstance, msg) {
var f, obj = {
message: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.Stats}
*/
proto.game.Stats.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.Stats;
return proto.game.Stats.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.Stats} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.Stats}
*/
proto.game.Stats.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.setMessage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.Stats.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.Stats.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.Stats} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Stats.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string message = 1;
* @return {string}
*/
proto.game.Stats.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.Stats.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* 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.game.UserInterfaceMessage.oneofGroups_ = [[1,2]];
/**
* @enum {number}
*/
proto.game.UserInterfaceMessage.UiMessageCase = {
UI_MESSAGE_NOT_SET: 0,
USER_MESSAGE: 1,
COMMAND_UPDATE: 2
};
/**
* @return {proto.game.UserInterfaceMessage.UiMessageCase}
*/
proto.game.UserInterfaceMessage.prototype.getUiMessageCase = function() {
return /** @type {proto.game.UserInterfaceMessage.UiMessageCase} */(jspb.Message.computeOneofCase(this, proto.game.UserInterfaceMessage.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.game.UserInterfaceMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.UserInterfaceMessage.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.game.UserInterfaceMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.UserInterfaceMessage.toObject = function(includeInstance, msg) {
var f, obj = {
userMessage: (f = msg.getUserMessage()) && proto.game.MessageToUser.toObject(includeInstance, f),
commandUpdate: (f = msg.getCommandUpdate()) && proto.game.CommandUpdate.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.game.UserInterfaceMessage}
*/
proto.game.UserInterfaceMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.UserInterfaceMessage;
return proto.game.UserInterfaceMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.UserInterfaceMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.UserInterfaceMessage}
*/
proto.game.UserInterfaceMessage.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.game.MessageToUser;
reader.readMessage(value,proto.game.MessageToUser.deserializeBinaryFromReader);
msg.setUserMessage(value);
break;
case 2:
var value = new proto.game.CommandUpdate;
reader.readMessage(value,proto.game.CommandUpdate.deserializeBinaryFromReader);
msg.setCommandUpdate(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.UserInterfaceMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.UserInterfaceMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.UserInterfaceMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.UserInterfaceMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUserMessage();
if (f != null) {
writer.writeMessage(
1,
f,
proto.game.MessageToUser.serializeBinaryToWriter
);
}
f = message.getCommandUpdate();
if (f != null) {
writer.writeMessage(
2,
f,
proto.game.CommandUpdate.serializeBinaryToWriter
);
}
};
/**
* optional MessageToUser user_message = 1;
* @return {?proto.game.MessageToUser}
*/
proto.game.UserInterfaceMessage.prototype.getUserMessage = function() {
return /** @type{?proto.game.MessageToUser} */ (
jspb.Message.getWrapperField(this, proto.game.MessageToUser, 1));
};
/** @param {?proto.game.MessageToUser|undefined} value */
proto.game.UserInterfaceMessage.prototype.setUserMessage = function(value) {
jspb.Message.setOneofWrapperField(this, 1, proto.game.UserInterfaceMessage.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
*/
proto.game.UserInterfaceMessage.prototype.clearUserMessage = function() {
this.setUserMessage(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.game.UserInterfaceMessage.prototype.hasUserMessage = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional CommandUpdate command_update = 2;
* @return {?proto.game.CommandUpdate}
*/
proto.game.UserInterfaceMessage.prototype.getCommandUpdate = function() {
return /** @type{?proto.game.CommandUpdate} */ (
jspb.Message.getWrapperField(this, proto.game.CommandUpdate, 2));
};
/** @param {?proto.game.CommandUpdate|undefined} value */
proto.game.UserInterfaceMessage.prototype.setCommandUpdate = function(value) {
jspb.Message.setOneofWrapperField(this, 2, proto.game.UserInterfaceMessage.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
*/
proto.game.UserInterfaceMessage.prototype.clearCommandUpdate = function() {
this.setCommandUpdate(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.game.UserInterfaceMessage.prototype.hasCommandUpdate = function() {
return jspb.Message.getField(this, 2) != null;
};
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.game.Exit.prototype.toObject = function(opt_includeInstance) {
return proto.game.Exit.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.game.Exit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Exit.toObject = function(includeInstance, msg) {
var f, obj = {
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.Exit}
*/
proto.game.Exit.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.Exit;
return proto.game.Exit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.Exit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.Exit}
*/
proto.game.Exit.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.Exit.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.Exit.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.Exit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Exit.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};
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.game.Location.prototype.toObject = function(opt_includeInstance) {
return proto.game.Location.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.game.Location} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Location.toObject = function(includeInstance, msg) {
var f, obj = {
did: jspb.Message.getFieldWithDefault(msg, 1, ""),
tip: jspb.Message.getFieldWithDefault(msg, 2, ""),
x: jspb.Message.getFieldWithDefault(msg, 3, 0),
y: jspb.Message.getFieldWithDefault(msg, 4, 0),
description: jspb.Message.getFieldWithDefault(msg, 5, ""),
portal: (f = msg.getPortal()) && proto.game.Portal.toObject(includeInstance, f),
inventoryMap: (f = msg.getInventoryMap()) ? f.toObject(includeInstance, undefined) : []
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.Location}
*/
proto.game.Location.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.Location;
return proto.game.Location.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.Location} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.Location}
*/
proto.game.Location.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.setDid(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTip(value);
break;
case 3:
var value = /** @type {number} */ (reader.readInt64());
msg.setX(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setY(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setDescription(value);
break;
case 6:
var value = new proto.game.Portal;
reader.readMessage(value,proto.game.Portal.deserializeBinaryFromReader);
msg.setPortal(value);
break;
case 7:
var value = msg.getInventoryMap();
reader.readMessage(value, function(message, reader) {
jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "");
});
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.Location.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.Location.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.Location} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Location.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getDid();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getTip();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getX();
if (f !== 0) {
writer.writeInt64(
3,
f
);
}
f = message.getY();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getDescription();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getPortal();
if (f != null) {
writer.writeMessage(
6,
f,
proto.game.Portal.serializeBinaryToWriter
);
}
f = message.getInventoryMap(true);
if (f && f.getLength() > 0) {
f.serializeBinary(7, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
}
};
/**
* optional string did = 1;
* @return {string}
*/
proto.game.Location.prototype.getDid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.Location.prototype.setDid = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string tip = 2;
* @return {string}
*/
proto.game.Location.prototype.getTip = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.Location.prototype.setTip = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional int64 x = 3;
* @return {number}
*/
proto.game.Location.prototype.getX = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
};
/** @param {number} value */
proto.game.Location.prototype.setX = function(value) {
jspb.Message.setProto3IntField(this, 3, value);
};
/**
* optional int64 y = 4;
* @return {number}
*/
proto.game.Location.prototype.getY = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.game.Location.prototype.setY = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional string description = 5;
* @return {string}
*/
proto.game.Location.prototype.getDescription = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
proto.game.Location.prototype.setDescription = function(value) {
jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional Portal portal = 6;
* @return {?proto.game.Portal}
*/
proto.game.Location.prototype.getPortal = function() {
return /** @type{?proto.game.Portal} */ (
jspb.Message.getWrapperField(this, proto.game.Portal, 6));
};
/** @param {?proto.game.Portal|undefined} value */
proto.game.Location.prototype.setPortal = function(value) {
jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
*/
proto.game.Location.prototype.clearPortal = function() {
this.setPortal(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.game.Location.prototype.hasPortal = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* map<string, string> inventory = 7;
* @param {boolean=} opt_noLazyCreate Do not create the map if
* empty, instead returning `undefined`
* @return {!jspb.Map<string,string>}
*/
proto.game.Location.prototype.getInventoryMap = function(opt_noLazyCreate) {
return /** @type {!jspb.Map<string,string>} */ (
jspb.Message.getMapField(this, 7, opt_noLazyCreate,
null));
};
/**
* Clears values from the map. The map will be non-null.
*/
proto.game.Location.prototype.clearInventoryMap = function() {
this.getInventoryMap().clear();
};
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.game.Player.prototype.toObject = function(opt_includeInstance) {
return proto.game.Player.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.game.Player} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Player.toObject = function(includeInstance, msg) {
var f, obj = {
name: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.Player}
*/
proto.game.Player.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.Player;
return proto.game.Player.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.Player} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.Player}
*/
proto.game.Player.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.setName(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.Player.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.Player.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.Player} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Player.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getName();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string name = 1;
* @return {string}
*/
proto.game.Player.prototype.getName = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.Player.prototype.setName = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
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.game.Portal.prototype.toObject = function(opt_includeInstance) {
return proto.game.Portal.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.game.Portal} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Portal.toObject = function(includeInstance, msg) {
var f, obj = {
to: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.Portal}
*/
proto.game.Portal.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.Portal;
return proto.game.Portal.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.Portal} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.Portal}
*/
proto.game.Portal.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.setTo(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.Portal.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.Portal.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.Portal} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Portal.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getTo();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string to = 1;
* @return {string}
*/
proto.game.Portal.prototype.getTo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.Portal.prototype.setTo = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
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.game.CommandReceived.prototype.toObject = function(opt_includeInstance) {
return proto.game.CommandReceived.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.game.CommandReceived} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.CommandReceived.toObject = function(includeInstance, msg) {
var f, obj = {
sequence: jspb.Message.getFieldWithDefault(msg, 1, 0),
error: jspb.Message.getBooleanFieldWithDefault(msg, 2, false),
errorMessage: 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.game.CommandReceived}
*/
proto.game.CommandReceived.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.CommandReceived;
return proto.game.CommandReceived.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.CommandReceived} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.CommandReceived}
*/
proto.game.CommandReceived.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readUint64());
msg.setSequence(value);
break;
case 2:
var value = /** @type {boolean} */ (reader.readBool());
msg.setError(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setErrorMessage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.CommandReceived.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.CommandReceived.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.CommandReceived} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.CommandReceived.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getSequence();
if (f !== 0) {
writer.writeUint64(
1,
f
);
}
f = message.getError();
if (f) {
writer.writeBool(
2,
f
);
}
f = message.getErrorMessage();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional uint64 sequence = 1;
* @return {number}
*/
proto.game.CommandReceived.prototype.getSequence = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/** @param {number} value */
proto.game.CommandReceived.prototype.setSequence = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional bool error = 2;
* @return {boolean}
*/
proto.game.CommandReceived.prototype.getError = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false));
};
/** @param {boolean} value */
proto.game.CommandReceived.prototype.setError = function(value) {
jspb.Message.setProto3BooleanField(this, 2, value);
};
/**
* optional string error_message = 3;
* @return {string}
*/
proto.game.CommandReceived.prototype.getErrorMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.game.CommandReceived.prototype.setErrorMessage = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
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.game.Session.prototype.toObject = function(opt_includeInstance) {
return proto.game.Session.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.game.Session} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Session.toObject = function(includeInstance, msg) {
var f, obj = {
uuid: jspb.Message.getFieldWithDefault(msg, 1, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.Session}
*/
proto.game.Session.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.Session;
return proto.game.Session.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.Session} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.Session}
*/
proto.game.Session.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.setUuid(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.Session.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.Session.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.Session} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.Session.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUuid();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
};
/**
* optional string uuid = 1;
* @return {string}
*/
proto.game.Session.prototype.getUuid = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.Session.prototype.setUuid = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
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.game.ChatMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.ChatMessage.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.game.ChatMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.ChatMessage.toObject = function(includeInstance, msg) {
var f, obj = {
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
message: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.ChatMessage}
*/
proto.game.ChatMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.ChatMessage;
return proto.game.ChatMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.ChatMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.ChatMessage}
*/
proto.game.ChatMessage.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.setFrom(value);
break;
case 2:
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.game.ChatMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.ChatMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.ChatMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.ChatMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string from = 1;
* @return {string}
*/
proto.game.ChatMessage.prototype.getFrom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.ChatMessage.prototype.setFrom = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string message = 2;
* @return {string}
*/
proto.game.ChatMessage.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.ChatMessage.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
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.game.ShoutMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.ShoutMessage.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.game.ShoutMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.ShoutMessage.toObject = function(includeInstance, msg) {
var f, obj = {
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
message: jspb.Message.getFieldWithDefault(msg, 2, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.ShoutMessage}
*/
proto.game.ShoutMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.ShoutMessage;
return proto.game.ShoutMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.ShoutMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.ShoutMessage}
*/
proto.game.ShoutMessage.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.setFrom(value);
break;
case 2:
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.game.ShoutMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.ShoutMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.ShoutMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.ShoutMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
};
/**
* optional string from = 1;
* @return {string}
*/
proto.game.ShoutMessage.prototype.getFrom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.ShoutMessage.prototype.setFrom = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string message = 2;
* @return {string}
*/
proto.game.ShoutMessage.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.ShoutMessage.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
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.game.OpenPortalMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.OpenPortalMessage.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.game.OpenPortalMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.OpenPortalMessage.toObject = function(includeInstance, msg) {
var f, obj = {
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
to: jspb.Message.getFieldWithDefault(msg, 2, ""),
toLandId: jspb.Message.getFieldWithDefault(msg, 3, ""),
locationX: jspb.Message.getFieldWithDefault(msg, 4, 0),
locationY: jspb.Message.getFieldWithDefault(msg, 5, 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.game.OpenPortalMessage}
*/
proto.game.OpenPortalMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.OpenPortalMessage;
return proto.game.OpenPortalMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.OpenPortalMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.OpenPortalMessage}
*/
proto.game.OpenPortalMessage.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.setFrom(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTo(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setToLandId(value);
break;
case 4:
var value = /** @type {number} */ (reader.readInt64());
msg.setLocationX(value);
break;
case 5:
var value = /** @type {number} */ (reader.readInt64());
msg.setLocationY(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.OpenPortalMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.OpenPortalMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.OpenPortalMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.OpenPortalMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getTo();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getToLandId();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getLocationX();
if (f !== 0) {
writer.writeInt64(
4,
f
);
}
f = message.getLocationY();
if (f !== 0) {
writer.writeInt64(
5,
f
);
}
};
/**
* optional string from = 1;
* @return {string}
*/
proto.game.OpenPortalMessage.prototype.getFrom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.OpenPortalMessage.prototype.setFrom = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string to = 2;
* @return {string}
*/
proto.game.OpenPortalMessage.prototype.getTo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.OpenPortalMessage.prototype.setTo = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string to_land_id = 3;
* @return {string}
*/
proto.game.OpenPortalMessage.prototype.getToLandId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.game.OpenPortalMessage.prototype.setToLandId = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional int64 location_x = 4;
* @return {number}
*/
proto.game.OpenPortalMessage.prototype.getLocationX = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
};
/** @param {number} value */
proto.game.OpenPortalMessage.prototype.setLocationX = function(value) {
jspb.Message.setProto3IntField(this, 4, value);
};
/**
* optional int64 location_y = 5;
* @return {number}
*/
proto.game.OpenPortalMessage.prototype.getLocationY = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};
/** @param {number} value */
proto.game.OpenPortalMessage.prototype.setLocationY = function(value) {
jspb.Message.setProto3IntField(this, 5, value);
};
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.game.OpenPortalResponseMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.OpenPortalResponseMessage.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.game.OpenPortalResponseMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.OpenPortalResponseMessage.toObject = function(includeInstance, msg) {
var f, obj = {
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
to: jspb.Message.getFieldWithDefault(msg, 2, ""),
accepted: jspb.Message.getBooleanFieldWithDefault(msg, 3, false),
opener: jspb.Message.getFieldWithDefault(msg, 4, ""),
landId: jspb.Message.getFieldWithDefault(msg, 5, ""),
locationX: jspb.Message.getFieldWithDefault(msg, 6, 0),
locationY: jspb.Message.getFieldWithDefault(msg, 7, 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.game.OpenPortalResponseMessage}
*/
proto.game.OpenPortalResponseMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.OpenPortalResponseMessage;
return proto.game.OpenPortalResponseMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.OpenPortalResponseMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.OpenPortalResponseMessage}
*/
proto.game.OpenPortalResponseMessage.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.setFrom(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTo(value);
break;
case 3:
var value = /** @type {boolean} */ (reader.readBool());
msg.setAccepted(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setOpener(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setLandId(value);
break;
case 6:
var value = /** @type {number} */ (reader.readInt64());
msg.setLocationX(value);
break;
case 7:
var value = /** @type {number} */ (reader.readInt64());
msg.setLocationY(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.OpenPortalResponseMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.OpenPortalResponseMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.OpenPortalResponseMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.OpenPortalResponseMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getTo();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getAccepted();
if (f) {
writer.writeBool(
3,
f
);
}
f = message.getOpener();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getLandId();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
f = message.getLocationX();
if (f !== 0) {
writer.writeInt64(
6,
f
);
}
f = message.getLocationY();
if (f !== 0) {
writer.writeInt64(
7,
f
);
}
};
/**
* optional string from = 1;
* @return {string}
*/
proto.game.OpenPortalResponseMessage.prototype.getFrom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.OpenPortalResponseMessage.prototype.setFrom = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string to = 2;
* @return {string}
*/
proto.game.OpenPortalResponseMessage.prototype.getTo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.OpenPortalResponseMessage.prototype.setTo = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional bool accepted = 3;
* @return {boolean}
*/
proto.game.OpenPortalResponseMessage.prototype.getAccepted = function() {
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};
/** @param {boolean} value */
proto.game.OpenPortalResponseMessage.prototype.setAccepted = function(value) {
jspb.Message.setProto3BooleanField(this, 3, value);
};
/**
* optional string opener = 4;
* @return {string}
*/
proto.game.OpenPortalResponseMessage.prototype.getOpener = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.game.OpenPortalResponseMessage.prototype.setOpener = function(value) {
jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string land_id = 5;
* @return {string}
*/
proto.game.OpenPortalResponseMessage.prototype.getLandId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
proto.game.OpenPortalResponseMessage.prototype.setLandId = function(value) {
jspb.Message.setProto3StringField(this, 5, value);
};
/**
* optional int64 location_x = 6;
* @return {number}
*/
proto.game.OpenPortalResponseMessage.prototype.getLocationX = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0));
};
/** @param {number} value */
proto.game.OpenPortalResponseMessage.prototype.setLocationX = function(value) {
jspb.Message.setProto3IntField(this, 6, value);
};
/**
* optional int64 location_y = 7;
* @return {number}
*/
proto.game.OpenPortalResponseMessage.prototype.getLocationY = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0));
};
/** @param {number} value */
proto.game.OpenPortalResponseMessage.prototype.setLocationY = function(value) {
jspb.Message.setProto3IntField(this, 7, value);
};
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.game.TransferredObjectMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.TransferredObjectMessage.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.game.TransferredObjectMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.TransferredObjectMessage.toObject = function(includeInstance, msg) {
var f, obj = {
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
to: jspb.Message.getFieldWithDefault(msg, 2, ""),
object: jspb.Message.getFieldWithDefault(msg, 3, ""),
message: jspb.Message.getFieldWithDefault(msg, 4, ""),
error: jspb.Message.getFieldWithDefault(msg, 5, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.game.TransferredObjectMessage}
*/
proto.game.TransferredObjectMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.TransferredObjectMessage;
return proto.game.TransferredObjectMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.TransferredObjectMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.TransferredObjectMessage}
*/
proto.game.TransferredObjectMessage.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.setFrom(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTo(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setObject(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setMessage(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setError(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.TransferredObjectMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.TransferredObjectMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.TransferredObjectMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.TransferredObjectMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getTo();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getObject();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getMessage();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getError();
if (f.length > 0) {
writer.writeString(
5,
f
);
}
};
/**
* optional string from = 1;
* @return {string}
*/
proto.game.TransferredObjectMessage.prototype.getFrom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.TransferredObjectMessage.prototype.setFrom = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string to = 2;
* @return {string}
*/
proto.game.TransferredObjectMessage.prototype.getTo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.TransferredObjectMessage.prototype.setTo = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string object = 3;
* @return {string}
*/
proto.game.TransferredObjectMessage.prototype.getObject = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.game.TransferredObjectMessage.prototype.setObject = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string message = 4;
* @return {string}
*/
proto.game.TransferredObjectMessage.prototype.getMessage = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/** @param {string} value */
proto.game.TransferredObjectMessage.prototype.setMessage = function(value) {
jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string error = 5;
* @return {string}
*/
proto.game.TransferredObjectMessage.prototype.getError = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
};
/** @param {string} value */
proto.game.TransferredObjectMessage.prototype.setError = function(value) {
jspb.Message.setProto3StringField(this, 5, value);
};
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.game.RequestObjectTransferMessage.prototype.toObject = function(opt_includeInstance) {
return proto.game.RequestObjectTransferMessage.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.game.RequestObjectTransferMessage} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.RequestObjectTransferMessage.toObject = function(includeInstance, msg) {
var f, obj = {
from: jspb.Message.getFieldWithDefault(msg, 1, ""),
to: jspb.Message.getFieldWithDefault(msg, 2, ""),
object: 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.game.RequestObjectTransferMessage}
*/
proto.game.RequestObjectTransferMessage.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.game.RequestObjectTransferMessage;
return proto.game.RequestObjectTransferMessage.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.game.RequestObjectTransferMessage} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.game.RequestObjectTransferMessage}
*/
proto.game.RequestObjectTransferMessage.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.setFrom(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setTo(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setObject(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.game.RequestObjectTransferMessage.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.game.RequestObjectTransferMessage.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.game.RequestObjectTransferMessage} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.game.RequestObjectTransferMessage.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getFrom();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getTo();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getObject();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional string from = 1;
* @return {string}
*/
proto.game.RequestObjectTransferMessage.prototype.getFrom = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/** @param {string} value */
proto.game.RequestObjectTransferMessage.prototype.setFrom = function(value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string to = 2;
* @return {string}
*/
proto.game.RequestObjectTransferMessage.prototype.getTo = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/** @param {string} value */
proto.game.RequestObjectTransferMessage.prototype.setTo = function(value) {
jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string object = 3;
* @return {string}
*/
proto.game.RequestObjectTransferMessage.prototype.getObject = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/** @param {string} value */
proto.game.RequestObjectTransferMessage.prototype.setObject = function(value) {
jspb.Message.setProto3StringField(this, 3, value);
};
goog.object.extend(exports, proto);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment