protobuf-platform 1.0.219 → 1.0.220
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/package.json +1 -1
- package/payment/payment.proto +14 -0
- package/payment/payment_grpc_pb.js +34 -0
- package/payment/payment_pb.js +490 -0
package/package.json
CHANGED
package/payment/payment.proto
CHANGED
@@ -17,6 +17,8 @@ service Payment {
|
|
17
17
|
rpc updateSingleMethod(stream MethodRequest) returns (MethodResponse);
|
18
18
|
rpc deleteSingleMethod(GetMethodRequest) returns (PaymentStatusResponse);
|
19
19
|
rpc readListMethods(PaginationRequest) returns (MethodItemsResponse);
|
20
|
+
//Deposit
|
21
|
+
rpc attemptDeposit(AttemptDepositRequest) returns (DepositResponse);
|
20
22
|
}
|
21
23
|
//Technical
|
22
24
|
message PingRequest { string ping = 1; }
|
@@ -104,4 +106,16 @@ message MethodItemsResponse {
|
|
104
106
|
repeated MethodItem items = 1;
|
105
107
|
optional int32 total_pages = 2;
|
106
108
|
optional int32 total_items = 3;
|
109
|
+
}
|
110
|
+
//Deposit
|
111
|
+
message AttemptDepositRequest {
|
112
|
+
int32 payment_method_id = 1;
|
113
|
+
int32 user_id = 2;
|
114
|
+
float amount = 3;
|
115
|
+
optional int32 bonus_id = 4;
|
116
|
+
optional string user_currency = 5;
|
117
|
+
}
|
118
|
+
message DepositResponse {
|
119
|
+
int32 id = 1;
|
120
|
+
string status = 2;
|
107
121
|
}
|
@@ -4,6 +4,28 @@
|
|
4
4
|
var grpc = require('@grpc/grpc-js');
|
5
5
|
var payment_pb = require('./payment_pb.js');
|
6
6
|
|
7
|
+
function serialize_payment_AttemptDepositRequest(arg) {
|
8
|
+
if (!(arg instanceof payment_pb.AttemptDepositRequest)) {
|
9
|
+
throw new Error('Expected argument of type payment.AttemptDepositRequest');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_payment_AttemptDepositRequest(buffer_arg) {
|
15
|
+
return payment_pb.AttemptDepositRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
18
|
+
function serialize_payment_DepositResponse(arg) {
|
19
|
+
if (!(arg instanceof payment_pb.DepositResponse)) {
|
20
|
+
throw new Error('Expected argument of type payment.DepositResponse');
|
21
|
+
}
|
22
|
+
return Buffer.from(arg.serializeBinary());
|
23
|
+
}
|
24
|
+
|
25
|
+
function deserialize_payment_DepositResponse(buffer_arg) {
|
26
|
+
return payment_pb.DepositResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
27
|
+
}
|
28
|
+
|
7
29
|
function serialize_payment_File(arg) {
|
8
30
|
if (!(arg instanceof payment_pb.File)) {
|
9
31
|
throw new Error('Expected argument of type payment.File');
|
@@ -294,6 +316,18 @@ createSingleMethod: {
|
|
294
316
|
responseSerialize: serialize_payment_MethodItemsResponse,
|
295
317
|
responseDeserialize: deserialize_payment_MethodItemsResponse,
|
296
318
|
},
|
319
|
+
// Deposit
|
320
|
+
attemptDeposit: {
|
321
|
+
path: '/payment.Payment/attemptDeposit',
|
322
|
+
requestStream: false,
|
323
|
+
responseStream: false,
|
324
|
+
requestType: payment_pb.AttemptDepositRequest,
|
325
|
+
responseType: payment_pb.DepositResponse,
|
326
|
+
requestSerialize: serialize_payment_AttemptDepositRequest,
|
327
|
+
requestDeserialize: deserialize_payment_AttemptDepositRequest,
|
328
|
+
responseSerialize: serialize_payment_DepositResponse,
|
329
|
+
responseDeserialize: deserialize_payment_DepositResponse,
|
330
|
+
},
|
297
331
|
};
|
298
332
|
|
299
333
|
exports.PaymentClient = grpc.makeGenericClientConstructor(PaymentService);
|
package/payment/payment_pb.js
CHANGED
@@ -21,6 +21,8 @@ var global = (function() {
|
|
21
21
|
return Function('return this')();
|
22
22
|
}.call(null));
|
23
23
|
|
24
|
+
goog.exportSymbol('proto.payment.AttemptDepositRequest', null, global);
|
25
|
+
goog.exportSymbol('proto.payment.DepositResponse', null, global);
|
24
26
|
goog.exportSymbol('proto.payment.File', null, global);
|
25
27
|
goog.exportSymbol('proto.payment.GetFileRequest', null, global);
|
26
28
|
goog.exportSymbol('proto.payment.GetMethodRequest', null, global);
|
@@ -441,6 +443,48 @@ if (goog.DEBUG && !COMPILED) {
|
|
441
443
|
*/
|
442
444
|
proto.payment.MethodItemsResponse.displayName = 'proto.payment.MethodItemsResponse';
|
443
445
|
}
|
446
|
+
/**
|
447
|
+
* Generated by JsPbCodeGenerator.
|
448
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
449
|
+
* server response, or constructed directly in Javascript. The array is used
|
450
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
451
|
+
* If no data is provided, the constructed object will be empty, but still
|
452
|
+
* valid.
|
453
|
+
* @extends {jspb.Message}
|
454
|
+
* @constructor
|
455
|
+
*/
|
456
|
+
proto.payment.AttemptDepositRequest = function(opt_data) {
|
457
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
458
|
+
};
|
459
|
+
goog.inherits(proto.payment.AttemptDepositRequest, jspb.Message);
|
460
|
+
if (goog.DEBUG && !COMPILED) {
|
461
|
+
/**
|
462
|
+
* @public
|
463
|
+
* @override
|
464
|
+
*/
|
465
|
+
proto.payment.AttemptDepositRequest.displayName = 'proto.payment.AttemptDepositRequest';
|
466
|
+
}
|
467
|
+
/**
|
468
|
+
* Generated by JsPbCodeGenerator.
|
469
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
470
|
+
* server response, or constructed directly in Javascript. The array is used
|
471
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
472
|
+
* If no data is provided, the constructed object will be empty, but still
|
473
|
+
* valid.
|
474
|
+
* @extends {jspb.Message}
|
475
|
+
* @constructor
|
476
|
+
*/
|
477
|
+
proto.payment.DepositResponse = function(opt_data) {
|
478
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
479
|
+
};
|
480
|
+
goog.inherits(proto.payment.DepositResponse, jspb.Message);
|
481
|
+
if (goog.DEBUG && !COMPILED) {
|
482
|
+
/**
|
483
|
+
* @public
|
484
|
+
* @override
|
485
|
+
*/
|
486
|
+
proto.payment.DepositResponse.displayName = 'proto.payment.DepositResponse';
|
487
|
+
}
|
444
488
|
|
445
489
|
|
446
490
|
|
@@ -4847,4 +4891,450 @@ proto.payment.MethodItemsResponse.prototype.hasTotalItems = function() {
|
|
4847
4891
|
};
|
4848
4892
|
|
4849
4893
|
|
4894
|
+
|
4895
|
+
|
4896
|
+
|
4897
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
4898
|
+
/**
|
4899
|
+
* Creates an object representation of this proto.
|
4900
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
4901
|
+
* Optional fields that are not set will be set to undefined.
|
4902
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
4903
|
+
* For the list of reserved names please see:
|
4904
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
4905
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
4906
|
+
* JSPB instance for transitional soy proto support:
|
4907
|
+
* http://goto/soy-param-migration
|
4908
|
+
* @return {!Object}
|
4909
|
+
*/
|
4910
|
+
proto.payment.AttemptDepositRequest.prototype.toObject = function(opt_includeInstance) {
|
4911
|
+
return proto.payment.AttemptDepositRequest.toObject(opt_includeInstance, this);
|
4912
|
+
};
|
4913
|
+
|
4914
|
+
|
4915
|
+
/**
|
4916
|
+
* Static version of the {@see toObject} method.
|
4917
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
4918
|
+
* the JSPB instance for transitional soy proto support:
|
4919
|
+
* http://goto/soy-param-migration
|
4920
|
+
* @param {!proto.payment.AttemptDepositRequest} msg The msg instance to transform.
|
4921
|
+
* @return {!Object}
|
4922
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
4923
|
+
*/
|
4924
|
+
proto.payment.AttemptDepositRequest.toObject = function(includeInstance, msg) {
|
4925
|
+
var f, obj = {
|
4926
|
+
paymentMethodId: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
4927
|
+
userId: jspb.Message.getFieldWithDefault(msg, 2, 0),
|
4928
|
+
amount: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
|
4929
|
+
bonusId: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
4930
|
+
userCurrency: jspb.Message.getFieldWithDefault(msg, 5, "")
|
4931
|
+
};
|
4932
|
+
|
4933
|
+
if (includeInstance) {
|
4934
|
+
obj.$jspbMessageInstance = msg;
|
4935
|
+
}
|
4936
|
+
return obj;
|
4937
|
+
};
|
4938
|
+
}
|
4939
|
+
|
4940
|
+
|
4941
|
+
/**
|
4942
|
+
* Deserializes binary data (in protobuf wire format).
|
4943
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
4944
|
+
* @return {!proto.payment.AttemptDepositRequest}
|
4945
|
+
*/
|
4946
|
+
proto.payment.AttemptDepositRequest.deserializeBinary = function(bytes) {
|
4947
|
+
var reader = new jspb.BinaryReader(bytes);
|
4948
|
+
var msg = new proto.payment.AttemptDepositRequest;
|
4949
|
+
return proto.payment.AttemptDepositRequest.deserializeBinaryFromReader(msg, reader);
|
4950
|
+
};
|
4951
|
+
|
4952
|
+
|
4953
|
+
/**
|
4954
|
+
* Deserializes binary data (in protobuf wire format) from the
|
4955
|
+
* given reader into the given message object.
|
4956
|
+
* @param {!proto.payment.AttemptDepositRequest} msg The message object to deserialize into.
|
4957
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
4958
|
+
* @return {!proto.payment.AttemptDepositRequest}
|
4959
|
+
*/
|
4960
|
+
proto.payment.AttemptDepositRequest.deserializeBinaryFromReader = function(msg, reader) {
|
4961
|
+
while (reader.nextField()) {
|
4962
|
+
if (reader.isEndGroup()) {
|
4963
|
+
break;
|
4964
|
+
}
|
4965
|
+
var field = reader.getFieldNumber();
|
4966
|
+
switch (field) {
|
4967
|
+
case 1:
|
4968
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4969
|
+
msg.setPaymentMethodId(value);
|
4970
|
+
break;
|
4971
|
+
case 2:
|
4972
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4973
|
+
msg.setUserId(value);
|
4974
|
+
break;
|
4975
|
+
case 3:
|
4976
|
+
var value = /** @type {number} */ (reader.readFloat());
|
4977
|
+
msg.setAmount(value);
|
4978
|
+
break;
|
4979
|
+
case 4:
|
4980
|
+
var value = /** @type {number} */ (reader.readInt32());
|
4981
|
+
msg.setBonusId(value);
|
4982
|
+
break;
|
4983
|
+
case 5:
|
4984
|
+
var value = /** @type {string} */ (reader.readString());
|
4985
|
+
msg.setUserCurrency(value);
|
4986
|
+
break;
|
4987
|
+
default:
|
4988
|
+
reader.skipField();
|
4989
|
+
break;
|
4990
|
+
}
|
4991
|
+
}
|
4992
|
+
return msg;
|
4993
|
+
};
|
4994
|
+
|
4995
|
+
|
4996
|
+
/**
|
4997
|
+
* Serializes the message to binary data (in protobuf wire format).
|
4998
|
+
* @return {!Uint8Array}
|
4999
|
+
*/
|
5000
|
+
proto.payment.AttemptDepositRequest.prototype.serializeBinary = function() {
|
5001
|
+
var writer = new jspb.BinaryWriter();
|
5002
|
+
proto.payment.AttemptDepositRequest.serializeBinaryToWriter(this, writer);
|
5003
|
+
return writer.getResultBuffer();
|
5004
|
+
};
|
5005
|
+
|
5006
|
+
|
5007
|
+
/**
|
5008
|
+
* Serializes the given message to binary data (in protobuf wire
|
5009
|
+
* format), writing to the given BinaryWriter.
|
5010
|
+
* @param {!proto.payment.AttemptDepositRequest} message
|
5011
|
+
* @param {!jspb.BinaryWriter} writer
|
5012
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5013
|
+
*/
|
5014
|
+
proto.payment.AttemptDepositRequest.serializeBinaryToWriter = function(message, writer) {
|
5015
|
+
var f = undefined;
|
5016
|
+
f = message.getPaymentMethodId();
|
5017
|
+
if (f !== 0) {
|
5018
|
+
writer.writeInt32(
|
5019
|
+
1,
|
5020
|
+
f
|
5021
|
+
);
|
5022
|
+
}
|
5023
|
+
f = message.getUserId();
|
5024
|
+
if (f !== 0) {
|
5025
|
+
writer.writeInt32(
|
5026
|
+
2,
|
5027
|
+
f
|
5028
|
+
);
|
5029
|
+
}
|
5030
|
+
f = message.getAmount();
|
5031
|
+
if (f !== 0.0) {
|
5032
|
+
writer.writeFloat(
|
5033
|
+
3,
|
5034
|
+
f
|
5035
|
+
);
|
5036
|
+
}
|
5037
|
+
f = /** @type {number} */ (jspb.Message.getField(message, 4));
|
5038
|
+
if (f != null) {
|
5039
|
+
writer.writeInt32(
|
5040
|
+
4,
|
5041
|
+
f
|
5042
|
+
);
|
5043
|
+
}
|
5044
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 5));
|
5045
|
+
if (f != null) {
|
5046
|
+
writer.writeString(
|
5047
|
+
5,
|
5048
|
+
f
|
5049
|
+
);
|
5050
|
+
}
|
5051
|
+
};
|
5052
|
+
|
5053
|
+
|
5054
|
+
/**
|
5055
|
+
* optional int32 payment_method_id = 1;
|
5056
|
+
* @return {number}
|
5057
|
+
*/
|
5058
|
+
proto.payment.AttemptDepositRequest.prototype.getPaymentMethodId = function() {
|
5059
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
5060
|
+
};
|
5061
|
+
|
5062
|
+
|
5063
|
+
/**
|
5064
|
+
* @param {number} value
|
5065
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5066
|
+
*/
|
5067
|
+
proto.payment.AttemptDepositRequest.prototype.setPaymentMethodId = function(value) {
|
5068
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
5069
|
+
};
|
5070
|
+
|
5071
|
+
|
5072
|
+
/**
|
5073
|
+
* optional int32 user_id = 2;
|
5074
|
+
* @return {number}
|
5075
|
+
*/
|
5076
|
+
proto.payment.AttemptDepositRequest.prototype.getUserId = function() {
|
5077
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
|
5078
|
+
};
|
5079
|
+
|
5080
|
+
|
5081
|
+
/**
|
5082
|
+
* @param {number} value
|
5083
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5084
|
+
*/
|
5085
|
+
proto.payment.AttemptDepositRequest.prototype.setUserId = function(value) {
|
5086
|
+
return jspb.Message.setProto3IntField(this, 2, value);
|
5087
|
+
};
|
5088
|
+
|
5089
|
+
|
5090
|
+
/**
|
5091
|
+
* optional float amount = 3;
|
5092
|
+
* @return {number}
|
5093
|
+
*/
|
5094
|
+
proto.payment.AttemptDepositRequest.prototype.getAmount = function() {
|
5095
|
+
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
|
5096
|
+
};
|
5097
|
+
|
5098
|
+
|
5099
|
+
/**
|
5100
|
+
* @param {number} value
|
5101
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5102
|
+
*/
|
5103
|
+
proto.payment.AttemptDepositRequest.prototype.setAmount = function(value) {
|
5104
|
+
return jspb.Message.setProto3FloatField(this, 3, value);
|
5105
|
+
};
|
5106
|
+
|
5107
|
+
|
5108
|
+
/**
|
5109
|
+
* optional int32 bonus_id = 4;
|
5110
|
+
* @return {number}
|
5111
|
+
*/
|
5112
|
+
proto.payment.AttemptDepositRequest.prototype.getBonusId = function() {
|
5113
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
5114
|
+
};
|
5115
|
+
|
5116
|
+
|
5117
|
+
/**
|
5118
|
+
* @param {number} value
|
5119
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5120
|
+
*/
|
5121
|
+
proto.payment.AttemptDepositRequest.prototype.setBonusId = function(value) {
|
5122
|
+
return jspb.Message.setField(this, 4, value);
|
5123
|
+
};
|
5124
|
+
|
5125
|
+
|
5126
|
+
/**
|
5127
|
+
* Clears the field making it undefined.
|
5128
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5129
|
+
*/
|
5130
|
+
proto.payment.AttemptDepositRequest.prototype.clearBonusId = function() {
|
5131
|
+
return jspb.Message.setField(this, 4, undefined);
|
5132
|
+
};
|
5133
|
+
|
5134
|
+
|
5135
|
+
/**
|
5136
|
+
* Returns whether this field is set.
|
5137
|
+
* @return {boolean}
|
5138
|
+
*/
|
5139
|
+
proto.payment.AttemptDepositRequest.prototype.hasBonusId = function() {
|
5140
|
+
return jspb.Message.getField(this, 4) != null;
|
5141
|
+
};
|
5142
|
+
|
5143
|
+
|
5144
|
+
/**
|
5145
|
+
* optional string user_currency = 5;
|
5146
|
+
* @return {string}
|
5147
|
+
*/
|
5148
|
+
proto.payment.AttemptDepositRequest.prototype.getUserCurrency = function() {
|
5149
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
|
5150
|
+
};
|
5151
|
+
|
5152
|
+
|
5153
|
+
/**
|
5154
|
+
* @param {string} value
|
5155
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5156
|
+
*/
|
5157
|
+
proto.payment.AttemptDepositRequest.prototype.setUserCurrency = function(value) {
|
5158
|
+
return jspb.Message.setField(this, 5, value);
|
5159
|
+
};
|
5160
|
+
|
5161
|
+
|
5162
|
+
/**
|
5163
|
+
* Clears the field making it undefined.
|
5164
|
+
* @return {!proto.payment.AttemptDepositRequest} returns this
|
5165
|
+
*/
|
5166
|
+
proto.payment.AttemptDepositRequest.prototype.clearUserCurrency = function() {
|
5167
|
+
return jspb.Message.setField(this, 5, undefined);
|
5168
|
+
};
|
5169
|
+
|
5170
|
+
|
5171
|
+
/**
|
5172
|
+
* Returns whether this field is set.
|
5173
|
+
* @return {boolean}
|
5174
|
+
*/
|
5175
|
+
proto.payment.AttemptDepositRequest.prototype.hasUserCurrency = function() {
|
5176
|
+
return jspb.Message.getField(this, 5) != null;
|
5177
|
+
};
|
5178
|
+
|
5179
|
+
|
5180
|
+
|
5181
|
+
|
5182
|
+
|
5183
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
5184
|
+
/**
|
5185
|
+
* Creates an object representation of this proto.
|
5186
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
5187
|
+
* Optional fields that are not set will be set to undefined.
|
5188
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
5189
|
+
* For the list of reserved names please see:
|
5190
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
5191
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
5192
|
+
* JSPB instance for transitional soy proto support:
|
5193
|
+
* http://goto/soy-param-migration
|
5194
|
+
* @return {!Object}
|
5195
|
+
*/
|
5196
|
+
proto.payment.DepositResponse.prototype.toObject = function(opt_includeInstance) {
|
5197
|
+
return proto.payment.DepositResponse.toObject(opt_includeInstance, this);
|
5198
|
+
};
|
5199
|
+
|
5200
|
+
|
5201
|
+
/**
|
5202
|
+
* Static version of the {@see toObject} method.
|
5203
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
5204
|
+
* the JSPB instance for transitional soy proto support:
|
5205
|
+
* http://goto/soy-param-migration
|
5206
|
+
* @param {!proto.payment.DepositResponse} msg The msg instance to transform.
|
5207
|
+
* @return {!Object}
|
5208
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5209
|
+
*/
|
5210
|
+
proto.payment.DepositResponse.toObject = function(includeInstance, msg) {
|
5211
|
+
var f, obj = {
|
5212
|
+
id: jspb.Message.getFieldWithDefault(msg, 1, 0),
|
5213
|
+
status: jspb.Message.getFieldWithDefault(msg, 2, "")
|
5214
|
+
};
|
5215
|
+
|
5216
|
+
if (includeInstance) {
|
5217
|
+
obj.$jspbMessageInstance = msg;
|
5218
|
+
}
|
5219
|
+
return obj;
|
5220
|
+
};
|
5221
|
+
}
|
5222
|
+
|
5223
|
+
|
5224
|
+
/**
|
5225
|
+
* Deserializes binary data (in protobuf wire format).
|
5226
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
5227
|
+
* @return {!proto.payment.DepositResponse}
|
5228
|
+
*/
|
5229
|
+
proto.payment.DepositResponse.deserializeBinary = function(bytes) {
|
5230
|
+
var reader = new jspb.BinaryReader(bytes);
|
5231
|
+
var msg = new proto.payment.DepositResponse;
|
5232
|
+
return proto.payment.DepositResponse.deserializeBinaryFromReader(msg, reader);
|
5233
|
+
};
|
5234
|
+
|
5235
|
+
|
5236
|
+
/**
|
5237
|
+
* Deserializes binary data (in protobuf wire format) from the
|
5238
|
+
* given reader into the given message object.
|
5239
|
+
* @param {!proto.payment.DepositResponse} msg The message object to deserialize into.
|
5240
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
5241
|
+
* @return {!proto.payment.DepositResponse}
|
5242
|
+
*/
|
5243
|
+
proto.payment.DepositResponse.deserializeBinaryFromReader = function(msg, reader) {
|
5244
|
+
while (reader.nextField()) {
|
5245
|
+
if (reader.isEndGroup()) {
|
5246
|
+
break;
|
5247
|
+
}
|
5248
|
+
var field = reader.getFieldNumber();
|
5249
|
+
switch (field) {
|
5250
|
+
case 1:
|
5251
|
+
var value = /** @type {number} */ (reader.readInt32());
|
5252
|
+
msg.setId(value);
|
5253
|
+
break;
|
5254
|
+
case 2:
|
5255
|
+
var value = /** @type {string} */ (reader.readString());
|
5256
|
+
msg.setStatus(value);
|
5257
|
+
break;
|
5258
|
+
default:
|
5259
|
+
reader.skipField();
|
5260
|
+
break;
|
5261
|
+
}
|
5262
|
+
}
|
5263
|
+
return msg;
|
5264
|
+
};
|
5265
|
+
|
5266
|
+
|
5267
|
+
/**
|
5268
|
+
* Serializes the message to binary data (in protobuf wire format).
|
5269
|
+
* @return {!Uint8Array}
|
5270
|
+
*/
|
5271
|
+
proto.payment.DepositResponse.prototype.serializeBinary = function() {
|
5272
|
+
var writer = new jspb.BinaryWriter();
|
5273
|
+
proto.payment.DepositResponse.serializeBinaryToWriter(this, writer);
|
5274
|
+
return writer.getResultBuffer();
|
5275
|
+
};
|
5276
|
+
|
5277
|
+
|
5278
|
+
/**
|
5279
|
+
* Serializes the given message to binary data (in protobuf wire
|
5280
|
+
* format), writing to the given BinaryWriter.
|
5281
|
+
* @param {!proto.payment.DepositResponse} message
|
5282
|
+
* @param {!jspb.BinaryWriter} writer
|
5283
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
5284
|
+
*/
|
5285
|
+
proto.payment.DepositResponse.serializeBinaryToWriter = function(message, writer) {
|
5286
|
+
var f = undefined;
|
5287
|
+
f = message.getId();
|
5288
|
+
if (f !== 0) {
|
5289
|
+
writer.writeInt32(
|
5290
|
+
1,
|
5291
|
+
f
|
5292
|
+
);
|
5293
|
+
}
|
5294
|
+
f = message.getStatus();
|
5295
|
+
if (f.length > 0) {
|
5296
|
+
writer.writeString(
|
5297
|
+
2,
|
5298
|
+
f
|
5299
|
+
);
|
5300
|
+
}
|
5301
|
+
};
|
5302
|
+
|
5303
|
+
|
5304
|
+
/**
|
5305
|
+
* optional int32 id = 1;
|
5306
|
+
* @return {number}
|
5307
|
+
*/
|
5308
|
+
proto.payment.DepositResponse.prototype.getId = function() {
|
5309
|
+
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
|
5310
|
+
};
|
5311
|
+
|
5312
|
+
|
5313
|
+
/**
|
5314
|
+
* @param {number} value
|
5315
|
+
* @return {!proto.payment.DepositResponse} returns this
|
5316
|
+
*/
|
5317
|
+
proto.payment.DepositResponse.prototype.setId = function(value) {
|
5318
|
+
return jspb.Message.setProto3IntField(this, 1, value);
|
5319
|
+
};
|
5320
|
+
|
5321
|
+
|
5322
|
+
/**
|
5323
|
+
* optional string status = 2;
|
5324
|
+
* @return {string}
|
5325
|
+
*/
|
5326
|
+
proto.payment.DepositResponse.prototype.getStatus = function() {
|
5327
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
5328
|
+
};
|
5329
|
+
|
5330
|
+
|
5331
|
+
/**
|
5332
|
+
* @param {string} value
|
5333
|
+
* @return {!proto.payment.DepositResponse} returns this
|
5334
|
+
*/
|
5335
|
+
proto.payment.DepositResponse.prototype.setStatus = function(value) {
|
5336
|
+
return jspb.Message.setProto3StringField(this, 2, value);
|
5337
|
+
};
|
5338
|
+
|
5339
|
+
|
4850
5340
|
goog.object.extend(exports, proto.payment);
|