x
This commit is contained in:
300
gen/web/payment/v1/payment_pb.js
Normal file
300
gen/web/payment/v1/payment_pb.js
Normal file
@@ -0,0 +1,300 @@
|
||||
// source: payment/v1/payment.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() {
|
||||
if (this) { return this; }
|
||||
if (typeof window !== 'undefined') { return window; }
|
||||
if (typeof global !== 'undefined') { return global; }
|
||||
if (typeof self !== 'undefined') { return self; }
|
||||
return Function('return this')();
|
||||
}.call(null));
|
||||
|
||||
var google_type_money_pb = require('../../google/type/money_pb.js');
|
||||
goog.object.extend(proto, google_type_money_pb);
|
||||
goog.exportSymbol('proto.payment.v1.Order', null, global);
|
||||
goog.exportSymbol('proto.payment.v1.PaymentProvider', 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.payment.v1.Order = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.payment.v1.Order, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.payment.v1.Order.displayName = 'proto.payment.v1.Order';
|
||||
}
|
||||
|
||||
|
||||
|
||||
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.payment.v1.Order.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.payment.v1.Order.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.payment.v1.Order} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.payment.v1.Order.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
orderId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
||||
recipientId: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
||||
amount: (f = msg.getAmount()) && google_type_money_pb.Money.toObject(includeInstance, f),
|
||||
paymentProvider: jspb.Message.getFieldWithDefault(msg, 4, 0)
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.payment.v1.Order}
|
||||
*/
|
||||
proto.payment.v1.Order.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.payment.v1.Order;
|
||||
return proto.payment.v1.Order.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.payment.v1.Order} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.payment.v1.Order}
|
||||
*/
|
||||
proto.payment.v1.Order.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.setOrderId(value);
|
||||
break;
|
||||
case 2:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setRecipientId(value);
|
||||
break;
|
||||
case 3:
|
||||
var value = new google_type_money_pb.Money;
|
||||
reader.readMessage(value,google_type_money_pb.Money.deserializeBinaryFromReader);
|
||||
msg.setAmount(value);
|
||||
break;
|
||||
case 4:
|
||||
var value = /** @type {!proto.payment.v1.PaymentProvider} */ (reader.readEnum());
|
||||
msg.setPaymentProvider(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.payment.v1.Order.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.payment.v1.Order} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.payment.v1.Order.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getOrderId();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getRecipientId();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
2,
|
||||
f
|
||||
);
|
||||
}
|
||||
f = message.getAmount();
|
||||
if (f != null) {
|
||||
writer.writeMessage(
|
||||
3,
|
||||
f,
|
||||
google_type_money_pb.Money.serializeBinaryToWriter
|
||||
);
|
||||
}
|
||||
f = message.getPaymentProvider();
|
||||
if (f !== 0.0) {
|
||||
writer.writeEnum(
|
||||
4,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string order_id = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.getOrderId = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.payment.v1.Order} returns this
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.setOrderId = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string recipient_id = 2;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.getRecipientId = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.payment.v1.Order} returns this
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.setRecipientId = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 2, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional google.type.Money amount = 3;
|
||||
* @return {?proto.google.type.Money}
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.getAmount = function() {
|
||||
return /** @type{?proto.google.type.Money} */ (
|
||||
jspb.Message.getWrapperField(this, google_type_money_pb.Money, 3));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {?proto.google.type.Money|undefined} value
|
||||
* @return {!proto.payment.v1.Order} returns this
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.setAmount = function(value) {
|
||||
return jspb.Message.setWrapperField(this, 3, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Clears the message field making it undefined.
|
||||
* @return {!proto.payment.v1.Order} returns this
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.clearAmount = function() {
|
||||
return this.setAmount(undefined);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Returns whether this field is set.
|
||||
* @return {boolean}
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.hasAmount = function() {
|
||||
return jspb.Message.getField(this, 3) != null;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional PaymentProvider payment_provider = 4;
|
||||
* @return {!proto.payment.v1.PaymentProvider}
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.getPaymentProvider = function() {
|
||||
return /** @type {!proto.payment.v1.PaymentProvider} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.payment.v1.PaymentProvider} value
|
||||
* @return {!proto.payment.v1.Order} returns this
|
||||
*/
|
||||
proto.payment.v1.Order.prototype.setPaymentProvider = function(value) {
|
||||
return jspb.Message.setProto3EnumField(this, 4, value);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @enum {number}
|
||||
*/
|
||||
proto.payment.v1.PaymentProvider = {
|
||||
PAYMENT_PROVIDER_UNSPECIFIED: 0,
|
||||
PAYMENT_PROVIDER_STRIPE: 1,
|
||||
PAYMENT_PROVIDER_PAYPAL: 2,
|
||||
PAYMENT_PROVIDER_APPLE: 3
|
||||
};
|
||||
|
||||
goog.object.extend(exports, proto.payment.v1);
|
||||
Reference in New Issue
Block a user