Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: opencensus/proto/stats/v1/stats.proto
package io.opencensus.proto.stats.v1;
/**
*
* Describes a data point to be collected for a Measure.
*
*
* Protobuf type {@code opencensus.proto.stats.v1.Measurement}
*/
public final class Measurement extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:opencensus.proto.stats.v1.Measurement)
MeasurementOrBuilder {
private static final long serialVersionUID = 0L;
// Use Measurement.newBuilder() to construct.
private Measurement(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Measurement() {
tags_ = java.util.Collections.emptyList();
measureName_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Measurement();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Measurement(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
tags_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
tags_.add(
input.readMessage(io.opencensus.proto.stats.v1.Tag.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
measureName_ = s;
break;
}
case 25: {
valueCase_ = 3;
value_ = input.readDouble();
break;
}
case 32: {
valueCase_ = 4;
value_ = input.readInt64();
break;
}
case 42: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (time_ != null) {
subBuilder = time_.toBuilder();
}
time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(time_);
time_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
tags_ = java.util.Collections.unmodifiableList(tags_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return io.opencensus.proto.stats.v1.StatsProto.internal_static_opencensus_proto_stats_v1_Measurement_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return io.opencensus.proto.stats.v1.StatsProto.internal_static_opencensus_proto_stats_v1_Measurement_fieldAccessorTable
.ensureFieldAccessorsInitialized(
io.opencensus.proto.stats.v1.Measurement.class, io.opencensus.proto.stats.v1.Measurement.Builder.class);
}
private int valueCase_ = 0;
private java.lang.Object value_;
public enum ValueCase
implements com.google.protobuf.Internal.EnumLite {
DOUBLE_VALUE(3),
INT_VALUE(4),
VALUE_NOT_SET(0);
private final int value;
private ValueCase(int value) {
this.value = value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) {
case 3: return DOUBLE_VALUE;
case 4: return INT_VALUE;
case 0: return VALUE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ValueCase
getValueCase() {
return ValueCase.forNumber(
valueCase_);
}
public static final int TAGS_FIELD_NUMBER = 1;
private java.util.List tags_;
/**
* repeated .opencensus.proto.stats.v1.Tag tags = 1;
*/
public java.util.List getTagsList() {
return tags_;
}
/**
* repeated .opencensus.proto.stats.v1.Tag tags = 1;
*/
public java.util.List extends io.opencensus.proto.stats.v1.TagOrBuilder>
getTagsOrBuilderList() {
return tags_;
}
/**
* repeated .opencensus.proto.stats.v1.Tag tags = 1;
*/
public int getTagsCount() {
return tags_.size();
}
/**
* repeated .opencensus.proto.stats.v1.Tag tags = 1;
*/
public io.opencensus.proto.stats.v1.Tag getTags(int index) {
return tags_.get(index);
}
/**
* repeated .opencensus.proto.stats.v1.Tag tags = 1;
*/
public io.opencensus.proto.stats.v1.TagOrBuilder getTagsOrBuilder(
int index) {
return tags_.get(index);
}
public static final int MEASURE_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object measureName_;
/**
*
* The name of the measure to which the value is applied.
*
* The name of the measure to which the value is applied.
*
*
* string measure_name = 2;
*/
public com.google.protobuf.ByteString
getMeasureNameBytes() {
java.lang.Object ref = measureName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
measureName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DOUBLE_VALUE_FIELD_NUMBER = 3;
/**
* double double_value = 3;
*/
public double getDoubleValue() {
if (valueCase_ == 3) {
return (java.lang.Double) value_;
}
return 0D;
}
public static final int INT_VALUE_FIELD_NUMBER = 4;
/**
* int64 int_value = 4;
*/
public long getIntValue() {
if (valueCase_ == 4) {
return (java.lang.Long) value_;
}
return 0L;
}
public static final int TIME_FIELD_NUMBER = 5;
private com.google.protobuf.Timestamp time_;
/**
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
*
* .google.protobuf.Timestamp time = 5;
*/
public boolean hasTime() {
return time_ != null;
}
/**
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
*
* .google.protobuf.Timestamp time = 5;
*/
public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() {
return getTime();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
for (int i = 0; i < tags_.size(); i++) {
output.writeMessage(1, tags_.get(i));
}
if (!getMeasureNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, measureName_);
}
if (valueCase_ == 3) {
output.writeDouble(
3, (double)((java.lang.Double) value_));
}
if (valueCase_ == 4) {
output.writeInt64(
4, (long)((java.lang.Long) value_));
}
if (time_ != null) {
output.writeMessage(5, getTime());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < tags_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, tags_.get(i));
}
if (!getMeasureNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, measureName_);
}
if (valueCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(
3, (double)((java.lang.Double) value_));
}
if (valueCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
4, (long)((java.lang.Long) value_));
}
if (time_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getTime());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof io.opencensus.proto.stats.v1.Measurement)) {
return super.equals(obj);
}
io.opencensus.proto.stats.v1.Measurement other = (io.opencensus.proto.stats.v1.Measurement) obj;
if (!getTagsList()
.equals(other.getTagsList())) return false;
if (!getMeasureName()
.equals(other.getMeasureName())) return false;
if (hasTime() != other.hasTime()) return false;
if (hasTime()) {
if (!getTime()
.equals(other.getTime())) return false;
}
if (!getValueCase().equals(other.getValueCase())) return false;
switch (valueCase_) {
case 3:
if (java.lang.Double.doubleToLongBits(getDoubleValue())
!= java.lang.Double.doubleToLongBits(
other.getDoubleValue())) return false;
break;
case 4:
if (getIntValue()
!= other.getIntValue()) return false;
break;
case 0:
default:
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getTagsCount() > 0) {
hash = (37 * hash) + TAGS_FIELD_NUMBER;
hash = (53 * hash) + getTagsList().hashCode();
}
hash = (37 * hash) + MEASURE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getMeasureName().hashCode();
if (hasTime()) {
hash = (37 * hash) + TIME_FIELD_NUMBER;
hash = (53 * hash) + getTime().hashCode();
}
switch (valueCase_) {
case 3:
hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getDoubleValue()));
break;
case 4:
hash = (37 * hash) + INT_VALUE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIntValue());
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static io.opencensus.proto.stats.v1.Measurement parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static io.opencensus.proto.stats.v1.Measurement parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static io.opencensus.proto.stats.v1.Measurement parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(io.opencensus.proto.stats.v1.Measurement prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Describes a data point to be collected for a Measure.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
*
* .google.protobuf.Timestamp time = 5;
*/
public Builder setTime(com.google.protobuf.Timestamp value) {
if (timeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
time_ = value;
onChanged();
} else {
timeBuilder_.setMessage(value);
}
return this;
}
/**
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
*
* .google.protobuf.Timestamp time = 5;
*/
public com.google.protobuf.Timestamp.Builder getTimeBuilder() {
onChanged();
return getTimeFieldBuilder().getBuilder();
}
/**
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
* The time when this measurement was recorded. If the implementation uses a async buffer to
* record measurements this may be the time when the measurement was read from the buffer.
*
*
* .google.protobuf.Timestamp time = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getTimeFieldBuilder() {
if (timeBuilder_ == null) {
timeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getTime(),
getParentForChildren(),
isClean());
time_ = null;
}
return timeBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:opencensus.proto.stats.v1.Measurement)
}
// @@protoc_insertion_point(class_scope:opencensus.proto.stats.v1.Measurement)
private static final io.opencensus.proto.stats.v1.Measurement DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new io.opencensus.proto.stats.v1.Measurement();
}
public static io.opencensus.proto.stats.v1.Measurement getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Measurement parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Measurement(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public io.opencensus.proto.stats.v1.Measurement getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}