// source: shop/v1/shop.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); goog.exportSymbol('proto.shop.v1.Shop', null, global); goog.exportSymbol('proto.shop.v1.ShopType', 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.shop.v1.Shop = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.shop.v1.Shop, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.shop.v1.Shop.displayName = 'proto.shop.v1.Shop'; } 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_, 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.shop.v1.Shop.prototype.toObject = function(opt_includeInstance) { return proto.shop.v1.Shop.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.shop.v1.Shop} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.shop.v1.Shop.toObject = function(includeInstance, msg) { var f, obj = { shopId: jspb.Message.getFieldWithDefault(msg, 1, ""), shopName: jspb.Message.getFieldWithDefault(msg, 2, ""), shopType: jspb.Message.getFieldWithDefault(msg, 3, 0), shopUrlWww: jspb.Message.getFieldWithDefault(msg, 4, ""), shopUrlLogo: jspb.Message.getFieldWithDefault(msg, 5, ""), shopUrlApi: jspb.Message.getFieldWithDefault(msg, 6, ""), shopCurrency: jspb.Message.getFieldWithDefault(msg, 7, ""), shopPrefixOrder: jspb.Message.getFieldWithDefault(msg, 8, ""), shopPrefixInvoice: jspb.Message.getFieldWithDefault(msg, 9, ""), shopPrefixOffer: jspb.Message.getFieldWithDefault(msg, 10, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.shop.v1.Shop} */ proto.shop.v1.Shop.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.shop.v1.Shop; return proto.shop.v1.Shop.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.shop.v1.Shop} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.shop.v1.Shop} */ proto.shop.v1.Shop.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.setShopId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setShopName(value); break; case 3: var value = /** @type {!proto.shop.v1.ShopType} */ (reader.readEnum()); msg.setShopType(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setShopUrlWww(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setShopUrlLogo(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setShopUrlApi(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setShopCurrency(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setShopPrefixOrder(value); break; case 9: var value = /** @type {string} */ (reader.readString()); msg.setShopPrefixInvoice(value); break; case 10: var value = /** @type {string} */ (reader.readString()); msg.setShopPrefixOffer(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.shop.v1.Shop.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.shop.v1.Shop.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.shop.v1.Shop} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.shop.v1.Shop.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } f = message.getShopName(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getShopType(); if (f !== 0.0) { writer.writeEnum( 3, f ); } f = message.getShopUrlWww(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getShopUrlLogo(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getShopUrlApi(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getShopCurrency(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getShopPrefixOrder(); if (f.length > 0) { writer.writeString( 8, f ); } f = message.getShopPrefixInvoice(); if (f.length > 0) { writer.writeString( 9, f ); } f = message.getShopPrefixOffer(); if (f.length > 0) { writer.writeString( 10, f ); } }; /** * optional string shop_id = 1; * @return {string} */ proto.shop.v1.Shop.prototype.getShopId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopId = function(value) { return jspb.Message.setField(this, 1, value); }; /** * Clears the field making it undefined. * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.clearShopId = function() { return jspb.Message.setField(this, 1, undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.shop.v1.Shop.prototype.hasShopId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string shop_name = 2; * @return {string} */ proto.shop.v1.Shop.prototype.getShopName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopName = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional ShopType shop_type = 3; * @return {!proto.shop.v1.ShopType} */ proto.shop.v1.Shop.prototype.getShopType = function() { return /** @type {!proto.shop.v1.ShopType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {!proto.shop.v1.ShopType} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopType = function(value) { return jspb.Message.setProto3EnumField(this, 3, value); }; /** * optional string shop_url_www = 4; * @return {string} */ proto.shop.v1.Shop.prototype.getShopUrlWww = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopUrlWww = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string shop_url_logo = 5; * @return {string} */ proto.shop.v1.Shop.prototype.getShopUrlLogo = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopUrlLogo = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string shop_url_api = 6; * @return {string} */ proto.shop.v1.Shop.prototype.getShopUrlApi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopUrlApi = function(value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string shop_currency = 7; * @return {string} */ proto.shop.v1.Shop.prototype.getShopCurrency = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopCurrency = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string shop_prefix_order = 8; * @return {string} */ proto.shop.v1.Shop.prototype.getShopPrefixOrder = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopPrefixOrder = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; /** * optional string shop_prefix_invoice = 9; * @return {string} */ proto.shop.v1.Shop.prototype.getShopPrefixInvoice = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopPrefixInvoice = function(value) { return jspb.Message.setProto3StringField(this, 9, value); }; /** * optional string shop_prefix_offer = 10; * @return {string} */ proto.shop.v1.Shop.prototype.getShopPrefixOffer = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** * @param {string} value * @return {!proto.shop.v1.Shop} returns this */ proto.shop.v1.Shop.prototype.setShopPrefixOffer = function(value) { return jspb.Message.setProto3StringField(this, 10, value); }; /** * @enum {number} */ proto.shop.v1.ShopType = { SHOP_TYPE_UNSPECIFIED: 0, SHOP_TYPE_DIGITAL: 1, SHOP_TYPE_RETAIL: 2 }; goog.object.extend(exports, proto.shop.v1);