// source: language-agent/Meter.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 common_Common_pb = require('../common/Common_pb.js');
goog.object.extend(proto, common_Common_pb);
goog.exportSymbol('proto.skywalking.v3.Label', null, global);
goog.exportSymbol('proto.skywalking.v3.MeterBucketValue', null, global);
goog.exportSymbol('proto.skywalking.v3.MeterData', null, global);
goog.exportSymbol('proto.skywalking.v3.MeterData.MetricCase', null, global);
goog.exportSymbol('proto.skywalking.v3.MeterDataCollection', null, global);
goog.exportSymbol('proto.skywalking.v3.MeterHistogram', null, global);
goog.exportSymbol('proto.skywalking.v3.MeterSingleValue', 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.skywalking.v3.Label = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.skywalking.v3.Label, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.skywalking.v3.Label.displayName = 'proto.skywalking.v3.Label';
}
/**
 * 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.skywalking.v3.MeterBucketValue = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.skywalking.v3.MeterBucketValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.skywalking.v3.MeterBucketValue.displayName = 'proto.skywalking.v3.MeterBucketValue';
}
/**
 * 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.skywalking.v3.MeterSingleValue = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.skywalking.v3.MeterSingleValue.repeatedFields_, null);
};
goog.inherits(proto.skywalking.v3.MeterSingleValue, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.skywalking.v3.MeterSingleValue.displayName = 'proto.skywalking.v3.MeterSingleValue';
}
/**
 * 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.skywalking.v3.MeterHistogram = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.skywalking.v3.MeterHistogram.repeatedFields_, null);
};
goog.inherits(proto.skywalking.v3.MeterHistogram, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.skywalking.v3.MeterHistogram.displayName = 'proto.skywalking.v3.MeterHistogram';
}
/**
 * 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.skywalking.v3.MeterData = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, null, proto.skywalking.v3.MeterData.oneofGroups_);
};
goog.inherits(proto.skywalking.v3.MeterData, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.skywalking.v3.MeterData.displayName = 'proto.skywalking.v3.MeterData';
}
/**
 * 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.skywalking.v3.MeterDataCollection = function(opt_data) {
  jspb.Message.initialize(this, opt_data, 0, -1, proto.skywalking.v3.MeterDataCollection.repeatedFields_, null);
};
goog.inherits(proto.skywalking.v3.MeterDataCollection, jspb.Message);
if (goog.DEBUG && !COMPILED) {
  /**
   * @public
   * @override
   */
  proto.skywalking.v3.MeterDataCollection.displayName = 'proto.skywalking.v3.MeterDataCollection';
}



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.skywalking.v3.Label.prototype.toObject = function(opt_includeInstance) {
  return proto.skywalking.v3.Label.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.skywalking.v3.Label} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.Label.toObject = function(includeInstance, msg) {
  var f, obj = {
    name: jspb.Message.getFieldWithDefault(msg, 1, ""),
    value: 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.skywalking.v3.Label}
 */
proto.skywalking.v3.Label.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.skywalking.v3.Label;
  return proto.skywalking.v3.Label.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.skywalking.v3.Label} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.skywalking.v3.Label}
 */
proto.skywalking.v3.Label.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.setName(value);
      break;
    case 2:
      var value = /** @type {string} */ (reader.readString());
      msg.setValue(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.skywalking.v3.Label.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.skywalking.v3.Label.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.skywalking.v3.Label} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.Label.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getName();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getValue();
  if (f.length > 0) {
    writer.writeString(
      2,
      f
    );
  }
};


/**
 * optional string name = 1;
 * @return {string}
 */
proto.skywalking.v3.Label.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.skywalking.v3.Label} returns this
 */
proto.skywalking.v3.Label.prototype.setName = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * optional string value = 2;
 * @return {string}
 */
proto.skywalking.v3.Label.prototype.getValue = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};


/**
 * @param {string} value
 * @return {!proto.skywalking.v3.Label} returns this
 */
