/* eslint-disable */ /*Proudly generated by GenDocu.com*/ // source: google/api/servicecontrol/v1/distribution.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('return this')(); var google_api_distribution_pb = require('../../../../google/api/distribution_pb.js'); goog.object.extend(proto, google_api_distribution_pb); goog.exportSymbol('proto.google.api.servicecontrol.v1.Distribution', null, global); goog.exportSymbol('proto.google.api.servicecontrol.v1.Distribution.BucketOptionCase', null, global); goog.exportSymbol('proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets', null, global); goog.exportSymbol('proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets', null, global); goog.exportSymbol('proto.google.api.servicecontrol.v1.Distribution.LinearBuckets', 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.google.api.servicecontrol.v1.Distribution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.servicecontrol.v1.Distribution.repeatedFields_, proto.google.api.servicecontrol.v1.Distribution.oneofGroups_); }; goog.inherits(proto.google.api.servicecontrol.v1.Distribution, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.servicecontrol.v1.Distribution.displayName = 'proto.google.api.servicecontrol.v1.Distribution'; } /** * 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.google.api.servicecontrol.v1.Distribution.LinearBuckets = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.servicecontrol.v1.Distribution.LinearBuckets, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.displayName = 'proto.google.api.servicecontrol.v1.Distribution.LinearBuckets'; } /** * 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.google.api.servicecontrol.v1.Distribution.ExponentialBuckets = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.displayName = 'proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets'; } /** * 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.google.api.servicecontrol.v1.Distribution.ExplicitBuckets = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.repeatedFields_, null); }; goog.inherits(proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.displayName = 'proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.servicecontrol.v1.Distribution.repeatedFields_ = [6,10]; /** * 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>} * @const */ proto.google.api.servicecontrol.v1.Distribution.oneofGroups_ = [[7,8,9]]; /** * @enum {number} */ proto.google.api.servicecontrol.v1.Distribution.BucketOptionCase = { BUCKET_OPTION_NOT_SET: 0, LINEAR_BUCKETS: 7, EXPONENTIAL_BUCKETS: 8, EXPLICIT_BUCKETS: 9 }; /** * @return {proto.google.api.servicecontrol.v1.Distribution.BucketOptionCase} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getBucketOptionCase = function() { return /** @type {proto.google.api.servicecontrol.v1.Distribution.BucketOptionCase} */(jspb.Message.computeOneofCase(this, proto.google.api.servicecontrol.v1.Distribution.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_, 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.google.api.servicecontrol.v1.Distribution.prototype.toObject = function(opt_includeInstance) { return proto.google.api.servicecontrol.v1.Distribution.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.google.api.servicecontrol.v1.Distribution} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.toObject = function(includeInstance, msg) { var f, obj = { count: jspb.Message.getFieldWithDefault(msg, 1, 0), mean: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), minimum: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0), maximum: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), sumOfSquaredDeviation: jspb.Message.getFloatingPointFieldWithDefault(msg, 5, 0.0), bucketCountsList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f, linearBuckets: (f = msg.getLinearBuckets()) && proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.toObject(includeInstance, f), exponentialBuckets: (f = msg.getExponentialBuckets()) && proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.toObject(includeInstance, f), explicitBuckets: (f = msg.getExplicitBuckets()) && proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.toObject(includeInstance, f), exemplarsList: jspb.Message.toObjectList(msg.getExemplarsList(), google_api_distribution_pb.Distribution.Exemplar.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.google.api.servicecontrol.v1.Distribution} */ proto.google.api.servicecontrol.v1.Distribution.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.servicecontrol.v1.Distribution; return proto.google.api.servicecontrol.v1.Distribution.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.servicecontrol.v1.Distribution} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.servicecontrol.v1.Distribution} */ proto.google.api.servicecontrol.v1.Distribution.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setCount(value); break; case 2: var value = /** @type {number} */ (reader.readDouble()); msg.setMean(value); break; case 3: var value = /** @type {number} */ (reader.readDouble()); msg.setMinimum(value); break; case 4: var value = /** @type {number} */ (reader.readDouble()); msg.setMaximum(value); break; case 5: var value = /** @type {number} */ (reader.readDouble()); msg.setSumOfSquaredDeviation(value); break; case 6: var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); for (var i = 0; i < values.length; i++) { msg.addBucketCounts(values[i]); } break; case 7: var value = new proto.google.api.servicecontrol.v1.Distribution.LinearBuckets; reader.readMessage(value,proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.deserializeBinaryFromReader); msg.setLinearBuckets(value); break; case 8: var value = new proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets; reader.readMessage(value,proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.deserializeBinaryFromReader); msg.setExponentialBuckets(value); break; case 9: var value = new proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets; reader.readMessage(value,proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.deserializeBinaryFromReader); msg.setExplicitBuckets(value); break; case 10: var value = new google_api_distribution_pb.Distribution.Exemplar; reader.readMessage(value,google_api_distribution_pb.Distribution.Exemplar.deserializeBinaryFromReader); msg.addExemplars(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.servicecontrol.v1.Distribution.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.servicecontrol.v1.Distribution.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.servicecontrol.v1.Distribution} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCount(); if (f !== 0) { writer.writeInt64( 1, f ); } f = message.getMean(); if (f !== 0.0) { writer.writeDouble( 2, f ); } f = message.getMinimum(); if (f !== 0.0) { writer.writeDouble( 3, f ); } f = message.getMaximum(); if (f !== 0.0) { writer.writeDouble( 4, f ); } f = message.getSumOfSquaredDeviation(); if (f !== 0.0) { writer.writeDouble( 5, f ); } f = message.getBucketCountsList(); if (f.length > 0) { writer.writePackedInt64( 6, f ); } f = message.getLinearBuckets(); if (f != null) { writer.writeMessage( 7, f, proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.serializeBinaryToWriter ); } f = message.getExponentialBuckets(); if (f != null) { writer.writeMessage( 8, f, proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.serializeBinaryToWriter ); } f = message.getExplicitBuckets(); if (f != null) { writer.writeMessage( 9, f, proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.serializeBinaryToWriter ); } f = message.getExemplarsList(); if (f.length > 0) { writer.writeRepeatedMessage( 10, f, google_api_distribution_pb.Distribution.Exemplar.serializeBinaryToWriter ); } }; 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.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.toObject = function(opt_includeInstance) { return proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.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.google.api.servicecontrol.v1.Distribution.LinearBuckets} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.toObject = function(includeInstance, msg) { var f, obj = { numFiniteBuckets: jspb.Message.getFieldWithDefault(msg, 1, 0), width: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), offset: 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.google.api.servicecontrol.v1.Distribution.LinearBuckets} */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.servicecontrol.v1.Distribution.LinearBuckets; return proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.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.setNumFiniteBuckets(value); break; case 2: var value = /** @type {number} */ (reader.readDouble()); msg.setWidth(value); break; case 3: var value = /** @type {number} */ (reader.readDouble()); msg.setOffset(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNumFiniteBuckets(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getWidth(); if (f !== 0.0) { writer.writeDouble( 2, f ); } f = message.getOffset(); if (f !== 0.0) { writer.writeDouble( 3, f ); } }; /** * optional int32 num_finite_buckets = 1; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.getNumFiniteBuckets = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.setNumFiniteBuckets = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional double width = 2; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.getWidth = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.setWidth = function(value) { return jspb.Message.setProto3FloatField(this, 2, value); }; /** * optional double offset = 3; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.getOffset = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.LinearBuckets.prototype.setOffset = function(value) { return jspb.Message.setProto3FloatField(this, 3, 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_, 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.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.toObject = function(opt_includeInstance) { return proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.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.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.toObject = function(includeInstance, msg) { var f, obj = { numFiniteBuckets: jspb.Message.getFieldWithDefault(msg, 1, 0), growthFactor: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0), scale: 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.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets; return proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.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.setNumFiniteBuckets(value); break; case 2: var value = /** @type {number} */ (reader.readDouble()); msg.setGrowthFactor(value); break; case 3: var value = /** @type {number} */ (reader.readDouble()); msg.setScale(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getNumFiniteBuckets(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getGrowthFactor(); if (f !== 0.0) { writer.writeDouble( 2, f ); } f = message.getScale(); if (f !== 0.0) { writer.writeDouble( 3, f ); } }; /** * optional int32 num_finite_buckets = 1; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.getNumFiniteBuckets = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.setNumFiniteBuckets = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional double growth_factor = 2; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.getGrowthFactor = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.setGrowthFactor = function(value) { return jspb.Message.setProto3FloatField(this, 2, value); }; /** * optional double scale = 3; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.getScale = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets.prototype.setScale = function(value) { return jspb.Message.setProto3FloatField(this, 3, value); }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.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_, 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.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.prototype.toObject = function(opt_includeInstance) { return proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.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.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.toObject = function(includeInstance, msg) { var f, obj = { boundsList: (f = jspb.Message.getRepeatedFloatingPointField(msg, 1)) == null ? undefined : 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.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets; return proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedDouble() : [reader.readDouble()]); for (var i = 0; i < values.length; i++) { msg.addBounds(values[i]); } break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getBoundsList(); if (f.length > 0) { writer.writePackedDouble( 1, f ); } }; /** * repeated double bounds = 1; * @return {!Array} */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.prototype.getBoundsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedFloatingPointField(this, 1)); }; /** * @param {!Array} value * @return {!proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.prototype.setBoundsList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** * @param {number} value * @param {number=} opt_index * @return {!proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.prototype.addBounds = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} returns this */ proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets.prototype.clearBoundsList = function() { return this.setBoundsList([]); }; /** * optional int64 count = 1; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setCount = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional double mean = 2; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getMean = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setMean = function(value) { return jspb.Message.setProto3FloatField(this, 2, value); }; /** * optional double minimum = 3; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getMinimum = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setMinimum = function(value) { return jspb.Message.setProto3FloatField(this, 3, value); }; /** * optional double maximum = 4; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getMaximum = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 4, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setMaximum = function(value) { return jspb.Message.setProto3FloatField(this, 4, value); }; /** * optional double sum_of_squared_deviation = 5; * @return {number} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getSumOfSquaredDeviation = function() { return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 5, 0.0)); }; /** * @param {number} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setSumOfSquaredDeviation = function(value) { return jspb.Message.setProto3FloatField(this, 5, value); }; /** * repeated int64 bucket_counts = 6; * @return {!Array} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getBucketCountsList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 6)); }; /** * @param {!Array} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setBucketCountsList = function(value) { return jspb.Message.setField(this, 6, value || []); }; /** * @param {number} value * @param {number=} opt_index * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.addBucketCounts = function(value, opt_index) { return jspb.Message.addToRepeatedField(this, 6, value, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.clearBucketCountsList = function() { return this.setBucketCountsList([]); }; /** * optional LinearBuckets linear_buckets = 7; * @return {?proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getLinearBuckets = function() { return /** @type{?proto.google.api.servicecontrol.v1.Distribution.LinearBuckets} */ ( jspb.Message.getWrapperField(this, proto.google.api.servicecontrol.v1.Distribution.LinearBuckets, 7)); }; /** * @param {?proto.google.api.servicecontrol.v1.Distribution.LinearBuckets|undefined} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setLinearBuckets = function(value) { return jspb.Message.setOneofWrapperField(this, 7, proto.google.api.servicecontrol.v1.Distribution.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.clearLinearBuckets = function() { return this.setLinearBuckets(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.servicecontrol.v1.Distribution.prototype.hasLinearBuckets = function() { return jspb.Message.getField(this, 7) != null; }; /** * optional ExponentialBuckets exponential_buckets = 8; * @return {?proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getExponentialBuckets = function() { return /** @type{?proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets} */ ( jspb.Message.getWrapperField(this, proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets, 8)); }; /** * @param {?proto.google.api.servicecontrol.v1.Distribution.ExponentialBuckets|undefined} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setExponentialBuckets = function(value) { return jspb.Message.setOneofWrapperField(this, 8, proto.google.api.servicecontrol.v1.Distribution.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.clearExponentialBuckets = function() { return this.setExponentialBuckets(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.servicecontrol.v1.Distribution.prototype.hasExponentialBuckets = function() { return jspb.Message.getField(this, 8) != null; }; /** * optional ExplicitBuckets explicit_buckets = 9; * @return {?proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getExplicitBuckets = function() { return /** @type{?proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets} */ ( jspb.Message.getWrapperField(this, proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets, 9)); }; /** * @param {?proto.google.api.servicecontrol.v1.Distribution.ExplicitBuckets|undefined} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setExplicitBuckets = function(value) { return jspb.Message.setOneofWrapperField(this, 9, proto.google.api.servicecontrol.v1.Distribution.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.clearExplicitBuckets = function() { return this.setExplicitBuckets(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.google.api.servicecontrol.v1.Distribution.prototype.hasExplicitBuckets = function() { return jspb.Message.getField(this, 9) != null; }; /** * repeated google.api.Distribution.Exemplar exemplars = 10; * @return {!Array} */ proto.google.api.servicecontrol.v1.Distribution.prototype.getExemplarsList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, google_api_distribution_pb.Distribution.Exemplar, 10)); }; /** * @param {!Array} value * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.setExemplarsList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 10, value); }; /** * @param {!proto.google.api.Distribution.Exemplar=} opt_value * @param {number=} opt_index * @return {!proto.google.api.Distribution.Exemplar} */ proto.google.api.servicecontrol.v1.Distribution.prototype.addExemplars = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 10, opt_value, proto.google.api.Distribution.Exemplar, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.google.api.servicecontrol.v1.Distribution} returns this */ proto.google.api.servicecontrol.v1.Distribution.prototype.clearExemplarsList = function() { return this.setExemplarsList([]); }; goog.object.extend(exports, proto.google.api.servicecontrol.v1);