2090 lines
61 KiB
JavaScript
2090 lines
61 KiB
JavaScript
// source: printer/v1/pdf_invoice.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);
|
|
var google_type_datetime_pb = require('../../google/type/datetime_pb.js');
|
|
goog.object.extend(proto, google_type_datetime_pb);
|
|
var google_api_annotations_pb = require('../../google/api/annotations_pb.js');
|
|
goog.object.extend(proto, google_api_annotations_pb);
|
|
goog.exportSymbol('proto.printer.v1.invoice.DocumentResponse', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.Invoice', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.InvoiceInfo', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.InvoiceType', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.OfferInfo', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.OrderInfo', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.OrderItem', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.OrderType', null, global);
|
|
goog.exportSymbol('proto.printer.v1.invoice.OrderVatItem', 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.printer.v1.invoice.InvoiceInfo = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.InvoiceInfo, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.displayName = 'proto.printer.v1.invoice.InvoiceInfo';
|
|
}
|
|
/**
|
|
* 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.printer.v1.invoice.OrderInfo = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, proto.printer.v1.invoice.OrderInfo.repeatedFields_, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.OrderInfo, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.displayName = 'proto.printer.v1.invoice.OrderInfo';
|
|
}
|
|
/**
|
|
* 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.printer.v1.invoice.OfferInfo = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.OfferInfo, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.displayName = 'proto.printer.v1.invoice.OfferInfo';
|
|
}
|
|
/**
|
|
* 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.printer.v1.invoice.OrderItem = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.OrderItem, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.displayName = 'proto.printer.v1.invoice.OrderItem';
|
|
}
|
|
/**
|
|
* 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.printer.v1.invoice.OrderVatItem = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.OrderVatItem, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.displayName = 'proto.printer.v1.invoice.OrderVatItem';
|
|
}
|
|
/**
|
|
* 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.printer.v1.invoice.Invoice = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.Invoice, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.displayName = 'proto.printer.v1.invoice.Invoice';
|
|
}
|
|
/**
|
|
* 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.printer.v1.invoice.DocumentResponse = function(opt_data) {
|
|
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
|
};
|
|
goog.inherits(proto.printer.v1.invoice.DocumentResponse, jspb.Message);
|
|
if (goog.DEBUG && !COMPILED) {
|
|
/**
|
|
* @public
|
|
* @override
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.displayName = 'proto.printer.v1.invoice.DocumentResponse';
|
|
}
|
|
|
|
|
|
|
|
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.printer.v1.invoice.InvoiceInfo.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.InvoiceInfo.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.printer.v1.invoice.InvoiceInfo} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
invoiceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
invoiceDate: (f = msg.getInvoiceDate()) && google_type_datetime_pb.DateTime.toObject(includeInstance, f),
|
|
invoiceDueDate: (f = msg.getInvoiceDueDate()) && google_type_datetime_pb.DateTime.toObject(includeInstance, f),
|
|
invoiceType: 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.printer.v1.invoice.InvoiceInfo}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.InvoiceInfo;
|
|
return proto.printer.v1.invoice.InvoiceInfo.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.InvoiceInfo} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.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.setInvoiceId(value);
|
|
break;
|
|
case 2:
|
|
var value = new google_type_datetime_pb.DateTime;
|
|
reader.readMessage(value,google_type_datetime_pb.DateTime.deserializeBinaryFromReader);
|
|
msg.setInvoiceDate(value);
|
|
break;
|
|
case 3:
|
|
var value = new google_type_datetime_pb.DateTime;
|
|
reader.readMessage(value,google_type_datetime_pb.DateTime.deserializeBinaryFromReader);
|
|
msg.setInvoiceDueDate(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {!proto.printer.v1.invoice.InvoiceType} */ (reader.readEnum());
|
|
msg.setInvoiceType(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.InvoiceInfo.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.InvoiceInfo} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getInvoiceId();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getInvoiceDate();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
google_type_datetime_pb.DateTime.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getInvoiceDueDate();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
3,
|
|
f,
|
|
google_type_datetime_pb.DateTime.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getInvoiceType();
|
|
if (f !== 0.0) {
|
|
writer.writeEnum(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string invoice_id = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.getInvoiceId = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.setInvoiceId = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.type.DateTime invoice_date = 2;
|
|
* @return {?proto.google.type.DateTime}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.getInvoiceDate = function() {
|
|
return /** @type{?proto.google.type.DateTime} */ (
|
|
jspb.Message.getWrapperField(this, google_type_datetime_pb.DateTime, 2));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.google.type.DateTime|undefined} value
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.setInvoiceDate = function(value) {
|
|
return jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.clearInvoiceDate = function() {
|
|
return this.setInvoiceDate(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.hasInvoiceDate = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.type.DateTime invoice_due_date = 3;
|
|
* @return {?proto.google.type.DateTime}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.getInvoiceDueDate = function() {
|
|
return /** @type{?proto.google.type.DateTime} */ (
|
|
jspb.Message.getWrapperField(this, google_type_datetime_pb.DateTime, 3));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.google.type.DateTime|undefined} value
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.setInvoiceDueDate = function(value) {
|
|
return jspb.Message.setWrapperField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.clearInvoiceDueDate = function() {
|
|
return this.setInvoiceDueDate(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.hasInvoiceDueDate = function() {
|
|
return jspb.Message.getField(this, 3) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional InvoiceType invoice_type = 4;
|
|
* @return {!proto.printer.v1.invoice.InvoiceType}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.getInvoiceType = function() {
|
|
return /** @type {!proto.printer.v1.invoice.InvoiceType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.printer.v1.invoice.InvoiceType} value
|
|
* @return {!proto.printer.v1.invoice.InvoiceInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceInfo.prototype.setInvoiceType = function(value) {
|
|
return jspb.Message.setProto3EnumField(this, 4, value);
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
* List of repeated fields within this message type.
|
|
* @private {!Array<number>}
|
|
* @const
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.repeatedFields_ = [5,6];
|
|
|
|
|
|
|
|
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.printer.v1.invoice.OrderInfo.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.OrderInfo.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.printer.v1.invoice.OrderInfo} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
orderId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
orderDate: (f = msg.getOrderDate()) && google_type_datetime_pb.DateTime.toObject(includeInstance, f),
|
|
orderDueDate: (f = msg.getOrderDueDate()) && google_type_datetime_pb.DateTime.toObject(includeInstance, f),
|
|
orderType: jspb.Message.getFieldWithDefault(msg, 4, 0),
|
|
orderItemsList: jspb.Message.toObjectList(msg.getOrderItemsList(),
|
|
proto.printer.v1.invoice.OrderItem.toObject, includeInstance),
|
|
orderVatItemsList: jspb.Message.toObjectList(msg.getOrderVatItemsList(),
|
|
proto.printer.v1.invoice.OrderVatItem.toObject, includeInstance),
|
|
deposit: jspb.Message.getFloatingPointFieldWithDefault(msg, 7, 0.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.printer.v1.invoice.OrderInfo}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.OrderInfo;
|
|
return proto.printer.v1.invoice.OrderInfo.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.OrderInfo} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.OrderInfo}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.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 = new google_type_datetime_pb.DateTime;
|
|
reader.readMessage(value,google_type_datetime_pb.DateTime.deserializeBinaryFromReader);
|
|
msg.setOrderDate(value);
|
|
break;
|
|
case 3:
|
|
var value = new google_type_datetime_pb.DateTime;
|
|
reader.readMessage(value,google_type_datetime_pb.DateTime.deserializeBinaryFromReader);
|
|
msg.setOrderDueDate(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {!proto.printer.v1.invoice.OrderType} */ (reader.readEnum());
|
|
msg.setOrderType(value);
|
|
break;
|
|
case 5:
|
|
var value = new proto.printer.v1.invoice.OrderItem;
|
|
reader.readMessage(value,proto.printer.v1.invoice.OrderItem.deserializeBinaryFromReader);
|
|
msg.addOrderItems(value);
|
|
break;
|
|
case 6:
|
|
var value = new proto.printer.v1.invoice.OrderVatItem;
|
|
reader.readMessage(value,proto.printer.v1.invoice.OrderVatItem.deserializeBinaryFromReader);
|
|
msg.addOrderVatItems(value);
|
|
break;
|
|
case 7:
|
|
var value = /** @type {number} */ (reader.readDouble());
|
|
msg.setDeposit(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.OrderInfo.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.OrderInfo} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getOrderId();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getOrderDate();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
google_type_datetime_pb.DateTime.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getOrderDueDate();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
3,
|
|
f,
|
|
google_type_datetime_pb.DateTime.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getOrderType();
|
|
if (f !== 0.0) {
|
|
writer.writeEnum(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getOrderItemsList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedMessage(
|
|
5,
|
|
f,
|
|
proto.printer.v1.invoice.OrderItem.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getOrderVatItemsList();
|
|
if (f.length > 0) {
|
|
writer.writeRepeatedMessage(
|
|
6,
|
|
f,
|
|
proto.printer.v1.invoice.OrderVatItem.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = /** @type {number} */ (jspb.Message.getField(message, 7));
|
|
if (f != null) {
|
|
writer.writeDouble(
|
|
7,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string order_id = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getOrderId = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setOrderId = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.type.DateTime order_date = 2;
|
|
* @return {?proto.google.type.DateTime}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getOrderDate = function() {
|
|
return /** @type{?proto.google.type.DateTime} */ (
|
|
jspb.Message.getWrapperField(this, google_type_datetime_pb.DateTime, 2));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.google.type.DateTime|undefined} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setOrderDate = function(value) {
|
|
return jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.clearOrderDate = function() {
|
|
return this.setOrderDate(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.hasOrderDate = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.type.DateTime order_due_date = 3;
|
|
* @return {?proto.google.type.DateTime}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getOrderDueDate = function() {
|
|
return /** @type{?proto.google.type.DateTime} */ (
|
|
jspb.Message.getWrapperField(this, google_type_datetime_pb.DateTime, 3));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.google.type.DateTime|undefined} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setOrderDueDate = function(value) {
|
|
return jspb.Message.setWrapperField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.clearOrderDueDate = function() {
|
|
return this.setOrderDueDate(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.hasOrderDueDate = function() {
|
|
return jspb.Message.getField(this, 3) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional OrderType order_type = 4;
|
|
* @return {!proto.printer.v1.invoice.OrderType}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getOrderType = function() {
|
|
return /** @type {!proto.printer.v1.invoice.OrderType} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.printer.v1.invoice.OrderType} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setOrderType = function(value) {
|
|
return jspb.Message.setProto3EnumField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated OrderItem order_items = 5;
|
|
* @return {!Array<!proto.printer.v1.invoice.OrderItem>}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getOrderItemsList = function() {
|
|
return /** @type{!Array<!proto.printer.v1.invoice.OrderItem>} */ (
|
|
jspb.Message.getRepeatedWrapperField(this, proto.printer.v1.invoice.OrderItem, 5));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!Array<!proto.printer.v1.invoice.OrderItem>} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setOrderItemsList = function(value) {
|
|
return jspb.Message.setRepeatedWrapperField(this, 5, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.printer.v1.invoice.OrderItem=} opt_value
|
|
* @param {number=} opt_index
|
|
* @return {!proto.printer.v1.invoice.OrderItem}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.addOrderItems = function(opt_value, opt_index) {
|
|
return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.printer.v1.invoice.OrderItem, opt_index);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the list making it empty but non-null.
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.clearOrderItemsList = function() {
|
|
return this.setOrderItemsList([]);
|
|
};
|
|
|
|
|
|
/**
|
|
* repeated OrderVatItem order_vat_items = 6;
|
|
* @return {!Array<!proto.printer.v1.invoice.OrderVatItem>}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getOrderVatItemsList = function() {
|
|
return /** @type{!Array<!proto.printer.v1.invoice.OrderVatItem>} */ (
|
|
jspb.Message.getRepeatedWrapperField(this, proto.printer.v1.invoice.OrderVatItem, 6));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!Array<!proto.printer.v1.invoice.OrderVatItem>} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setOrderVatItemsList = function(value) {
|
|
return jspb.Message.setRepeatedWrapperField(this, 6, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!proto.printer.v1.invoice.OrderVatItem=} opt_value
|
|
* @param {number=} opt_index
|
|
* @return {!proto.printer.v1.invoice.OrderVatItem}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.addOrderVatItems = function(opt_value, opt_index) {
|
|
return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.printer.v1.invoice.OrderVatItem, opt_index);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the list making it empty but non-null.
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.clearOrderVatItemsList = function() {
|
|
return this.setOrderVatItemsList([]);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional double deposit = 7;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.getDeposit = function() {
|
|
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 7, 0.0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.setDeposit = function(value) {
|
|
return jspb.Message.setField(this, 7, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.OrderInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.clearDeposit = function() {
|
|
return jspb.Message.setField(this, 7, undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.OrderInfo.prototype.hasDeposit = function() {
|
|
return jspb.Message.getField(this, 7) != 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.printer.v1.invoice.OfferInfo.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.OfferInfo.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.printer.v1.invoice.OfferInfo} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
offerId: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
offerDate: (f = msg.getOfferDate()) && google_type_datetime_pb.DateTime.toObject(includeInstance, f),
|
|
offerDueDate: (f = msg.getOfferDueDate()) && google_type_datetime_pb.DateTime.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.printer.v1.invoice.OfferInfo}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.OfferInfo;
|
|
return proto.printer.v1.invoice.OfferInfo.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.OfferInfo} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.OfferInfo}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.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.setOfferId(value);
|
|
break;
|
|
case 2:
|
|
var value = new google_type_datetime_pb.DateTime;
|
|
reader.readMessage(value,google_type_datetime_pb.DateTime.deserializeBinaryFromReader);
|
|
msg.setOfferDate(value);
|
|
break;
|
|
case 3:
|
|
var value = new google_type_datetime_pb.DateTime;
|
|
reader.readMessage(value,google_type_datetime_pb.DateTime.deserializeBinaryFromReader);
|
|
msg.setOfferDueDate(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.OfferInfo.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.OfferInfo} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getOfferId();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getOfferDate();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
google_type_datetime_pb.DateTime.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getOfferDueDate();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
3,
|
|
f,
|
|
google_type_datetime_pb.DateTime.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string offer_id = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.getOfferId = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.OfferInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.setOfferId = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.type.DateTime offer_date = 2;
|
|
* @return {?proto.google.type.DateTime}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.getOfferDate = function() {
|
|
return /** @type{?proto.google.type.DateTime} */ (
|
|
jspb.Message.getWrapperField(this, google_type_datetime_pb.DateTime, 2));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.google.type.DateTime|undefined} value
|
|
* @return {!proto.printer.v1.invoice.OfferInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.setOfferDate = function(value) {
|
|
return jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.OfferInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.clearOfferDate = function() {
|
|
return this.setOfferDate(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.hasOfferDate = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional google.type.DateTime offer_due_date = 3;
|
|
* @return {?proto.google.type.DateTime}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.getOfferDueDate = function() {
|
|
return /** @type{?proto.google.type.DateTime} */ (
|
|
jspb.Message.getWrapperField(this, google_type_datetime_pb.DateTime, 3));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.google.type.DateTime|undefined} value
|
|
* @return {!proto.printer.v1.invoice.OfferInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.setOfferDueDate = function(value) {
|
|
return jspb.Message.setWrapperField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.OfferInfo} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.clearOfferDueDate = function() {
|
|
return this.setOfferDueDate(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.OfferInfo.prototype.hasOfferDueDate = 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.printer.v1.invoice.OrderItem.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.OrderItem.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.printer.v1.invoice.OrderItem} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
description: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
vat: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
|
|
count: jspb.Message.getFieldWithDefault(msg, 3, 0),
|
|
priceSingle: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0),
|
|
priceSum: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0),
|
|
priceNet: jspb.Message.getBooleanFieldWithDefault(msg, 6, false)
|
|
};
|
|
|
|
if (includeInstance) {
|
|
obj.$jspbMessageInstance = msg;
|
|
}
|
|
return obj;
|
|
};
|
|
}
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format).
|
|
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
|
* @return {!proto.printer.v1.invoice.OrderItem}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.OrderItem;
|
|
return proto.printer.v1.invoice.OrderItem.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.OrderItem} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.OrderItem}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.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.setDescription(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {number} */ (reader.readDouble());
|
|
msg.setVat(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {number} */ (reader.readUint64());
|
|
msg.setCount(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {number} */ (reader.readDouble());
|
|
msg.setPriceSingle(value);
|
|
break;
|
|
case 5:
|
|
var value = /** @type {number} */ (reader.readDouble());
|
|
msg.setPriceSum(value);
|
|
break;
|
|
case 6:
|
|
var value = /** @type {boolean} */ (reader.readBool());
|
|
msg.setPriceNet(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.OrderItem.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.OrderItem} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getDescription();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getVat();
|
|
if (f !== 0.0) {
|
|
writer.writeDouble(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getCount();
|
|
if (f !== 0) {
|
|
writer.writeUint64(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = message.getPriceSingle();
|
|
if (f !== 0.0) {
|
|
writer.writeDouble(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
f = message.getPriceSum();
|
|
if (f !== 0.0) {
|
|
writer.writeDouble(
|
|
5,
|
|
f
|
|
);
|
|
}
|
|
f = message.getPriceNet();
|
|
if (f) {
|
|
writer.writeBool(
|
|
6,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string description = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.getDescription = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.OrderItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.setDescription = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional double vat = 2;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.getVat = function() {
|
|
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.setVat = function(value) {
|
|
return jspb.Message.setProto3FloatField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional uint64 count = 3;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.getCount = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.setCount = function(value) {
|
|
return jspb.Message.setProto3IntField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional double price_single = 4;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.getPriceSingle = function() {
|
|
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.setPriceSingle = function(value) {
|
|
return jspb.Message.setProto3FloatField(this, 4, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional double price_sum = 5;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.getPriceSum = function() {
|
|
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.setPriceSum = function(value) {
|
|
return jspb.Message.setProto3FloatField(this, 5, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bool price_net = 6;
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.getPriceNet = function() {
|
|
return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {boolean} value
|
|
* @return {!proto.printer.v1.invoice.OrderItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderItem.prototype.setPriceNet = function(value) {
|
|
return jspb.Message.setProto3BooleanField(this, 6, 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.printer.v1.invoice.OrderVatItem.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.OrderVatItem.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.printer.v1.invoice.OrderVatItem} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
description: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
|
vat: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
|
|
vatMoneySum: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
|
|
itemsCount: 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.printer.v1.invoice.OrderVatItem}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.OrderVatItem;
|
|
return proto.printer.v1.invoice.OrderVatItem.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.OrderVatItem} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.OrderVatItem}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.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.setDescription(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {number} */ (reader.readDouble());
|
|
msg.setVat(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {number} */ (reader.readDouble());
|
|
msg.setVatMoneySum(value);
|
|
break;
|
|
case 4:
|
|
var value = /** @type {number} */ (reader.readUint64());
|
|
msg.setItemsCount(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.OrderVatItem.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.OrderVatItem} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getDescription();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getVat();
|
|
if (f !== 0.0) {
|
|
writer.writeDouble(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getVatMoneySum();
|
|
if (f !== 0.0) {
|
|
writer.writeDouble(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
f = message.getItemsCount();
|
|
if (f !== 0) {
|
|
writer.writeUint64(
|
|
4,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string description = 1;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.getDescription = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.OrderVatItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.setDescription = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional double vat = 2;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.getVat = function() {
|
|
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderVatItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.setVat = function(value) {
|
|
return jspb.Message.setProto3FloatField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional double vat_money_sum = 3;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.getVatMoneySum = function() {
|
|
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderVatItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.setVatMoneySum = function(value) {
|
|
return jspb.Message.setProto3FloatField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional uint64 items_count = 4;
|
|
* @return {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.getItemsCount = function() {
|
|
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {number} value
|
|
* @return {!proto.printer.v1.invoice.OrderVatItem} returns this
|
|
*/
|
|
proto.printer.v1.invoice.OrderVatItem.prototype.setItemsCount = function(value) {
|
|
return jspb.Message.setProto3IntField(this, 4, 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.printer.v1.invoice.Invoice.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.Invoice.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.printer.v1.invoice.Invoice} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
order: (f = msg.getOrder()) && proto.printer.v1.invoice.OrderInfo.toObject(includeInstance, f),
|
|
offer: (f = msg.getOffer()) && proto.printer.v1.invoice.OfferInfo.toObject(includeInstance, f),
|
|
info: (f = msg.getInfo()) && proto.printer.v1.invoice.InvoiceInfo.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.printer.v1.invoice.Invoice}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.Invoice;
|
|
return proto.printer.v1.invoice.Invoice.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.Invoice} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.Invoice}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = new proto.printer.v1.invoice.OrderInfo;
|
|
reader.readMessage(value,proto.printer.v1.invoice.OrderInfo.deserializeBinaryFromReader);
|
|
msg.setOrder(value);
|
|
break;
|
|
case 2:
|
|
var value = new proto.printer.v1.invoice.OfferInfo;
|
|
reader.readMessage(value,proto.printer.v1.invoice.OfferInfo.deserializeBinaryFromReader);
|
|
msg.setOffer(value);
|
|
break;
|
|
case 3:
|
|
var value = new proto.printer.v1.invoice.InvoiceInfo;
|
|
reader.readMessage(value,proto.printer.v1.invoice.InvoiceInfo.deserializeBinaryFromReader);
|
|
msg.setInfo(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.Invoice.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.Invoice} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getOrder();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
1,
|
|
f,
|
|
proto.printer.v1.invoice.OrderInfo.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getOffer();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
2,
|
|
f,
|
|
proto.printer.v1.invoice.OfferInfo.serializeBinaryToWriter
|
|
);
|
|
}
|
|
f = message.getInfo();
|
|
if (f != null) {
|
|
writer.writeMessage(
|
|
3,
|
|
f,
|
|
proto.printer.v1.invoice.InvoiceInfo.serializeBinaryToWriter
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional OrderInfo order = 1;
|
|
* @return {?proto.printer.v1.invoice.OrderInfo}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.getOrder = function() {
|
|
return /** @type{?proto.printer.v1.invoice.OrderInfo} */ (
|
|
jspb.Message.getWrapperField(this, proto.printer.v1.invoice.OrderInfo, 1));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.printer.v1.invoice.OrderInfo|undefined} value
|
|
* @return {!proto.printer.v1.invoice.Invoice} returns this
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.setOrder = function(value) {
|
|
return jspb.Message.setWrapperField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.Invoice} returns this
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.clearOrder = function() {
|
|
return this.setOrder(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.hasOrder = function() {
|
|
return jspb.Message.getField(this, 1) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional OfferInfo offer = 2;
|
|
* @return {?proto.printer.v1.invoice.OfferInfo}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.getOffer = function() {
|
|
return /** @type{?proto.printer.v1.invoice.OfferInfo} */ (
|
|
jspb.Message.getWrapperField(this, proto.printer.v1.invoice.OfferInfo, 2));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.printer.v1.invoice.OfferInfo|undefined} value
|
|
* @return {!proto.printer.v1.invoice.Invoice} returns this
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.setOffer = function(value) {
|
|
return jspb.Message.setWrapperField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.Invoice} returns this
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.clearOffer = function() {
|
|
return this.setOffer(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.hasOffer = function() {
|
|
return jspb.Message.getField(this, 2) != null;
|
|
};
|
|
|
|
|
|
/**
|
|
* optional InvoiceInfo info = 3;
|
|
* @return {?proto.printer.v1.invoice.InvoiceInfo}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.getInfo = function() {
|
|
return /** @type{?proto.printer.v1.invoice.InvoiceInfo} */ (
|
|
jspb.Message.getWrapperField(this, proto.printer.v1.invoice.InvoiceInfo, 3));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {?proto.printer.v1.invoice.InvoiceInfo|undefined} value
|
|
* @return {!proto.printer.v1.invoice.Invoice} returns this
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.setInfo = function(value) {
|
|
return jspb.Message.setWrapperField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* Clears the message field making it undefined.
|
|
* @return {!proto.printer.v1.invoice.Invoice} returns this
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.clearInfo = function() {
|
|
return this.setInfo(undefined);
|
|
};
|
|
|
|
|
|
/**
|
|
* Returns whether this field is set.
|
|
* @return {boolean}
|
|
*/
|
|
proto.printer.v1.invoice.Invoice.prototype.hasInfo = 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.printer.v1.invoice.DocumentResponse.prototype.toObject = function(opt_includeInstance) {
|
|
return proto.printer.v1.invoice.DocumentResponse.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.printer.v1.invoice.DocumentResponse} msg The msg instance to transform.
|
|
* @return {!Object}
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.toObject = function(includeInstance, msg) {
|
|
var f, obj = {
|
|
document: msg.getDocument_asB64(),
|
|
signature: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
|
sha512: 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.printer.v1.invoice.DocumentResponse}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.deserializeBinary = function(bytes) {
|
|
var reader = new jspb.BinaryReader(bytes);
|
|
var msg = new proto.printer.v1.invoice.DocumentResponse;
|
|
return proto.printer.v1.invoice.DocumentResponse.deserializeBinaryFromReader(msg, reader);
|
|
};
|
|
|
|
|
|
/**
|
|
* Deserializes binary data (in protobuf wire format) from the
|
|
* given reader into the given message object.
|
|
* @param {!proto.printer.v1.invoice.DocumentResponse} msg The message object to deserialize into.
|
|
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
|
* @return {!proto.printer.v1.invoice.DocumentResponse}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.deserializeBinaryFromReader = function(msg, reader) {
|
|
while (reader.nextField()) {
|
|
if (reader.isEndGroup()) {
|
|
break;
|
|
}
|
|
var field = reader.getFieldNumber();
|
|
switch (field) {
|
|
case 1:
|
|
var value = /** @type {!Uint8Array} */ (reader.readBytes());
|
|
msg.setDocument(value);
|
|
break;
|
|
case 2:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setSignature(value);
|
|
break;
|
|
case 3:
|
|
var value = /** @type {string} */ (reader.readString());
|
|
msg.setSha512(value);
|
|
break;
|
|
default:
|
|
reader.skipField();
|
|
break;
|
|
}
|
|
}
|
|
return msg;
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the message to binary data (in protobuf wire format).
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.serializeBinary = function() {
|
|
var writer = new jspb.BinaryWriter();
|
|
proto.printer.v1.invoice.DocumentResponse.serializeBinaryToWriter(this, writer);
|
|
return writer.getResultBuffer();
|
|
};
|
|
|
|
|
|
/**
|
|
* Serializes the given message to binary data (in protobuf wire
|
|
* format), writing to the given BinaryWriter.
|
|
* @param {!proto.printer.v1.invoice.DocumentResponse} message
|
|
* @param {!jspb.BinaryWriter} writer
|
|
* @suppress {unusedLocalVariables} f is only used for nested messages
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.serializeBinaryToWriter = function(message, writer) {
|
|
var f = undefined;
|
|
f = message.getDocument_asU8();
|
|
if (f.length > 0) {
|
|
writer.writeBytes(
|
|
1,
|
|
f
|
|
);
|
|
}
|
|
f = message.getSignature();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
2,
|
|
f
|
|
);
|
|
}
|
|
f = message.getSha512();
|
|
if (f.length > 0) {
|
|
writer.writeString(
|
|
3,
|
|
f
|
|
);
|
|
}
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes document = 1;
|
|
* @return {!(string|Uint8Array)}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.getDocument = function() {
|
|
return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes document = 1;
|
|
* This is a type-conversion wrapper around `getDocument()`
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.getDocument_asB64 = function() {
|
|
return /** @type {string} */ (jspb.Message.bytesAsB64(
|
|
this.getDocument()));
|
|
};
|
|
|
|
|
|
/**
|
|
* optional bytes document = 1;
|
|
* Note that Uint8Array is not supported on all browsers.
|
|
* @see http://caniuse.com/Uint8Array
|
|
* This is a type-conversion wrapper around `getDocument()`
|
|
* @return {!Uint8Array}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.getDocument_asU8 = function() {
|
|
return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(
|
|
this.getDocument()));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {!(string|Uint8Array)} value
|
|
* @return {!proto.printer.v1.invoice.DocumentResponse} returns this
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.setDocument = function(value) {
|
|
return jspb.Message.setProto3BytesField(this, 1, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string signature = 2;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.getSignature = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.DocumentResponse} returns this
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.setSignature = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 2, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* optional string sha512 = 3;
|
|
* @return {string}
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.getSha512 = function() {
|
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
|
};
|
|
|
|
|
|
/**
|
|
* @param {string} value
|
|
* @return {!proto.printer.v1.invoice.DocumentResponse} returns this
|
|
*/
|
|
proto.printer.v1.invoice.DocumentResponse.prototype.setSha512 = function(value) {
|
|
return jspb.Message.setProto3StringField(this, 3, value);
|
|
};
|
|
|
|
|
|
/**
|
|
* @enum {number}
|
|
*/
|
|
proto.printer.v1.invoice.InvoiceType = {
|
|
INVOICE_TYPE_UNSPECIFIED: 0,
|
|
INVOICE_TYPE_PAID: 1,
|
|
INVOICE_TYPE_OPEN: 2
|
|
};
|
|
|
|
/**
|
|
* @enum {number}
|
|
*/
|
|
proto.printer.v1.invoice.OrderType = {
|
|
ORDER_TYPE_UNSPECIFIED: 0,
|
|
ORDER_TYPE_PHONE: 1,
|
|
ORDER_TYPE_WWW: 2,
|
|
ORDER_TYPE_EMAIL: 3
|
|
};
|
|
|
|
goog.object.extend(exports, proto.printer.v1.invoice);
|