proto.skywalking.v3.Label.prototype.setValue = function(value) {
  return jspb.Message.setProto3StringField(this, 2, 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.skywalking.v3.MeterBucketValue.prototype.toObject = function(opt_includeInstance) {
  return proto.skywalking.v3.MeterBucketValue.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.skywalking.v3.MeterBucketValue} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterBucketValue.toObject = function(includeInstance, msg) {
  var f, obj = {
    bucket: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
    count: jspb.Message.getFieldWithDefault(msg, 2, 0),
    isnegativeinfinity: jspb.Message.getBooleanFieldWithDefault(msg, 3, 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.skywalking.v3.MeterBucketValue}
 */
proto.skywalking.v3.MeterBucketValue.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.skywalking.v3.MeterBucketValue;
  return proto.skywalking.v3.MeterBucketValue.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.skywalking.v3.MeterBucketValue} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.skywalking.v3.MeterBucketValue}
 */
proto.skywalking.v3.MeterBucketValue.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = /** @type {number} */ (reader.readDouble());
      msg.setBucket(value);
      break;
    case 2:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setCount(value);
      break;
    case 3:
      var value = /** @type {boolean} */ (reader.readBool());
      msg.setIsnegativeinfinity(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.skywalking.v3.MeterBucketValue.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.skywalking.v3.MeterBucketValue.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.skywalking.v3.MeterBucketValue} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterBucketValue.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getBucket();
  if (f !== 0.0) {
    writer.writeDouble(
      1,
      f
    );
  }
  f = message.getCount();
  if (f !== 0) {
    writer.writeInt64(
      2,
      f
    );
  }
  f = message.getIsnegativeinfinity();
  if (f) {
    writer.writeBool(
      3,
      f
    );
  }
};


/**
 * optional double bucket = 1;
 * @return {number}
 */
proto.skywalking.v3.MeterBucketValue.prototype.getBucket = function() {
  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};


/**
 * @param {number} value
 * @return {!proto.skywalking.v3.MeterBucketValue} returns this
 */
proto.skywalking.v3.MeterBucketValue.prototype.setBucket = function(value) {
  return jspb.Message.setProto3FloatField(this, 1, value);
};


/**
 * optional int64 count = 2;
 * @return {number}
 */
proto.skywalking.v3.MeterBucketValue.prototype.getCount = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/**
 * @param {number} value
 * @return {!proto.skywalking.v3.MeterBucketValue} returns this
 */
proto.skywalking.v3.MeterBucketValue.prototype.setCount = function(value) {
  return jspb.Message.setProto3IntField(this, 2, value);
};


/**
 * optional bool isNegativeInfinity = 3;
 * @return {boolean}
 */
proto.skywalking.v3.MeterBucketValue.prototype.getIsnegativeinfinity = function() {
  return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false));
};


/**
 * @param {boolean} value
 * @return {!proto.skywalking.v3.MeterBucketValue} returns this
 */
proto.skywalking.v3.MeterBucketValue.prototype.setIsnegativeinfinity = function(value) {
  return jspb.Message.setProto3BooleanField(this, 3, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.skywalking.v3.MeterSingleValue.repeatedFields_ = [2];



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.skywalking.v3.MeterSingleValue.prototype.toObject = function(opt_includeInstance) {
  return proto.skywalking.v3.MeterSingleValue.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.skywalking.v3.MeterSingleValue} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterSingleValue.toObject = function(includeInstance, msg) {
  var f, obj = {
    name: jspb.Message.getFieldWithDefault(msg, 1, ""),
    labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
    proto.skywalking.v3.Label.toObject, includeInstance),
    value: 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.skywalking.v3.MeterSingleValue}
 */
proto.skywalking.v3.MeterSingleValue.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.skywalking.v3.MeterSingleValue;
  return proto.skywalking.v3.MeterSingleValue.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.skywalking.v3.MeterSingleValue} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.skywalking.v3.MeterSingleValue}
 */
proto.skywalking.v3.MeterSingleValue.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.setName(value);
      break;
    case 2:
      var value = new proto.skywalking.v3.Label;
      reader.readMessage(value,proto.skywalking.v3.Label.deserializeBinaryFromReader);
      msg.addLabels(value);
      break;
    case 3:
      var value = /** @type {number} */ (reader.readDouble());
      msg.setValue(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.skywalking.v3.MeterSingleValue.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.skywalking.v3.MeterSingleValue.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.skywalking.v3.MeterSingleValue} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterSingleValue.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getName();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getLabelsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.skywalking.v3.Label.serializeBinaryToWriter
    );
  }
  f = message.getValue();
  if (f !== 0.0) {
    writer.writeDouble(
      3,
      f
    );
  }
};


/**
 * optional string name = 1;
 * @return {string}
 */
