protobuf-platform 1.0.72 → 1.0.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/game/game.proto +11 -0
- package/game/game_grpc_pb.js +33 -0
- package/game/game_pb.js +457 -0
- package/package.json +1 -1
package/game/game.proto
CHANGED
@@ -45,6 +45,7 @@ service Game {
|
|
45
45
|
rpc searchGamesByTags(SearchGamesIntoTagsRequest) returns (GameItemsResponse);
|
46
46
|
rpc initGameSession(InitGameSessionRequest) returns (InitGameSessionResponse);
|
47
47
|
rpc initDemoGameSession(InitDemoGameSessionRequest) returns (InitGameSessionResponse);
|
48
|
+
rpc processedVendorActionCallback(VendorActionRequest) returns (VendorActionResponse);
|
48
49
|
}
|
49
50
|
|
50
51
|
message PingRequest { string ping = 1; }
|
@@ -322,4 +323,14 @@ message InitGameSessionResponse {
|
|
322
323
|
string game_slug = 5;
|
323
324
|
string provider_title = 6;
|
324
325
|
string provider_slug = 7;
|
326
|
+
}
|
327
|
+
message VendorActionRequest {
|
328
|
+
string data = 1;
|
329
|
+
}
|
330
|
+
message VendorActionResponse {
|
331
|
+
|
332
|
+
}
|
333
|
+
message UserBalanceGameSessionRequest {
|
334
|
+
float balance_amount = 1;
|
335
|
+
string balance_type = 2;
|
325
336
|
}
|
package/game/game_grpc_pb.js
CHANGED
@@ -444,6 +444,28 @@ function deserialize_game_TagStatusResponse(buffer_arg) {
|
|
444
444
|
return game_pb.TagStatusResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
445
445
|
}
|
446
446
|
|
447
|
+
function serialize_game_VendorActionRequest(arg) {
|
448
|
+
if (!(arg instanceof game_pb.VendorActionRequest)) {
|
449
|
+
throw new Error('Expected argument of type game.VendorActionRequest');
|
450
|
+
}
|
451
|
+
return Buffer.from(arg.serializeBinary());
|
452
|
+
}
|
453
|
+
|
454
|
+
function deserialize_game_VendorActionRequest(buffer_arg) {
|
455
|
+
return game_pb.VendorActionRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
456
|
+
}
|
457
|
+
|
458
|
+
function serialize_game_VendorActionResponse(arg) {
|
459
|
+
if (!(arg instanceof game_pb.VendorActionResponse)) {
|
460
|
+
throw new Error('Expected argument of type game.VendorActionResponse');
|
461
|
+
}
|
462
|
+
return Buffer.from(arg.serializeBinary());
|
463
|
+
}
|
464
|
+
|
465
|
+
function deserialize_game_VendorActionResponse(buffer_arg) {
|
466
|
+
return game_pb.VendorActionResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
467
|
+
}
|
468
|
+
|
447
469
|
|
448
470
|
var GameService = exports.GameService = {
|
449
471
|
checkConnection: {
|
@@ -858,6 +880,17 @@ parseGames: {
|
|
858
880
|
responseSerialize: serialize_game_InitGameSessionResponse,
|
859
881
|
responseDeserialize: deserialize_game_InitGameSessionResponse,
|
860
882
|
},
|
883
|
+
processedVendorActionCallback: {
|
884
|
+
path: '/game.Game/processedVendorActionCallback',
|
885
|
+
requestStream: false,
|
886
|
+
responseStream: false,
|
887
|
+
requestType: game_pb.VendorActionRequest,
|
888
|
+
responseType: game_pb.VendorActionResponse,
|
889
|
+
requestSerialize: serialize_game_VendorActionRequest,
|
890
|
+
requestDeserialize: deserialize_game_VendorActionRequest,
|
891
|
+
responseSerialize: serialize_game_VendorActionResponse,
|
892
|
+
responseDeserialize: deserialize_game_VendorActionResponse,
|
893
|
+
},
|
861
894
|
};
|
862
895
|
|
863
896
|
exports.GameClient = grpc.makeGenericClientConstructor(GameService);
|
package/game/game_pb.js
CHANGED
@@ -76,6 +76,9 @@ goog.exportSymbol('proto.game.TagRequest', null, global);
|
|
76
76
|
goog.exportSymbol('proto.game.TagRequest.RequestCase', null, global);
|
77
77
|
goog.exportSymbol('proto.game.TagResponse', null, global);
|
78
78
|
goog.exportSymbol('proto.game.TagStatusResponse', null, global);
|
79
|
+
goog.exportSymbol('proto.game.UserBalanceGameSessionRequest', null, global);
|
80
|
+
goog.exportSymbol('proto.game.VendorActionRequest', null, global);
|
81
|
+
goog.exportSymbol('proto.game.VendorActionResponse', null, global);
|
79
82
|
/**
|
80
83
|
* Generated by JsPbCodeGenerator.
|
81
84
|
* @param {Array=} opt_data Optional initial data array, typically from a
|
@@ -1126,6 +1129,69 @@ if (goog.DEBUG && !COMPILED) {
|
|
1126
1129
|
*/
|
1127
1130
|
proto.game.InitGameSessionResponse.displayName = 'proto.game.InitGameSessionResponse';
|
1128
1131
|
}
|
1132
|
+
/**
|
1133
|
+
* Generated by JsPbCodeGenerator.
|
1134
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1135
|
+
* server response, or constructed directly in Javascript. The array is used
|
1136
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1137
|
+
* If no data is provided, the constructed object will be empty, but still
|
1138
|
+
* valid.
|
1139
|
+
* @extends {jspb.Message}
|
1140
|
+
* @constructor
|
1141
|
+
*/
|
1142
|
+
proto.game.VendorActionRequest = function(opt_data) {
|
1143
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1144
|
+
};
|
1145
|
+
goog.inherits(proto.game.VendorActionRequest, jspb.Message);
|
1146
|
+
if (goog.DEBUG && !COMPILED) {
|
1147
|
+
/**
|
1148
|
+
* @public
|
1149
|
+
* @override
|
1150
|
+
*/
|
1151
|
+
proto.game.VendorActionRequest.displayName = 'proto.game.VendorActionRequest';
|
1152
|
+
}
|
1153
|
+
/**
|
1154
|
+
* Generated by JsPbCodeGenerator.
|
1155
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1156
|
+
* server response, or constructed directly in Javascript. The array is used
|
1157
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1158
|
+
* If no data is provided, the constructed object will be empty, but still
|
1159
|
+
* valid.
|
1160
|
+
* @extends {jspb.Message}
|
1161
|
+
* @constructor
|
1162
|
+
*/
|
1163
|
+
proto.game.VendorActionResponse = function(opt_data) {
|
1164
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1165
|
+
};
|
1166
|
+
goog.inherits(proto.game.VendorActionResponse, jspb.Message);
|
1167
|
+
if (goog.DEBUG && !COMPILED) {
|
1168
|
+
/**
|
1169
|
+
* @public
|
1170
|
+
* @override
|
1171
|
+
*/
|
1172
|
+
proto.game.VendorActionResponse.displayName = 'proto.game.VendorActionResponse';
|
1173
|
+
}
|
1174
|
+
/**
|
1175
|
+
* Generated by JsPbCodeGenerator.
|
1176
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
1177
|
+
* server response, or constructed directly in Javascript. The array is used
|
1178
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
1179
|
+
* If no data is provided, the constructed object will be empty, but still
|
1180
|
+
* valid.
|
1181
|
+
* @extends {jspb.Message}
|
1182
|
+
* @constructor
|
1183
|
+
*/
|
1184
|
+
proto.game.UserBalanceGameSessionRequest = function(opt_data) {
|
1185
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
1186
|
+
};
|
1187
|
+
goog.inherits(proto.game.UserBalanceGameSessionRequest, jspb.Message);
|
1188
|
+
if (goog.DEBUG && !COMPILED) {
|
1189
|
+
/**
|
1190
|
+
* @public
|
1191
|
+
* @override
|
1192
|
+
*/
|
1193
|
+
proto.game.UserBalanceGameSessionRequest.displayName = 'proto.game.UserBalanceGameSessionRequest';
|
1194
|
+
}
|
1129
1195
|
|
1130
1196
|
|
1131
1197
|
|
@@ -13402,4 +13468,395 @@ proto.game.InitGameSessionResponse.prototype.setProviderSlug = function(value) {
|
|
13402
13468
|
};
|
13403
13469
|
|
13404
13470
|
|
13471
|
+
|
13472
|
+
|
13473
|
+
|
13474
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
13475
|
+
/**
|
13476
|
+
* Creates an object representation of this proto.
|
13477
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
13478
|
+
* Optional fields that are not set will be set to undefined.
|
13479
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
13480
|
+
* For the list of reserved names please see:
|
13481
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
13482
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
13483
|
+
* JSPB instance for transitional soy proto support:
|
13484
|
+
* http://goto/soy-param-migration
|
13485
|
+
* @return {!Object}
|
13486
|
+
*/
|
13487
|
+
proto.game.VendorActionRequest.prototype.toObject = function(opt_includeInstance) {
|
13488
|
+
return proto.game.VendorActionRequest.toObject(opt_includeInstance, this);
|
13489
|
+
};
|
13490
|
+
|
13491
|
+
|
13492
|
+
/**
|
13493
|
+
* Static version of the {@see toObject} method.
|
13494
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
13495
|
+
* the JSPB instance for transitional soy proto support:
|
13496
|
+
* http://goto/soy-param-migration
|
13497
|
+
* @param {!proto.game.VendorActionRequest} msg The msg instance to transform.
|
13498
|
+
* @return {!Object}
|
13499
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
13500
|
+
*/
|
13501
|
+
proto.game.VendorActionRequest.toObject = function(includeInstance, msg) {
|
13502
|
+
var f, obj = {
|
13503
|
+
data: jspb.Message.getFieldWithDefault(msg, 1, "")
|
13504
|
+
};
|
13505
|
+
|
13506
|
+
if (includeInstance) {
|
13507
|
+
obj.$jspbMessageInstance = msg;
|
13508
|
+
}
|
13509
|
+
return obj;
|
13510
|
+
};
|
13511
|
+
}
|
13512
|
+
|
13513
|
+
|
13514
|
+
/**
|
13515
|
+
* Deserializes binary data (in protobuf wire format).
|
13516
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
13517
|
+
* @return {!proto.game.VendorActionRequest}
|
13518
|
+
*/
|
13519
|
+
proto.game.VendorActionRequest.deserializeBinary = function(bytes) {
|
13520
|
+
var reader = new jspb.BinaryReader(bytes);
|
13521
|
+
var msg = new proto.game.VendorActionRequest;
|
13522
|
+
return proto.game.VendorActionRequest.deserializeBinaryFromReader(msg, reader);
|
13523
|
+
};
|
13524
|
+
|
13525
|
+
|
13526
|
+
/**
|
13527
|
+
* Deserializes binary data (in protobuf wire format) from the
|
13528
|
+
* given reader into the given message object.
|
13529
|
+
* @param {!proto.game.VendorActionRequest} msg The message object to deserialize into.
|
13530
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
13531
|
+
* @return {!proto.game.VendorActionRequest}
|
13532
|
+
*/
|
13533
|
+
proto.game.VendorActionRequest.deserializeBinaryFromReader = function(msg, reader) {
|
13534
|
+
while (reader.nextField()) {
|
13535
|
+
if (reader.isEndGroup()) {
|
13536
|
+
break;
|
13537
|
+
}
|
13538
|
+
var field = reader.getFieldNumber();
|
13539
|
+
switch (field) {
|
13540
|
+
case 1:
|
13541
|
+
var value = /** @type {string} */ (reader.readString());
|
13542
|
+
msg.setData(value);
|
13543
|
+
break;
|
13544
|
+
default:
|
13545
|
+
reader.skipField();
|
13546
|
+
break;
|
13547
|
+
}
|
13548
|
+
}
|
13549
|
+
return msg;
|
13550
|
+
};
|
13551
|
+
|
13552
|
+
|
13553
|
+
/**
|
13554
|
+
* Serializes the message to binary data (in protobuf wire format).
|
13555
|
+
* @return {!Uint8Array}
|
13556
|
+
*/
|
13557
|
+
proto.game.VendorActionRequest.prototype.serializeBinary = function() {
|
13558
|
+
var writer = new jspb.BinaryWriter();
|
13559
|
+
proto.game.VendorActionRequest.serializeBinaryToWriter(this, writer);
|
13560
|
+
return writer.getResultBuffer();
|
13561
|
+
};
|
13562
|
+
|
13563
|
+
|
13564
|
+
/**
|
13565
|
+
* Serializes the given message to binary data (in protobuf wire
|
13566
|
+
* format), writing to the given BinaryWriter.
|
13567
|
+
* @param {!proto.game.VendorActionRequest} message
|
13568
|
+
* @param {!jspb.BinaryWriter} writer
|
13569
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
13570
|
+
*/
|
13571
|
+
proto.game.VendorActionRequest.serializeBinaryToWriter = function(message, writer) {
|
13572
|
+
var f = undefined;
|
13573
|
+
f = message.getData();
|
13574
|
+
if (f.length > 0) {
|
13575
|
+
writer.writeString(
|
13576
|
+
1,
|
13577
|
+
f
|
13578
|
+
);
|
13579
|
+
}
|
13580
|
+
};
|
13581
|
+
|
13582
|
+
|
13583
|
+
/**
|
13584
|
+
* optional string data = 1;
|
13585
|
+
* @return {string}
|
13586
|
+
*/
|
13587
|
+
proto.game.VendorActionRequest.prototype.getData = function() {
|
13588
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
13589
|
+
};
|
13590
|
+
|
13591
|
+
|
13592
|
+
/**
|
13593
|
+
* @param {string} value
|
13594
|
+
* @return {!proto.game.VendorActionRequest} returns this
|
13595
|
+
*/
|
13596
|
+
proto.game.VendorActionRequest.prototype.setData = function(value) {
|
13597
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
13598
|
+
};
|
13599
|
+
|
13600
|
+
|
13601
|
+
|
13602
|
+
|
13603
|
+
|
13604
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
13605
|
+
/**
|
13606
|
+
* Creates an object representation of this proto.
|
13607
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
13608
|
+
* Optional fields that are not set will be set to undefined.
|
13609
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
13610
|
+
* For the list of reserved names please see:
|
13611
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
13612
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
13613
|
+
* JSPB instance for transitional soy proto support:
|
13614
|
+
* http://goto/soy-param-migration
|
13615
|
+
* @return {!Object}
|
13616
|
+
*/
|
13617
|
+
proto.game.VendorActionResponse.prototype.toObject = function(opt_includeInstance) {
|
13618
|
+
return proto.game.VendorActionResponse.toObject(opt_includeInstance, this);
|
13619
|
+
};
|
13620
|
+
|
13621
|
+
|
13622
|
+
/**
|
13623
|
+
* Static version of the {@see toObject} method.
|
13624
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
13625
|
+
* the JSPB instance for transitional soy proto support:
|
13626
|
+
* http://goto/soy-param-migration
|
13627
|
+
* @param {!proto.game.VendorActionResponse} msg The msg instance to transform.
|
13628
|
+
* @return {!Object}
|
13629
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
13630
|
+
*/
|
13631
|
+
proto.game.VendorActionResponse.toObject = function(includeInstance, msg) {
|
13632
|
+
var f, obj = {
|
13633
|
+
|
13634
|
+
};
|
13635
|
+
|
13636
|
+
if (includeInstance) {
|
13637
|
+
obj.$jspbMessageInstance = msg;
|
13638
|
+
}
|
13639
|
+
return obj;
|
13640
|
+
};
|
13641
|
+
}
|
13642
|
+
|
13643
|
+
|
13644
|
+
/**
|
13645
|
+
* Deserializes binary data (in protobuf wire format).
|
13646
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
13647
|
+
* @return {!proto.game.VendorActionResponse}
|
13648
|
+
*/
|
13649
|
+
proto.game.VendorActionResponse.deserializeBinary = function(bytes) {
|
13650
|
+
var reader = new jspb.BinaryReader(bytes);
|
13651
|
+
var msg = new proto.game.VendorActionResponse;
|
13652
|
+
return proto.game.VendorActionResponse.deserializeBinaryFromReader(msg, reader);
|
13653
|
+
};
|
13654
|
+
|
13655
|
+
|
13656
|
+
/**
|
13657
|
+
* Deserializes binary data (in protobuf wire format) from the
|
13658
|
+
* given reader into the given message object.
|
13659
|
+
* @param {!proto.game.VendorActionResponse} msg The message object to deserialize into.
|
13660
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
13661
|
+
* @return {!proto.game.VendorActionResponse}
|
13662
|
+
*/
|
13663
|
+
proto.game.VendorActionResponse.deserializeBinaryFromReader = function(msg, reader) {
|
13664
|
+
while (reader.nextField()) {
|
13665
|
+
if (reader.isEndGroup()) {
|
13666
|
+
break;
|
13667
|
+
}
|
13668
|
+
var field = reader.getFieldNumber();
|
13669
|
+
switch (field) {
|
13670
|
+
default:
|
13671
|
+
reader.skipField();
|
13672
|
+
break;
|
13673
|
+
}
|
13674
|
+
}
|
13675
|
+
return msg;
|
13676
|
+
};
|
13677
|
+
|
13678
|
+
|
13679
|
+
/**
|
13680
|
+
* Serializes the message to binary data (in protobuf wire format).
|
13681
|
+
* @return {!Uint8Array}
|
13682
|
+
*/
|
13683
|
+
proto.game.VendorActionResponse.prototype.serializeBinary = function() {
|
13684
|
+
var writer = new jspb.BinaryWriter();
|
13685
|
+
proto.game.VendorActionResponse.serializeBinaryToWriter(this, writer);
|
13686
|
+
return writer.getResultBuffer();
|
13687
|
+
};
|
13688
|
+
|
13689
|
+
|
13690
|
+
/**
|
13691
|
+
* Serializes the given message to binary data (in protobuf wire
|
13692
|
+
* format), writing to the given BinaryWriter.
|
13693
|
+
* @param {!proto.game.VendorActionResponse} message
|
13694
|
+
* @param {!jspb.BinaryWriter} writer
|
13695
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
13696
|
+
*/
|
13697
|
+
proto.game.VendorActionResponse.serializeBinaryToWriter = function(message, writer) {
|
13698
|
+
var f = undefined;
|
13699
|
+
};
|
13700
|
+
|
13701
|
+
|
13702
|
+
|
13703
|
+
|
13704
|
+
|
13705
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
13706
|
+
/**
|
13707
|
+
* Creates an object representation of this proto.
|
13708
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
13709
|
+
* Optional fields that are not set will be set to undefined.
|
13710
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
13711
|
+
* For the list of reserved names please see:
|
13712
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
13713
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
13714
|
+
* JSPB instance for transitional soy proto support:
|
13715
|
+
* http://goto/soy-param-migration
|
13716
|
+
* @return {!Object}
|
13717
|
+
*/
|
13718
|
+
proto.game.UserBalanceGameSessionRequest.prototype.toObject = function(opt_includeInstance) {
|
13719
|
+
return proto.game.UserBalanceGameSessionRequest.toObject(opt_includeInstance, this);
|
13720
|
+
};
|
13721
|
+
|
13722
|
+
|
13723
|
+
/**
|
13724
|
+
* Static version of the {@see toObject} method.
|
13725
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
13726
|
+
* the JSPB instance for transitional soy proto support:
|
13727
|
+
* http://goto/soy-param-migration
|
13728
|
+
* @param {!proto.game.UserBalanceGameSessionRequest} msg The msg instance to transform.
|
13729
|
+
* @return {!Object}
|
13730
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
13731
|
+
*/
|
13732
|
+
proto.game.UserBalanceGameSessionRequest.toObject = function(includeInstance, msg) {
|
13733
|
+
var f, obj = {
|
13734
|
+
balanceAmount: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
|
13735
|
+
balanceType: jspb.Message.getFieldWithDefault(msg, 2, "")
|
13736
|
+
};
|
13737
|
+
|
13738
|
+
if (includeInstance) {
|
13739
|
+
obj.$jspbMessageInstance = msg;
|
13740
|
+
}
|
13741
|
+
return obj;
|
13742
|
+
};
|
13743
|
+
}
|
13744
|
+
|
13745
|
+
|
13746
|
+
/**
|
13747
|
+
* Deserializes binary data (in protobuf wire format).
|
13748
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
13749
|
+
* @return {!proto.game.UserBalanceGameSessionRequest}
|
13750
|
+
*/
|
13751
|
+
proto.game.UserBalanceGameSessionRequest.deserializeBinary = function(bytes) {
|
13752
|
+
var reader = new jspb.BinaryReader(bytes);
|
13753
|
+
var msg = new proto.game.UserBalanceGameSessionRequest;
|
13754
|
+
return proto.game.UserBalanceGameSessionRequest.deserializeBinaryFromReader(msg, reader);
|
13755
|
+
};
|
13756
|
+
|
13757
|
+
|
13758
|
+
/**
|
13759
|
+
* Deserializes binary data (in protobuf wire format) from the
|
13760
|
+
* given reader into the given message object.
|
13761
|
+
* @param {!proto.game.UserBalanceGameSessionRequest} msg The message object to deserialize into.
|
13762
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
13763
|
+
* @return {!proto.game.UserBalanceGameSessionRequest}
|
13764
|
+
*/
|
13765
|
+
proto.game.UserBalanceGameSessionRequest.deserializeBinaryFromReader = function(msg, reader) {
|
13766
|
+
while (reader.nextField()) {
|
13767
|
+
if (reader.isEndGroup()) {
|
13768
|
+
break;
|
13769
|
+
}
|
13770
|
+
var field = reader.getFieldNumber();
|
13771
|
+
switch (field) {
|
13772
|
+
case 1:
|
13773
|
+
var value = /** @type {number} */ (reader.readFloat());
|
13774
|
+
msg.setBalanceAmount(value);
|
13775
|
+
break;
|
13776
|
+
case 2:
|
13777
|
+
var value = /** @type {string} */ (reader.readString());
|
13778
|
+
msg.setBalanceType(value);
|
13779
|
+
break;
|
13780
|
+
default:
|
13781
|
+
reader.skipField();
|
13782
|
+
break;
|
13783
|
+
}
|
13784
|
+
}
|
13785
|
+
return msg;
|
13786
|
+
};
|
13787
|
+
|
13788
|
+
|
13789
|
+
/**
|
13790
|
+
* Serializes the message to binary data (in protobuf wire format).
|
13791
|
+
* @return {!Uint8Array}
|
13792
|
+
*/
|
13793
|
+
proto.game.UserBalanceGameSessionRequest.prototype.serializeBinary = function() {
|
13794
|
+
var writer = new jspb.BinaryWriter();
|
13795
|
+
proto.game.UserBalanceGameSessionRequest.serializeBinaryToWriter(this, writer);
|
13796
|
+
return writer.getResultBuffer();
|
13797
|
+
};
|
13798
|
+
|
13799
|
+
|
13800
|
+
/**
|
13801
|
+
* Serializes the given message to binary data (in protobuf wire
|
13802
|
+
* format), writing to the given BinaryWriter.
|
13803
|
+
* @param {!proto.game.UserBalanceGameSessionRequest} message
|
13804
|
+
* @param {!jspb.BinaryWriter} writer
|
13805
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
13806
|
+
*/
|
13807
|
+
proto.game.UserBalanceGameSessionRequest.serializeBinaryToWriter = function(message, writer) {
|
13808
|
+
var f = undefined;
|
13809
|
+
f = message.getBalanceAmount();
|
13810
|
+
if (f !== 0.0) {
|
13811
|
+
writer.writeFloat(
|
13812
|
+
1,
|
13813
|
+
f
|
13814
|
+
);
|
13815
|
+
}
|
13816
|
+
f = message.getBalanceType();
|
13817
|
+
if (f.length > 0) {
|
13818
|
+
writer.writeString(
|
13819
|
+
2,
|
13820
|
+
f
|
13821
|
+
);
|
13822
|
+
}
|
13823
|
+
};
|
13824
|
+
|
13825
|
+
|
13826
|
+
/**
|
13827
|
+
* optional float balance_amount = 1;
|
13828
|
+
* @return {number}
|
13829
|
+
*/
|
13830
|
+
proto.game.UserBalanceGameSessionRequest.prototype.getBalanceAmount = function() {
|
13831
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
|
13832
|
+
};
|
13833
|
+
|
13834
|
+
|
13835
|
+
/**
|
13836
|
+
* @param {number} value
|
13837
|
+
* @return {!proto.game.UserBalanceGameSessionRequest} returns this
|
13838
|
+
*/
|
13839
|
+
proto.game.UserBalanceGameSessionRequest.prototype.setBalanceAmount = function(value) {
|
13840
|
+
return jspb.Message.setProto3FloatField(this, 1, value);
|
13841
|
+
};
|
13842
|
+
|
13843
|
+
|
13844
|
+
/**
|
13845
|
+
* optional string balance_type = 2;
|
13846
|
+
* @return {string}
|
13847
|
+
*/
|
13848
|
+
proto.game.UserBalanceGameSessionRequest.prototype.getBalanceType = function() {
|
13849
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
13850
|
+
};
|
13851
|
+
|
13852
|
+
|
13853
|
+
/**
|
13854
|
+
* @param {string} value
|
13855
|
+
* @return {!proto.game.UserBalanceGameSessionRequest} returns this
|
13856
|
+
*/
|
13857
|
+
proto.game.UserBalanceGameSessionRequest.prototype.setBalanceType = function(value) {
|
13858
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
13859
|
+
};
|
13860
|
+
|
13861
|
+
|
13405
13862
|
goog.object.extend(exports, proto.game);
|