1923 lines
59 KiB
JavaScript

// source: c2se/api/game.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 || window || global || self || Function("return this")();
}.call(null);
var protobuf_rpc_pb = require("../../protobuf/rpc_pb.js");
goog.object.extend(proto, protobuf_rpc_pb);
var protobuf_pagination_pb = require("../../protobuf/pagination_pb.js");
goog.object.extend(proto, protobuf_pagination_pb);
var models_core_network_pb = require("../../models/core/network_pb.js");
goog.object.extend(proto, models_core_network_pb);
var models_api_game_pb = require("../../models/api/game_pb.js");
goog.object.extend(proto, models_api_game_pb);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.GetGameUrlRequest",
null,
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.GetGameUrlResponse",
null,
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result",
null,
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.ListGamesRequest",
null,
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.ListGamesRequest.Search",
null,
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.ListGamesResponse",
null,
global
);
goog.exportSymbol(
"proto.bet.beteran.c2se.api.game.ListGamesResponse.Result",
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.bet.beteran.c2se.api.game.ListGamesRequest = function (opt_data) {
jspb.Message.initialize(
this,
opt_data,
0,
-1,
proto.bet.beteran.c2se.api.game.ListGamesRequest.repeatedFields_,
null
);
};
goog.inherits(proto.bet.beteran.c2se.api.game.ListGamesRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.displayName =
"proto.bet.beteran.c2se.api.game.ListGamesRequest";
}
/**
* 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.bet.beteran.c2se.api.game.ListGamesRequest.Search = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search,
jspb.Message
);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.displayName =
"proto.bet.beteran.c2se.api.game.ListGamesRequest.Search";
}
/**
* 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.bet.beteran.c2se.api.game.ListGamesResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.c2se.api.game.ListGamesResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.displayName =
"proto.bet.beteran.c2se.api.game.ListGamesResponse";
}
/**
* 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.bet.beteran.c2se.api.game.ListGamesResponse.Result = function (opt_data) {
jspb.Message.initialize(
this,
opt_data,
0,
-1,
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.repeatedFields_,
null
);
};
goog.inherits(
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result,
jspb.Message
);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.displayName =
"proto.bet.beteran.c2se.api.game.ListGamesResponse.Result";
}
/**
* 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.bet.beteran.c2se.api.game.GetGameUrlRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.c2se.api.game.GetGameUrlRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.displayName =
"proto.bet.beteran.c2se.api.game.GetGameUrlRequest";
}
/**
* 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.bet.beteran.c2se.api.game.GetGameUrlResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.bet.beteran.c2se.api.game.GetGameUrlResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.displayName =
"proto.bet.beteran.c2se.api.game.GetGameUrlResponse";
}
/**
* 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.bet.beteran.c2se.api.game.GetGameUrlResponse.Result = function (
opt_data
) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result,
jspb.Message
);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.displayName =
"proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result";
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.repeatedFields_ = [2];
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.bet.beteran.c2se.api.game.ListGamesRequest.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.ListGamesRequest.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.bet.beteran.c2se.api.game.ListGamesRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
pagination:
(f = msg.getPagination()) &&
protobuf_pagination_pb.Pagination.toObject(includeInstance, f),
sortsList: jspb.Message.toObjectList(
msg.getSortsList(),
protobuf_pagination_pb.Sort.toObject,
includeInstance
),
search:
(f = msg.getSearch()) &&
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.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.bet.beteran.c2se.api.game.ListGamesRequest}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.deserializeBinary = function (
bytes
) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.ListGamesRequest();
return proto.bet.beteran.c2se.api.game.ListGamesRequest.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new protobuf_pagination_pb.Pagination();
reader.readMessage(
value,
protobuf_pagination_pb.Pagination.deserializeBinaryFromReader
);
msg.setPagination(value);
break;
case 2:
var value = new protobuf_pagination_pb.Sort();
reader.readMessage(
value,
protobuf_pagination_pb.Sort.deserializeBinaryFromReader
);
msg.addSorts(value);
break;
case 3:
var value =
new proto.bet.beteran.c2se.api.game.ListGamesRequest.Search();
reader.readMessage(
value,
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search
.deserializeBinaryFromReader
);
msg.setSearch(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.ListGamesRequest.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getPagination();
if (f != null) {
writer.writeMessage(
1,
f,
protobuf_pagination_pb.Pagination.serializeBinaryToWriter
);
}
f = message.getSortsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
protobuf_pagination_pb.Sort.serializeBinaryToWriter
);
}
f = message.getSearch();
if (f != null) {
writer.writeMessage(
3,
f,
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search
.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.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.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.bet.beteran.c2se.api.game.ListGamesRequest.Search} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
parentId: jspb.Message.getFieldWithDefault(msg, 1, 0),
keyLike: jspb.Message.getFieldWithDefault(msg, 2, ""),
platformLike: jspb.Message.getFieldWithDefault(msg, 3, ""),
categoryLike: jspb.Message.getFieldWithDefault(msg, 4, ""),
gameTypeLike: 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.bet.beteran.c2se.api.game.ListGamesRequest.Search}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.ListGamesRequest.Search();
return proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.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.setParentId(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setKeyLike(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setPlatformLike(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setCategoryLike(value);
break;
case 5:
var value = /** @type {string} */ (reader.readString());
msg.setGameTypeLike(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = /** @type {number} */ (jspb.Message.getField(message, 1));
if (f != null) {
writer.writeUint64(1, f);
}
f = /** @type {string} */ (jspb.Message.getField(message, 2));
if (f != null) {
writer.writeString(2, f);
}
f = /** @type {string} */ (jspb.Message.getField(message, 3));
if (f != null) {
writer.writeString(3, f);
}
f = /** @type {string} */ (jspb.Message.getField(message, 4));
if (f != null) {
writer.writeString(4, f);
}
f = /** @type {string} */ (jspb.Message.getField(message, 5));
if (f != null) {
writer.writeString(5, f);
}
};
/**
* optional uint64 parent_id = 1;
* @return {number}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.getParentId =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.setParentId =
function (value) {
return jspb.Message.setField(this, 1, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.clearParentId =
function () {
return jspb.Message.setField(this, 1, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.hasParentId =
function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string key_like = 2;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.getKeyLike =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.setKeyLike =
function (value) {
return jspb.Message.setField(this, 2, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.clearKeyLike =
function () {
return jspb.Message.setField(this, 2, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.hasKeyLike =
function () {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional string platform_like = 3;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.getPlatformLike =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.setPlatformLike =
function (value) {
return jspb.Message.setField(this, 3, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.clearPlatformLike =
function () {
return jspb.Message.setField(this, 3, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.hasPlatformLike =
function () {
return jspb.Message.getField(this, 3) != null;
};
/**
* optional string category_like = 4;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.getCategoryLike =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 4, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.setCategoryLike =
function (value) {
return jspb.Message.setField(this, 4, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.clearCategoryLike =
function () {
return jspb.Message.setField(this, 4, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.hasCategoryLike =
function () {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional string game_type_like = 5;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.getGameTypeLike =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 5, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.setGameTypeLike =
function (value) {
return jspb.Message.setField(this, 5, value);
};
/**
* Clears the field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.clearGameTypeLike =
function () {
return jspb.Message.setField(this, 5, undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search.prototype.hasGameTypeLike =
function () {
return jspb.Message.getField(this, 5) != null;
};
/**
* optional bet.protobuf.pagination.Pagination pagination = 1;
* @return {?proto.bet.protobuf.pagination.Pagination}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.getPagination =
function () {
return /** @type{?proto.bet.protobuf.pagination.Pagination} */ (
jspb.Message.getWrapperField(this, protobuf_pagination_pb.Pagination, 1)
);
};
/**
* @param {?proto.bet.protobuf.pagination.Pagination|undefined} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.setPagination =
function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.clearPagination =
function () {
return this.setPagination(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.hasPagination =
function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* repeated bet.protobuf.pagination.Sort sorts = 2;
* @return {!Array<!proto.bet.protobuf.pagination.Sort>}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.getSortsList =
function () {
return /** @type{!Array<!proto.bet.protobuf.pagination.Sort>} */ (
jspb.Message.getRepeatedWrapperField(this, protobuf_pagination_pb.Sort, 2)
);
};
/**
* @param {!Array<!proto.bet.protobuf.pagination.Sort>} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.setSortsList =
function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.bet.protobuf.pagination.Sort=} opt_value
* @param {number=} opt_index
* @return {!proto.bet.protobuf.pagination.Sort}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.addSorts = function (
opt_value,
opt_index
) {
return jspb.Message.addToRepeatedWrapperField(
this,
2,
opt_value,
proto.bet.protobuf.pagination.Sort,
opt_index
);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.clearSortsList =
function () {
return this.setSortsList([]);
};
/**
* optional Search search = 3;
* @return {?proto.bet.beteran.c2se.api.game.ListGamesRequest.Search}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.getSearch =
function () {
return /** @type{?proto.bet.beteran.c2se.api.game.ListGamesRequest.Search} */ (
jspb.Message.getWrapperField(
this,
proto.bet.beteran.c2se.api.game.ListGamesRequest.Search,
3
)
);
};
/**
* @param {?proto.bet.beteran.c2se.api.game.ListGamesRequest.Search|undefined} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.setSearch =
function (value) {
return jspb.Message.setWrapperField(this, 3, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesRequest} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.clearSearch =
function () {
return this.setSearch(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesRequest.prototype.hasSearch =
function () {
return jspb.Message.getField(this, 3) != 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.bet.beteran.c2se.api.game.ListGamesResponse.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.ListGamesResponse.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.bet.beteran.c2se.api.game.ListGamesResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
error:
(f = msg.getError()) &&
protobuf_rpc_pb.Error.toObject(includeInstance, f),
result:
(f = msg.getResult()) &&
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.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.bet.beteran.c2se.api.game.ListGamesResponse}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.deserializeBinary = function (
bytes
) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.ListGamesResponse();
return proto.bet.beteran.c2se.api.game.ListGamesResponse.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new protobuf_rpc_pb.Error();
reader.readMessage(
value,
protobuf_rpc_pb.Error.deserializeBinaryFromReader
);
msg.setError(value);
break;
case 2:
var value =
new proto.bet.beteran.c2se.api.game.ListGamesResponse.Result();
reader.readMessage(
value,
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result
.deserializeBinaryFromReader
);
msg.setResult(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.ListGamesResponse.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getError();
if (f != null) {
writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter);
}
f = message.getResult();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result
.serializeBinaryToWriter
);
}
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.repeatedFields_ = [2];
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.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.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.bet.beteran.c2se.api.game.ListGamesResponse.Result} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
totalCount: jspb.Message.getFieldWithDefault(msg, 1, 0),
gamesList: jspb.Message.toObjectList(
msg.getGamesList(),
models_api_game_pb.Game.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.bet.beteran.c2se.api.game.ListGamesResponse.Result}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.ListGamesResponse.Result();
return proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesResponse.Result} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse.Result}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.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.setTotalCount(value);
break;
case 2:
var value = new models_api_game_pb.Game();
reader.readMessage(
value,
models_api_game_pb.Game.deserializeBinaryFromReader
);
msg.addGames(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.ListGamesResponse.Result} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getTotalCount();
if (f !== 0) {
writer.writeUint64(1, f);
}
f = message.getGamesList();
if (f.length > 0) {
writer.writeRepeatedMessage(
2,
f,
models_api_game_pb.Game.serializeBinaryToWriter
);
}
};
/**
* optional uint64 total_count = 1;
* @return {number}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.getTotalCount =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse.Result} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.setTotalCount =
function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* repeated bet.beteran.api.game.Game games = 2;
* @return {!Array<!proto.bet.beteran.api.game.Game>}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.getGamesList =
function () {
return /** @type{!Array<!proto.bet.beteran.api.game.Game>} */ (
jspb.Message.getRepeatedWrapperField(this, models_api_game_pb.Game, 2)
);
};
/**
* @param {!Array<!proto.bet.beteran.api.game.Game>} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse.Result} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.setGamesList =
function (value) {
return jspb.Message.setRepeatedWrapperField(this, 2, value);
};
/**
* @param {!proto.bet.beteran.api.game.Game=} opt_value
* @param {number=} opt_index
* @return {!proto.bet.beteran.api.game.Game}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.addGames =
function (opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(
this,
2,
opt_value,
proto.bet.beteran.api.game.Game,
opt_index
);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse.Result} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result.prototype.clearGamesList =
function () {
return this.setGamesList([]);
};
/**
* optional bet.protobuf.rpc.Error error = 1;
* @return {?proto.bet.protobuf.rpc.Error}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.getError =
function () {
return /** @type{?proto.bet.protobuf.rpc.Error} */ (
jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1)
);
};
/**
* @param {?proto.bet.protobuf.rpc.Error|undefined} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.setError =
function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.clearError =
function () {
return this.setError(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.hasError =
function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Result result = 2;
* @return {?proto.bet.beteran.c2se.api.game.ListGamesResponse.Result}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.getResult =
function () {
return /** @type{?proto.bet.beteran.c2se.api.game.ListGamesResponse.Result} */ (
jspb.Message.getWrapperField(
this,
proto.bet.beteran.c2se.api.game.ListGamesResponse.Result,
2
)
);
};
/**
* @param {?proto.bet.beteran.c2se.api.game.ListGamesResponse.Result|undefined} value
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.setResult =
function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.ListGamesResponse} returns this
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.clearResult =
function () {
return this.setResult(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.ListGamesResponse.prototype.hasResult =
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.bet.beteran.c2se.api.game.GetGameUrlRequest.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.GetGameUrlRequest.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.bet.beteran.c2se.api.game.GetGameUrlRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
vendorKey: jspb.Message.getFieldWithDefault(msg, 1, ""),
gameKey: 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.bet.beteran.c2se.api.game.GetGameUrlRequest}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.deserializeBinary = function (
bytes
) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.GetGameUrlRequest();
return proto.bet.beteran.c2se.api.game.GetGameUrlRequest.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.GetGameUrlRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlRequest}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.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.setVendorKey(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setGameKey(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.GetGameUrlRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getVendorKey();
if (f.length > 0) {
writer.writeString(1, f);
}
f = message.getGameKey();
if (f.length > 0) {
writer.writeString(2, f);
}
};
/**
* optional string vendor_key = 1;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.prototype.getVendorKey =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlRequest} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.prototype.setVendorKey =
function (value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string game_key = 2;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.prototype.getGameKey =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 2, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlRequest} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlRequest.prototype.setGameKey =
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_<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.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.GetGameUrlResponse.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.bet.beteran.c2se.api.game.GetGameUrlResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.toObject = function (
includeInstance,
msg
) {
var f,
obj = {
error:
(f = msg.getError()) &&
protobuf_rpc_pb.Error.toObject(includeInstance, f),
result:
(f = msg.getResult()) &&
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.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.bet.beteran.c2se.api.game.GetGameUrlResponse}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.GetGameUrlResponse();
return proto.bet.beteran.c2se.api.game.GetGameUrlResponse.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.deserializeBinaryFromReader =
function (msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new protobuf_rpc_pb.Error();
reader.readMessage(
value,
protobuf_rpc_pb.Error.deserializeBinaryFromReader
);
msg.setError(value);
break;
case 2:
var value =
new proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result();
reader.readMessage(
value,
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result
.deserializeBinaryFromReader
);
msg.setResult(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getError();
if (f != null) {
writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter);
}
f = message.getResult();
if (f != null) {
writer.writeMessage(
2,
f,
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result
.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.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.toObject =
function (opt_includeInstance) {
return proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.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.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.toObject =
function (includeInstance, msg) {
var f,
obj = {
userId: jspb.Message.getFieldWithDefault(msg, 1, 0),
balance: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
url: 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.bet.beteran.c2se.api.game.GetGameUrlResponse.Result}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.deserializeBinary =
function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result();
return proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.deserializeBinaryFromReader(
msg,
reader
);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.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.setUserId(value);
break;
case 2:
var value = /** @type {number} */ (reader.readDouble());
msg.setBalance(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setUrl(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.serializeBinary =
function () {
var writer = new jspb.BinaryWriter();
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.serializeBinaryToWriter(
this,
writer
);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.serializeBinaryToWriter =
function (message, writer) {
var f = undefined;
f = message.getUserId();
if (f !== 0) {
writer.writeUint64(1, f);
}
f = message.getBalance();
if (f !== 0.0) {
writer.writeDouble(2, f);
}
f = message.getUrl();
if (f.length > 0) {
writer.writeString(3, f);
}
};
/**
* optional uint64 user_id = 1;
* @return {number}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.getUserId =
function () {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.setUserId =
function (value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional double balance = 2;
* @return {number}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.getBalance =
function () {
return /** @type {number} */ (
jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)
);
};
/**
* @param {number} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.setBalance =
function (value) {
return jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* optional string url = 3;
* @return {string}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.getUrl =
function () {
return /** @type {string} */ (
jspb.Message.getFieldWithDefault(this, 3, "")
);
};
/**
* @param {string} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result.prototype.setUrl =
function (value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional bet.protobuf.rpc.Error error = 1;
* @return {?proto.bet.protobuf.rpc.Error}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.getError =
function () {
return /** @type{?proto.bet.protobuf.rpc.Error} */ (
jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1)
);
};
/**
* @param {?proto.bet.protobuf.rpc.Error|undefined} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.setError =
function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.clearError =
function () {
return this.setError(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.hasError =
function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Result result = 2;
* @return {?proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.getResult =
function () {
return /** @type{?proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result} */ (
jspb.Message.getWrapperField(
this,
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result,
2
)
);
};
/**
* @param {?proto.bet.beteran.c2se.api.game.GetGameUrlResponse.Result|undefined} value
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.setResult =
function (value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.bet.beteran.c2se.api.game.GetGameUrlResponse} returns this
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.clearResult =
function () {
return this.setResult(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.bet.beteran.c2se.api.game.GetGameUrlResponse.prototype.hasResult =
function () {
return jspb.Message.getField(this, 2) != null;
};
goog.object.extend(exports, proto.bet.beteran.c2se.api.game);