UNPKG

rocketmq-client-nodejs

Version:
1,470 lines (1,322 loc) 187 kB
// source: apache/rocketmq/v2/definition.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_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js'); goog.object.extend(proto, google_protobuf_duration_pb); goog.exportSymbol('proto.apache.rocketmq.v2.Address', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.AddressScheme', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Assignment', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Broker', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.ClientType', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Code', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.CustomizedBackoff', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.DeadLetterQueue', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Digest', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.DigestType', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Encoding', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Endpoints', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.ExponentialBackoff', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.FilterExpression', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.FilterType', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Language', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Message', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.MessageQueue', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.MessageType', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Metric', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Permission', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Publishing', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.QueryOffsetPolicy', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Resource', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.RetryPolicy', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.RetryPolicy.StrategyCase', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Settings', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Settings.PubSubCase', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Status', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.Subscription', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.SubscriptionEntry', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.SystemProperties', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.TransactionResolution', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.TransactionSource', null, global); goog.exportSymbol('proto.apache.rocketmq.v2.UA', 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.apache.rocketmq.v2.FilterExpression = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.FilterExpression, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.FilterExpression.displayName = 'proto.apache.rocketmq.v2.FilterExpression'; } /** * 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.apache.rocketmq.v2.RetryPolicy = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.apache.rocketmq.v2.RetryPolicy.oneofGroups_); }; goog.inherits(proto.apache.rocketmq.v2.RetryPolicy, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.RetryPolicy.displayName = 'proto.apache.rocketmq.v2.RetryPolicy'; } /** * 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.apache.rocketmq.v2.ExponentialBackoff = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.ExponentialBackoff, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.ExponentialBackoff.displayName = 'proto.apache.rocketmq.v2.ExponentialBackoff'; } /** * 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.apache.rocketmq.v2.CustomizedBackoff = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.apache.rocketmq.v2.CustomizedBackoff.repeatedFields_, null); }; goog.inherits(proto.apache.rocketmq.v2.CustomizedBackoff, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.CustomizedBackoff.displayName = 'proto.apache.rocketmq.v2.CustomizedBackoff'; } /** * 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.apache.rocketmq.v2.Resource = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Resource, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Resource.displayName = 'proto.apache.rocketmq.v2.Resource'; } /** * 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.apache.rocketmq.v2.SubscriptionEntry = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.SubscriptionEntry, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.SubscriptionEntry.displayName = 'proto.apache.rocketmq.v2.SubscriptionEntry'; } /** * 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.apache.rocketmq.v2.Address = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Address, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Address.displayName = 'proto.apache.rocketmq.v2.Address'; } /** * 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.apache.rocketmq.v2.Endpoints = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.apache.rocketmq.v2.Endpoints.repeatedFields_, null); }; goog.inherits(proto.apache.rocketmq.v2.Endpoints, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Endpoints.displayName = 'proto.apache.rocketmq.v2.Endpoints'; } /** * 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.apache.rocketmq.v2.Broker = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Broker, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Broker.displayName = 'proto.apache.rocketmq.v2.Broker'; } /** * 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.apache.rocketmq.v2.MessageQueue = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.apache.rocketmq.v2.MessageQueue.repeatedFields_, null); }; goog.inherits(proto.apache.rocketmq.v2.MessageQueue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.MessageQueue.displayName = 'proto.apache.rocketmq.v2.MessageQueue'; } /** * 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.apache.rocketmq.v2.Digest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Digest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Digest.displayName = 'proto.apache.rocketmq.v2.Digest'; } /** * 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.apache.rocketmq.v2.SystemProperties = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.apache.rocketmq.v2.SystemProperties.repeatedFields_, null); }; goog.inherits(proto.apache.rocketmq.v2.SystemProperties, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.SystemProperties.displayName = 'proto.apache.rocketmq.v2.SystemProperties'; } /** * 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.apache.rocketmq.v2.DeadLetterQueue = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.DeadLetterQueue, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.DeadLetterQueue.displayName = 'proto.apache.rocketmq.v2.DeadLetterQueue'; } /** * 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.apache.rocketmq.v2.Message = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Message, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Message.displayName = 'proto.apache.rocketmq.v2.Message'; } /** * 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.apache.rocketmq.v2.Assignment = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Assignment, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Assignment.displayName = 'proto.apache.rocketmq.v2.Assignment'; } /** * 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.apache.rocketmq.v2.Status = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Status, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Status.displayName = 'proto.apache.rocketmq.v2.Status'; } /** * 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.apache.rocketmq.v2.UA = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.UA, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.UA.displayName = 'proto.apache.rocketmq.v2.UA'; } /** * 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.apache.rocketmq.v2.Settings = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.apache.rocketmq.v2.Settings.oneofGroups_); }; goog.inherits(proto.apache.rocketmq.v2.Settings, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Settings.displayName = 'proto.apache.rocketmq.v2.Settings'; } /** * 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.apache.rocketmq.v2.Publishing = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.apache.rocketmq.v2.Publishing.repeatedFields_, null); }; goog.inherits(proto.apache.rocketmq.v2.Publishing, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Publishing.displayName = 'proto.apache.rocketmq.v2.Publishing'; } /** * 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.apache.rocketmq.v2.Subscription = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.apache.rocketmq.v2.Subscription.repeatedFields_, null); }; goog.inherits(proto.apache.rocketmq.v2.Subscription, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Subscription.displayName = 'proto.apache.rocketmq.v2.Subscription'; } /** * 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.apache.rocketmq.v2.Metric = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.apache.rocketmq.v2.Metric, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.apache.rocketmq.v2.Metric.displayName = 'proto.apache.rocketmq.v2.Metric'; } 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.apache.rocketmq.v2.FilterExpression.prototype.toObject = function(opt_includeInstance) { return proto.apache.rocketmq.v2.FilterExpression.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.apache.rocketmq.v2.FilterExpression} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.FilterExpression.toObject = function(includeInstance, msg) { var f, obj = { type: jspb.Message.getFieldWithDefault(msg, 1, 0), expression: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.apache.rocketmq.v2.FilterExpression} */ proto.apache.rocketmq.v2.FilterExpression.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.apache.rocketmq.v2.FilterExpression; return proto.apache.rocketmq.v2.FilterExpression.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.apache.rocketmq.v2.FilterExpression} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.apache.rocketmq.v2.FilterExpression} */ proto.apache.rocketmq.v2.FilterExpression.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.apache.rocketmq.v2.FilterType} */ (reader.readEnum()); msg.setType(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setExpression(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.apache.rocketmq.v2.FilterExpression.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.apache.rocketmq.v2.FilterExpression.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.apache.rocketmq.v2.FilterExpression} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.FilterExpression.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getType(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getExpression(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional FilterType type = 1; * @return {!proto.apache.rocketmq.v2.FilterType} */ proto.apache.rocketmq.v2.FilterExpression.prototype.getType = function() { return /** @type {!proto.apache.rocketmq.v2.FilterType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.apache.rocketmq.v2.FilterType} value * @return {!proto.apache.rocketmq.v2.FilterExpression} returns this */ proto.apache.rocketmq.v2.FilterExpression.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string expression = 2; * @return {string} */ proto.apache.rocketmq.v2.FilterExpression.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.apache.rocketmq.v2.FilterExpression} returns this */ proto.apache.rocketmq.v2.FilterExpression.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.apache.rocketmq.v2.RetryPolicy.oneofGroups_ = [[2,3]]; /** * @enum {number} */ proto.apache.rocketmq.v2.RetryPolicy.StrategyCase = { STRATEGY_NOT_SET: 0, EXPONENTIAL_BACKOFF: 2, CUSTOMIZED_BACKOFF: 3 }; /** * @return {proto.apache.rocketmq.v2.RetryPolicy.StrategyCase} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.getStrategyCase = function() { return /** @type {proto.apache.rocketmq.v2.RetryPolicy.StrategyCase} */(jspb.Message.computeOneofCase(this, proto.apache.rocketmq.v2.RetryPolicy.oneofGroups_[0])); }; 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.apache.rocketmq.v2.RetryPolicy.prototype.toObject = function(opt_includeInstance) { return proto.apache.rocketmq.v2.RetryPolicy.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.apache.rocketmq.v2.RetryPolicy} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.RetryPolicy.toObject = function(includeInstance, msg) { var f, obj = { maxAttempts: jspb.Message.getFieldWithDefault(msg, 1, 0), exponentialBackoff: (f = msg.getExponentialBackoff()) && proto.apache.rocketmq.v2.ExponentialBackoff.toObject(includeInstance, f), customizedBackoff: (f = msg.getCustomizedBackoff()) && proto.apache.rocketmq.v2.CustomizedBackoff.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.apache.rocketmq.v2.RetryPolicy} */ proto.apache.rocketmq.v2.RetryPolicy.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.apache.rocketmq.v2.RetryPolicy; return proto.apache.rocketmq.v2.RetryPolicy.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.apache.rocketmq.v2.RetryPolicy} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.apache.rocketmq.v2.RetryPolicy} */ proto.apache.rocketmq.v2.RetryPolicy.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setMaxAttempts(value); break; case 2: var value = new proto.apache.rocketmq.v2.ExponentialBackoff; reader.readMessage(value,proto.apache.rocketmq.v2.ExponentialBackoff.deserializeBinaryFromReader); msg.setExponentialBackoff(value); break; case 3: var value = new proto.apache.rocketmq.v2.CustomizedBackoff; reader.readMessage(value,proto.apache.rocketmq.v2.CustomizedBackoff.deserializeBinaryFromReader); msg.setCustomizedBackoff(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.apache.rocketmq.v2.RetryPolicy.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.apache.rocketmq.v2.RetryPolicy} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.RetryPolicy.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMaxAttempts(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getExponentialBackoff(); if (f != null) { writer.writeMessage( 2, f, proto.apache.rocketmq.v2.ExponentialBackoff.serializeBinaryToWriter ); } f = message.getCustomizedBackoff(); if (f != null) { writer.writeMessage( 3, f, proto.apache.rocketmq.v2.CustomizedBackoff.serializeBinaryToWriter ); } }; /** * optional int32 max_attempts = 1; * @return {number} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.getMaxAttempts = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.apache.rocketmq.v2.RetryPolicy} returns this */ proto.apache.rocketmq.v2.RetryPolicy.prototype.setMaxAttempts = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional ExponentialBackoff exponential_backoff = 2; * @return {?proto.apache.rocketmq.v2.ExponentialBackoff} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.getExponentialBackoff = function() { return /** @type{?proto.apache.rocketmq.v2.ExponentialBackoff} */ ( jspb.Message.getWrapperField(this, proto.apache.rocketmq.v2.ExponentialBackoff, 2)); }; /** * @param {?proto.apache.rocketmq.v2.ExponentialBackoff|undefined} value * @return {!proto.apache.rocketmq.v2.RetryPolicy} returns this */ proto.apache.rocketmq.v2.RetryPolicy.prototype.setExponentialBackoff = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.apache.rocketmq.v2.RetryPolicy.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.apache.rocketmq.v2.RetryPolicy} returns this */ proto.apache.rocketmq.v2.RetryPolicy.prototype.clearExponentialBackoff = function() { return this.setExponentialBackoff(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.hasExponentialBackoff = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional CustomizedBackoff customized_backoff = 3; * @return {?proto.apache.rocketmq.v2.CustomizedBackoff} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.getCustomizedBackoff = function() { return /** @type{?proto.apache.rocketmq.v2.CustomizedBackoff} */ ( jspb.Message.getWrapperField(this, proto.apache.rocketmq.v2.CustomizedBackoff, 3)); }; /** * @param {?proto.apache.rocketmq.v2.CustomizedBackoff|undefined} value * @return {!proto.apache.rocketmq.v2.RetryPolicy} returns this */ proto.apache.rocketmq.v2.RetryPolicy.prototype.setCustomizedBackoff = function(value) { return jspb.Message.setOneofWrapperField(this, 3, proto.apache.rocketmq.v2.RetryPolicy.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.apache.rocketmq.v2.RetryPolicy} returns this */ proto.apache.rocketmq.v2.RetryPolicy.prototype.clearCustomizedBackoff = function() { return this.setCustomizedBackoff(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.apache.rocketmq.v2.RetryPolicy.prototype.hasCustomizedBackoff = 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.apache.rocketmq.v2.ExponentialBackoff.prototype.toObject = function(opt_includeInstance) { return proto.apache.rocketmq.v2.ExponentialBackoff.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.apache.rocketmq.v2.ExponentialBackoff} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.ExponentialBackoff.toObject = function(includeInstance, msg) { var f, obj = { initial: (f = msg.getInitial()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), max: (f = msg.getMax()) && google_protobuf_duration_pb.Duration.toObject(includeInstance, f), multiplier: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 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.apache.rocketmq.v2.ExponentialBackoff} */ proto.apache.rocketmq.v2.ExponentialBackoff.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.apache.rocketmq.v2.ExponentialBackoff; return proto.apache.rocketmq.v2.ExponentialBackoff.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.apache.rocketmq.v2.ExponentialBackoff} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.apache.rocketmq.v2.ExponentialBackoff} */ proto.apache.rocketmq.v2.ExponentialBackoff.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setInitial(value); break; case 2: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.setMax(value); break; case 3: var value = /** @type {number} */ (reader.readFloat()); msg.setMultiplier(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.apache.rocketmq.v2.ExponentialBackoff.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.apache.rocketmq.v2.ExponentialBackoff} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.ExponentialBackoff.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getInitial(); if (f != null) { writer.writeMessage( 1, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = message.getMax(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } f = message.getMultiplier(); if (f !== 0.0) { writer.writeFloat( 3, f ); } }; /** * optional google.protobuf.Duration initial = 1; * @return {?proto.google.protobuf.Duration} */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.getInitial = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 1)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.apache.rocketmq.v2.ExponentialBackoff} returns this */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.setInitial = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.apache.rocketmq.v2.ExponentialBackoff} returns this */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.clearInitial = function() { return this.setInitial(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.hasInitial = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional google.protobuf.Duration max = 2; * @return {?proto.google.protobuf.Duration} */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.getMax = function() { return /** @type{?proto.google.protobuf.Duration} */ ( jspb.Message.getWrapperField(this, google_protobuf_duration_pb.Duration, 2)); }; /** * @param {?proto.google.protobuf.Duration|undefined} value * @return {!proto.apache.rocketmq.v2.ExponentialBackoff} returns this */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.setMax = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.apache.rocketmq.v2.ExponentialBackoff} returns this */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.clearMax = function() { return this.setMax(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.hasMax = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional float multiplier = 3; * @return {number} */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.getMultiplier = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); }; /** * @param {number} value * @return {!proto.apache.rocketmq.v2.ExponentialBackoff} returns this */ proto.apache.rocketmq.v2.ExponentialBackoff.prototype.setMultiplier = function(value) { return jspb.Message.setProto3FloatField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.apache.rocketmq.v2.CustomizedBackoff.repeatedFields_ = [1]; 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.apache.rocketmq.v2.CustomizedBackoff.prototype.toObject = function(opt_includeInstance) { return proto.apache.rocketmq.v2.CustomizedBackoff.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.apache.rocketmq.v2.CustomizedBackoff} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.CustomizedBackoff.toObject = function(includeInstance, msg) { var f, obj = { nextList: jspb.Message.toObjectList(msg.getNextList(), google_protobuf_duration_pb.Duration.toObject, includeInstance) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.apache.rocketmq.v2.CustomizedBackoff} */ proto.apache.rocketmq.v2.CustomizedBackoff.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.apache.rocketmq.v2.CustomizedBackoff; return proto.apache.rocketmq.v2.CustomizedBackoff.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.apache.rocketmq.v2.CustomizedBackoff} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.apache.rocketmq.v2.CustomizedBackoff} */ proto.apache.rocketmq.v2.CustomizedBackoff.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new google_protobuf_duration_pb.Duration; reader.readMessage(value,google_protobuf_duration_pb.Duration.deserializeBinaryFromReader); msg.addNext(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.apache.rocketmq.v2.CustomizedBackoff.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.apache.rocketmq.v2.CustomizedBackoff.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.apache.rocketmq.v2.CustomizedBackoff} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.CustomizedBackoff.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNextList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, google_protobuf_duration_pb.Duration.serializeBinaryToWriter ); } }; /** * repeated google.protobuf.Duration next = 1; * @return {!Array<!proto.google.protobuf.Duration>} */ proto.apache.rocketmq.v2.CustomizedBackoff.prototype.getNextList = function() { return /** @type{!Array<!proto.google.protobuf.Duration>} */ ( jspb.Message.getRepeatedWrapperField(this, google_protobuf_duration_pb.Duration, 1)); }; /** * @param {!Array<!proto.google.protobuf.Duration>} value * @return {!proto.apache.rocketmq.v2.CustomizedBackoff} returns this */ proto.apache.rocketmq.v2.CustomizedBackoff.prototype.setNextList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.google.protobuf.Duration=} opt_value * @param {number=} opt_index * @return {!proto.google.protobuf.Duration} */ proto.apache.rocketmq.v2.CustomizedBackoff.prototype.addNext = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Duration, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.apache.rocketmq.v2.CustomizedBackoff} returns this */ proto.apache.rocketmq.v2.CustomizedBackoff.prototype.clearNextList = function() { return this.setNextList([]); }; 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.apache.rocketmq.v2.Resource.prototype.toObject = function(opt_includeInstance) { return proto.apache.rocketmq.v2.Resource.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.apache.rocketmq.v2.Resource} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.Resource.toObject = function(includeInstance, msg) { var f, obj = { resourceNamespace: jspb.Message.getFieldWithDefault(msg, 1, ""), name: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.apache.rocketmq.v2.Resource} */ proto.apache.rocketmq.v2.Resource.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.apache.rocketmq.v2.Resource; return proto.apache.rocketmq.v2.Resource.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.apache.rocketmq.v2.Resource} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.apache.rocketmq.v2.Resource} */ proto.apache.rocketmq.v2.Resource.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.setResourceNamespace(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.apache.rocketmq.v2.Resource.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.apache.rocketmq.v2.Resource.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.apache.rocketmq.v2.Resource} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.apache.rocketmq.v2.Resource.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getResourceNamespace(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getName(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string resource_namespace = 1; * @return {string} */ proto.apache.rocketmq.v2.Resource.prototype.getResourceNamespace = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.apache.rocketmq.v2.Resource} returns this */ proto.apache.rocketmq.v2.Resource.prototype.setResourceNamespace = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string name = 2; * @return {string} */ proto.apache.rocketmq.v2.Resource.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.apache.rocketmq.v2.Resource} returns this */ proto.apache.rocketmq.v2.Resource.prototype.setName = function(value) { return jspb.