// source: dicebot.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.dicebot.GetAllVariablesReply', null, global); goog.exportSymbol('proto.dicebot.GetAllVariablesRequest', null, global); goog.exportSymbol('proto.dicebot.GetVariableReply', null, global); goog.exportSymbol('proto.dicebot.GetVariableRequest', null, global); goog.exportSymbol('proto.dicebot.RoomsListReply', null, global); goog.exportSymbol('proto.dicebot.RoomsListReply.Room', null, global); goog.exportSymbol('proto.dicebot.SetVariableReply', null, global); goog.exportSymbol('proto.dicebot.SetVariableRequest', null, global); goog.exportSymbol('proto.dicebot.UserIdRequest', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.dicebot.GetVariableRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.GetVariableRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.GetVariableRequest.displayName = 'proto.dicebot.GetVariableRequest'; } /** * 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.dicebot.GetVariableReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.GetVariableReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.GetVariableReply.displayName = 'proto.dicebot.GetVariableReply'; } /** * 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.dicebot.GetAllVariablesRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.GetAllVariablesRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.GetAllVariablesRequest.displayName = 'proto.dicebot.GetAllVariablesRequest'; } /** * 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.dicebot.GetAllVariablesReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.GetAllVariablesReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.GetAllVariablesReply.displayName = 'proto.dicebot.GetAllVariablesReply'; } /** * 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.dicebot.SetVariableRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.SetVariableRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.SetVariableRequest.displayName = 'proto.dicebot.SetVariableRequest'; } /** * 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.dicebot.SetVariableReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.SetVariableReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.SetVariableReply.displayName = 'proto.dicebot.SetVariableReply'; } /** * 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.dicebot.UserIdRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.UserIdRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.UserIdRequest.displayName = 'proto.dicebot.UserIdRequest'; } /** * 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.dicebot.RoomsListReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.dicebot.RoomsListReply.repeatedFields_, null); }; goog.inherits(proto.dicebot.RoomsListReply, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.RoomsListReply.displayName = 'proto.dicebot.RoomsListReply'; } /** * 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.dicebot.RoomsListReply.Room = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.dicebot.RoomsListReply.Room, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.dicebot.RoomsListReply.Room.displayName = 'proto.dicebot.RoomsListReply.Room'; } 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_, 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.dicebot.GetVariableRequest.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.GetVariableRequest.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.dicebot.GetVariableRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetVariableRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, ""), roomId: jspb.Message.getFieldWithDefault(msg, 2, ""), variableName: 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.dicebot.GetVariableRequest} */ proto.dicebot.GetVariableRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.GetVariableRequest; return proto.dicebot.GetVariableRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.GetVariableRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.GetVariableRequest} */ proto.dicebot.GetVariableRequest.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.setUserId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setRoomId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setVariableName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.GetVariableRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.GetVariableRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.GetVariableRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetVariableRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getRoomId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getVariableName(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.dicebot.GetVariableRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.dicebot.GetVariableRequest} returns this */ proto.dicebot.GetVariableRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string room_id = 2; * @return {string} */ proto.dicebot.GetVariableRequest.prototype.getRoomId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.dicebot.GetVariableRequest} returns this */ proto.dicebot.GetVariableRequest.prototype.setRoomId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string variable_name = 3; * @return {string} */ proto.dicebot.GetVariableRequest.prototype.getVariableName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.dicebot.GetVariableRequest} returns this */ proto.dicebot.GetVariableRequest.prototype.setVariableName = function(value) { return 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_, 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.dicebot.GetVariableReply.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.GetVariableReply.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.dicebot.GetVariableReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetVariableReply.toObject = function(includeInstance, msg) { var f, obj = { value: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.dicebot.GetVariableReply} */ proto.dicebot.GetVariableReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.GetVariableReply; return proto.dicebot.GetVariableReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.GetVariableReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.GetVariableReply} */ proto.dicebot.GetVariableReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.GetVariableReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.GetVariableReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.GetVariableReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetVariableReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getValue(); if (f !== 0) { writer.writeInt32( 1, f ); } }; /** * optional int32 value = 1; * @return {number} */ proto.dicebot.GetVariableReply.prototype.getValue = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.dicebot.GetVariableReply} returns this */ proto.dicebot.GetVariableReply.prototype.setValue = function(value) { return jspb.Message.setProto3IntField(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_, 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.dicebot.GetAllVariablesRequest.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.GetAllVariablesRequest.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.dicebot.GetAllVariablesRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetAllVariablesRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, ""), roomId: 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.dicebot.GetAllVariablesRequest} */ proto.dicebot.GetAllVariablesRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.GetAllVariablesRequest; return proto.dicebot.GetAllVariablesRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.GetAllVariablesRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.GetAllVariablesRequest} */ proto.dicebot.GetAllVariablesRequest.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.setUserId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setRoomId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.GetAllVariablesRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.GetAllVariablesRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.GetAllVariablesRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetAllVariablesRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getRoomId(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.dicebot.GetAllVariablesRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.dicebot.GetAllVariablesRequest} returns this */ proto.dicebot.GetAllVariablesRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string room_id = 2; * @return {string} */ proto.dicebot.GetAllVariablesRequest.prototype.getRoomId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.dicebot.GetAllVariablesRequest} returns this */ proto.dicebot.GetAllVariablesRequest.prototype.setRoomId = function(value) { return 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_, 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.dicebot.GetAllVariablesReply.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.GetAllVariablesReply.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.dicebot.GetAllVariablesReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetAllVariablesReply.toObject = function(includeInstance, msg) { var f, obj = { variablesMap: (f = msg.getVariablesMap()) ? 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.dicebot.GetAllVariablesReply} */ proto.dicebot.GetAllVariablesReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.GetAllVariablesReply; return proto.dicebot.GetAllVariablesReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.GetAllVariablesReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.GetAllVariablesReply} */ proto.dicebot.GetAllVariablesReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = msg.getVariablesMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readInt32, null, "", 0); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.GetAllVariablesReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.GetAllVariablesReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.GetAllVariablesReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.GetAllVariablesReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getVariablesMap(true); if (f && f.getLength() > 0) { f.serializeBinary(1, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeInt32); } }; /** * map variables = 1; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.dicebot.GetAllVariablesReply.prototype.getVariablesMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 1, opt_noLazyCreate, null)); }; /** * Clears values from the map. The map will be non-null. * @return {!proto.dicebot.GetAllVariablesReply} returns this */ proto.dicebot.GetAllVariablesReply.prototype.clearVariablesMap = function() { this.getVariablesMap().clear(); return this;}; 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_, 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.dicebot.SetVariableRequest.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.SetVariableRequest.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.dicebot.SetVariableRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.SetVariableRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: jspb.Message.getFieldWithDefault(msg, 1, ""), roomId: jspb.Message.getFieldWithDefault(msg, 2, ""), variableName: jspb.Message.getFieldWithDefault(msg, 3, ""), value: jspb.Message.getFieldWithDefault(msg, 4, 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.dicebot.SetVariableRequest} */ proto.dicebot.SetVariableRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.SetVariableRequest; return proto.dicebot.SetVariableRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.SetVariableRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.SetVariableRequest} */ proto.dicebot.SetVariableRequest.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.setUserId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setRoomId(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setVariableName(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setValue(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.SetVariableRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.SetVariableRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.SetVariableRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.SetVariableRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getRoomId(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getVariableName(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getValue(); if (f !== 0) { writer.writeInt32( 4, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.dicebot.SetVariableRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.dicebot.SetVariableRequest} returns this */ proto.dicebot.SetVariableRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string room_id = 2; * @return {string} */ proto.dicebot.SetVariableRequest.prototype.getRoomId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.dicebot.SetVariableRequest} returns this */ proto.dicebot.SetVariableRequest.prototype.setRoomId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string variable_name = 3; * @return {string} */ proto.dicebot.SetVariableRequest.prototype.getVariableName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.dicebot.SetVariableRequest} returns this */ proto.dicebot.SetVariableRequest.prototype.setVariableName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional int32 value = 4; * @return {number} */ proto.dicebot.SetVariableRequest.prototype.getValue = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.dicebot.SetVariableRequest} returns this */ proto.dicebot.SetVariableRequest.prototype.setValue = function(value) { return jspb.Message.setProto3IntField(this, 4, 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_, 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.dicebot.SetVariableReply.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.SetVariableReply.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.dicebot.SetVariableReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.SetVariableReply.toObject = function(includeInstance, msg) { var f, obj = { success: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.dicebot.SetVariableReply} */ proto.dicebot.SetVariableReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.SetVariableReply; return proto.dicebot.SetVariableReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.SetVariableReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.SetVariableReply} */ proto.dicebot.SetVariableReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setSuccess(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.SetVariableReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.SetVariableReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.SetVariableReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.SetVariableReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSuccess(); if (f) { writer.writeBool( 1, f ); } }; /** * optional bool success = 1; * @return {boolean} */ proto.dicebot.SetVariableReply.prototype.getSuccess = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** * @param {boolean} value * @return {!proto.dicebot.SetVariableReply} returns this */ proto.dicebot.SetVariableReply.prototype.setSuccess = function(value) { return jspb.Message.setProto3BooleanField(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_, 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.dicebot.UserIdRequest.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.UserIdRequest.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.dicebot.UserIdRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.UserIdRequest.toObject = function(includeInstance, msg) { var f, obj = { userId: 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.dicebot.UserIdRequest} */ proto.dicebot.UserIdRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.UserIdRequest; return proto.dicebot.UserIdRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.UserIdRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.UserIdRequest} */ proto.dicebot.UserIdRequest.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.setUserId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.UserIdRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.UserIdRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.UserIdRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.UserIdRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserId(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string user_id = 1; * @return {string} */ proto.dicebot.UserIdRequest.prototype.getUserId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.dicebot.UserIdRequest} returns this */ proto.dicebot.UserIdRequest.prototype.setUserId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.dicebot.RoomsListReply.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_, 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.dicebot.RoomsListReply.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.RoomsListReply.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.dicebot.RoomsListReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.RoomsListReply.toObject = function(includeInstance, msg) { var f, obj = { roomsList: jspb.Message.toObjectList(msg.getRoomsList(), proto.dicebot.RoomsListReply.Room.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.dicebot.RoomsListReply} */ proto.dicebot.RoomsListReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.RoomsListReply; return proto.dicebot.RoomsListReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.RoomsListReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.RoomsListReply} */ proto.dicebot.RoomsListReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.dicebot.RoomsListReply.Room; reader.readMessage(value,proto.dicebot.RoomsListReply.Room.deserializeBinaryFromReader); msg.addRooms(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.RoomsListReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.RoomsListReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.RoomsListReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.RoomsListReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRoomsList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, proto.dicebot.RoomsListReply.Room.serializeBinaryToWriter ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_, 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.dicebot.RoomsListReply.Room.prototype.toObject = function(opt_includeInstance) { return proto.dicebot.RoomsListReply.Room.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.dicebot.RoomsListReply.Room} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.RoomsListReply.Room.toObject = function(includeInstance, msg) { var f, obj = { roomId: jspb.Message.getFieldWithDefault(msg, 1, ""), displayName: 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.dicebot.RoomsListReply.Room} */ proto.dicebot.RoomsListReply.Room.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.dicebot.RoomsListReply.Room; return proto.dicebot.RoomsListReply.Room.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.dicebot.RoomsListReply.Room} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.dicebot.RoomsListReply.Room} */ proto.dicebot.RoomsListReply.Room.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.setRoomId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setDisplayName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.dicebot.RoomsListReply.Room.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.dicebot.RoomsListReply.Room.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.dicebot.RoomsListReply.Room} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.dicebot.RoomsListReply.Room.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRoomId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getDisplayName(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string room_id = 1; * @return {string} */ proto.dicebot.RoomsListReply.Room.prototype.getRoomId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.dicebot.RoomsListReply.Room} returns this */ proto.dicebot.RoomsListReply.Room.prototype.setRoomId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string display_name = 2; * @return {string} */ proto.dicebot.RoomsListReply.Room.prototype.getDisplayName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.dicebot.RoomsListReply.Room} returns this */ proto.dicebot.RoomsListReply.Room.prototype.setDisplayName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * repeated Room rooms = 1; * @return {!Array} */ proto.dicebot.RoomsListReply.prototype.getRoomsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, proto.dicebot.RoomsListReply.Room, 1)); }; /** * @param {!Array} value * @return {!proto.dicebot.RoomsListReply} returns this */ proto.dicebot.RoomsListReply.prototype.setRoomsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.dicebot.RoomsListReply.Room=} opt_value * @param {number=} opt_index * @return {!proto.dicebot.RoomsListReply.Room} */ proto.dicebot.RoomsListReply.prototype.addRooms = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.dicebot.RoomsListReply.Room, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.dicebot.RoomsListReply} returns this */ proto.dicebot.RoomsListReply.prototype.clearRoomsList = function() { return this.setRoomsList([]); }; goog.object.extend(exports, proto.dicebot);