proto.skywalking.v3.MeterSingleValue.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.skywalking.v3.MeterSingleValue} returns this
 */
proto.skywalking.v3.MeterSingleValue.prototype.setName = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * repeated Label labels = 2;
 * @return {!Array<!proto.skywalking.v3.Label>}
 */
proto.skywalking.v3.MeterSingleValue.prototype.getLabelsList = function() {
  return /** @type{!Array<!proto.skywalking.v3.Label>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.skywalking.v3.Label, 2));
};


/**
 * @param {!Array<!proto.skywalking.v3.Label>} value
 * @return {!proto.skywalking.v3.MeterSingleValue} returns this
*/
proto.skywalking.v3.MeterSingleValue.prototype.setLabelsList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.skywalking.v3.Label=} opt_value
 * @param {number=} opt_index
 * @return {!proto.skywalking.v3.Label}
 */
proto.skywalking.v3.MeterSingleValue.prototype.addLabels = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.skywalking.v3.Label, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.skywalking.v3.MeterSingleValue} returns this
 */
proto.skywalking.v3.MeterSingleValue.prototype.clearLabelsList = function() {
  return this.setLabelsList([]);
};


/**
 * optional double value = 3;
 * @return {number}
 */
proto.skywalking.v3.MeterSingleValue.prototype.getValue = function() {
  return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};


/**
 * @param {number} value
 * @return {!proto.skywalking.v3.MeterSingleValue} returns this
 */
proto.skywalking.v3.MeterSingleValue.prototype.setValue = function(value) {
  return jspb.Message.setProto3FloatField(this, 3, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.skywalking.v3.MeterHistogram.repeatedFields_ = [2,3];



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.skywalking.v3.MeterHistogram.prototype.toObject = function(opt_includeInstance) {
  return proto.skywalking.v3.MeterHistogram.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.skywalking.v3.MeterHistogram} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterHistogram.toObject = function(includeInstance, msg) {
  var f, obj = {
    name: jspb.Message.getFieldWithDefault(msg, 1, ""),
    labelsList: jspb.Message.toObjectList(msg.getLabelsList(),
    proto.skywalking.v3.Label.toObject, includeInstance),
    valuesList: jspb.Message.toObjectList(msg.getValuesList(),
    proto.skywalking.v3.MeterBucketValue.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.skywalking.v3.MeterHistogram}
 */
proto.skywalking.v3.MeterHistogram.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.skywalking.v3.MeterHistogram;
  return proto.skywalking.v3.MeterHistogram.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.skywalking.v3.MeterHistogram} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.skywalking.v3.MeterHistogram}
 */
proto.skywalking.v3.MeterHistogram.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.setName(value);
      break;
    case 2:
      var value = new proto.skywalking.v3.Label;
      reader.readMessage(value,proto.skywalking.v3.Label.deserializeBinaryFromReader);
      msg.addLabels(value);
      break;
    case 3:
      var value = new proto.skywalking.v3.MeterBucketValue;
      reader.readMessage(value,proto.skywalking.v3.MeterBucketValue.deserializeBinaryFromReader);
      msg.addValues(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.skywalking.v3.MeterHistogram.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.skywalking.v3.MeterHistogram.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.skywalking.v3.MeterHistogram} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterHistogram.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getName();
  if (f.length > 0) {
    writer.writeString(
      1,
      f
    );
  }
  f = message.getLabelsList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      2,
      f,
      proto.skywalking.v3.Label.serializeBinaryToWriter
    );
  }
  f = message.getValuesList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      3,
      f,
      proto.skywalking.v3.MeterBucketValue.serializeBinaryToWriter
    );
  }
};


/**
 * optional string name = 1;
 * @return {string}
 */
proto.skywalking.v3.MeterHistogram.prototype.getName = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};


/**
 * @param {string} value
 * @return {!proto.skywalking.v3.MeterHistogram} returns this
 */
proto.skywalking.v3.MeterHistogram.prototype.setName = function(value) {
  return jspb.Message.setProto3StringField(this, 1, value);
};


/**
 * repeated Label labels = 2;
 * @return {!Array<!proto.skywalking.v3.Label>}
 */
