chirpstack/api/grpc-web/google/api/distribution_pb.js
Orne Brocaar 103e4298fb Add device-profile option to configure region configuration.
By selecting a region configuration, devices using the device-profile
will only stick to the selected region configuration, rather than the
configurations provided by the selected region common-name.

This change also renames the region 'name' option to 'id' in the region
configuration, as well it adds a 'description' to provide a human
readable description, which is used in the drop-down in the UI.

This also fixes the JS API generation. In a previous commit the the
protobuf package was updated, but the latest protobuf compiler no longer
supports generating JS code (this now requires an external plugin). This
has been fixed.

Please note that if you have implemented custom ADR algorithms that are
referring to the 'regionName' key, that you must change this to
'regionConfigId' (see the ADR code example).
2023-01-09 12:04:10 +00:00

1793 lines
56 KiB
JavaScript
Vendored

// source: google/api/distribution.proto
/**
* @fileoverview
* @enhanceable
* @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!
var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();
var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js');
goog.object.extend(proto, google_protobuf_any_pb);
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
goog.object.extend(proto, google_protobuf_timestamp_pb);
goog.exportSymbol('proto.google.api.Distribution', null, global);
goog.exportSymbol('proto.google.api.Distribution.BucketOptions', null, global);
goog.exportSymbol('proto.google.api.Distribution.BucketOptions.Explicit', null, global);
goog.exportSymbol('proto.google.api.Distribution.BucketOptions.Exponential', null, global);
goog.exportSymbol('proto.google.api.Distribution.BucketOptions.Linear', null, global);
goog.exportSymbol('proto.google.api.Distribution.BucketOptions.OptionsCase', null, global);
goog.exportSymbol('proto.google.api.Distribution.Exemplar', null, global);
goog.exportSymbol('proto.google.api.Distribution.Range', 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.Distribution = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Distribution.repeatedFields_, null);
};
goog.inherits(proto.google.api.Distribution, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.displayName = 'proto.google.api.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.Distribution.Range = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Distribution.Range, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.Range.displayName = 'proto.google.api.Distribution.Range';
}
/**
* 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.Distribution.BucketOptions = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, proto.google.api.Distribution.BucketOptions.oneofGroups_);
};
goog.inherits(proto.google.api.Distribution.BucketOptions, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.BucketOptions.displayName = 'proto.google.api.Distribution.BucketOptions';
}
/**
* 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.Distribution.BucketOptions.Linear = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Distribution.BucketOptions.Linear, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.BucketOptions.Linear.displayName = 'proto.google.api.Distribution.BucketOptions.Linear';
}
/**
* 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.Distribution.BucketOptions.Exponential = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.google.api.Distribution.BucketOptions.Exponential, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.BucketOptions.Exponential.displayName = 'proto.google.api.Distribution.BucketOptions.Exponential';
}
/**
* 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.Distribution.BucketOptions.Explicit = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Distribution.BucketOptions.Explicit.repeatedFields_, null);
};
goog.inherits(proto.google.api.Distribution.BucketOptions.Explicit, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.BucketOptions.Explicit.displayName = 'proto.google.api.Distribution.BucketOptions.Explicit';
}
/**
* 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.Distribution.Exemplar = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.google.api.Distribution.Exemplar.repeatedFields_, null);
};
goog.inherits(proto.google.api.Distribution.Exemplar, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.google.api.Distribution.Exemplar.displayName = 'proto.google.api.Distribution.Exemplar';
}
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Distribution.repeatedFields_ = [7,10];
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.google.api.Distribution.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.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.Distribution} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.toObject = function(includeInstance, msg) {
var f, obj = {
count: jspb.Message.getFieldWithDefault(msg, 1, 0),
mean: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 0.0),
sumOfSquaredDeviation: jspb.Message.getFloatingPointFieldWithDefault(msg, 3, 0.0),
range: (f = msg.getRange()) && proto.google.api.Distribution.Range.toObject(includeInstance, f),
bucketOptions: (f = msg.getBucketOptions()) && proto.google.api.Distribution.BucketOptions.toObject(includeInstance, f),
bucketCountsList: (f = jspb.Message.getRepeatedField(msg, 7)) == null ? undefined : f,
exemplarsList: jspb.Message.toObjectList(msg.getExemplarsList(),
proto.google.api.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.Distribution}
*/
proto.google.api.Distribution.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution;
return proto.google.api.Distribution.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution}
*/
proto.google.api.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.setSumOfSquaredDeviation(value);
break;
case 4:
var value = new proto.google.api.Distribution.Range;
reader.readMessage(value,proto.google.api.Distribution.Range.deserializeBinaryFromReader);
msg.setRange(value);
break;
case 6:
var value = new proto.google.api.Distribution.BucketOptions;
reader.readMessage(value,proto.google.api.Distribution.BucketOptions.deserializeBinaryFromReader);
msg.setBucketOptions(value);
break;
case 7:
var value = /** @type {!Array<number>} */ (reader.readPackedInt64());
msg.setBucketCountsList(value);
break;
case 10:
var value = new proto.google.api.Distribution.Exemplar;
reader.readMessage(value,proto.google.api.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.Distribution.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.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.Distribution} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.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.getSumOfSquaredDeviation();
if (f !== 0.0) {
writer.writeDouble(
3,
f
);
}
f = message.getRange();
if (f != null) {
writer.writeMessage(
4,
f,
proto.google.api.Distribution.Range.serializeBinaryToWriter
);
}
f = message.getBucketOptions();
if (f != null) {
writer.writeMessage(
6,
f,
proto.google.api.Distribution.BucketOptions.serializeBinaryToWriter
);
}
f = message.getBucketCountsList();
if (f.length > 0) {
writer.writePackedInt64(
7,
f
);
}
f = message.getExemplarsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
10,
f,
proto.google.api.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_<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.google.api.Distribution.Range.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Distribution.Range.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.Distribution.Range} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.Range.toObject = function(includeInstance, msg) {
var f, obj = {
min: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
max: jspb.Message.getFloatingPointFieldWithDefault(msg, 2, 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.Distribution.Range}
*/
proto.google.api.Distribution.Range.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution.Range;
return proto.google.api.Distribution.Range.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution.Range} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution.Range}
*/
proto.google.api.Distribution.Range.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.setMin(value);
break;
case 2:
var value = /** @type {number} */ (reader.readDouble());
msg.setMax(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Distribution.Range.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.Distribution.Range.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.Distribution.Range} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.Range.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMin();
if (f !== 0.0) {
writer.writeDouble(
1,
f
);
}
f = message.getMax();
if (f !== 0.0) {
writer.writeDouble(
2,
f
);
}
};
/**
* optional double min = 1;
* @return {number}
*/
proto.google.api.Distribution.Range.prototype.getMin = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.Range} returns this
*/
proto.google.api.Distribution.Range.prototype.setMin = function(value) {
return jspb.Message.setProto3FloatField(this, 1, value);
};
/**
* optional double max = 2;
* @return {number}
*/
proto.google.api.Distribution.Range.prototype.getMax = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.Range} returns this
*/
proto.google.api.Distribution.Range.prototype.setMax = function(value) {
return jspb.Message.setProto3FloatField(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.google.api.Distribution.BucketOptions.oneofGroups_ = [[1,2,3]];
/**
* @enum {number}
*/
proto.google.api.Distribution.BucketOptions.OptionsCase = {
OPTIONS_NOT_SET: 0,
LINEAR_BUCKETS: 1,
EXPONENTIAL_BUCKETS: 2,
EXPLICIT_BUCKETS: 3
};
/**
* @return {proto.google.api.Distribution.BucketOptions.OptionsCase}
*/
proto.google.api.Distribution.BucketOptions.prototype.getOptionsCase = function() {
return /** @type {proto.google.api.Distribution.BucketOptions.OptionsCase} */(jspb.Message.computeOneofCase(this, proto.google.api.Distribution.BucketOptions.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.google.api.Distribution.BucketOptions.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Distribution.BucketOptions.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.Distribution.BucketOptions} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.toObject = function(includeInstance, msg) {
var f, obj = {
linearBuckets: (f = msg.getLinearBuckets()) && proto.google.api.Distribution.BucketOptions.Linear.toObject(includeInstance, f),
exponentialBuckets: (f = msg.getExponentialBuckets()) && proto.google.api.Distribution.BucketOptions.Exponential.toObject(includeInstance, f),
explicitBuckets: (f = msg.getExplicitBuckets()) && proto.google.api.Distribution.BucketOptions.Explicit.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.google.api.Distribution.BucketOptions}
*/
proto.google.api.Distribution.BucketOptions.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution.BucketOptions;
return proto.google.api.Distribution.BucketOptions.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution.BucketOptions} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution.BucketOptions}
*/
proto.google.api.Distribution.BucketOptions.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.google.api.Distribution.BucketOptions.Linear;
reader.readMessage(value,proto.google.api.Distribution.BucketOptions.Linear.deserializeBinaryFromReader);
msg.setLinearBuckets(value);
break;
case 2:
var value = new proto.google.api.Distribution.BucketOptions.Exponential;
reader.readMessage(value,proto.google.api.Distribution.BucketOptions.Exponential.deserializeBinaryFromReader);
msg.setExponentialBuckets(value);
break;
case 3:
var value = new proto.google.api.Distribution.BucketOptions.Explicit;
reader.readMessage(value,proto.google.api.Distribution.BucketOptions.Explicit.deserializeBinaryFromReader);
msg.setExplicitBuckets(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Distribution.BucketOptions.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.Distribution.BucketOptions.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.Distribution.BucketOptions} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getLinearBuckets();
if (f != null) {
writer.writeMessage(
1,
f,
proto.google.api.Distribution.BucketOptions.Linear.serializeBinaryToWriter
);
}
f = message.getExponentialBuckets();
if (f != null) {
writer.writeMessage(
2,
f,
proto.google.api.Distribution.BucketOptions.Exponential.serializeBinaryToWriter
);
}
f = message.getExplicitBuckets();
if (f != null) {
writer.writeMessage(
3,
f,
proto.google.api.Distribution.BucketOptions.Explicit.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_<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.google.api.Distribution.BucketOptions.Linear.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Distribution.BucketOptions.Linear.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.Distribution.BucketOptions.Linear} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.Linear.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.Distribution.BucketOptions.Linear}
*/
proto.google.api.Distribution.BucketOptions.Linear.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution.BucketOptions.Linear;
return proto.google.api.Distribution.BucketOptions.Linear.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution.BucketOptions.Linear} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution.BucketOptions.Linear}
*/
proto.google.api.Distribution.BucketOptions.Linear.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.Distribution.BucketOptions.Linear.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.Distribution.BucketOptions.Linear.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.Distribution.BucketOptions.Linear} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.Linear.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.Distribution.BucketOptions.Linear.prototype.getNumFiniteBuckets = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.BucketOptions.Linear} returns this
*/
proto.google.api.Distribution.BucketOptions.Linear.prototype.setNumFiniteBuckets = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional double width = 2;
* @return {number}
*/
proto.google.api.Distribution.BucketOptions.Linear.prototype.getWidth = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.BucketOptions.Linear} returns this
*/
proto.google.api.Distribution.BucketOptions.Linear.prototype.setWidth = function(value) {
return jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* optional double offset = 3;
* @return {number}
*/
proto.google.api.Distribution.BucketOptions.Linear.prototype.getOffset = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.BucketOptions.Linear} returns this
*/
proto.google.api.Distribution.BucketOptions.Linear.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_<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.google.api.Distribution.BucketOptions.Exponential.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Distribution.BucketOptions.Exponential.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.Distribution.BucketOptions.Exponential} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.Exponential.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.Distribution.BucketOptions.Exponential}
*/
proto.google.api.Distribution.BucketOptions.Exponential.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution.BucketOptions.Exponential;
return proto.google.api.Distribution.BucketOptions.Exponential.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution.BucketOptions.Exponential} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution.BucketOptions.Exponential}
*/
proto.google.api.Distribution.BucketOptions.Exponential.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.Distribution.BucketOptions.Exponential.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.Distribution.BucketOptions.Exponential.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.Distribution.BucketOptions.Exponential} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.Exponential.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.Distribution.BucketOptions.Exponential.prototype.getNumFiniteBuckets = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.BucketOptions.Exponential} returns this
*/
proto.google.api.Distribution.BucketOptions.Exponential.prototype.setNumFiniteBuckets = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional double growth_factor = 2;
* @return {number}
*/
proto.google.api.Distribution.BucketOptions.Exponential.prototype.getGrowthFactor = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.BucketOptions.Exponential} returns this
*/
proto.google.api.Distribution.BucketOptions.Exponential.prototype.setGrowthFactor = function(value) {
return jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* optional double scale = 3;
* @return {number}
*/
proto.google.api.Distribution.BucketOptions.Exponential.prototype.getScale = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.BucketOptions.Exponential} returns this
*/
proto.google.api.Distribution.BucketOptions.Exponential.prototype.setScale = function(value) {
return jspb.Message.setProto3FloatField(this, 3, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Distribution.BucketOptions.Explicit.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.google.api.Distribution.BucketOptions.Explicit.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Distribution.BucketOptions.Explicit.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.Distribution.BucketOptions.Explicit} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.Explicit.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.Distribution.BucketOptions.Explicit}
*/
proto.google.api.Distribution.BucketOptions.Explicit.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution.BucketOptions.Explicit;
return proto.google.api.Distribution.BucketOptions.Explicit.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution.BucketOptions.Explicit} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution.BucketOptions.Explicit}
*/
proto.google.api.Distribution.BucketOptions.Explicit.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!Array<number>} */ (reader.readPackedDouble());
msg.setBoundsList(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Distribution.BucketOptions.Explicit.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.Distribution.BucketOptions.Explicit.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.Distribution.BucketOptions.Explicit} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.BucketOptions.Explicit.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getBoundsList();
if (f.length > 0) {
writer.writePackedDouble(
1,
f
);
}
};
/**
* repeated double bounds = 1;
* @return {!Array<number>}
*/
proto.google.api.Distribution.BucketOptions.Explicit.prototype.getBoundsList = function() {
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedFloatingPointField(this, 1));
};
/**
* @param {!Array<number>} value
* @return {!proto.google.api.Distribution.BucketOptions.Explicit} returns this
*/
proto.google.api.Distribution.BucketOptions.Explicit.prototype.setBoundsList = function(value) {
return jspb.Message.setField(this, 1, value || []);
};
/**
* @param {number} value
* @param {number=} opt_index
* @return {!proto.google.api.Distribution.BucketOptions.Explicit} returns this
*/
proto.google.api.Distribution.BucketOptions.Explicit.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.Distribution.BucketOptions.Explicit} returns this
*/
proto.google.api.Distribution.BucketOptions.Explicit.prototype.clearBoundsList = function() {
return this.setBoundsList([]);
};
/**
* optional Linear linear_buckets = 1;
* @return {?proto.google.api.Distribution.BucketOptions.Linear}
*/
proto.google.api.Distribution.BucketOptions.prototype.getLinearBuckets = function() {
return /** @type{?proto.google.api.Distribution.BucketOptions.Linear} */ (
jspb.Message.getWrapperField(this, proto.google.api.Distribution.BucketOptions.Linear, 1));
};
/**
* @param {?proto.google.api.Distribution.BucketOptions.Linear|undefined} value
* @return {!proto.google.api.Distribution.BucketOptions} returns this
*/
proto.google.api.Distribution.BucketOptions.prototype.setLinearBuckets = function(value) {
return jspb.Message.setOneofWrapperField(this, 1, proto.google.api.Distribution.BucketOptions.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.Distribution.BucketOptions} returns this
*/
proto.google.api.Distribution.BucketOptions.prototype.clearLinearBuckets = function() {
return this.setLinearBuckets(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.api.Distribution.BucketOptions.prototype.hasLinearBuckets = function() {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional Exponential exponential_buckets = 2;
* @return {?proto.google.api.Distribution.BucketOptions.Exponential}
*/
proto.google.api.Distribution.BucketOptions.prototype.getExponentialBuckets = function() {
return /** @type{?proto.google.api.Distribution.BucketOptions.Exponential} */ (
jspb.Message.getWrapperField(this, proto.google.api.Distribution.BucketOptions.Exponential, 2));
};
/**
* @param {?proto.google.api.Distribution.BucketOptions.Exponential|undefined} value
* @return {!proto.google.api.Distribution.BucketOptions} returns this
*/
proto.google.api.Distribution.BucketOptions.prototype.setExponentialBuckets = function(value) {
return jspb.Message.setOneofWrapperField(this, 2, proto.google.api.Distribution.BucketOptions.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.Distribution.BucketOptions} returns this
*/
proto.google.api.Distribution.BucketOptions.prototype.clearExponentialBuckets = function() {
return this.setExponentialBuckets(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.api.Distribution.BucketOptions.prototype.hasExponentialBuckets = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* optional Explicit explicit_buckets = 3;
* @return {?proto.google.api.Distribution.BucketOptions.Explicit}
*/
proto.google.api.Distribution.BucketOptions.prototype.getExplicitBuckets = function() {
return /** @type{?proto.google.api.Distribution.BucketOptions.Explicit} */ (
jspb.Message.getWrapperField(this, proto.google.api.Distribution.BucketOptions.Explicit, 3));
};
/**
* @param {?proto.google.api.Distribution.BucketOptions.Explicit|undefined} value
* @return {!proto.google.api.Distribution.BucketOptions} returns this
*/
proto.google.api.Distribution.BucketOptions.prototype.setExplicitBuckets = function(value) {
return jspb.Message.setOneofWrapperField(this, 3, proto.google.api.Distribution.BucketOptions.oneofGroups_[0], value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.Distribution.BucketOptions} returns this
*/
proto.google.api.Distribution.BucketOptions.prototype.clearExplicitBuckets = function() {
return this.setExplicitBuckets(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.api.Distribution.BucketOptions.prototype.hasExplicitBuckets = function() {
return jspb.Message.getField(this, 3) != null;
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.google.api.Distribution.Exemplar.repeatedFields_ = [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.google.api.Distribution.Exemplar.prototype.toObject = function(opt_includeInstance) {
return proto.google.api.Distribution.Exemplar.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.Distribution.Exemplar} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.Exemplar.toObject = function(includeInstance, msg) {
var f, obj = {
value: jspb.Message.getFloatingPointFieldWithDefault(msg, 1, 0.0),
timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
attachmentsList: jspb.Message.toObjectList(msg.getAttachmentsList(),
google_protobuf_any_pb.Any.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.Distribution.Exemplar}
*/
proto.google.api.Distribution.Exemplar.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.google.api.Distribution.Exemplar;
return proto.google.api.Distribution.Exemplar.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.google.api.Distribution.Exemplar} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.google.api.Distribution.Exemplar}
*/
proto.google.api.Distribution.Exemplar.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.setValue(value);
break;
case 2:
var value = new google_protobuf_timestamp_pb.Timestamp;
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setTimestamp(value);
break;
case 3:
var value = new google_protobuf_any_pb.Any;
reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader);
msg.addAttachments(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.google.api.Distribution.Exemplar.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.google.api.Distribution.Exemplar.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.Distribution.Exemplar} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.google.api.Distribution.Exemplar.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getValue();
if (f !== 0.0) {
writer.writeDouble(
1,
f
);
}
f = message.getTimestamp();
if (f != null) {
writer.writeMessage(
2,
f,
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getAttachmentsList();
if (f.length > 0) {
writer.writeRepeatedMessage(
3,
f,
google_protobuf_any_pb.Any.serializeBinaryToWriter
);
}
};
/**
* optional double value = 1;
* @return {number}
*/
proto.google.api.Distribution.Exemplar.prototype.getValue = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 1, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution.Exemplar} returns this
*/
proto.google.api.Distribution.Exemplar.prototype.setValue = function(value) {
return jspb.Message.setProto3FloatField(this, 1, value);
};
/**
* optional google.protobuf.Timestamp timestamp = 2;
* @return {?proto.google.protobuf.Timestamp}
*/
proto.google.api.Distribution.Exemplar.prototype.getTimestamp = function() {
return /** @type{?proto.google.protobuf.Timestamp} */ (
jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 2));
};
/**
* @param {?proto.google.protobuf.Timestamp|undefined} value
* @return {!proto.google.api.Distribution.Exemplar} returns this
*/
proto.google.api.Distribution.Exemplar.prototype.setTimestamp = function(value) {
return jspb.Message.setWrapperField(this, 2, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.Distribution.Exemplar} returns this
*/
proto.google.api.Distribution.Exemplar.prototype.clearTimestamp = function() {
return this.setTimestamp(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.api.Distribution.Exemplar.prototype.hasTimestamp = function() {
return jspb.Message.getField(this, 2) != null;
};
/**
* repeated google.protobuf.Any attachments = 3;
* @return {!Array<!proto.google.protobuf.Any>}
*/
proto.google.api.Distribution.Exemplar.prototype.getAttachmentsList = function() {
return /** @type{!Array<!proto.google.protobuf.Any>} */ (
jspb.Message.getRepeatedWrapperField(this, google_protobuf_any_pb.Any, 3));
};
/**
* @param {!Array<!proto.google.protobuf.Any>} value
* @return {!proto.google.api.Distribution.Exemplar} returns this
*/
proto.google.api.Distribution.Exemplar.prototype.setAttachmentsList = function(value) {
return jspb.Message.setRepeatedWrapperField(this, 3, value);
};
/**
* @param {!proto.google.protobuf.Any=} opt_value
* @param {number=} opt_index
* @return {!proto.google.protobuf.Any}
*/
proto.google.api.Distribution.Exemplar.prototype.addAttachments = function(opt_value, opt_index) {
return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.google.protobuf.Any, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Distribution.Exemplar} returns this
*/
proto.google.api.Distribution.Exemplar.prototype.clearAttachmentsList = function() {
return this.setAttachmentsList([]);
};
/**
* optional int64 count = 1;
* @return {number}
*/
proto.google.api.Distribution.prototype.getCount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.setCount = function(value) {
return jspb.Message.setProto3IntField(this, 1, value);
};
/**
* optional double mean = 2;
* @return {number}
*/
proto.google.api.Distribution.prototype.getMean = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 2, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.setMean = function(value) {
return jspb.Message.setProto3FloatField(this, 2, value);
};
/**
* optional double sum_of_squared_deviation = 3;
* @return {number}
*/
proto.google.api.Distribution.prototype.getSumOfSquaredDeviation = function() {
return /** @type {number} */ (jspb.Message.getFloatingPointFieldWithDefault(this, 3, 0.0));
};
/**
* @param {number} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.setSumOfSquaredDeviation = function(value) {
return jspb.Message.setProto3FloatField(this, 3, value);
};
/**
* optional Range range = 4;
* @return {?proto.google.api.Distribution.Range}
*/
proto.google.api.Distribution.prototype.getRange = function() {
return /** @type{?proto.google.api.Distribution.Range} */ (
jspb.Message.getWrapperField(this, proto.google.api.Distribution.Range, 4));
};
/**
* @param {?proto.google.api.Distribution.Range|undefined} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.setRange = function(value) {
return jspb.Message.setWrapperField(this, 4, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.clearRange = function() {
return this.setRange(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.api.Distribution.prototype.hasRange = function() {
return jspb.Message.getField(this, 4) != null;
};
/**
* optional BucketOptions bucket_options = 6;
* @return {?proto.google.api.Distribution.BucketOptions}
*/
proto.google.api.Distribution.prototype.getBucketOptions = function() {
return /** @type{?proto.google.api.Distribution.BucketOptions} */ (
jspb.Message.getWrapperField(this, proto.google.api.Distribution.BucketOptions, 6));
};
/**
* @param {?proto.google.api.Distribution.BucketOptions|undefined} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.setBucketOptions = function(value) {
return jspb.Message.setWrapperField(this, 6, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.clearBucketOptions = function() {
return this.setBucketOptions(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.google.api.Distribution.prototype.hasBucketOptions = function() {
return jspb.Message.getField(this, 6) != null;
};
/**
* repeated int64 bucket_counts = 7;
* @return {!Array<number>}
*/
proto.google.api.Distribution.prototype.getBucketCountsList = function() {
return /** @type {!Array<number>} */ (jspb.Message.getRepeatedField(this, 7));
};
/**
* @param {!Array<number>} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.setBucketCountsList = function(value) {
return jspb.Message.setField(this, 7, value || []);
};
/**
* @param {number} value
* @param {number=} opt_index
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.addBucketCounts = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 7, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.Distribution.prototype.clearBucketCountsList = function() {
return this.setBucketCountsList([]);
};
/**
* repeated Exemplar exemplars = 10;
* @return {!Array<!proto.google.api.Distribution.Exemplar>}
*/
proto.google.api.Distribution.prototype.getExemplarsList = function() {
return /** @type{!Array<!proto.google.api.Distribution.Exemplar>} */ (
jspb.Message.getRepeatedWrapperField(this, proto.google.api.Distribution.Exemplar, 10));
};
/**
* @param {!Array<!proto.google.api.Distribution.Exemplar>} value
* @return {!proto.google.api.Distribution} returns this
*/
proto.google.api.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.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.Distribution} returns this
*/
proto.google.api.Distribution.prototype.clearExemplarsList = function() {
return this.setExemplarsList([]);
};
goog.object.extend(exports, proto.google.api);