forked from projectmoon/tenebrous-dicebot
535 lines
16 KiB
JavaScript
535 lines
16 KiB
JavaScript
|
// source: web-api.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.web_api.RoomsListReply', null, global);
|
||
|
goog.exportSymbol('proto.web_api.RoomsListReply.Room', null, global);
|
||
|
goog.exportSymbol('proto.web_api.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.web_api.UserIdRequest = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||
|
};
|
||
|
goog.inherits(proto.web_api.UserIdRequest, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
/**
|
||
|
* @public
|
||
|
* @override
|
||
|
*/
|
||
|
proto.web_api.UserIdRequest.displayName = 'proto.web_api.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.web_api.RoomsListReply = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.web_api.RoomsListReply.repeatedFields_, null);
|
||
|
};
|
||
|
goog.inherits(proto.web_api.RoomsListReply, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
/**
|
||
|
* @public
|
||
|
* @override
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.displayName = 'proto.web_api.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.web_api.RoomsListReply.Room = function(opt_data) {
|
||
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||
|
};
|
||
|
goog.inherits(proto.web_api.RoomsListReply.Room, jspb.Message);
|
||
|
if (goog.DEBUG && !COMPILED) {
|
||
|
/**
|
||
|
* @public
|
||
|
* @override
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.Room.displayName = 'proto.web_api.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_<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.web_api.UserIdRequest.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.web_api.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.web_api.UserIdRequest} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||
|
*/
|
||
|
proto.web_api.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.web_api.UserIdRequest}
|
||
|
*/
|
||
|
proto.web_api.UserIdRequest.deserializeBinary = function(bytes) {
|
||
|
var reader = new jspb.BinaryReader(bytes);
|
||
|
var msg = new proto.web_api.UserIdRequest;
|
||
|
return proto.web_api.UserIdRequest.deserializeBinaryFromReader(msg, reader);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Deserializes binary data (in protobuf wire format) from the
|
||
|
* given reader into the given message object.
|
||
|
* @param {!proto.web_api.UserIdRequest} msg The message object to deserialize into.
|
||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||
|
* @return {!proto.web_api.UserIdRequest}
|
||
|
*/
|
||
|
proto.web_api.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.web_api.UserIdRequest.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
proto.web_api.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.web_api.UserIdRequest} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||
|
*/
|
||
|
proto.web_api.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.web_api.UserIdRequest.prototype.getUserId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {string} value
|
||
|
* @return {!proto.web_api.UserIdRequest} returns this
|
||
|
*/
|
||
|
proto.web_api.UserIdRequest.prototype.setUserId = function(value) {
|
||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
|
||
|
/**
|
||
|
* List of repeated fields within this message type.
|
||
|
* @private {!Array<number>}
|
||
|
* @const
|
||
|
*/
|
||
|
proto.web_api.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_<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.web_api.RoomsListReply.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.web_api.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.web_api.RoomsListReply} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.toObject = function(includeInstance, msg) {
|
||
|
var f, obj = {
|
||
|
roomsList: jspb.Message.toObjectList(msg.getRoomsList(),
|
||
|
proto.web_api.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.web_api.RoomsListReply}
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.deserializeBinary = function(bytes) {
|
||
|
var reader = new jspb.BinaryReader(bytes);
|
||
|
var msg = new proto.web_api.RoomsListReply;
|
||
|
return proto.web_api.RoomsListReply.deserializeBinaryFromReader(msg, reader);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Deserializes binary data (in protobuf wire format) from the
|
||
|
* given reader into the given message object.
|
||
|
* @param {!proto.web_api.RoomsListReply} msg The message object to deserialize into.
|
||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||
|
* @return {!proto.web_api.RoomsListReply}
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.deserializeBinaryFromReader = function(msg, reader) {
|
||
|
while (reader.nextField()) {
|
||
|
if (reader.isEndGroup()) {
|
||
|
break;
|
||
|
}
|
||
|
var field = reader.getFieldNumber();
|
||
|
switch (field) {
|
||
|
case 1:
|
||
|
var value = new proto.web_api.RoomsListReply.Room;
|
||
|
reader.readMessage(value,proto.web_api.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.web_api.RoomsListReply.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
proto.web_api.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.web_api.RoomsListReply} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.serializeBinaryToWriter = function(message, writer) {
|
||
|
var f = undefined;
|
||
|
f = message.getRoomsList();
|
||
|
if (f.length > 0) {
|
||
|
writer.writeRepeatedMessage(
|
||
|
1,
|
||
|
f,
|
||
|
proto.web_api.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_<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.web_api.RoomsListReply.Room.prototype.toObject = function(opt_includeInstance) {
|
||
|
return proto.web_api.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.web_api.RoomsListReply.Room} msg The msg instance to transform.
|
||
|
* @return {!Object}
|
||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||
|
*/
|
||
|
proto.web_api.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.web_api.RoomsListReply.Room}
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.Room.deserializeBinary = function(bytes) {
|
||
|
var reader = new jspb.BinaryReader(bytes);
|
||
|
var msg = new proto.web_api.RoomsListReply.Room;
|
||
|
return proto.web_api.RoomsListReply.Room.deserializeBinaryFromReader(msg, reader);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Deserializes binary data (in protobuf wire format) from the
|
||
|
* given reader into the given message object.
|
||
|
* @param {!proto.web_api.RoomsListReply.Room} msg The message object to deserialize into.
|
||
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||
|
* @return {!proto.web_api.RoomsListReply.Room}
|
||
|
*/
|
||
|
proto.web_api.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.web_api.RoomsListReply.Room.prototype.serializeBinary = function() {
|
||
|
var writer = new jspb.BinaryWriter();
|
||
|
proto.web_api.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.web_api.RoomsListReply.Room} message
|
||
|
* @param {!jspb.BinaryWriter} writer
|
||
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||
|
*/
|
||
|
proto.web_api.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.web_api.RoomsListReply.Room.prototype.getRoomId = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {string} value
|
||
|
* @return {!proto.web_api.RoomsListReply.Room} returns this
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.Room.prototype.setRoomId = function(value) {
|
||
|
return jspb.Message.setProto3StringField(this, 1, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* optional string display_name = 2;
|
||
|
* @return {string}
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.Room.prototype.getDisplayName = function() {
|
||
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {string} value
|
||
|
* @return {!proto.web_api.RoomsListReply.Room} returns this
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.Room.prototype.setDisplayName = function(value) {
|
||
|
return jspb.Message.setProto3StringField(this, 2, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* repeated Room rooms = 1;
|
||
|
* @return {!Array<!proto.web_api.RoomsListReply.Room>}
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.prototype.getRoomsList = function() {
|
||
|
return /** @type{!Array<!proto.web_api.RoomsListReply.Room>} */ (
|
||
|
jspb.Message.getRepeatedWrapperField(this, proto.web_api.RoomsListReply.Room, 1));
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!Array<!proto.web_api.RoomsListReply.Room>} value
|
||
|
* @return {!proto.web_api.RoomsListReply} returns this
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.prototype.setRoomsList = function(value) {
|
||
|
return jspb.Message.setRepeatedWrapperField(this, 1, value);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* @param {!proto.web_api.RoomsListReply.Room=} opt_value
|
||
|
* @param {number=} opt_index
|
||
|
* @return {!proto.web_api.RoomsListReply.Room}
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.prototype.addRooms = function(opt_value, opt_index) {
|
||
|
return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.web_api.RoomsListReply.Room, opt_index);
|
||
|
};
|
||
|
|
||
|
|
||
|
/**
|
||
|
* Clears the list making it empty but non-null.
|
||
|
* @return {!proto.web_api.RoomsListReply} returns this
|
||
|
*/
|
||
|
proto.web_api.RoomsListReply.prototype.clearRoomsList = function() {
|
||
|
return this.setRoomsList([]);
|
||
|
};
|
||
|
|
||
|
|
||
|
goog.object.extend(exports, proto.web_api);
|