proto.skywalking.v3.MeterHistogram.prototype.getLabelsList = function() {
  return /** @type{!Array<!proto.skywalking.v3.Label>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.skywalking.v3.Label, 2));
};


/**
 * @param {!Array<!proto.skywalking.v3.Label>} value
 * @return {!proto.skywalking.v3.MeterHistogram} returns this
*/
proto.skywalking.v3.MeterHistogram.prototype.setLabelsList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 2, value);
};


/**
 * @param {!proto.skywalking.v3.Label=} opt_value
 * @param {number=} opt_index
 * @return {!proto.skywalking.v3.Label}
 */
proto.skywalking.v3.MeterHistogram.prototype.addLabels = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.skywalking.v3.Label, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.skywalking.v3.MeterHistogram} returns this
 */
proto.skywalking.v3.MeterHistogram.prototype.clearLabelsList = function() {
  return this.setLabelsList([]);
};


/**
 * repeated MeterBucketValue values = 3;
 * @return {!Array<!proto.skywalking.v3.MeterBucketValue>}
 */
proto.skywalking.v3.MeterHistogram.prototype.getValuesList = function() {
  return /** @type{!Array<!proto.skywalking.v3.MeterBucketValue>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.skywalking.v3.MeterBucketValue, 3));
};


/**
 * @param {!Array<!proto.skywalking.v3.MeterBucketValue>} value
 * @return {!proto.skywalking.v3.MeterHistogram} returns this
*/
proto.skywalking.v3.MeterHistogram.prototype.setValuesList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 3, value);
};


/**
 * @param {!proto.skywalking.v3.MeterBucketValue=} opt_value
 * @param {number=} opt_index
 * @return {!proto.skywalking.v3.MeterBucketValue}
 */
proto.skywalking.v3.MeterHistogram.prototype.addValues = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.skywalking.v3.MeterBucketValue, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.skywalking.v3.MeterHistogram} returns this
 */
proto.skywalking.v3.MeterHistogram.prototype.clearValuesList = function() {
  return this.setValuesList([]);
};



/**
 * 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.skywalking.v3.MeterData.oneofGroups_ = [[1,2]];

/**
 * @enum {number}
 */
proto.skywalking.v3.MeterData.MetricCase = {
  METRIC_NOT_SET: 0,
  SINGLEVALUE: 1,
  HISTOGRAM: 2
};

/**
 * @return {proto.skywalking.v3.MeterData.MetricCase}
 */
proto.skywalking.v3.MeterData.prototype.getMetricCase = function() {
  return /** @type {proto.skywalking.v3.MeterData.MetricCase} */(jspb.Message.computeOneofCase(this, proto.skywalking.v3.MeterData.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.skywalking.v3.MeterData.prototype.toObject = function(opt_includeInstance) {
  return proto.skywalking.v3.MeterData.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.skywalking.v3.MeterData} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterData.toObject = function(includeInstance, msg) {
  var f, obj = {
    singlevalue: (f = msg.getSinglevalue()) && proto.skywalking.v3.MeterSingleValue.toObject(includeInstance, f),
    histogram: (f = msg.getHistogram()) && proto.skywalking.v3.MeterHistogram.toObject(includeInstance, f),
    service: jspb.Message.getFieldWithDefault(msg, 3, ""),
    serviceinstance: jspb.Message.getFieldWithDefault(msg, 4, ""),
    timestamp: jspb.Message.getFieldWithDefault(msg, 5, 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.skywalking.v3.MeterData}
 */
proto.skywalking.v3.MeterData.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.skywalking.v3.MeterData;
  return proto.skywalking.v3.MeterData.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.skywalking.v3.MeterData} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.skywalking.v3.MeterData}
 */
proto.skywalking.v3.MeterData.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.skywalking.v3.MeterSingleValue;
      reader.readMessage(value,proto.skywalking.v3.MeterSingleValue.deserializeBinaryFromReader);
      msg.setSinglevalue(value);
      break;
    case 2:
      var value = new proto.skywalking.v3.MeterHistogram;
      reader.readMessage(value,proto.skywalking.v3.MeterHistogram.deserializeBinaryFromReader);
      msg.setHistogram(value);
      break;
    case 3:
      var value = /** @type {string} */ (reader.readString());
      msg.setService(value);
      break;
    case 4:
      var value = /** @type {string} */ (reader.readString());
      msg.setServiceinstance(value);
      break;
    case 5:
      var value = /** @type {number} */ (reader.readInt64());
      msg.setTimestamp(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.skywalking.v3.MeterData.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.skywalking.v3.MeterData.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.skywalking.v3.MeterData} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterData.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getSinglevalue();
  if (f != null) {
    writer.writeMessage(
      1,
      f,
      proto.skywalking.v3.MeterSingleValue.serializeBinaryToWriter
    );
  }
  f = message.getHistogram();
  if (f != null) {
    writer.writeMessage(
      2,
      f,
      proto.skywalking.v3.MeterHistogram.serializeBinaryToWriter
    );
  }
  f = message.getService();
  if (f.length > 0) {
    writer.writeString(
      3,
      f
    );
  }
  f = message.getServiceinstance();
  if (f.length > 0) {
    writer.writeString(
      4,
      f
    );
  }
  f = message.getTimestamp();
  if (f !== 0) {
    writer.writeInt64(
      5,
      f
    );
  }
};


/**
 * optional MeterSingleValue singleValue = 1;
 * @return {?proto.skywalking.v3.MeterSingleValue}
 */
proto.skywalking.v3.MeterData.prototype.getSinglevalue = function() {
  return /** @type{?proto.skywalking.v3.MeterSingleValue} */ (
    jspb.Message.getWrapperField(this, proto.skywalking.v3.MeterSingleValue, 1));
};


/**
 * @param {?proto.skywalking.v3.MeterSingleValue|undefined} value
 * @return {!proto.skywalking.v3.MeterData} returns this
*/
proto.skywalking.v3.MeterData.prototype.setSinglevalue = function(value) {
  return jspb.Message.setOneofWrapperField(this, 1, proto.skywalking.v3.MeterData.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.skywalking.v3.MeterData} returns this
 */
proto.skywalking.v3.MeterData.prototype.clearSinglevalue = function() {
  return this.setSinglevalue(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.skywalking.v3.MeterData.prototype.hasSinglevalue = function() {
  return jspb.Message.getField(this, 1) != null;
};


/**
 * optional MeterHistogram histogram = 2;
 * @return {?proto.skywalking.v3.MeterHistogram}
 */
proto.skywalking.v3.MeterData.prototype.getHistogram = function() {
  return /** @type{?proto.skywalking.v3.MeterHistogram} */ (
    jspb.Message.getWrapperField(this, proto.skywalking.v3.MeterHistogram, 2));
};


/**
 * @param {?proto.skywalking.v3.MeterHistogram|undefined} value
 * @return {!proto.skywalking.v3.MeterData} returns this
*/
proto.skywalking.v3.MeterData.prototype.setHistogram = function(value) {
  return jspb.Message.setOneofWrapperField(this, 2, proto.skywalking.v3.MeterData.oneofGroups_[0], value);
};


/**
 * Clears the message field making it undefined.
 * @return {!proto.skywalking.v3.MeterData} returns this
 */
proto.skywalking.v3.MeterData.prototype.clearHistogram = function() {
  return this.setHistogram(undefined);
};


/**
 * Returns whether this field is set.
 * @return {boolean}
 */
proto.skywalking.v3.MeterData.prototype.hasHistogram = function() {
  return jspb.Message.getField(this, 2) != null;
};


/**
 * optional string service = 3;
 * @return {string}
 */
proto.skywalking.v3.MeterData.prototype.getService = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};


/**
 * @param {string} value
 * @return {!proto.skywalking.v3.MeterData} returns this
 */
proto.skywalking.v3.MeterData.prototype.setService = function(value) {
  return jspb.Message.setProto3StringField(this, 3, value);
};


/**
 * optional string serviceInstance = 4;
 * @return {string}
 */
proto.skywalking.v3.MeterData.prototype.getServiceinstance = function() {
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};


/**
 * @param {string} value
 * @return {!proto.skywalking.v3.MeterData} returns this
 */
proto.skywalking.v3.MeterData.prototype.setServiceinstance = function(value) {
  return jspb.Message.setProto3StringField(this, 4, value);
};


/**
 * optional int64 timestamp = 5;
 * @return {number}
 */
proto.skywalking.v3.MeterData.prototype.getTimestamp = function() {
  return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0));
};


/**
 * @param {number} value
 * @return {!proto.skywalking.v3.MeterData} returns this
 */
proto.skywalking.v3.MeterData.prototype.setTimestamp = function(value) {
  return jspb.Message.setProto3IntField(this, 5, value);
};



/**
 * List of repeated fields within this message type.
 * @private {!Array<number>}
 * @const
 */
proto.skywalking.v3.MeterDataCollection.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.skywalking.v3.MeterDataCollection.prototype.toObject = function(opt_includeInstance) {
  return proto.skywalking.v3.MeterDataCollection.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.skywalking.v3.MeterDataCollection} msg The msg instance to transform.
 * @return {!Object}
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterDataCollection.toObject = function(includeInstance, msg) {
  var f, obj = {
    meterdataList: jspb.Message.toObjectList(msg.getMeterdataList(),
    proto.skywalking.v3.MeterData.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.skywalking.v3.MeterDataCollection}
 */
proto.skywalking.v3.MeterDataCollection.deserializeBinary = function(bytes) {
  var reader = new jspb.BinaryReader(bytes);
  var msg = new proto.skywalking.v3.MeterDataCollection;
  return proto.skywalking.v3.MeterDataCollection.deserializeBinaryFromReader(msg, reader);
};


/**
 * Deserializes binary data (in protobuf wire format) from the
 * given reader into the given message object.
 * @param {!proto.skywalking.v3.MeterDataCollection} msg The message object to deserialize into.
 * @param {!jspb.BinaryReader} reader The BinaryReader to use.
 * @return {!proto.skywalking.v3.MeterDataCollection}
 */
proto.skywalking.v3.MeterDataCollection.deserializeBinaryFromReader = function(msg, reader) {
  while (reader.nextField()) {
    if (reader.isEndGroup()) {
      break;
    }
    var field = reader.getFieldNumber();
    switch (field) {
    case 1:
      var value = new proto.skywalking.v3.MeterData;
      reader.readMessage(value,proto.skywalking.v3.MeterData.deserializeBinaryFromReader);
      msg.addMeterdata(value);
      break;
    default:
      reader.skipField();
      break;
    }
  }
  return msg;
};


/**
 * Serializes the message to binary data (in protobuf wire format).
 * @return {!Uint8Array}
 */
proto.skywalking.v3.MeterDataCollection.prototype.serializeBinary = function() {
  var writer = new jspb.BinaryWriter();
  proto.skywalking.v3.MeterDataCollection.serializeBinaryToWriter(this, writer);
  return writer.getResultBuffer();
};


/**
 * Serializes the given message to binary data (in protobuf wire
 * format), writing to the given BinaryWriter.
 * @param {!proto.skywalking.v3.MeterDataCollection} message
 * @param {!jspb.BinaryWriter} writer
 * @suppress {unusedLocalVariables} f is only used for nested messages
 */
proto.skywalking.v3.MeterDataCollection.serializeBinaryToWriter = function(message, writer) {
  var f = undefined;
  f = message.getMeterdataList();
  if (f.length > 0) {
    writer.writeRepeatedMessage(
      1,
      f,
      proto.skywalking.v3.MeterData.serializeBinaryToWriter
    );
  }
};


/**
 * repeated MeterData meterData = 1;
 * @return {!Array<!proto.skywalking.v3.MeterData>}
 */
proto.skywalking.v3.MeterDataCollection.prototype.getMeterdataList = function() {
  return /** @type{!Array<!proto.skywalking.v3.MeterData>} */ (
    jspb.Message.getRepeatedWrapperField(this, proto.skywalking.v3.MeterData, 1));
};


/**
 * @param {!Array<!proto.skywalking.v3.MeterData>} value
 * @return {!proto.skywalking.v3.MeterDataCollection} returns this
*/
proto.skywalking.v3.MeterDataCollection.prototype.setMeterdataList = function(value) {
  return jspb.Message.setRepeatedWrapperField(this, 1, value);
};


/**
 * @param {!proto.skywalking.v3.MeterData=} opt_value
 * @param {number=} opt_index
 * @return {!proto.skywalking.v3.MeterData}
 */
proto.skywalking.v3.MeterDataCollection.prototype.addMeterdata = function(opt_value, opt_index) {
  return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.skywalking.v3.MeterData, opt_index);
};


/**
 * Clears the list making it empty but non-null.
 * @return {!proto.skywalking.v3.MeterDataCollection} returns this
 */
proto.skywalking.v3.MeterDataCollection.prototype.clearMeterdataList = function() {
  return this.setMeterdataList([]);
};


goog.object.extend(exports, proto.skywalking.v3);
