diff options
author | Eric Gribkoff <ericgribkoff@google.com> | 2018-06-29 15:03:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-29 15:03:08 -0700 |
commit | 8c52e138eeb9c040ca6197643db496749d65b580 (patch) | |
tree | 919a5799728cfe582ee19f233ab023da3737394d /services | |
parent | 39d2dd0eaa4ff14f6ff5ecfeddb58124495c5b70 (diff) | |
download | grpc-grpc-java-8c52e138eeb9c040ca6197643db496749d65b580.tar.gz |
services: delete unused proto (#4604)
Diffstat (limited to 'services')
-rw-r--r-- | services/src/generated/main/java/com/google/instrumentation/stats/proto/CensusProto.java | 15756 | ||||
-rw-r--r-- | services/src/main/proto/google/instrumentation/census.proto | 317 |
2 files changed, 0 insertions, 16073 deletions
diff --git a/services/src/generated/main/java/com/google/instrumentation/stats/proto/CensusProto.java b/services/src/generated/main/java/com/google/instrumentation/stats/proto/CensusProto.java deleted file mode 100644 index 89a110c9f..000000000 --- a/services/src/generated/main/java/com/google/instrumentation/stats/proto/CensusProto.java +++ /dev/null @@ -1,15756 +0,0 @@ -// Generated by the protocol buffer compiler. DO NOT EDIT! -// source: google/instrumentation/census.proto - -package com.google.instrumentation.stats.proto; - -public final class CensusProto { - private CensusProto() {} - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistryLite registry) { - } - - public static void registerAllExtensions( - com.google.protobuf.ExtensionRegistry registry) { - registerAllExtensions( - (com.google.protobuf.ExtensionRegistryLite) registry); - } - public interface DurationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.Duration) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - long getSeconds(); - - /** - * <pre> - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - int getNanos(); - } - /** - * Protobuf type {@code google.instrumentation.Duration} - */ - public static final class Duration extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.Duration) - DurationOrBuilder { - private static final long serialVersionUID = 0L; - // Use Duration.newBuilder() to construct. - private Duration(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private Duration() { - seconds_ = 0L; - nanos_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Duration( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - - seconds_ = input.readInt64(); - break; - } - case 16: { - - nanos_ = input.readInt32(); - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Duration_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Duration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.Duration.class, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder.class); - } - - public static final int SECONDS_FIELD_NUMBER = 1; - private long seconds_; - /** - * <pre> - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public long getSeconds() { - return seconds_; - } - - public static final int NANOS_FIELD_NUMBER = 2; - private int nanos_; - /** - * <pre> - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public int getNanos() { - return nanos_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (seconds_ != 0L) { - output.writeInt64(1, seconds_); - } - if (nanos_ != 0) { - output.writeInt32(2, nanos_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (seconds_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, seconds_); - } - if (nanos_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, nanos_); - } - 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 com.google.instrumentation.stats.proto.CensusProto.Duration)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.Duration other = (com.google.instrumentation.stats.proto.CensusProto.Duration) obj; - - boolean result = true; - result = result && (getSeconds() - == other.getSeconds()); - result = result && (getNanos() - == other.getNanos()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SECONDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSeconds()); - hash = (37 * hash) + NANOS_FIELD_NUMBER; - hash = (53 * hash) + getNanos(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration 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 com.google.instrumentation.stats.proto.CensusProto.Duration parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration 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 com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Duration parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.Duration prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.instrumentation.Duration} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.Duration) - com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Duration_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Duration_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.Duration.class, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.Duration.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - seconds_ = 0L; - - nanos_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Duration_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.Duration getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.Duration build() { - com.google.instrumentation.stats.proto.CensusProto.Duration result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.Duration buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.Duration result = new com.google.instrumentation.stats.proto.CensusProto.Duration(this); - result.seconds_ = seconds_; - result.nanos_ = nanos_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.Duration) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.Duration)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.Duration other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance()) return this; - if (other.getSeconds() != 0L) { - setSeconds(other.getSeconds()); - } - if (other.getNanos() != 0) { - setNanos(other.getNanos()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.Duration parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.Duration) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long seconds_ ; - /** - * <pre> - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public long getSeconds() { - return seconds_; - } - /** - * <pre> - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public Builder setSeconds(long value) { - - seconds_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Signed seconds of the span of time. Must be from -315,576,000,000 - * to +315,576,000,000 inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public Builder clearSeconds() { - - seconds_ = 0L; - onChanged(); - return this; - } - - private int nanos_ ; - /** - * <pre> - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public int getNanos() { - return nanos_; - } - /** - * <pre> - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public Builder setNanos(int value) { - - nanos_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Signed fractions of a second at nanosecond resolution of the span - * of time. Durations less than one second are represented with a 0 - * `seconds` field and a positive or negative `nanos` field. For durations - * of one second or more, a non-zero value for the `nanos` field must be - * of the same sign as the `seconds` field. Must be from -999,999,999 - * to +999,999,999 inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public Builder clearNanos() { - - nanos_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.Duration) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.Duration) - private static final com.google.instrumentation.stats.proto.CensusProto.Duration DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.Duration(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.Duration getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<Duration> - PARSER = new com.google.protobuf.AbstractParser<Duration>() { - public Duration parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Duration(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<Duration> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<Duration> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.Duration getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TimestampOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.Timestamp) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - long getSeconds(); - - /** - * <pre> - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - int getNanos(); - } - /** - * Protobuf type {@code google.instrumentation.Timestamp} - */ - public static final class Timestamp extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.Timestamp) - TimestampOrBuilder { - private static final long serialVersionUID = 0L; - // Use Timestamp.newBuilder() to construct. - private Timestamp(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private Timestamp() { - seconds_ = 0L; - nanos_ = 0; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Timestamp( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - - seconds_ = input.readInt64(); - break; - } - case 16: { - - nanos_ = input.readInt32(); - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Timestamp_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Timestamp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.Timestamp.class, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder.class); - } - - public static final int SECONDS_FIELD_NUMBER = 1; - private long seconds_; - /** - * <pre> - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public long getSeconds() { - return seconds_; - } - - public static final int NANOS_FIELD_NUMBER = 2; - private int nanos_; - /** - * <pre> - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public int getNanos() { - return nanos_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (seconds_ != 0L) { - output.writeInt64(1, seconds_); - } - if (nanos_ != 0) { - output.writeInt32(2, nanos_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (seconds_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, seconds_); - } - if (nanos_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, nanos_); - } - 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 com.google.instrumentation.stats.proto.CensusProto.Timestamp)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.Timestamp other = (com.google.instrumentation.stats.proto.CensusProto.Timestamp) obj; - - boolean result = true; - result = result && (getSeconds() - == other.getSeconds()); - result = result && (getNanos() - == other.getNanos()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + SECONDS_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getSeconds()); - hash = (37 * hash) + NANOS_FIELD_NUMBER; - hash = (53 * hash) + getNanos(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp 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 com.google.instrumentation.stats.proto.CensusProto.Timestamp parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp 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 com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.Timestamp prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.instrumentation.Timestamp} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.Timestamp) - com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Timestamp_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Timestamp_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.Timestamp.class, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.Timestamp.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - seconds_ = 0L; - - nanos_ = 0; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Timestamp_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.Timestamp getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.Timestamp build() { - com.google.instrumentation.stats.proto.CensusProto.Timestamp result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.Timestamp buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.Timestamp result = new com.google.instrumentation.stats.proto.CensusProto.Timestamp(this); - result.seconds_ = seconds_; - result.nanos_ = nanos_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.Timestamp) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.Timestamp)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.Timestamp other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance()) return this; - if (other.getSeconds() != 0L) { - setSeconds(other.getSeconds()); - } - if (other.getNanos() != 0) { - setNanos(other.getNanos()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.Timestamp parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.Timestamp) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private long seconds_ ; - /** - * <pre> - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public long getSeconds() { - return seconds_; - } - /** - * <pre> - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public Builder setSeconds(long value) { - - seconds_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Represents seconds of UTC time since Unix epoch - * 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - * 9999-12-31T23:59:59Z inclusive. - * </pre> - * - * <code>int64 seconds = 1;</code> - */ - public Builder clearSeconds() { - - seconds_ = 0L; - onChanged(); - return this; - } - - private int nanos_ ; - /** - * <pre> - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public int getNanos() { - return nanos_; - } - /** - * <pre> - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public Builder setNanos(int value) { - - nanos_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Non-negative fractions of a second at nanosecond resolution. Negative - * second values with fractions must still have non-negative nanos values - * that count forward in time. Must be from 0 to 999,999,999 - * inclusive. - * </pre> - * - * <code>int32 nanos = 2;</code> - */ - public Builder clearNanos() { - - nanos_ = 0; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.Timestamp) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.Timestamp) - private static final com.google.instrumentation.stats.proto.CensusProto.Timestamp DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.Timestamp(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.Timestamp getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<Timestamp> - PARSER = new com.google.protobuf.AbstractParser<Timestamp>() { - public Timestamp parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Timestamp(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<Timestamp> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<Timestamp> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.Timestamp getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface MeasurementDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.MeasurementDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - java.lang.String getName(); - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - java.lang.String getDescription(); - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - boolean hasUnit(); - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getUnit(); - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder getUnitOrBuilder(); - } - /** - * <pre> - * MeasurementDescriptor describes a data point (measurement) type. - * </pre> - * - * Protobuf type {@code google.instrumentation.MeasurementDescriptor} - */ - public static final class MeasurementDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.MeasurementDescriptor) - MeasurementDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use MeasurementDescriptor.newBuilder() to construct. - private MeasurementDescriptor(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private MeasurementDescriptor() { - name_ = ""; - description_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MeasurementDescriptor( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder subBuilder = null; - if (unit_ != null) { - subBuilder = unit_.toBuilder(); - } - unit_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(unit_); - unit_ = subBuilder.buildPartial(); - } - - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder.class); - } - - /** - * <pre> - * Fundamental units of measurement supported by Census - * TODO(aveitch): expand this to include other S.I. units? - * </pre> - * - * Protobuf enum {@code google.instrumentation.MeasurementDescriptor.BasicUnit} - */ - public enum BasicUnit - implements com.google.protobuf.ProtocolMessageEnum { - /** - * <pre> - * Implementations should not use this - * </pre> - * - * <code>UNKNOWN = 0;</code> - */ - UNKNOWN(0), - /** - * <pre> - * Dimensionless - * </pre> - * - * <code>SCALAR = 1;</code> - */ - SCALAR(1), - /** - * <pre> - * A single bit - * </pre> - * - * <code>BITS = 2;</code> - */ - BITS(2), - /** - * <pre> - * An 8-bit byte - * </pre> - * - * <code>BYTES = 3;</code> - */ - BYTES(3), - /** - * <pre> - * S.I. unit - * </pre> - * - * <code>SECONDS = 4;</code> - */ - SECONDS(4), - /** - * <pre> - * CPU core usage - * </pre> - * - * <code>CORES = 5;</code> - */ - CORES(5), - /** - * <pre> - * Last defined value; implementations should only use - * </pre> - * - * <code>MAX_UNITS = 6;</code> - */ - MAX_UNITS(6), - UNRECOGNIZED(-1), - ; - - /** - * <pre> - * Implementations should not use this - * </pre> - * - * <code>UNKNOWN = 0;</code> - */ - public static final int UNKNOWN_VALUE = 0; - /** - * <pre> - * Dimensionless - * </pre> - * - * <code>SCALAR = 1;</code> - */ - public static final int SCALAR_VALUE = 1; - /** - * <pre> - * A single bit - * </pre> - * - * <code>BITS = 2;</code> - */ - public static final int BITS_VALUE = 2; - /** - * <pre> - * An 8-bit byte - * </pre> - * - * <code>BYTES = 3;</code> - */ - public static final int BYTES_VALUE = 3; - /** - * <pre> - * S.I. unit - * </pre> - * - * <code>SECONDS = 4;</code> - */ - public static final int SECONDS_VALUE = 4; - /** - * <pre> - * CPU core usage - * </pre> - * - * <code>CORES = 5;</code> - */ - public static final int CORES_VALUE = 5; - /** - * <pre> - * Last defined value; implementations should only use - * </pre> - * - * <code>MAX_UNITS = 6;</code> - */ - public static final int MAX_UNITS_VALUE = 6; - - - public final int getNumber() { - if (this == UNRECOGNIZED) { - throw new java.lang.IllegalArgumentException( - "Can't get the number of an unknown enum value."); - } - return value; - } - - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static BasicUnit valueOf(int value) { - return forNumber(value); - } - - public static BasicUnit forNumber(int value) { - switch (value) { - case 0: return UNKNOWN; - case 1: return SCALAR; - case 2: return BITS; - case 3: return BYTES; - case 4: return SECONDS; - case 5: return CORES; - case 6: return MAX_UNITS; - default: return null; - } - } - - public static com.google.protobuf.Internal.EnumLiteMap<BasicUnit> - internalGetValueMap() { - return internalValueMap; - } - private static final com.google.protobuf.Internal.EnumLiteMap< - BasicUnit> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap<BasicUnit>() { - public BasicUnit findValueByNumber(int number) { - return BasicUnit.forNumber(number); - } - }; - - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.getDescriptor().getEnumTypes().get(0); - } - - private static final BasicUnit[] VALUES = values(); - - public static BasicUnit valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); - } - if (desc.getIndex() == -1) { - return UNRECOGNIZED; - } - return VALUES[desc.getIndex()]; - } - - private final int value; - - private BasicUnit(int value) { - this.value = value; - } - - // @@protoc_insertion_point(enum_scope:google.instrumentation.MeasurementDescriptor.BasicUnit) - } - - public interface MeasurementUnitOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.MeasurementDescriptor.MeasurementUnit) - com.google.protobuf.MessageOrBuilder { - - /** - * <code>int32 power10 = 1;</code> - */ - int getPower10(); - - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> getNumeratorsList(); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - int getNumeratorsCount(); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getNumerators(int index); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - java.util.List<java.lang.Integer> - getNumeratorsValueList(); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - int getNumeratorsValue(int index); - - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> getDenominatorsList(); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - int getDenominatorsCount(); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getDenominators(int index); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - java.util.List<java.lang.Integer> - getDenominatorsValueList(); - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - int getDenominatorsValue(int index); - } - /** - * <pre> - * MeasurementUnit lets you build compound units of the form - * 10^n * (A * B * ...) / (X * Y * ...), - * where the elements in the numerator and denominator are all BasicUnits. A - * MeasurementUnit must have at least one BasicUnit in its numerator. - * To specify multiplication in the numerator or denominator, simply specify - * multiple numerator or denominator fields. For example: - * - byte-seconds (i.e. bytes * seconds): - * numerator: BYTES - * numerator: SECS - * - events/sec^2 (i.e. rate of change of events/sec): - * numerator: SCALAR - * denominator: SECS - * denominator: SECS - * To specify multiples (in power of 10) of units, specify a non-zero - * 'power10' value, for example: - * - MB/s (i.e. megabytes / s): - * power10: 6 - * numerator: BYTES - * denominator: SECS - * - nanoseconds - * power10: -9 - * numerator: SECS - * </pre> - * - * Protobuf type {@code google.instrumentation.MeasurementDescriptor.MeasurementUnit} - */ - public static final class MeasurementUnit extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.MeasurementDescriptor.MeasurementUnit) - MeasurementUnitOrBuilder { - private static final long serialVersionUID = 0L; - // Use MeasurementUnit.newBuilder() to construct. - private MeasurementUnit(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private MeasurementUnit() { - power10_ = 0; - numerators_ = java.util.Collections.emptyList(); - denominators_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MeasurementUnit( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - - power10_ = input.readInt32(); - break; - } - case 16: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - numerators_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000002; - } - numerators_.add(rawValue); - break; - } - case 18: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - numerators_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000002; - } - numerators_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 24: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - denominators_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000004; - } - denominators_.add(rawValue); - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - denominators_ = new java.util.ArrayList<java.lang.Integer>(); - mutable_bitField0_ |= 0x00000004; - } - denominators_.add(rawValue); - } - input.popLimit(oldLimit); - 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_ & 0x00000002) == 0x00000002)) { - numerators_ = java.util.Collections.unmodifiableList(numerators_); - } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { - denominators_ = java.util.Collections.unmodifiableList(denominators_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.class, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder.class); - } - - private int bitField0_; - public static final int POWER10_FIELD_NUMBER = 1; - private int power10_; - /** - * <code>int32 power10 = 1;</code> - */ - public int getPower10() { - return power10_; - } - - public static final int NUMERATORS_FIELD_NUMBER = 2; - private java.util.List<java.lang.Integer> numerators_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> numerators_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>() { - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit convert(java.lang.Integer from) { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit result = com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit.valueOf(from); - return result == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit.UNRECOGNIZED : result; - } - }; - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> getNumeratorsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(numerators_, numerators_converter_); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public int getNumeratorsCount() { - return numerators_.size(); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getNumerators(int index) { - return numerators_converter_.convert(numerators_.get(index)); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public java.util.List<java.lang.Integer> - getNumeratorsValueList() { - return numerators_; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public int getNumeratorsValue(int index) { - return numerators_.get(index); - } - private int numeratorsMemoizedSerializedSize; - - public static final int DENOMINATORS_FIELD_NUMBER = 3; - private java.util.List<java.lang.Integer> denominators_; - private static final com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> denominators_converter_ = - new com.google.protobuf.Internal.ListAdapter.Converter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>() { - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit convert(java.lang.Integer from) { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit result = com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit.valueOf(from); - return result == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit.UNRECOGNIZED : result; - } - }; - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> getDenominatorsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(denominators_, denominators_converter_); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public int getDenominatorsCount() { - return denominators_.size(); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getDenominators(int index) { - return denominators_converter_.convert(denominators_.get(index)); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public java.util.List<java.lang.Integer> - getDenominatorsValueList() { - return denominators_; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public int getDenominatorsValue(int index) { - return denominators_.get(index); - } - private int denominatorsMemoizedSerializedSize; - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (power10_ != 0) { - output.writeInt32(1, power10_); - } - if (getNumeratorsList().size() > 0) { - output.writeUInt32NoTag(18); - output.writeUInt32NoTag(numeratorsMemoizedSerializedSize); - } - for (int i = 0; i < numerators_.size(); i++) { - output.writeEnumNoTag(numerators_.get(i)); - } - if (getDenominatorsList().size() > 0) { - output.writeUInt32NoTag(26); - output.writeUInt32NoTag(denominatorsMemoizedSerializedSize); - } - for (int i = 0; i < denominators_.size(); i++) { - output.writeEnumNoTag(denominators_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (power10_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, power10_); - } - { - int dataSize = 0; - for (int i = 0; i < numerators_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(numerators_.get(i)); - } - size += dataSize; - if (!getNumeratorsList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }numeratorsMemoizedSerializedSize = dataSize; - } - { - int dataSize = 0; - for (int i = 0; i < denominators_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeEnumSizeNoTag(denominators_.get(i)); - } - size += dataSize; - if (!getDenominatorsList().isEmpty()) { size += 1; - size += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(dataSize); - }denominatorsMemoizedSerializedSize = dataSize; - } - 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 com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit other = (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit) obj; - - boolean result = true; - result = result && (getPower10() - == other.getPower10()); - result = result && numerators_.equals(other.numerators_); - result = result && denominators_.equals(other.denominators_); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + POWER10_FIELD_NUMBER; - hash = (53 * hash) + getPower10(); - if (getNumeratorsCount() > 0) { - hash = (37 * hash) + NUMERATORS_FIELD_NUMBER; - hash = (53 * hash) + numerators_.hashCode(); - } - if (getDenominatorsCount() > 0) { - hash = (37 * hash) + DENOMINATORS_FIELD_NUMBER; - hash = (53 * hash) + denominators_.hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit 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 com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit 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 com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * MeasurementUnit lets you build compound units of the form - * 10^n * (A * B * ...) / (X * Y * ...), - * where the elements in the numerator and denominator are all BasicUnits. A - * MeasurementUnit must have at least one BasicUnit in its numerator. - * To specify multiplication in the numerator or denominator, simply specify - * multiple numerator or denominator fields. For example: - * - byte-seconds (i.e. bytes * seconds): - * numerator: BYTES - * numerator: SECS - * - events/sec^2 (i.e. rate of change of events/sec): - * numerator: SCALAR - * denominator: SECS - * denominator: SECS - * To specify multiples (in power of 10) of units, specify a non-zero - * 'power10' value, for example: - * - MB/s (i.e. megabytes / s): - * power10: 6 - * numerator: BYTES - * denominator: SECS - * - nanoseconds - * power10: -9 - * numerator: SECS - * </pre> - * - * Protobuf type {@code google.instrumentation.MeasurementDescriptor.MeasurementUnit} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.MeasurementDescriptor.MeasurementUnit) - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.class, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - power10_ = 0; - - numerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - denominators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit build() { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit result = new com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.power10_ = power10_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - numerators_ = java.util.Collections.unmodifiableList(numerators_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.numerators_ = numerators_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - denominators_ = java.util.Collections.unmodifiableList(denominators_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.denominators_ = denominators_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.getDefaultInstance()) return this; - if (other.getPower10() != 0) { - setPower10(other.getPower10()); - } - if (!other.numerators_.isEmpty()) { - if (numerators_.isEmpty()) { - numerators_ = other.numerators_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureNumeratorsIsMutable(); - numerators_.addAll(other.numerators_); - } - onChanged(); - } - if (!other.denominators_.isEmpty()) { - if (denominators_.isEmpty()) { - denominators_ = other.denominators_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureDenominatorsIsMutable(); - denominators_.addAll(other.denominators_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int power10_ ; - /** - * <code>int32 power10 = 1;</code> - */ - public int getPower10() { - return power10_; - } - /** - * <code>int32 power10 = 1;</code> - */ - public Builder setPower10(int value) { - - power10_ = value; - onChanged(); - return this; - } - /** - * <code>int32 power10 = 1;</code> - */ - public Builder clearPower10() { - - power10_ = 0; - onChanged(); - return this; - } - - private java.util.List<java.lang.Integer> numerators_ = - java.util.Collections.emptyList(); - private void ensureNumeratorsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - numerators_ = new java.util.ArrayList<java.lang.Integer>(numerators_); - bitField0_ |= 0x00000002; - } - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> getNumeratorsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(numerators_, numerators_converter_); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public int getNumeratorsCount() { - return numerators_.size(); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getNumerators(int index) { - return numerators_converter_.convert(numerators_.get(index)); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder setNumerators( - int index, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNumeratorsIsMutable(); - numerators_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder addNumerators(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value) { - if (value == null) { - throw new NullPointerException(); - } - ensureNumeratorsIsMutable(); - numerators_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder addAllNumerators( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> values) { - ensureNumeratorsIsMutable(); - for (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value : values) { - numerators_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder clearNumerators() { - numerators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public java.util.List<java.lang.Integer> - getNumeratorsValueList() { - return java.util.Collections.unmodifiableList(numerators_); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public int getNumeratorsValue(int index) { - return numerators_.get(index); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder setNumeratorsValue( - int index, int value) { - ensureNumeratorsIsMutable(); - numerators_.set(index, value); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder addNumeratorsValue(int value) { - ensureNumeratorsIsMutable(); - numerators_.add(value); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2;</code> - */ - public Builder addAllNumeratorsValue( - java.lang.Iterable<java.lang.Integer> values) { - ensureNumeratorsIsMutable(); - for (int value : values) { - numerators_.add(value); - } - onChanged(); - return this; - } - - private java.util.List<java.lang.Integer> denominators_ = - java.util.Collections.emptyList(); - private void ensureDenominatorsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - denominators_ = new java.util.ArrayList<java.lang.Integer>(denominators_); - bitField0_ |= 0x00000004; - } - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> getDenominatorsList() { - return new com.google.protobuf.Internal.ListAdapter< - java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(denominators_, denominators_converter_); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public int getDenominatorsCount() { - return denominators_.size(); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getDenominators(int index) { - return denominators_converter_.convert(denominators_.get(index)); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder setDenominators( - int index, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDenominatorsIsMutable(); - denominators_.set(index, value.getNumber()); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder addDenominators(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value) { - if (value == null) { - throw new NullPointerException(); - } - ensureDenominatorsIsMutable(); - denominators_.add(value.getNumber()); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder addAllDenominators( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit> values) { - ensureDenominatorsIsMutable(); - for (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value : values) { - denominators_.add(value.getNumber()); - } - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder clearDenominators() { - denominators_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public java.util.List<java.lang.Integer> - getDenominatorsValueList() { - return java.util.Collections.unmodifiableList(denominators_); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public int getDenominatorsValue(int index) { - return denominators_.get(index); - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder setDenominatorsValue( - int index, int value) { - ensureDenominatorsIsMutable(); - denominators_.set(index, value); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder addDenominatorsValue(int value) { - ensureDenominatorsIsMutable(); - denominators_.add(value); - onChanged(); - return this; - } - /** - * <code>repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3;</code> - */ - public Builder addAllDenominatorsValue( - java.lang.Iterable<java.lang.Integer> values) { - ensureDenominatorsIsMutable(); - for (int value : values) { - denominators_.add(value); - } - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.MeasurementDescriptor.MeasurementUnit) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.MeasurementDescriptor.MeasurementUnit) - private static final com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<MeasurementUnit> - PARSER = new com.google.protobuf.AbstractParser<MeasurementUnit>() { - public MeasurementUnit parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MeasurementUnit(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<MeasurementUnit> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<MeasurementUnit> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int UNIT_FIELD_NUMBER = 3; - private com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit unit_; - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public boolean hasUnit() { - return unit_ != null; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getUnit() { - return unit_ == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.getDefaultInstance() : unit_; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder getUnitOrBuilder() { - return getUnit(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (unit_ != null) { - output.writeMessage(3, getUnit()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (unit_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getUnit()); - } - 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 com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor other = (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getDescription() - .equals(other.getDescription()); - result = result && (hasUnit() == other.hasUnit()); - if (hasUnit()) { - result = result && getUnit() - .equals(other.getUnit()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - if (hasUnit()) { - hash = (37 * hash) + UNIT_FIELD_NUMBER; - hash = (53 * hash) + getUnit().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * MeasurementDescriptor describes a data point (measurement) type. - * </pre> - * - * Protobuf type {@code google.instrumentation.MeasurementDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.MeasurementDescriptor) - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - if (unitBuilder_ == null) { - unit_ = null; - } else { - unit_ = null; - unitBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_MeasurementDescriptor_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor build() { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor result = new com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor(this); - result.name_ = name_; - result.description_ = description_; - if (unitBuilder_ == null) { - result.unit_ = unit_; - } else { - result.unit_ = unitBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (other.hasUnit()) { - mergeUnit(other.getUnit()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object name_ = ""; - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * <pre> - * A descriptive name, e.g. rpc_latency, cpu. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * <pre> - * More detailed description of the resource, used in documentation. - * </pre> - * - * <code>string description = 2;</code> - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit unit_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder> unitBuilder_; - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public boolean hasUnit() { - return unitBuilder_ != null || unit_ != null; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getUnit() { - if (unitBuilder_ == null) { - return unit_ == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.getDefaultInstance() : unit_; - } else { - return unitBuilder_.getMessage(); - } - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public Builder setUnit(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit value) { - if (unitBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - unit_ = value; - onChanged(); - } else { - unitBuilder_.setMessage(value); - } - - return this; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public Builder setUnit( - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder builderForValue) { - if (unitBuilder_ == null) { - unit_ = builderForValue.build(); - onChanged(); - } else { - unitBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public Builder mergeUnit(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit value) { - if (unitBuilder_ == null) { - if (unit_ != null) { - unit_ = - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.newBuilder(unit_).mergeFrom(value).buildPartial(); - } else { - unit_ = value; - } - onChanged(); - } else { - unitBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public Builder clearUnit() { - if (unitBuilder_ == null) { - unit_ = null; - onChanged(); - } else { - unit_ = null; - unitBuilder_ = null; - } - - return this; - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder getUnitBuilder() { - - onChanged(); - return getUnitFieldBuilder().getBuilder(); - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder getUnitOrBuilder() { - if (unitBuilder_ != null) { - return unitBuilder_.getMessageOrBuilder(); - } else { - return unit_ == null ? - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.getDefaultInstance() : unit_; - } - } - /** - * <pre> - * The units used by this type of measurement. - * </pre> - * - * <code>.google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder> - getUnitFieldBuilder() { - if (unitBuilder_ == null) { - unitBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder>( - getUnit(), - getParentForChildren(), - isClean()); - unit_ = null; - } - return unitBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.MeasurementDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.MeasurementDescriptor) - private static final com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<MeasurementDescriptor> - PARSER = new com.google.protobuf.AbstractParser<MeasurementDescriptor>() { - public MeasurementDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new MeasurementDescriptor(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<MeasurementDescriptor> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<MeasurementDescriptor> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DistributionAggregationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.DistributionAggregation) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * The number of values in the population. Must be non-negative. - * </pre> - * - * <code>int64 count = 1;</code> - */ - long getCount(); - - /** - * <pre> - * The arithmetic mean of the values in the population. If `count` is zero - * then this field must be zero. - * </pre> - * - * <code>double mean = 2;</code> - */ - double getMean(); - - /** - * <pre> - * The sum of the values in the population. If `count` is zero then this - * field must be zero. - * </pre> - * - * <code>double sum = 3;</code> - */ - double getSum(); - - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - boolean hasRange(); - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getRange(); - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder getRangeOrBuilder(); - - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - java.util.List<java.lang.Long> getBucketCountsList(); - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - int getBucketCountsCount(); - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - long getBucketCounts(int index); - - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> - getTagsList(); - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index); - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - int getTagsCount(); - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsOrBuilderList(); - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( - int index); - } - /** - * <pre> - * DistributionAggregation contains summary statistics for a population of - * values and, optionally, a histogram representing the distribution of those - * values across a specified set of histogram buckets, as defined in - * DistributionAggregationDescriptor.bucket_bounds. - * The summary statistics are the count, mean, minimum, and the maximum of the - * set of population of values. - * Although it is not forbidden, it is generally a bad idea to include - * non-finite values (infinities or NaNs) in the population of values, as this - * will render the `mean` field meaningless. - * </pre> - * - * Protobuf type {@code google.instrumentation.DistributionAggregation} - */ - public static final class DistributionAggregation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.DistributionAggregation) - DistributionAggregationOrBuilder { - private static final long serialVersionUID = 0L; - // Use DistributionAggregation.newBuilder() to construct. - private DistributionAggregation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private DistributionAggregation() { - count_ = 0L; - mean_ = 0D; - sum_ = 0D; - bucketCounts_ = java.util.Collections.emptyList(); - tags_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DistributionAggregation( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - - count_ = input.readInt64(); - break; - } - case 17: { - - mean_ = input.readDouble(); - break; - } - case 25: { - - sum_ = input.readDouble(); - break; - } - case 34: { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder subBuilder = null; - if (range_ != null) { - subBuilder = range_.toBuilder(); - } - range_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(range_); - range_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { - bucketCounts_ = new java.util.ArrayList<java.lang.Long>(); - mutable_bitField0_ |= 0x00000010; - } - bucketCounts_.add(input.readInt64()); - break; - } - case 42: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010) && input.getBytesUntilLimit() > 0) { - bucketCounts_ = new java.util.ArrayList<java.lang.Long>(); - mutable_bitField0_ |= 0x00000010; - } - while (input.getBytesUntilLimit() > 0) { - bucketCounts_.add(input.readInt64()); - } - input.popLimit(limit); - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tags_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.Tag>(); - mutable_bitField0_ |= 0x00000020; - } - tags_.add( - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.Tag.parser(), extensionRegistry)); - 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_ & 0x00000010) == 0x00000010)) { - bucketCounts_ = java.util.Collections.unmodifiableList(bucketCounts_); - } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tags_ = java.util.Collections.unmodifiableList(tags_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.class, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder.class); - } - - public interface RangeOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.DistributionAggregation.Range) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * The minimum of the population values. - * </pre> - * - * <code>double min = 1;</code> - */ - double getMin(); - - /** - * <pre> - * The maximum of the population values. - * </pre> - * - * <code>double max = 2;</code> - */ - double getMax(); - } - /** - * <pre> - * Describes a range of population values. - * </pre> - * - * Protobuf type {@code google.instrumentation.DistributionAggregation.Range} - */ - public static final class Range extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.DistributionAggregation.Range) - RangeOrBuilder { - private static final long serialVersionUID = 0L; - // Use Range.newBuilder() to construct. - private Range(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private Range() { - min_ = 0D; - max_ = 0D; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Range( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 9: { - - min_ = input.readDouble(); - break; - } - case 17: { - - max_ = input.readDouble(); - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_Range_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_Range_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.class, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder.class); - } - - public static final int MIN_FIELD_NUMBER = 1; - private double min_; - /** - * <pre> - * The minimum of the population values. - * </pre> - * - * <code>double min = 1;</code> - */ - public double getMin() { - return min_; - } - - public static final int MAX_FIELD_NUMBER = 2; - private double max_; - /** - * <pre> - * The maximum of the population values. - * </pre> - * - * <code>double max = 2;</code> - */ - public double getMax() { - return max_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (min_ != 0D) { - output.writeDouble(1, min_); - } - if (max_ != 0D) { - output.writeDouble(2, max_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (min_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(1, min_); - } - if (max_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, max_); - } - 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range other = (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range) obj; - - boolean result = true; - result = result && ( - java.lang.Double.doubleToLongBits(getMin()) - == java.lang.Double.doubleToLongBits( - other.getMin())); - result = result && ( - java.lang.Double.doubleToLongBits(getMax()) - == java.lang.Double.doubleToLongBits( - other.getMax())); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MIN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMin())); - hash = (37 * hash) + MAX_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMax())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * Describes a range of population values. - * </pre> - * - * Protobuf type {@code google.instrumentation.DistributionAggregation.Range} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.DistributionAggregation.Range) - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_Range_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_Range_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.class, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - min_ = 0D; - - max_ = 0D; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_Range_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range build() { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range result = new com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range(this); - result.min_ = min_; - result.max_ = max_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.getDefaultInstance()) return this; - if (other.getMin() != 0D) { - setMin(other.getMin()); - } - if (other.getMax() != 0D) { - setMax(other.getMax()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private double min_ ; - /** - * <pre> - * The minimum of the population values. - * </pre> - * - * <code>double min = 1;</code> - */ - public double getMin() { - return min_; - } - /** - * <pre> - * The minimum of the population values. - * </pre> - * - * <code>double min = 1;</code> - */ - public Builder setMin(double value) { - - min_ = value; - onChanged(); - return this; - } - /** - * <pre> - * The minimum of the population values. - * </pre> - * - * <code>double min = 1;</code> - */ - public Builder clearMin() { - - min_ = 0D; - onChanged(); - return this; - } - - private double max_ ; - /** - * <pre> - * The maximum of the population values. - * </pre> - * - * <code>double max = 2;</code> - */ - public double getMax() { - return max_; - } - /** - * <pre> - * The maximum of the population values. - * </pre> - * - * <code>double max = 2;</code> - */ - public Builder setMax(double value) { - - max_ = value; - onChanged(); - return this; - } - /** - * <pre> - * The maximum of the population values. - * </pre> - * - * <code>double max = 2;</code> - */ - public Builder clearMax() { - - max_ = 0D; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.DistributionAggregation.Range) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.DistributionAggregation.Range) - private static final com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<Range> - PARSER = new com.google.protobuf.AbstractParser<Range>() { - public Range parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Range(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<Range> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<Range> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private int bitField0_; - public static final int COUNT_FIELD_NUMBER = 1; - private long count_; - /** - * <pre> - * The number of values in the population. Must be non-negative. - * </pre> - * - * <code>int64 count = 1;</code> - */ - public long getCount() { - return count_; - } - - public static final int MEAN_FIELD_NUMBER = 2; - private double mean_; - /** - * <pre> - * The arithmetic mean of the values in the population. If `count` is zero - * then this field must be zero. - * </pre> - * - * <code>double mean = 2;</code> - */ - public double getMean() { - return mean_; - } - - public static final int SUM_FIELD_NUMBER = 3; - private double sum_; - /** - * <pre> - * The sum of the values in the population. If `count` is zero then this - * field must be zero. - * </pre> - * - * <code>double sum = 3;</code> - */ - public double getSum() { - return sum_; - } - - public static final int RANGE_FIELD_NUMBER = 4; - private com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range range_; - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public boolean hasRange() { - return range_ != null; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getRange() { - return range_ == null ? com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.getDefaultInstance() : range_; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder getRangeOrBuilder() { - return getRange(); - } - - public static final int BUCKET_COUNTS_FIELD_NUMBER = 5; - private java.util.List<java.lang.Long> bucketCounts_; - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public java.util.List<java.lang.Long> - getBucketCountsList() { - return bucketCounts_; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public int getBucketCountsCount() { - return bucketCounts_.size(); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public long getBucketCounts(int index) { - return bucketCounts_.get(index); - } - private int bucketCountsMemoizedSerializedSize = -1; - - public static final int TAGS_FIELD_NUMBER = 6; - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> tags_; - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> getTagsList() { - return tags_; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsOrBuilderList() { - return tags_; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public int getTagsCount() { - return tags_.size(); - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { - return tags_.get(index); - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( - int index) { - return tags_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (count_ != 0L) { - output.writeInt64(1, count_); - } - if (mean_ != 0D) { - output.writeDouble(2, mean_); - } - if (sum_ != 0D) { - output.writeDouble(3, sum_); - } - if (range_ != null) { - output.writeMessage(4, getRange()); - } - if (getBucketCountsList().size() > 0) { - output.writeUInt32NoTag(42); - output.writeUInt32NoTag(bucketCountsMemoizedSerializedSize); - } - for (int i = 0; i < bucketCounts_.size(); i++) { - output.writeInt64NoTag(bucketCounts_.get(i)); - } - for (int i = 0; i < tags_.size(); i++) { - output.writeMessage(6, tags_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (count_ != 0L) { - size += com.google.protobuf.CodedOutputStream - .computeInt64Size(1, count_); - } - if (mean_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, mean_); - } - if (sum_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, sum_); - } - if (range_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, getRange()); - } - { - int dataSize = 0; - for (int i = 0; i < bucketCounts_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeInt64SizeNoTag(bucketCounts_.get(i)); - } - size += dataSize; - if (!getBucketCountsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - bucketCountsMemoizedSerializedSize = dataSize; - } - for (int i = 0; i < tags_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, tags_.get(i)); - } - 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation other = (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation) obj; - - boolean result = true; - result = result && (getCount() - == other.getCount()); - result = result && ( - java.lang.Double.doubleToLongBits(getMean()) - == java.lang.Double.doubleToLongBits( - other.getMean())); - result = result && ( - java.lang.Double.doubleToLongBits(getSum()) - == java.lang.Double.doubleToLongBits( - other.getSum())); - result = result && (hasRange() == other.hasRange()); - if (hasRange()) { - result = result && getRange() - .equals(other.getRange()); - } - result = result && getBucketCountsList() - .equals(other.getBucketCountsList()); - result = result && getTagsList() - .equals(other.getTagsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - getCount()); - hash = (37 * hash) + MEAN_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getMean())); - hash = (37 * hash) + SUM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getSum())); - if (hasRange()) { - hash = (37 * hash) + RANGE_FIELD_NUMBER; - hash = (53 * hash) + getRange().hashCode(); - } - if (getBucketCountsCount() > 0) { - hash = (37 * hash) + BUCKET_COUNTS_FIELD_NUMBER; - hash = (53 * hash) + getBucketCountsList().hashCode(); - } - if (getTagsCount() > 0) { - hash = (37 * hash) + TAGS_FIELD_NUMBER; - hash = (53 * hash) + getTagsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * DistributionAggregation contains summary statistics for a population of - * values and, optionally, a histogram representing the distribution of those - * values across a specified set of histogram buckets, as defined in - * DistributionAggregationDescriptor.bucket_bounds. - * The summary statistics are the count, mean, minimum, and the maximum of the - * set of population of values. - * Although it is not forbidden, it is generally a bad idea to include - * non-finite values (infinities or NaNs) in the population of values, as this - * will render the `mean` field meaningless. - * </pre> - * - * Protobuf type {@code google.instrumentation.DistributionAggregation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.DistributionAggregation) - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.class, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getTagsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - count_ = 0L; - - mean_ = 0D; - - sum_ = 0D; - - if (rangeBuilder_ == null) { - range_ = null; - } else { - range_ = null; - rangeBuilder_ = null; - } - bucketCounts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - if (tagsBuilder_ == null) { - tags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - tagsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregation_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation build() { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation result = new com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.count_ = count_; - result.mean_ = mean_; - result.sum_ = sum_; - if (rangeBuilder_ == null) { - result.range_ = range_; - } else { - result.range_ = rangeBuilder_.build(); - } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - bucketCounts_ = java.util.Collections.unmodifiableList(bucketCounts_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.bucketCounts_ = bucketCounts_; - if (tagsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - tags_ = java.util.Collections.unmodifiableList(tags_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.tags_ = tags_; - } else { - result.tags_ = tagsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.getDefaultInstance()) return this; - if (other.getCount() != 0L) { - setCount(other.getCount()); - } - if (other.getMean() != 0D) { - setMean(other.getMean()); - } - if (other.getSum() != 0D) { - setSum(other.getSum()); - } - if (other.hasRange()) { - mergeRange(other.getRange()); - } - if (!other.bucketCounts_.isEmpty()) { - if (bucketCounts_.isEmpty()) { - bucketCounts_ = other.bucketCounts_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureBucketCountsIsMutable(); - bucketCounts_.addAll(other.bucketCounts_); - } - onChanged(); - } - if (tagsBuilder_ == null) { - if (!other.tags_.isEmpty()) { - if (tags_.isEmpty()) { - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTagsIsMutable(); - tags_.addAll(other.tags_); - } - onChanged(); - } - } else { - if (!other.tags_.isEmpty()) { - if (tagsBuilder_.isEmpty()) { - tagsBuilder_.dispose(); - tagsBuilder_ = null; - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000020); - tagsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTagsFieldBuilder() : null; - } else { - tagsBuilder_.addAllMessages(other.tags_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private long count_ ; - /** - * <pre> - * The number of values in the population. Must be non-negative. - * </pre> - * - * <code>int64 count = 1;</code> - */ - public long getCount() { - return count_; - } - /** - * <pre> - * The number of values in the population. Must be non-negative. - * </pre> - * - * <code>int64 count = 1;</code> - */ - public Builder setCount(long value) { - - count_ = value; - onChanged(); - return this; - } - /** - * <pre> - * The number of values in the population. Must be non-negative. - * </pre> - * - * <code>int64 count = 1;</code> - */ - public Builder clearCount() { - - count_ = 0L; - onChanged(); - return this; - } - - private double mean_ ; - /** - * <pre> - * The arithmetic mean of the values in the population. If `count` is zero - * then this field must be zero. - * </pre> - * - * <code>double mean = 2;</code> - */ - public double getMean() { - return mean_; - } - /** - * <pre> - * The arithmetic mean of the values in the population. If `count` is zero - * then this field must be zero. - * </pre> - * - * <code>double mean = 2;</code> - */ - public Builder setMean(double value) { - - mean_ = value; - onChanged(); - return this; - } - /** - * <pre> - * The arithmetic mean of the values in the population. If `count` is zero - * then this field must be zero. - * </pre> - * - * <code>double mean = 2;</code> - */ - public Builder clearMean() { - - mean_ = 0D; - onChanged(); - return this; - } - - private double sum_ ; - /** - * <pre> - * The sum of the values in the population. If `count` is zero then this - * field must be zero. - * </pre> - * - * <code>double sum = 3;</code> - */ - public double getSum() { - return sum_; - } - /** - * <pre> - * The sum of the values in the population. If `count` is zero then this - * field must be zero. - * </pre> - * - * <code>double sum = 3;</code> - */ - public Builder setSum(double value) { - - sum_ = value; - onChanged(); - return this; - } - /** - * <pre> - * The sum of the values in the population. If `count` is zero then this - * field must be zero. - * </pre> - * - * <code>double sum = 3;</code> - */ - public Builder clearSum() { - - sum_ = 0D; - onChanged(); - return this; - } - - private com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range range_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder> rangeBuilder_; - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public boolean hasRange() { - return rangeBuilder_ != null || range_ != null; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getRange() { - if (rangeBuilder_ == null) { - return range_ == null ? com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.getDefaultInstance() : range_; - } else { - return rangeBuilder_.getMessage(); - } - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public Builder setRange(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range value) { - if (rangeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - range_ = value; - onChanged(); - } else { - rangeBuilder_.setMessage(value); - } - - return this; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public Builder setRange( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder builderForValue) { - if (rangeBuilder_ == null) { - range_ = builderForValue.build(); - onChanged(); - } else { - rangeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public Builder mergeRange(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range value) { - if (rangeBuilder_ == null) { - if (range_ != null) { - range_ = - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.newBuilder(range_).mergeFrom(value).buildPartial(); - } else { - range_ = value; - } - onChanged(); - } else { - rangeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public Builder clearRange() { - if (rangeBuilder_ == null) { - range_ = null; - onChanged(); - } else { - range_ = null; - rangeBuilder_ = null; - } - - return this; - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder getRangeBuilder() { - - onChanged(); - return getRangeFieldBuilder().getBuilder(); - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder getRangeOrBuilder() { - if (rangeBuilder_ != null) { - return rangeBuilder_.getMessageOrBuilder(); - } else { - return range_ == null ? - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.getDefaultInstance() : range_; - } - } - /** - * <pre> - * The range of the population values. If `count` is zero, this field will not - * be defined. - * </pre> - * - * <code>.google.instrumentation.DistributionAggregation.Range range = 4;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder> - getRangeFieldBuilder() { - if (rangeBuilder_ == null) { - rangeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder>( - getRange(), - getParentForChildren(), - isClean()); - range_ = null; - } - return rangeBuilder_; - } - - private java.util.List<java.lang.Long> bucketCounts_ = java.util.Collections.emptyList(); - private void ensureBucketCountsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - bucketCounts_ = new java.util.ArrayList<java.lang.Long>(bucketCounts_); - bitField0_ |= 0x00000010; - } - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public java.util.List<java.lang.Long> - getBucketCountsList() { - return java.util.Collections.unmodifiableList(bucketCounts_); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public int getBucketCountsCount() { - return bucketCounts_.size(); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public long getBucketCounts(int index) { - return bucketCounts_.get(index); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public Builder setBucketCounts( - int index, long value) { - ensureBucketCountsIsMutable(); - bucketCounts_.set(index, value); - onChanged(); - return this; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public Builder addBucketCounts(long value) { - ensureBucketCountsIsMutable(); - bucketCounts_.add(value); - onChanged(); - return this; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public Builder addAllBucketCounts( - java.lang.Iterable<? extends java.lang.Long> values) { - ensureBucketCountsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketCounts_); - onChanged(); - return this; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The histogram is given in `bucket_count` as counts of values - * that fall into one of a sequence of non-overlapping buckets, as described - * by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - * values in `bucket_counts` must equal the value in `count`. - * Bucket counts are given in order under the numbering scheme described - * above (the underflow bucket has number 0; the finite buckets, if any, - * have numbers 1 through N-2; the overflow bucket has number N-1). - * The size of `bucket_count` must be no greater than N as defined in - * `bucket_boundaries`. - * Any suffix of trailing zero bucket_count fields may be omitted. - * </pre> - * - * <code>repeated int64 bucket_counts = 5;</code> - */ - public Builder clearBucketCounts() { - bucketCounts_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - return this; - } - - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> tags_ = - java.util.Collections.emptyList(); - private void ensureTagsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - tags_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.Tag>(tags_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Tag, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder, com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> tagsBuilder_; - - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> getTagsList() { - if (tagsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tags_); - } else { - return tagsBuilder_.getMessageList(); - } - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public int getTagsCount() { - if (tagsBuilder_ == null) { - return tags_.size(); - } else { - return tagsBuilder_.getCount(); - } - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { - if (tagsBuilder_ == null) { - return tags_.get(index); - } else { - return tagsBuilder_.getMessage(index); - } - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder setTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.set(index, value); - onChanged(); - } else { - tagsBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder setTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.set(index, builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder addTags(com.google.instrumentation.stats.proto.CensusProto.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - } else { - tagsBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder addTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(index, value); - onChanged(); - } else { - tagsBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder addTags( - com.google.instrumentation.stats.proto.CensusProto.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder addTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(index, builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder addAllTags( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.Tag> values) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tags_); - onChanged(); - } else { - tagsBuilder_.addAllMessages(values); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder clearTags() { - if (tagsBuilder_ == null) { - tags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - tagsBuilder_.clear(); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public Builder removeTags(int index) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.remove(index); - onChanged(); - } else { - tagsBuilder_.remove(index); - } - return this; - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder getTagsBuilder( - int index) { - return getTagsFieldBuilder().getBuilder(index); - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( - int index) { - if (tagsBuilder_ == null) { - return tags_.get(index); } else { - return tagsBuilder_.getMessageOrBuilder(index); - } - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsOrBuilderList() { - if (tagsBuilder_ != null) { - return tagsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tags_); - } - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder() { - return getTagsFieldBuilder().addBuilder( - com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder( - int index) { - return getTagsFieldBuilder().addBuilder( - index, com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); - } - /** - * <pre> - * Tags associated with this DistributionAggregation. These will be filled - * in based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 6;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag.Builder> - getTagsBuilderList() { - return getTagsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Tag, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder, com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsFieldBuilder() { - if (tagsBuilder_ == null) { - tagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Tag, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder, com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder>( - tags_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - tags_ = null; - } - return tagsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.DistributionAggregation) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.DistributionAggregation) - private static final com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<DistributionAggregation> - PARSER = new com.google.protobuf.AbstractParser<DistributionAggregation>() { - public DistributionAggregation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DistributionAggregation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<DistributionAggregation> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<DistributionAggregation> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DistributionAggregationDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.DistributionAggregationDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - java.util.List<java.lang.Double> getBucketBoundsList(); - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - int getBucketBoundsCount(); - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - double getBucketBounds(int index); - } - /** - * Protobuf type {@code google.instrumentation.DistributionAggregationDescriptor} - */ - public static final class DistributionAggregationDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.DistributionAggregationDescriptor) - DistributionAggregationDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use DistributionAggregationDescriptor.newBuilder() to construct. - private DistributionAggregationDescriptor(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private DistributionAggregationDescriptor() { - bucketBounds_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DistributionAggregationDescriptor( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 9: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - bucketBounds_ = new java.util.ArrayList<java.lang.Double>(); - mutable_bitField0_ |= 0x00000001; - } - bucketBounds_.add(input.readDouble()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { - bucketBounds_ = new java.util.ArrayList<java.lang.Double>(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - bucketBounds_.add(input.readDouble()); - } - input.popLimit(limit); - 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) == 0x00000001)) { - bucketBounds_ = java.util.Collections.unmodifiableList(bucketBounds_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregationDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregationDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder.class); - } - - public static final int BUCKET_BOUNDS_FIELD_NUMBER = 1; - private java.util.List<java.lang.Double> bucketBounds_; - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public java.util.List<java.lang.Double> - getBucketBoundsList() { - return bucketBounds_; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public int getBucketBoundsCount() { - return bucketBounds_.size(); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public double getBucketBounds(int index) { - return bucketBounds_.get(index); - } - private int bucketBoundsMemoizedSerializedSize = -1; - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - getSerializedSize(); - if (getBucketBoundsList().size() > 0) { - output.writeUInt32NoTag(10); - output.writeUInt32NoTag(bucketBoundsMemoizedSerializedSize); - } - for (int i = 0; i < bucketBounds_.size(); i++) { - output.writeDoubleNoTag(bucketBounds_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - { - int dataSize = 0; - dataSize = 8 * getBucketBoundsList().size(); - size += dataSize; - if (!getBucketBoundsList().isEmpty()) { - size += 1; - size += com.google.protobuf.CodedOutputStream - .computeInt32SizeNoTag(dataSize); - } - bucketBoundsMemoizedSerializedSize = dataSize; - } - 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor other = (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) obj; - - boolean result = true; - result = result && getBucketBoundsList() - .equals(other.getBucketBoundsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getBucketBoundsCount() > 0) { - hash = (37 * hash) + BUCKET_BOUNDS_FIELD_NUMBER; - hash = (53 * hash) + getBucketBoundsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * Protobuf type {@code google.instrumentation.DistributionAggregationDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.DistributionAggregationDescriptor) - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregationDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregationDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - bucketBounds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionAggregationDescriptor_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor build() { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor result = new com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - bucketBounds_ = java.util.Collections.unmodifiableList(bucketBounds_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.bucketBounds_ = bucketBounds_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance()) return this; - if (!other.bucketBounds_.isEmpty()) { - if (bucketBounds_.isEmpty()) { - bucketBounds_ = other.bucketBounds_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBucketBoundsIsMutable(); - bucketBounds_.addAll(other.bucketBounds_); - } - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List<java.lang.Double> bucketBounds_ = java.util.Collections.emptyList(); - private void ensureBucketBoundsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - bucketBounds_ = new java.util.ArrayList<java.lang.Double>(bucketBounds_); - bitField0_ |= 0x00000001; - } - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public java.util.List<java.lang.Double> - getBucketBoundsList() { - return java.util.Collections.unmodifiableList(bucketBounds_); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public int getBucketBoundsCount() { - return bucketBounds_.size(); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public double getBucketBounds(int index) { - return bucketBounds_.get(index); - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public Builder setBucketBounds( - int index, double value) { - ensureBucketBoundsIsMutable(); - bucketBounds_.set(index, value); - onChanged(); - return this; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public Builder addBucketBounds(double value) { - ensureBucketBoundsIsMutable(); - bucketBounds_.add(value); - onChanged(); - return this; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public Builder addAllBucketBounds( - java.lang.Iterable<? extends java.lang.Double> values) { - ensureBucketBoundsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, bucketBounds_); - onChanged(); - return this; - } - /** - * <pre> - * A Distribution may optionally contain a histogram of the values in the - * population. The bucket boundaries for that histogram are described by - * `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - * buckets. The boundaries for bucket index i are: - * [-infinity, bucket_bounds[i]) for i == 0 - * [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - * [bucket_bounds[i-1], +infinity) for i == N-1 - * i.e. an underflow bucket (number 0), zero or more finite buckets (1 - * through N - 2, and an overflow bucket (N - 1), with inclusive lower - * bounds and exclusive upper bounds. - * If `bucket_bounds` has no elements (zero size), then there is no - * histogram associated with the Distribution. If `bucket_bounds` has only - * one element, there are no finite buckets, and that single element is the - * common boundary of the overflow and underflow buckets. The values must - * be monotonically increasing. - * </pre> - * - * <code>repeated double bucket_bounds = 1;</code> - */ - public Builder clearBucketBounds() { - bucketBounds_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.DistributionAggregationDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.DistributionAggregationDescriptor) - private static final com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<DistributionAggregationDescriptor> - PARSER = new com.google.protobuf.AbstractParser<DistributionAggregationDescriptor>() { - public DistributionAggregationDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DistributionAggregationDescriptor(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<DistributionAggregationDescriptor> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<DistributionAggregationDescriptor> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IntervalAggregationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.IntervalAggregation) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval> - getIntervalsList(); - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getIntervals(int index); - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - int getIntervalsCount(); - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder> - getIntervalsOrBuilderList(); - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder getIntervalsOrBuilder( - int index); - - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> - getTagsList(); - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index); - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - int getTagsCount(); - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsOrBuilderList(); - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( - int index); - } - /** - * <pre> - * An IntervalAggreation records summary stats over various time - * windows. These stats are approximate, with the degree of accuracy - * controlled by setting the n_sub_intervals parameter in the - * IntervalAggregationDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalAggregation} - */ - public static final class IntervalAggregation extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.IntervalAggregation) - IntervalAggregationOrBuilder { - private static final long serialVersionUID = 0L; - // Use IntervalAggregation.newBuilder() to construct. - private IntervalAggregation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private IntervalAggregation() { - intervals_ = java.util.Collections.emptyList(); - tags_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IntervalAggregation( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - intervals_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval>(); - mutable_bitField0_ |= 0x00000001; - } - intervals_.add( - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - tags_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.Tag>(); - mutable_bitField0_ |= 0x00000002; - } - tags_.add( - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.Tag.parser(), extensionRegistry)); - 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) == 0x00000001)) { - intervals_ = java.util.Collections.unmodifiableList(intervals_); - } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - tags_ = java.util.Collections.unmodifiableList(tags_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.class, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder.class); - } - - public interface IntervalOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.IntervalAggregation.Interval) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - boolean hasIntervalSize(); - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSize(); - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizeOrBuilder(); - - /** - * <pre> - * Approximate number of measurements recorded in this interval. - * </pre> - * - * <code>double count = 2;</code> - */ - double getCount(); - - /** - * <pre> - * The cumulative sum of measurements in this interval. - * </pre> - * - * <code>double sum = 3;</code> - */ - double getSum(); - } - /** - * <pre> - * Summary statistic over a single time interval. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalAggregation.Interval} - */ - public static final class Interval extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.IntervalAggregation.Interval) - IntervalOrBuilder { - private static final long serialVersionUID = 0L; - // Use Interval.newBuilder() to construct. - private Interval(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private Interval() { - count_ = 0D; - sum_ = 0D; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Interval( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - com.google.instrumentation.stats.proto.CensusProto.Duration.Builder subBuilder = null; - if (intervalSize_ != null) { - subBuilder = intervalSize_.toBuilder(); - } - intervalSize_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(intervalSize_); - intervalSize_ = subBuilder.buildPartial(); - } - - break; - } - case 17: { - - count_ = input.readDouble(); - break; - } - case 25: { - - sum_ = input.readDouble(); - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_Interval_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_Interval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.class, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder.class); - } - - public static final int INTERVAL_SIZE_FIELD_NUMBER = 1; - private com.google.instrumentation.stats.proto.CensusProto.Duration intervalSize_; - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public boolean hasIntervalSize() { - return intervalSize_ != null; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSize() { - return intervalSize_ == null ? com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance() : intervalSize_; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizeOrBuilder() { - return getIntervalSize(); - } - - public static final int COUNT_FIELD_NUMBER = 2; - private double count_; - /** - * <pre> - * Approximate number of measurements recorded in this interval. - * </pre> - * - * <code>double count = 2;</code> - */ - public double getCount() { - return count_; - } - - public static final int SUM_FIELD_NUMBER = 3; - private double sum_; - /** - * <pre> - * The cumulative sum of measurements in this interval. - * </pre> - * - * <code>double sum = 3;</code> - */ - public double getSum() { - return sum_; - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (intervalSize_ != null) { - output.writeMessage(1, getIntervalSize()); - } - if (count_ != 0D) { - output.writeDouble(2, count_); - } - if (sum_ != 0D) { - output.writeDouble(3, sum_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (intervalSize_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, getIntervalSize()); - } - if (count_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(2, count_); - } - if (sum_ != 0D) { - size += com.google.protobuf.CodedOutputStream - .computeDoubleSize(3, sum_); - } - 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval other = (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval) obj; - - boolean result = true; - result = result && (hasIntervalSize() == other.hasIntervalSize()); - if (hasIntervalSize()) { - result = result && getIntervalSize() - .equals(other.getIntervalSize()); - } - result = result && ( - java.lang.Double.doubleToLongBits(getCount()) - == java.lang.Double.doubleToLongBits( - other.getCount())); - result = result && ( - java.lang.Double.doubleToLongBits(getSum()) - == java.lang.Double.doubleToLongBits( - other.getSum())); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (hasIntervalSize()) { - hash = (37 * hash) + INTERVAL_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getIntervalSize().hashCode(); - } - hash = (37 * hash) + COUNT_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getCount())); - hash = (37 * hash) + SUM_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong( - java.lang.Double.doubleToLongBits(getSum())); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * Summary statistic over a single time interval. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalAggregation.Interval} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.IntervalAggregation.Interval) - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_Interval_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_Interval_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.class, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - if (intervalSizeBuilder_ == null) { - intervalSize_ = null; - } else { - intervalSize_ = null; - intervalSizeBuilder_ = null; - } - count_ = 0D; - - sum_ = 0D; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_Interval_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval build() { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval result = new com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval(this); - if (intervalSizeBuilder_ == null) { - result.intervalSize_ = intervalSize_; - } else { - result.intervalSize_ = intervalSizeBuilder_.build(); - } - result.count_ = count_; - result.sum_ = sum_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.getDefaultInstance()) return this; - if (other.hasIntervalSize()) { - mergeIntervalSize(other.getIntervalSize()); - } - if (other.getCount() != 0D) { - setCount(other.getCount()); - } - if (other.getSum() != 0D) { - setSum(other.getSum()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private com.google.instrumentation.stats.proto.CensusProto.Duration intervalSize_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Duration, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder, com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> intervalSizeBuilder_; - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public boolean hasIntervalSize() { - return intervalSizeBuilder_ != null || intervalSize_ != null; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSize() { - if (intervalSizeBuilder_ == null) { - return intervalSize_ == null ? com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance() : intervalSize_; - } else { - return intervalSizeBuilder_.getMessage(); - } - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public Builder setIntervalSize(com.google.instrumentation.stats.proto.CensusProto.Duration value) { - if (intervalSizeBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - intervalSize_ = value; - onChanged(); - } else { - intervalSizeBuilder_.setMessage(value); - } - - return this; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public Builder setIntervalSize( - com.google.instrumentation.stats.proto.CensusProto.Duration.Builder builderForValue) { - if (intervalSizeBuilder_ == null) { - intervalSize_ = builderForValue.build(); - onChanged(); - } else { - intervalSizeBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public Builder mergeIntervalSize(com.google.instrumentation.stats.proto.CensusProto.Duration value) { - if (intervalSizeBuilder_ == null) { - if (intervalSize_ != null) { - intervalSize_ = - com.google.instrumentation.stats.proto.CensusProto.Duration.newBuilder(intervalSize_).mergeFrom(value).buildPartial(); - } else { - intervalSize_ = value; - } - onChanged(); - } else { - intervalSizeBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public Builder clearIntervalSize() { - if (intervalSizeBuilder_ == null) { - intervalSize_ = null; - onChanged(); - } else { - intervalSize_ = null; - intervalSizeBuilder_ = null; - } - - return this; - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder getIntervalSizeBuilder() { - - onChanged(); - return getIntervalSizeFieldBuilder().getBuilder(); - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizeOrBuilder() { - if (intervalSizeBuilder_ != null) { - return intervalSizeBuilder_.getMessageOrBuilder(); - } else { - return intervalSize_ == null ? - com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance() : intervalSize_; - } - } - /** - * <pre> - * The interval duration. Must be positive. - * </pre> - * - * <code>.google.instrumentation.Duration interval_size = 1;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Duration, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder, com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> - getIntervalSizeFieldBuilder() { - if (intervalSizeBuilder_ == null) { - intervalSizeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Duration, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder, com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder>( - getIntervalSize(), - getParentForChildren(), - isClean()); - intervalSize_ = null; - } - return intervalSizeBuilder_; - } - - private double count_ ; - /** - * <pre> - * Approximate number of measurements recorded in this interval. - * </pre> - * - * <code>double count = 2;</code> - */ - public double getCount() { - return count_; - } - /** - * <pre> - * Approximate number of measurements recorded in this interval. - * </pre> - * - * <code>double count = 2;</code> - */ - public Builder setCount(double value) { - - count_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Approximate number of measurements recorded in this interval. - * </pre> - * - * <code>double count = 2;</code> - */ - public Builder clearCount() { - - count_ = 0D; - onChanged(); - return this; - } - - private double sum_ ; - /** - * <pre> - * The cumulative sum of measurements in this interval. - * </pre> - * - * <code>double sum = 3;</code> - */ - public double getSum() { - return sum_; - } - /** - * <pre> - * The cumulative sum of measurements in this interval. - * </pre> - * - * <code>double sum = 3;</code> - */ - public Builder setSum(double value) { - - sum_ = value; - onChanged(); - return this; - } - /** - * <pre> - * The cumulative sum of measurements in this interval. - * </pre> - * - * <code>double sum = 3;</code> - */ - public Builder clearSum() { - - sum_ = 0D; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.IntervalAggregation.Interval) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.IntervalAggregation.Interval) - private static final com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<Interval> - PARSER = new com.google.protobuf.AbstractParser<Interval>() { - public Interval parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Interval(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<Interval> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<Interval> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public static final int INTERVALS_FIELD_NUMBER = 1; - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval> intervals_; - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval> getIntervalsList() { - return intervals_; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder> - getIntervalsOrBuilderList() { - return intervals_; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public int getIntervalsCount() { - return intervals_.size(); - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getIntervals(int index) { - return intervals_.get(index); - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder getIntervalsOrBuilder( - int index) { - return intervals_.get(index); - } - - public static final int TAGS_FIELD_NUMBER = 2; - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> tags_; - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> getTagsList() { - return tags_; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsOrBuilderList() { - return tags_; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public int getTagsCount() { - return tags_.size(); - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { - return tags_.get(index); - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( - int index) { - return tags_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < intervals_.size(); i++) { - output.writeMessage(1, intervals_.get(i)); - } - for (int i = 0; i < tags_.size(); i++) { - output.writeMessage(2, tags_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < intervals_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, intervals_.get(i)); - } - for (int i = 0; i < tags_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, tags_.get(i)); - } - 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation other = (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation) obj; - - boolean result = true; - result = result && getIntervalsList() - .equals(other.getIntervalsList()); - result = result && getTagsList() - .equals(other.getTagsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getIntervalsCount() > 0) { - hash = (37 * hash) + INTERVALS_FIELD_NUMBER; - hash = (53 * hash) + getIntervalsList().hashCode(); - } - if (getTagsCount() > 0) { - hash = (37 * hash) + TAGS_FIELD_NUMBER; - hash = (53 * hash) + getTagsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * An IntervalAggreation records summary stats over various time - * windows. These stats are approximate, with the degree of accuracy - * controlled by setting the n_sub_intervals parameter in the - * IntervalAggregationDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalAggregation} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.IntervalAggregation) - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.class, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getIntervalsFieldBuilder(); - getTagsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (intervalsBuilder_ == null) { - intervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - intervalsBuilder_.clear(); - } - if (tagsBuilder_ == null) { - tags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - tagsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregation_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation build() { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation result = new com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation(this); - int from_bitField0_ = bitField0_; - if (intervalsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - intervals_ = java.util.Collections.unmodifiableList(intervals_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.intervals_ = intervals_; - } else { - result.intervals_ = intervalsBuilder_.build(); - } - if (tagsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - tags_ = java.util.Collections.unmodifiableList(tags_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.tags_ = tags_; - } else { - result.tags_ = tagsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.getDefaultInstance()) return this; - if (intervalsBuilder_ == null) { - if (!other.intervals_.isEmpty()) { - if (intervals_.isEmpty()) { - intervals_ = other.intervals_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureIntervalsIsMutable(); - intervals_.addAll(other.intervals_); - } - onChanged(); - } - } else { - if (!other.intervals_.isEmpty()) { - if (intervalsBuilder_.isEmpty()) { - intervalsBuilder_.dispose(); - intervalsBuilder_ = null; - intervals_ = other.intervals_; - bitField0_ = (bitField0_ & ~0x00000001); - intervalsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIntervalsFieldBuilder() : null; - } else { - intervalsBuilder_.addAllMessages(other.intervals_); - } - } - } - if (tagsBuilder_ == null) { - if (!other.tags_.isEmpty()) { - if (tags_.isEmpty()) { - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureTagsIsMutable(); - tags_.addAll(other.tags_); - } - onChanged(); - } - } else { - if (!other.tags_.isEmpty()) { - if (tagsBuilder_.isEmpty()) { - tagsBuilder_.dispose(); - tagsBuilder_ = null; - tags_ = other.tags_; - bitField0_ = (bitField0_ & ~0x00000002); - tagsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getTagsFieldBuilder() : null; - } else { - tagsBuilder_.addAllMessages(other.tags_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval> intervals_ = - java.util.Collections.emptyList(); - private void ensureIntervalsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - intervals_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval>(intervals_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder> intervalsBuilder_; - - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval> getIntervalsList() { - if (intervalsBuilder_ == null) { - return java.util.Collections.unmodifiableList(intervals_); - } else { - return intervalsBuilder_.getMessageList(); - } - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public int getIntervalsCount() { - if (intervalsBuilder_ == null) { - return intervals_.size(); - } else { - return intervalsBuilder_.getCount(); - } - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getIntervals(int index) { - if (intervalsBuilder_ == null) { - return intervals_.get(index); - } else { - return intervalsBuilder_.getMessage(index); - } - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder setIntervals( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval value) { - if (intervalsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntervalsIsMutable(); - intervals_.set(index, value); - onChanged(); - } else { - intervalsBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder setIntervals( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder builderForValue) { - if (intervalsBuilder_ == null) { - ensureIntervalsIsMutable(); - intervals_.set(index, builderForValue.build()); - onChanged(); - } else { - intervalsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder addIntervals(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval value) { - if (intervalsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntervalsIsMutable(); - intervals_.add(value); - onChanged(); - } else { - intervalsBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder addIntervals( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval value) { - if (intervalsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntervalsIsMutable(); - intervals_.add(index, value); - onChanged(); - } else { - intervalsBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder addIntervals( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder builderForValue) { - if (intervalsBuilder_ == null) { - ensureIntervalsIsMutable(); - intervals_.add(builderForValue.build()); - onChanged(); - } else { - intervalsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder addIntervals( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder builderForValue) { - if (intervalsBuilder_ == null) { - ensureIntervalsIsMutable(); - intervals_.add(index, builderForValue.build()); - onChanged(); - } else { - intervalsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder addAllIntervals( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval> values) { - if (intervalsBuilder_ == null) { - ensureIntervalsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, intervals_); - onChanged(); - } else { - intervalsBuilder_.addAllMessages(values); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder clearIntervals() { - if (intervalsBuilder_ == null) { - intervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - intervalsBuilder_.clear(); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public Builder removeIntervals(int index) { - if (intervalsBuilder_ == null) { - ensureIntervalsIsMutable(); - intervals_.remove(index); - onChanged(); - } else { - intervalsBuilder_.remove(index); - } - return this; - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder getIntervalsBuilder( - int index) { - return getIntervalsFieldBuilder().getBuilder(index); - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder getIntervalsOrBuilder( - int index) { - if (intervalsBuilder_ == null) { - return intervals_.get(index); } else { - return intervalsBuilder_.getMessageOrBuilder(index); - } - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder> - getIntervalsOrBuilderList() { - if (intervalsBuilder_ != null) { - return intervalsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(intervals_); - } - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder addIntervalsBuilder() { - return getIntervalsFieldBuilder().addBuilder( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.getDefaultInstance()); - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder addIntervalsBuilder( - int index) { - return getIntervalsFieldBuilder().addBuilder( - index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.getDefaultInstance()); - } - /** - * <pre> - * Full set of intervals for this aggregation. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder> - getIntervalsBuilderList() { - return getIntervalsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder> - getIntervalsFieldBuilder() { - if (intervalsBuilder_ == null) { - intervalsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder>( - intervals_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - intervals_ = null; - } - return intervalsBuilder_; - } - - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> tags_ = - java.util.Collections.emptyList(); - private void ensureTagsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - tags_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.Tag>(tags_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Tag, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder, com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> tagsBuilder_; - - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag> getTagsList() { - if (tagsBuilder_ == null) { - return java.util.Collections.unmodifiableList(tags_); - } else { - return tagsBuilder_.getMessageList(); - } - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public int getTagsCount() { - if (tagsBuilder_ == null) { - return tags_.size(); - } else { - return tagsBuilder_.getCount(); - } - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { - if (tagsBuilder_ == null) { - return tags_.get(index); - } else { - return tagsBuilder_.getMessage(index); - } - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder setTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.set(index, value); - onChanged(); - } else { - tagsBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder setTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.set(index, builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder addTags(com.google.instrumentation.stats.proto.CensusProto.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(value); - onChanged(); - } else { - tagsBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder addTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag value) { - if (tagsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagsIsMutable(); - tags_.add(index, value); - onChanged(); - } else { - tagsBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder addTags( - com.google.instrumentation.stats.proto.CensusProto.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder addTags( - int index, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder builderForValue) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.add(index, builderForValue.build()); - onChanged(); - } else { - tagsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder addAllTags( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.Tag> values) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tags_); - onChanged(); - } else { - tagsBuilder_.addAllMessages(values); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder clearTags() { - if (tagsBuilder_ == null) { - tags_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - tagsBuilder_.clear(); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public Builder removeTags(int index) { - if (tagsBuilder_ == null) { - ensureTagsIsMutable(); - tags_.remove(index); - onChanged(); - } else { - tagsBuilder_.remove(index); - } - return this; - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder getTagsBuilder( - int index) { - return getTagsFieldBuilder().getBuilder(index); - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( - int index) { - if (tagsBuilder_ == null) { - return tags_.get(index); } else { - return tagsBuilder_.getMessageOrBuilder(index); - } - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsOrBuilderList() { - if (tagsBuilder_ != null) { - return tagsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(tags_); - } - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder() { - return getTagsFieldBuilder().addBuilder( - com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder( - int index) { - return getTagsFieldBuilder().addBuilder( - index, com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); - } - /** - * <pre> - * Tags associated with this IntervalAggregation. These will be filled in - * based on the View specification. - * </pre> - * - * <code>repeated .google.instrumentation.Tag tags = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Tag.Builder> - getTagsBuilderList() { - return getTagsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Tag, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder, com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder> - getTagsFieldBuilder() { - if (tagsBuilder_ == null) { - tagsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Tag, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder, com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder>( - tags_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - tags_ = null; - } - return tagsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.IntervalAggregation) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.IntervalAggregation) - private static final com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<IntervalAggregation> - PARSER = new com.google.protobuf.AbstractParser<IntervalAggregation>() { - public IntervalAggregation parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IntervalAggregation(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<IntervalAggregation> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<IntervalAggregation> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IntervalAggregationDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.IntervalAggregationDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Number of internal sub-intervals to use when collecting stats for each - * interval. The max error in interval measurements will be approximately - * 1/n_sub_intervals (although in practice, this will only be approached in - * the presence of very large and bursty workload changes), and underlying - * memory usage will be roughly proportional to the value of this - * field. Must be in the range [2, 20]. A value of 5 will be used if this is - * unspecified. - * </pre> - * - * <code>int32 n_sub_intervals = 1;</code> - */ - int getNSubIntervals(); - - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.Duration> - getIntervalSizesList(); - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSizes(int index); - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - int getIntervalSizesCount(); - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> - getIntervalSizesOrBuilderList(); - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizesOrBuilder( - int index); - } - /** - * <pre> - * An IntervalAggreationDescriptor specifies time intervals for an - * IntervalAggregation. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalAggregationDescriptor} - */ - public static final class IntervalAggregationDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.IntervalAggregationDescriptor) - IntervalAggregationDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use IntervalAggregationDescriptor.newBuilder() to construct. - private IntervalAggregationDescriptor(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private IntervalAggregationDescriptor() { - nSubIntervals_ = 0; - intervalSizes_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IntervalAggregationDescriptor( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 8: { - - nSubIntervals_ = input.readInt32(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { - intervalSizes_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.Duration>(); - mutable_bitField0_ |= 0x00000002; - } - intervalSizes_.add( - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.Duration.parser(), extensionRegistry)); - 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_ & 0x00000002) == 0x00000002)) { - intervalSizes_ = java.util.Collections.unmodifiableList(intervalSizes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregationDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregationDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder.class); - } - - private int bitField0_; - public static final int N_SUB_INTERVALS_FIELD_NUMBER = 1; - private int nSubIntervals_; - /** - * <pre> - * Number of internal sub-intervals to use when collecting stats for each - * interval. The max error in interval measurements will be approximately - * 1/n_sub_intervals (although in practice, this will only be approached in - * the presence of very large and bursty workload changes), and underlying - * memory usage will be roughly proportional to the value of this - * field. Must be in the range [2, 20]. A value of 5 will be used if this is - * unspecified. - * </pre> - * - * <code>int32 n_sub_intervals = 1;</code> - */ - public int getNSubIntervals() { - return nSubIntervals_; - } - - public static final int INTERVAL_SIZES_FIELD_NUMBER = 2; - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.Duration> intervalSizes_; - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Duration> getIntervalSizesList() { - return intervalSizes_; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> - getIntervalSizesOrBuilderList() { - return intervalSizes_; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public int getIntervalSizesCount() { - return intervalSizes_.size(); - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSizes(int index) { - return intervalSizes_.get(index); - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizesOrBuilder( - int index) { - return intervalSizes_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (nSubIntervals_ != 0) { - output.writeInt32(1, nSubIntervals_); - } - for (int i = 0; i < intervalSizes_.size(); i++) { - output.writeMessage(2, intervalSizes_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (nSubIntervals_ != 0) { - size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, nSubIntervals_); - } - for (int i = 0; i < intervalSizes_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, intervalSizes_.get(i)); - } - 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor other = (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) obj; - - boolean result = true; - result = result && (getNSubIntervals() - == other.getNSubIntervals()); - result = result && getIntervalSizesList() - .equals(other.getIntervalSizesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + N_SUB_INTERVALS_FIELD_NUMBER; - hash = (53 * hash) + getNSubIntervals(); - if (getIntervalSizesCount() > 0) { - hash = (37 * hash) + INTERVAL_SIZES_FIELD_NUMBER; - hash = (53 * hash) + getIntervalSizesList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * An IntervalAggreationDescriptor specifies time intervals for an - * IntervalAggregation. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalAggregationDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.IntervalAggregationDescriptor) - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregationDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregationDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getIntervalSizesFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - nSubIntervals_ = 0; - - if (intervalSizesBuilder_ == null) { - intervalSizes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - intervalSizesBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalAggregationDescriptor_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor build() { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor result = new com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.nSubIntervals_ = nSubIntervals_; - if (intervalSizesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - intervalSizes_ = java.util.Collections.unmodifiableList(intervalSizes_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.intervalSizes_ = intervalSizes_; - } else { - result.intervalSizes_ = intervalSizesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance()) return this; - if (other.getNSubIntervals() != 0) { - setNSubIntervals(other.getNSubIntervals()); - } - if (intervalSizesBuilder_ == null) { - if (!other.intervalSizes_.isEmpty()) { - if (intervalSizes_.isEmpty()) { - intervalSizes_ = other.intervalSizes_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureIntervalSizesIsMutable(); - intervalSizes_.addAll(other.intervalSizes_); - } - onChanged(); - } - } else { - if (!other.intervalSizes_.isEmpty()) { - if (intervalSizesBuilder_.isEmpty()) { - intervalSizesBuilder_.dispose(); - intervalSizesBuilder_ = null; - intervalSizes_ = other.intervalSizes_; - bitField0_ = (bitField0_ & ~0x00000002); - intervalSizesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getIntervalSizesFieldBuilder() : null; - } else { - intervalSizesBuilder_.addAllMessages(other.intervalSizes_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private int nSubIntervals_ ; - /** - * <pre> - * Number of internal sub-intervals to use when collecting stats for each - * interval. The max error in interval measurements will be approximately - * 1/n_sub_intervals (although in practice, this will only be approached in - * the presence of very large and bursty workload changes), and underlying - * memory usage will be roughly proportional to the value of this - * field. Must be in the range [2, 20]. A value of 5 will be used if this is - * unspecified. - * </pre> - * - * <code>int32 n_sub_intervals = 1;</code> - */ - public int getNSubIntervals() { - return nSubIntervals_; - } - /** - * <pre> - * Number of internal sub-intervals to use when collecting stats for each - * interval. The max error in interval measurements will be approximately - * 1/n_sub_intervals (although in practice, this will only be approached in - * the presence of very large and bursty workload changes), and underlying - * memory usage will be roughly proportional to the value of this - * field. Must be in the range [2, 20]. A value of 5 will be used if this is - * unspecified. - * </pre> - * - * <code>int32 n_sub_intervals = 1;</code> - */ - public Builder setNSubIntervals(int value) { - - nSubIntervals_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Number of internal sub-intervals to use when collecting stats for each - * interval. The max error in interval measurements will be approximately - * 1/n_sub_intervals (although in practice, this will only be approached in - * the presence of very large and bursty workload changes), and underlying - * memory usage will be roughly proportional to the value of this - * field. Must be in the range [2, 20]. A value of 5 will be used if this is - * unspecified. - * </pre> - * - * <code>int32 n_sub_intervals = 1;</code> - */ - public Builder clearNSubIntervals() { - - nSubIntervals_ = 0; - onChanged(); - return this; - } - - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.Duration> intervalSizes_ = - java.util.Collections.emptyList(); - private void ensureIntervalSizesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - intervalSizes_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.Duration>(intervalSizes_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Duration, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder, com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> intervalSizesBuilder_; - - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Duration> getIntervalSizesList() { - if (intervalSizesBuilder_ == null) { - return java.util.Collections.unmodifiableList(intervalSizes_); - } else { - return intervalSizesBuilder_.getMessageList(); - } - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public int getIntervalSizesCount() { - if (intervalSizesBuilder_ == null) { - return intervalSizes_.size(); - } else { - return intervalSizesBuilder_.getCount(); - } - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSizes(int index) { - if (intervalSizesBuilder_ == null) { - return intervalSizes_.get(index); - } else { - return intervalSizesBuilder_.getMessage(index); - } - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder setIntervalSizes( - int index, com.google.instrumentation.stats.proto.CensusProto.Duration value) { - if (intervalSizesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntervalSizesIsMutable(); - intervalSizes_.set(index, value); - onChanged(); - } else { - intervalSizesBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder setIntervalSizes( - int index, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder builderForValue) { - if (intervalSizesBuilder_ == null) { - ensureIntervalSizesIsMutable(); - intervalSizes_.set(index, builderForValue.build()); - onChanged(); - } else { - intervalSizesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder addIntervalSizes(com.google.instrumentation.stats.proto.CensusProto.Duration value) { - if (intervalSizesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntervalSizesIsMutable(); - intervalSizes_.add(value); - onChanged(); - } else { - intervalSizesBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder addIntervalSizes( - int index, com.google.instrumentation.stats.proto.CensusProto.Duration value) { - if (intervalSizesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntervalSizesIsMutable(); - intervalSizes_.add(index, value); - onChanged(); - } else { - intervalSizesBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder addIntervalSizes( - com.google.instrumentation.stats.proto.CensusProto.Duration.Builder builderForValue) { - if (intervalSizesBuilder_ == null) { - ensureIntervalSizesIsMutable(); - intervalSizes_.add(builderForValue.build()); - onChanged(); - } else { - intervalSizesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder addIntervalSizes( - int index, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder builderForValue) { - if (intervalSizesBuilder_ == null) { - ensureIntervalSizesIsMutable(); - intervalSizes_.add(index, builderForValue.build()); - onChanged(); - } else { - intervalSizesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder addAllIntervalSizes( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.Duration> values) { - if (intervalSizesBuilder_ == null) { - ensureIntervalSizesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, intervalSizes_); - onChanged(); - } else { - intervalSizesBuilder_.addAllMessages(values); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder clearIntervalSizes() { - if (intervalSizesBuilder_ == null) { - intervalSizes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - intervalSizesBuilder_.clear(); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public Builder removeIntervalSizes(int index) { - if (intervalSizesBuilder_ == null) { - ensureIntervalSizesIsMutable(); - intervalSizes_.remove(index); - onChanged(); - } else { - intervalSizesBuilder_.remove(index); - } - return this; - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder getIntervalSizesBuilder( - int index) { - return getIntervalSizesFieldBuilder().getBuilder(index); - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizesOrBuilder( - int index) { - if (intervalSizesBuilder_ == null) { - return intervalSizes_.get(index); } else { - return intervalSizesBuilder_.getMessageOrBuilder(index); - } - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> - getIntervalSizesOrBuilderList() { - if (intervalSizesBuilder_ != null) { - return intervalSizesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(intervalSizes_); - } - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder addIntervalSizesBuilder() { - return getIntervalSizesFieldBuilder().addBuilder( - com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance()); - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder addIntervalSizesBuilder( - int index) { - return getIntervalSizesFieldBuilder().addBuilder( - index, com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance()); - } - /** - * <pre> - * The size of each interval, as a time duration. Must have at least one - * element. - * </pre> - * - * <code>repeated .google.instrumentation.Duration interval_sizes = 2;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.Duration.Builder> - getIntervalSizesBuilderList() { - return getIntervalSizesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Duration, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder, com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder> - getIntervalSizesFieldBuilder() { - if (intervalSizesBuilder_ == null) { - intervalSizesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Duration, com.google.instrumentation.stats.proto.CensusProto.Duration.Builder, com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder>( - intervalSizes_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - intervalSizes_ = null; - } - return intervalSizesBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.IntervalAggregationDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.IntervalAggregationDescriptor) - private static final com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<IntervalAggregationDescriptor> - PARSER = new com.google.protobuf.AbstractParser<IntervalAggregationDescriptor>() { - public IntervalAggregationDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IntervalAggregationDescriptor(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<IntervalAggregationDescriptor> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<IntervalAggregationDescriptor> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface TagOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.Tag) - com.google.protobuf.MessageOrBuilder { - - /** - * <code>string key = 1;</code> - */ - java.lang.String getKey(); - /** - * <code>string key = 1;</code> - */ - com.google.protobuf.ByteString - getKeyBytes(); - - /** - * <code>string value = 2;</code> - */ - java.lang.String getValue(); - /** - * <code>string value = 2;</code> - */ - com.google.protobuf.ByteString - getValueBytes(); - } - /** - * <pre> - * A Tag: key-value pair. - * </pre> - * - * Protobuf type {@code google.instrumentation.Tag} - */ - public static final class Tag extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.Tag) - TagOrBuilder { - private static final long serialVersionUID = 0L; - // Use Tag.newBuilder() to construct. - private Tag(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private Tag() { - key_ = ""; - value_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private Tag( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Tag_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Tag_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.Tag.class, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder.class); - } - - public static final int KEY_FIELD_NUMBER = 1; - private volatile java.lang.Object key_; - /** - * <code>string key = 1;</code> - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } - } - /** - * <code>string key = 1;</code> - */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; - /** - * <code>string value = 2;</code> - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } - } - /** - * <code>string value = 2;</code> - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getKeyBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_); - } - if (!getValueBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getKeyBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_); - } - if (!getValueBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); - } - 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 com.google.instrumentation.stats.proto.CensusProto.Tag)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.Tag other = (com.google.instrumentation.stats.proto.CensusProto.Tag) obj; - - boolean result = true; - result = result && getKey() - .equals(other.getKey()); - result = result && getValue() - .equals(other.getValue()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + KEY_FIELD_NUMBER; - hash = (53 * hash) + getKey().hashCode(); - hash = (37 * hash) + VALUE_FIELD_NUMBER; - hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag 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 com.google.instrumentation.stats.proto.CensusProto.Tag parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag 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 com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.Tag parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.Tag prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * A Tag: key-value pair. - * </pre> - * - * Protobuf type {@code google.instrumentation.Tag} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.Tag) - com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Tag_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Tag_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.Tag.class, com.google.instrumentation.stats.proto.CensusProto.Tag.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.Tag.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - key_ = ""; - - value_ = ""; - - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_Tag_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.Tag getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.Tag build() { - com.google.instrumentation.stats.proto.CensusProto.Tag result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.Tag buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.Tag result = new com.google.instrumentation.stats.proto.CensusProto.Tag(this); - result.key_ = key_; - result.value_ = value_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.Tag) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.Tag)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.Tag other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()) return this; - if (!other.getKey().isEmpty()) { - key_ = other.key_; - onChanged(); - } - if (!other.getValue().isEmpty()) { - value_ = other.value_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.Tag parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.Tag) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object key_ = ""; - /** - * <code>string key = 1;</code> - */ - public java.lang.String getKey() { - java.lang.Object ref = key_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - key_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <code>string key = 1;</code> - */ - public com.google.protobuf.ByteString - getKeyBytes() { - java.lang.Object ref = key_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - key_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <code>string key = 1;</code> - */ - public Builder setKey( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - key_ = value; - onChanged(); - return this; - } - /** - * <code>string key = 1;</code> - */ - public Builder clearKey() { - - key_ = getDefaultInstance().getKey(); - onChanged(); - return this; - } - /** - * <code>string key = 1;</code> - */ - public Builder setKeyBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - key_ = value; - onChanged(); - return this; - } - - private java.lang.Object value_ = ""; - /** - * <code>string value = 2;</code> - */ - public java.lang.String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - value_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <code>string value = 2;</code> - */ - public com.google.protobuf.ByteString - getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <code>string value = 2;</code> - */ - public Builder setValue( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - value_ = value; - onChanged(); - return this; - } - /** - * <code>string value = 2;</code> - */ - public Builder clearValue() { - - value_ = getDefaultInstance().getValue(); - onChanged(); - return this; - } - /** - * <code>string value = 2;</code> - */ - public Builder setValueBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - value_ = value; - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.Tag) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.Tag) - private static final com.google.instrumentation.stats.proto.CensusProto.Tag DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.Tag(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.Tag getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<Tag> - PARSER = new com.google.protobuf.AbstractParser<Tag>() { - public Tag parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Tag(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<Tag> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<Tag> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.Tag getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ViewDescriptorOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.ViewDescriptor) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - java.lang.String getName(); - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - com.google.protobuf.ByteString - getNameBytes(); - - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - java.lang.String getDescription(); - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - com.google.protobuf.ByteString - getDescriptionBytes(); - - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - java.lang.String getMeasurementDescriptorName(); - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - com.google.protobuf.ByteString - getMeasurementDescriptorNameBytes(); - - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - boolean hasIntervalAggregation(); - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getIntervalAggregation(); - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder getIntervalAggregationOrBuilder(); - - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - boolean hasDistributionAggregation(); - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDistributionAggregation(); - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder getDistributionAggregationOrBuilder(); - - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - java.util.List<java.lang.String> - getTagKeysList(); - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - int getTagKeysCount(); - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - java.lang.String getTagKeys(int index); - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - com.google.protobuf.ByteString - getTagKeysBytes(int index); - - public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.AggregationCase getAggregationCase(); - } - /** - * <pre> - * A ViewDescriptor specifies an AggregationDescriptor and a set of tag - * keys. Views instantiated from this descriptor will contain Aggregations - * broken down by the unique set of matching tag values for each measurement. - * </pre> - * - * Protobuf type {@code google.instrumentation.ViewDescriptor} - */ - public static final class ViewDescriptor extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.ViewDescriptor) - ViewDescriptorOrBuilder { - private static final long serialVersionUID = 0L; - // Use ViewDescriptor.newBuilder() to construct. - private ViewDescriptor(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private ViewDescriptor() { - name_ = ""; - description_ = ""; - measurementDescriptorName_ = ""; - tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ViewDescriptor( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - measurementDescriptorName_ = s; - break; - } - case 34: { - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder subBuilder = null; - if (aggregationCase_ == 4) { - subBuilder = ((com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_).toBuilder(); - } - aggregation_ = - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_); - aggregation_ = subBuilder.buildPartial(); - } - aggregationCase_ = 4; - break; - } - case 42: { - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder subBuilder = null; - if (aggregationCase_ == 5) { - subBuilder = ((com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_).toBuilder(); - } - aggregation_ = - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_); - aggregation_ = subBuilder.buildPartial(); - } - aggregationCase_ = 5; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { - tagKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - tagKeys_.add(s); - 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_ & 0x00000020) == 0x00000020)) { - tagKeys_ = tagKeys_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_ViewDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_ViewDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder.class); - } - - private int bitField0_; - private int aggregationCase_ = 0; - private java.lang.Object aggregation_; - public enum AggregationCase - implements com.google.protobuf.Internal.EnumLite { - INTERVAL_AGGREGATION(4), - DISTRIBUTION_AGGREGATION(5), - AGGREGATION_NOT_SET(0); - private final int value; - private AggregationCase(int value) { - this.value = value; - } - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static AggregationCase valueOf(int value) { - return forNumber(value); - } - - public static AggregationCase forNumber(int value) { - switch (value) { - case 4: return INTERVAL_AGGREGATION; - case 5: return DISTRIBUTION_AGGREGATION; - case 0: return AGGREGATION_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public AggregationCase - getAggregationCase() { - return AggregationCase.forNumber( - aggregationCase_); - } - - public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } - } - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DESCRIPTION_FIELD_NUMBER = 2; - private volatile java.lang.Object description_; - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } - } - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int MEASUREMENT_DESCRIPTOR_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object measurementDescriptorName_; - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public java.lang.String getMeasurementDescriptorName() { - java.lang.Object ref = measurementDescriptorName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - measurementDescriptorName_ = s; - return s; - } - } - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public com.google.protobuf.ByteString - getMeasurementDescriptorNameBytes() { - java.lang.Object ref = measurementDescriptorName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - measurementDescriptorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int INTERVAL_AGGREGATION_FIELD_NUMBER = 4; - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public boolean hasIntervalAggregation() { - return aggregationCase_ == 4; - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getIntervalAggregation() { - if (aggregationCase_ == 4) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder getIntervalAggregationOrBuilder() { - if (aggregationCase_ == 4) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } - - public static final int DISTRIBUTION_AGGREGATION_FIELD_NUMBER = 5; - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public boolean hasDistributionAggregation() { - return aggregationCase_ == 5; - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDistributionAggregation() { - if (aggregationCase_ == 5) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder getDistributionAggregationOrBuilder() { - if (aggregationCase_ == 5) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } - - public static final int TAG_KEYS_FIELD_NUMBER = 6; - private com.google.protobuf.LazyStringList tagKeys_; - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public com.google.protobuf.ProtocolStringList - getTagKeysList() { - return tagKeys_; - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public int getTagKeysCount() { - return tagKeys_.size(); - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public java.lang.String getTagKeys(int index) { - return tagKeys_.get(index); - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public com.google.protobuf.ByteString - getTagKeysBytes(int index) { - return tagKeys_.getByteString(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); - } - if (!getDescriptionBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); - } - if (!getMeasurementDescriptorNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, measurementDescriptorName_); - } - if (aggregationCase_ == 4) { - output.writeMessage(4, (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_); - } - if (aggregationCase_ == 5) { - output.writeMessage(5, (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_); - } - for (int i = 0; i < tagKeys_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 6, tagKeys_.getRaw(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); - } - if (!getDescriptionBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); - } - if (!getMeasurementDescriptorNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, measurementDescriptorName_); - } - if (aggregationCase_ == 4) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_); - } - if (aggregationCase_ == 5) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_); - } - { - int dataSize = 0; - for (int i = 0; i < tagKeys_.size(); i++) { - dataSize += computeStringSizeNoTag(tagKeys_.getRaw(i)); - } - size += dataSize; - size += 1 * getTagKeysList().size(); - } - 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 com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor other = (com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor) obj; - - boolean result = true; - result = result && getName() - .equals(other.getName()); - result = result && getDescription() - .equals(other.getDescription()); - result = result && getMeasurementDescriptorName() - .equals(other.getMeasurementDescriptorName()); - result = result && getTagKeysList() - .equals(other.getTagKeysList()); - result = result && getAggregationCase().equals( - other.getAggregationCase()); - if (!result) return false; - switch (aggregationCase_) { - case 4: - result = result && getIntervalAggregation() - .equals(other.getIntervalAggregation()); - break; - case 5: - result = result && getDistributionAggregation() - .equals(other.getDistributionAggregation()); - break; - case 0: - default: - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + NAME_FIELD_NUMBER; - hash = (53 * hash) + getName().hashCode(); - hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; - hash = (53 * hash) + getDescription().hashCode(); - hash = (37 * hash) + MEASUREMENT_DESCRIPTOR_NAME_FIELD_NUMBER; - hash = (53 * hash) + getMeasurementDescriptorName().hashCode(); - if (getTagKeysCount() > 0) { - hash = (37 * hash) + TAG_KEYS_FIELD_NUMBER; - hash = (53 * hash) + getTagKeysList().hashCode(); - } - switch (aggregationCase_) { - case 4: - hash = (37 * hash) + INTERVAL_AGGREGATION_FIELD_NUMBER; - hash = (53 * hash) + getIntervalAggregation().hashCode(); - break; - case 5: - hash = (37 * hash) + DISTRIBUTION_AGGREGATION_FIELD_NUMBER; - hash = (53 * hash) + getDistributionAggregation().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor 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 com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * A ViewDescriptor specifies an AggregationDescriptor and a set of tag - * keys. Views instantiated from this descriptor will contain Aggregations - * broken down by the unique set of matching tag values for each measurement. - * </pre> - * - * Protobuf type {@code google.instrumentation.ViewDescriptor} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.ViewDescriptor) - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_ViewDescriptor_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_ViewDescriptor_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.class, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - name_ = ""; - - description_ = ""; - - measurementDescriptorName_ = ""; - - tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - aggregationCase_ = 0; - aggregation_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_ViewDescriptor_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor build() { - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor result = new com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - result.description_ = description_; - result.measurementDescriptorName_ = measurementDescriptorName_; - if (aggregationCase_ == 4) { - if (intervalAggregationBuilder_ == null) { - result.aggregation_ = aggregation_; - } else { - result.aggregation_ = intervalAggregationBuilder_.build(); - } - } - if (aggregationCase_ == 5) { - if (distributionAggregationBuilder_ == null) { - result.aggregation_ = aggregation_; - } else { - result.aggregation_ = distributionAggregationBuilder_.build(); - } - } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - tagKeys_ = tagKeys_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.tagKeys_ = tagKeys_; - result.bitField0_ = to_bitField0_; - result.aggregationCase_ = aggregationCase_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.getDefaultInstance()) return this; - if (!other.getName().isEmpty()) { - name_ = other.name_; - onChanged(); - } - if (!other.getDescription().isEmpty()) { - description_ = other.description_; - onChanged(); - } - if (!other.getMeasurementDescriptorName().isEmpty()) { - measurementDescriptorName_ = other.measurementDescriptorName_; - onChanged(); - } - if (!other.tagKeys_.isEmpty()) { - if (tagKeys_.isEmpty()) { - tagKeys_ = other.tagKeys_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureTagKeysIsMutable(); - tagKeys_.addAll(other.tagKeys_); - } - onChanged(); - } - switch (other.getAggregationCase()) { - case INTERVAL_AGGREGATION: { - mergeIntervalAggregation(other.getIntervalAggregation()); - break; - } - case DISTRIBUTION_AGGREGATION: { - mergeDistributionAggregation(other.getDistributionAggregation()); - break; - } - case AGGREGATION_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int aggregationCase_ = 0; - private java.lang.Object aggregation_; - public AggregationCase - getAggregationCase() { - return AggregationCase.forNumber( - aggregationCase_); - } - - public Builder clearAggregation() { - aggregationCase_ = 0; - aggregation_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private java.lang.Object name_ = ""; - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public java.lang.String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - name_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public com.google.protobuf.ByteString - getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public Builder setName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - name_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public Builder clearName() { - - name_ = getDefaultInstance().getName(); - onChanged(); - return this; - } - /** - * <pre> - * Name of view. Must be unique. - * </pre> - * - * <code>string name = 1;</code> - */ - public Builder setNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - name_ = value; - onChanged(); - return this; - } - - private java.lang.Object description_ = ""; - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public java.lang.String getDescription() { - java.lang.Object ref = description_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - description_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public com.google.protobuf.ByteString - getDescriptionBytes() { - java.lang.Object ref = description_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - description_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public Builder setDescription( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - description_ = value; - onChanged(); - return this; - } - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public Builder clearDescription() { - - description_ = getDefaultInstance().getDescription(); - onChanged(); - return this; - } - /** - * <pre> - * More detailed description, for documentation purposes. - * </pre> - * - * <code>string description = 2;</code> - */ - public Builder setDescriptionBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - description_ = value; - onChanged(); - return this; - } - - private java.lang.Object measurementDescriptorName_ = ""; - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public java.lang.String getMeasurementDescriptorName() { - java.lang.Object ref = measurementDescriptorName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - measurementDescriptorName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public com.google.protobuf.ByteString - getMeasurementDescriptorNameBytes() { - java.lang.Object ref = measurementDescriptorName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - measurementDescriptorName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public Builder setMeasurementDescriptorName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - measurementDescriptorName_ = value; - onChanged(); - return this; - } - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public Builder clearMeasurementDescriptorName() { - - measurementDescriptorName_ = getDefaultInstance().getMeasurementDescriptorName(); - onChanged(); - return this; - } - /** - * <pre> - * Name of a MeasurementDescriptor to be used for this view. - * </pre> - * - * <code>string measurement_descriptor_name = 3;</code> - */ - public Builder setMeasurementDescriptorNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - measurementDescriptorName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder> intervalAggregationBuilder_; - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public boolean hasIntervalAggregation() { - return aggregationCase_ == 4; - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getIntervalAggregation() { - if (intervalAggregationBuilder_ == null) { - if (aggregationCase_ == 4) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } else { - if (aggregationCase_ == 4) { - return intervalAggregationBuilder_.getMessage(); - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public Builder setIntervalAggregation(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor value) { - if (intervalAggregationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - aggregation_ = value; - onChanged(); - } else { - intervalAggregationBuilder_.setMessage(value); - } - aggregationCase_ = 4; - return this; - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public Builder setIntervalAggregation( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder builderForValue) { - if (intervalAggregationBuilder_ == null) { - aggregation_ = builderForValue.build(); - onChanged(); - } else { - intervalAggregationBuilder_.setMessage(builderForValue.build()); - } - aggregationCase_ = 4; - return this; - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public Builder mergeIntervalAggregation(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor value) { - if (intervalAggregationBuilder_ == null) { - if (aggregationCase_ == 4 && - aggregation_ != com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance()) { - aggregation_ = com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.newBuilder((com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_) - .mergeFrom(value).buildPartial(); - } else { - aggregation_ = value; - } - onChanged(); - } else { - if (aggregationCase_ == 4) { - intervalAggregationBuilder_.mergeFrom(value); - } - intervalAggregationBuilder_.setMessage(value); - } - aggregationCase_ = 4; - return this; - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public Builder clearIntervalAggregation() { - if (intervalAggregationBuilder_ == null) { - if (aggregationCase_ == 4) { - aggregationCase_ = 0; - aggregation_ = null; - onChanged(); - } - } else { - if (aggregationCase_ == 4) { - aggregationCase_ = 0; - aggregation_ = null; - } - intervalAggregationBuilder_.clear(); - } - return this; - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder getIntervalAggregationBuilder() { - return getIntervalAggregationFieldBuilder().getBuilder(); - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder getIntervalAggregationOrBuilder() { - if ((aggregationCase_ == 4) && (intervalAggregationBuilder_ != null)) { - return intervalAggregationBuilder_.getMessageOrBuilder(); - } else { - if (aggregationCase_ == 4) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder> - getIntervalAggregationFieldBuilder() { - if (intervalAggregationBuilder_ == null) { - if (!(aggregationCase_ == 4)) { - aggregation_ = com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.getDefaultInstance(); - } - intervalAggregationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder>( - (com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor) aggregation_, - getParentForChildren(), - isClean()); - aggregation_ = null; - } - aggregationCase_ = 4; - onChanged();; - return intervalAggregationBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder> distributionAggregationBuilder_; - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public boolean hasDistributionAggregation() { - return aggregationCase_ == 5; - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDistributionAggregation() { - if (distributionAggregationBuilder_ == null) { - if (aggregationCase_ == 5) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } else { - if (aggregationCase_ == 5) { - return distributionAggregationBuilder_.getMessage(); - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public Builder setDistributionAggregation(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor value) { - if (distributionAggregationBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - aggregation_ = value; - onChanged(); - } else { - distributionAggregationBuilder_.setMessage(value); - } - aggregationCase_ = 5; - return this; - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public Builder setDistributionAggregation( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder builderForValue) { - if (distributionAggregationBuilder_ == null) { - aggregation_ = builderForValue.build(); - onChanged(); - } else { - distributionAggregationBuilder_.setMessage(builderForValue.build()); - } - aggregationCase_ = 5; - return this; - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public Builder mergeDistributionAggregation(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor value) { - if (distributionAggregationBuilder_ == null) { - if (aggregationCase_ == 5 && - aggregation_ != com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance()) { - aggregation_ = com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.newBuilder((com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_) - .mergeFrom(value).buildPartial(); - } else { - aggregation_ = value; - } - onChanged(); - } else { - if (aggregationCase_ == 5) { - distributionAggregationBuilder_.mergeFrom(value); - } - distributionAggregationBuilder_.setMessage(value); - } - aggregationCase_ = 5; - return this; - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public Builder clearDistributionAggregation() { - if (distributionAggregationBuilder_ == null) { - if (aggregationCase_ == 5) { - aggregationCase_ = 0; - aggregation_ = null; - onChanged(); - } - } else { - if (aggregationCase_ == 5) { - aggregationCase_ = 0; - aggregation_ = null; - } - distributionAggregationBuilder_.clear(); - } - return this; - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder getDistributionAggregationBuilder() { - return getDistributionAggregationFieldBuilder().getBuilder(); - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder getDistributionAggregationOrBuilder() { - if ((aggregationCase_ == 5) && (distributionAggregationBuilder_ != null)) { - return distributionAggregationBuilder_.getMessageOrBuilder(); - } else { - if (aggregationCase_ == 5) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder> - getDistributionAggregationFieldBuilder() { - if (distributionAggregationBuilder_ == null) { - if (!(aggregationCase_ == 5)) { - aggregation_ = com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.getDefaultInstance(); - } - distributionAggregationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder>( - (com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor) aggregation_, - getParentForChildren(), - isClean()); - aggregation_ = null; - } - aggregationCase_ = 5; - onChanged();; - return distributionAggregationBuilder_; - } - - private com.google.protobuf.LazyStringList tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureTagKeysIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - tagKeys_ = new com.google.protobuf.LazyStringArrayList(tagKeys_); - bitField0_ |= 0x00000020; - } - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public com.google.protobuf.ProtocolStringList - getTagKeysList() { - return tagKeys_.getUnmodifiableView(); - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public int getTagKeysCount() { - return tagKeys_.size(); - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public java.lang.String getTagKeys(int index) { - return tagKeys_.get(index); - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public com.google.protobuf.ByteString - getTagKeysBytes(int index) { - return tagKeys_.getByteString(index); - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public Builder setTagKeys( - int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagKeysIsMutable(); - tagKeys_.set(index, value); - onChanged(); - return this; - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public Builder addTagKeys( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTagKeysIsMutable(); - tagKeys_.add(value); - onChanged(); - return this; - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public Builder addAllTagKeys( - java.lang.Iterable<java.lang.String> values) { - ensureTagKeysIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, tagKeys_); - onChanged(); - return this; - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public Builder clearTagKeys() { - tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - return this; - } - /** - * <pre> - * Tag keys to match with a given measurement. If no keys are specified, - * then all stats are recorded. Keys must be unique. - * </pre> - * - * <code>repeated string tag_keys = 6;</code> - */ - public Builder addTagKeysBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureTagKeysIsMutable(); - tagKeys_.add(value); - onChanged(); - return this; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.ViewDescriptor) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.ViewDescriptor) - private static final com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<ViewDescriptor> - PARSER = new com.google.protobuf.AbstractParser<ViewDescriptor>() { - public ViewDescriptor parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ViewDescriptor(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<ViewDescriptor> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<ViewDescriptor> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface DistributionViewOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.DistributionView) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation> - getAggregationsList(); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getAggregations(int index); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - int getAggregationsCount(); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder> - getAggregationsOrBuilderList(); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder getAggregationsOrBuilder( - int index); - - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - boolean hasStart(); - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.Timestamp getStart(); - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getStartOrBuilder(); - - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - boolean hasEnd(); - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.Timestamp getEnd(); - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getEndOrBuilder(); - } - /** - * <pre> - * DistributionView contains all aggregations for a view specified using a - * DistributionAggregationDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.DistributionView} - */ - public static final class DistributionView extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.DistributionView) - DistributionViewOrBuilder { - private static final long serialVersionUID = 0L; - // Use DistributionView.newBuilder() to construct. - private DistributionView(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private DistributionView() { - aggregations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private DistributionView( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aggregations_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation>(); - mutable_bitField0_ |= 0x00000001; - } - aggregations_.add( - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.parser(), extensionRegistry)); - break; - } - case 18: { - com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder subBuilder = null; - if (start_ != null) { - subBuilder = start_.toBuilder(); - } - start_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(start_); - start_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder subBuilder = null; - if (end_ != null) { - subBuilder = end_.toBuilder(); - } - end_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(end_); - end_ = subBuilder.buildPartial(); - } - - 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) == 0x00000001)) { - aggregations_ = java.util.Collections.unmodifiableList(aggregations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionView_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionView_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionView.class, com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder.class); - } - - private int bitField0_; - public static final int AGGREGATIONS_FIELD_NUMBER = 1; - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation> aggregations_; - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation> getAggregationsList() { - return aggregations_; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder> - getAggregationsOrBuilderList() { - return aggregations_; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public int getAggregationsCount() { - return aggregations_.size(); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getAggregations(int index) { - return aggregations_.get(index); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder getAggregationsOrBuilder( - int index) { - return aggregations_.get(index); - } - - public static final int START_FIELD_NUMBER = 2; - private com.google.instrumentation.stats.proto.CensusProto.Timestamp start_; - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public boolean hasStart() { - return start_ != null; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Timestamp getStart() { - return start_ == null ? com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : start_; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getStartOrBuilder() { - return getStart(); - } - - public static final int END_FIELD_NUMBER = 3; - private com.google.instrumentation.stats.proto.CensusProto.Timestamp end_; - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public boolean hasEnd() { - return end_ != null; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Timestamp getEnd() { - return end_ == null ? com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : end_; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getEndOrBuilder() { - return getEnd(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < aggregations_.size(); i++) { - output.writeMessage(1, aggregations_.get(i)); - } - if (start_ != null) { - output.writeMessage(2, getStart()); - } - if (end_ != null) { - output.writeMessage(3, getEnd()); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < aggregations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, aggregations_.get(i)); - } - if (start_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, getStart()); - } - if (end_ != null) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, getEnd()); - } - 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 com.google.instrumentation.stats.proto.CensusProto.DistributionView)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.DistributionView other = (com.google.instrumentation.stats.proto.CensusProto.DistributionView) obj; - - boolean result = true; - result = result && getAggregationsList() - .equals(other.getAggregationsList()); - result = result && (hasStart() == other.hasStart()); - if (hasStart()) { - result = result && getStart() - .equals(other.getStart()); - } - result = result && (hasEnd() == other.hasEnd()); - if (hasEnd()) { - result = result && getEnd() - .equals(other.getEnd()); - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAggregationsCount() > 0) { - hash = (37 * hash) + AGGREGATIONS_FIELD_NUMBER; - hash = (53 * hash) + getAggregationsList().hashCode(); - } - if (hasStart()) { - hash = (37 * hash) + START_FIELD_NUMBER; - hash = (53 * hash) + getStart().hashCode(); - } - if (hasEnd()) { - hash = (37 * hash) + END_FIELD_NUMBER; - hash = (53 * hash) + getEnd().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView 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 com.google.instrumentation.stats.proto.CensusProto.DistributionView parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView 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 com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.DistributionView prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * DistributionView contains all aggregations for a view specified using a - * DistributionAggregationDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.DistributionView} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.DistributionView) - com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionView_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionView_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.DistributionView.class, com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.DistributionView.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAggregationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (aggregationsBuilder_ == null) { - aggregations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - aggregationsBuilder_.clear(); - } - if (startBuilder_ == null) { - start_ = null; - } else { - start_ = null; - startBuilder_ = null; - } - if (endBuilder_ == null) { - end_ = null; - } else { - end_ = null; - endBuilder_ = null; - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_DistributionView_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionView getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionView build() { - com.google.instrumentation.stats.proto.CensusProto.DistributionView result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionView buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.DistributionView result = new com.google.instrumentation.stats.proto.CensusProto.DistributionView(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (aggregationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aggregations_ = java.util.Collections.unmodifiableList(aggregations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aggregations_ = aggregations_; - } else { - result.aggregations_ = aggregationsBuilder_.build(); - } - if (startBuilder_ == null) { - result.start_ = start_; - } else { - result.start_ = startBuilder_.build(); - } - if (endBuilder_ == null) { - result.end_ = end_; - } else { - result.end_ = endBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.DistributionView) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.DistributionView)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.DistributionView other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance()) return this; - if (aggregationsBuilder_ == null) { - if (!other.aggregations_.isEmpty()) { - if (aggregations_.isEmpty()) { - aggregations_ = other.aggregations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAggregationsIsMutable(); - aggregations_.addAll(other.aggregations_); - } - onChanged(); - } - } else { - if (!other.aggregations_.isEmpty()) { - if (aggregationsBuilder_.isEmpty()) { - aggregationsBuilder_.dispose(); - aggregationsBuilder_ = null; - aggregations_ = other.aggregations_; - bitField0_ = (bitField0_ & ~0x00000001); - aggregationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAggregationsFieldBuilder() : null; - } else { - aggregationsBuilder_.addAllMessages(other.aggregations_); - } - } - } - if (other.hasStart()) { - mergeStart(other.getStart()); - } - if (other.hasEnd()) { - mergeEnd(other.getEnd()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.DistributionView parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.DistributionView) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation> aggregations_ = - java.util.Collections.emptyList(); - private void ensureAggregationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aggregations_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation>(aggregations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder> aggregationsBuilder_; - - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation> getAggregationsList() { - if (aggregationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(aggregations_); - } else { - return aggregationsBuilder_.getMessageList(); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public int getAggregationsCount() { - if (aggregationsBuilder_ == null) { - return aggregations_.size(); - } else { - return aggregationsBuilder_.getCount(); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getAggregations(int index) { - if (aggregationsBuilder_ == null) { - return aggregations_.get(index); - } else { - return aggregationsBuilder_.getMessage(index); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder setAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation value) { - if (aggregationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAggregationsIsMutable(); - aggregations_.set(index, value); - onChanged(); - } else { - aggregationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder setAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder builderForValue) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.set(index, builderForValue.build()); - onChanged(); - } else { - aggregationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder addAggregations(com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation value) { - if (aggregationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAggregationsIsMutable(); - aggregations_.add(value); - onChanged(); - } else { - aggregationsBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder addAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation value) { - if (aggregationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAggregationsIsMutable(); - aggregations_.add(index, value); - onChanged(); - } else { - aggregationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder addAggregations( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder builderForValue) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.add(builderForValue.build()); - onChanged(); - } else { - aggregationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder addAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder builderForValue) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.add(index, builderForValue.build()); - onChanged(); - } else { - aggregationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder addAllAggregations( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation> values) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aggregations_); - onChanged(); - } else { - aggregationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder clearAggregations() { - if (aggregationsBuilder_ == null) { - aggregations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - aggregationsBuilder_.clear(); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public Builder removeAggregations(int index) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.remove(index); - onChanged(); - } else { - aggregationsBuilder_.remove(index); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder getAggregationsBuilder( - int index) { - return getAggregationsFieldBuilder().getBuilder(index); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder getAggregationsOrBuilder( - int index) { - if (aggregationsBuilder_ == null) { - return aggregations_.get(index); } else { - return aggregationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder> - getAggregationsOrBuilderList() { - if (aggregationsBuilder_ != null) { - return aggregationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(aggregations_); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder addAggregationsBuilder() { - return getAggregationsFieldBuilder().addBuilder( - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.getDefaultInstance()); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder addAggregationsBuilder( - int index) { - return getAggregationsFieldBuilder().addBuilder( - index, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.getDefaultInstance()); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.DistributionAggregation aggregations = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder> - getAggregationsBuilderList() { - return getAggregationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder> - getAggregationsFieldBuilder() { - if (aggregationsBuilder_ == null) { - aggregationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder>( - aggregations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - aggregations_ = null; - } - return aggregationsBuilder_; - } - - private com.google.instrumentation.stats.proto.CensusProto.Timestamp start_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Timestamp, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder, com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder> startBuilder_; - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public boolean hasStart() { - return startBuilder_ != null || start_ != null; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Timestamp getStart() { - if (startBuilder_ == null) { - return start_ == null ? com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : start_; - } else { - return startBuilder_.getMessage(); - } - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public Builder setStart(com.google.instrumentation.stats.proto.CensusProto.Timestamp value) { - if (startBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - start_ = value; - onChanged(); - } else { - startBuilder_.setMessage(value); - } - - return this; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public Builder setStart( - com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder builderForValue) { - if (startBuilder_ == null) { - start_ = builderForValue.build(); - onChanged(); - } else { - startBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public Builder mergeStart(com.google.instrumentation.stats.proto.CensusProto.Timestamp value) { - if (startBuilder_ == null) { - if (start_ != null) { - start_ = - com.google.instrumentation.stats.proto.CensusProto.Timestamp.newBuilder(start_).mergeFrom(value).buildPartial(); - } else { - start_ = value; - } - onChanged(); - } else { - startBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public Builder clearStart() { - if (startBuilder_ == null) { - start_ = null; - onChanged(); - } else { - start_ = null; - startBuilder_ = null; - } - - return this; - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder getStartBuilder() { - - onChanged(); - return getStartFieldBuilder().getBuilder(); - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getStartOrBuilder() { - if (startBuilder_ != null) { - return startBuilder_.getMessageOrBuilder(); - } else { - return start_ == null ? - com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : start_; - } - } - /** - * <pre> - * Start and end timestamps over which aggregations was accumulated. - * </pre> - * - * <code>.google.instrumentation.Timestamp start = 2;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Timestamp, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder, com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder> - getStartFieldBuilder() { - if (startBuilder_ == null) { - startBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Timestamp, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder, com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder>( - getStart(), - getParentForChildren(), - isClean()); - start_ = null; - } - return startBuilder_; - } - - private com.google.instrumentation.stats.proto.CensusProto.Timestamp end_ = null; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Timestamp, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder, com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder> endBuilder_; - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public boolean hasEnd() { - return endBuilder_ != null || end_ != null; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Timestamp getEnd() { - if (endBuilder_ == null) { - return end_ == null ? com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : end_; - } else { - return endBuilder_.getMessage(); - } - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public Builder setEnd(com.google.instrumentation.stats.proto.CensusProto.Timestamp value) { - if (endBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - end_ = value; - onChanged(); - } else { - endBuilder_.setMessage(value); - } - - return this; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public Builder setEnd( - com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder builderForValue) { - if (endBuilder_ == null) { - end_ = builderForValue.build(); - onChanged(); - } else { - endBuilder_.setMessage(builderForValue.build()); - } - - return this; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public Builder mergeEnd(com.google.instrumentation.stats.proto.CensusProto.Timestamp value) { - if (endBuilder_ == null) { - if (end_ != null) { - end_ = - com.google.instrumentation.stats.proto.CensusProto.Timestamp.newBuilder(end_).mergeFrom(value).buildPartial(); - } else { - end_ = value; - } - onChanged(); - } else { - endBuilder_.mergeFrom(value); - } - - return this; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public Builder clearEnd() { - if (endBuilder_ == null) { - end_ = null; - onChanged(); - } else { - end_ = null; - endBuilder_ = null; - } - - return this; - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder getEndBuilder() { - - onChanged(); - return getEndFieldBuilder().getBuilder(); - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getEndOrBuilder() { - if (endBuilder_ != null) { - return endBuilder_.getMessageOrBuilder(); - } else { - return end_ == null ? - com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : end_; - } - } - /** - * <code>.google.instrumentation.Timestamp end = 3;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Timestamp, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder, com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder> - getEndFieldBuilder() { - if (endBuilder_ == null) { - endBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.Timestamp, com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder, com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder>( - getEnd(), - getParentForChildren(), - isClean()); - end_ = null; - } - return endBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.DistributionView) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.DistributionView) - private static final com.google.instrumentation.stats.proto.CensusProto.DistributionView DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.DistributionView(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.DistributionView getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<DistributionView> - PARSER = new com.google.protobuf.AbstractParser<DistributionView>() { - public DistributionView parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new DistributionView(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<DistributionView> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<DistributionView> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.DistributionView getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface IntervalViewOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.IntervalView) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation> - getAggregationsList(); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getAggregations(int index); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - int getAggregationsCount(); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder> - getAggregationsOrBuilderList(); - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder getAggregationsOrBuilder( - int index); - } - /** - * <pre> - * IntervalView contains all aggregations for a view specified using a - * IntervalAggregationDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalView} - */ - public static final class IntervalView extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.IntervalView) - IntervalViewOrBuilder { - private static final long serialVersionUID = 0L; - // Use IntervalView.newBuilder() to construct. - private IntervalView(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private IntervalView() { - aggregations_ = java.util.Collections.emptyList(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private IntervalView( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aggregations_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation>(); - mutable_bitField0_ |= 0x00000001; - } - aggregations_.add( - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.parser(), extensionRegistry)); - 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) == 0x00000001)) { - aggregations_ = java.util.Collections.unmodifiableList(aggregations_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalView_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalView_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalView.class, com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder.class); - } - - public static final int AGGREGATIONS_FIELD_NUMBER = 1; - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation> aggregations_; - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation> getAggregationsList() { - return aggregations_; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder> - getAggregationsOrBuilderList() { - return aggregations_; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public int getAggregationsCount() { - return aggregations_.size(); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getAggregations(int index) { - return aggregations_.get(index); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder getAggregationsOrBuilder( - int index) { - return aggregations_.get(index); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - for (int i = 0; i < aggregations_.size(); i++) { - output.writeMessage(1, aggregations_.get(i)); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < aggregations_.size(); i++) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(1, aggregations_.get(i)); - } - 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 com.google.instrumentation.stats.proto.CensusProto.IntervalView)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.IntervalView other = (com.google.instrumentation.stats.proto.CensusProto.IntervalView) obj; - - boolean result = true; - result = result && getAggregationsList() - .equals(other.getAggregationsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getAggregationsCount() > 0) { - hash = (37 * hash) + AGGREGATIONS_FIELD_NUMBER; - hash = (53 * hash) + getAggregationsList().hashCode(); - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView 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 com.google.instrumentation.stats.proto.CensusProto.IntervalView parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView 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 com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.IntervalView prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * IntervalView contains all aggregations for a view specified using a - * IntervalAggregationDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.IntervalView} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.IntervalView) - com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalView_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalView_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.IntervalView.class, com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.IntervalView.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getAggregationsFieldBuilder(); - } - } - public Builder clear() { - super.clear(); - if (aggregationsBuilder_ == null) { - aggregations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - aggregationsBuilder_.clear(); - } - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_IntervalView_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalView getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalView build() { - com.google.instrumentation.stats.proto.CensusProto.IntervalView result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalView buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.IntervalView result = new com.google.instrumentation.stats.proto.CensusProto.IntervalView(this); - int from_bitField0_ = bitField0_; - if (aggregationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aggregations_ = java.util.Collections.unmodifiableList(aggregations_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.aggregations_ = aggregations_; - } else { - result.aggregations_ = aggregationsBuilder_.build(); - } - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.IntervalView) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.IntervalView)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.IntervalView other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance()) return this; - if (aggregationsBuilder_ == null) { - if (!other.aggregations_.isEmpty()) { - if (aggregations_.isEmpty()) { - aggregations_ = other.aggregations_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAggregationsIsMutable(); - aggregations_.addAll(other.aggregations_); - } - onChanged(); - } - } else { - if (!other.aggregations_.isEmpty()) { - if (aggregationsBuilder_.isEmpty()) { - aggregationsBuilder_.dispose(); - aggregationsBuilder_ = null; - aggregations_ = other.aggregations_; - bitField0_ = (bitField0_ & ~0x00000001); - aggregationsBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? - getAggregationsFieldBuilder() : null; - } else { - aggregationsBuilder_.addAllMessages(other.aggregations_); - } - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.IntervalView parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.IntervalView) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int bitField0_; - - private java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation> aggregations_ = - java.util.Collections.emptyList(); - private void ensureAggregationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aggregations_ = new java.util.ArrayList<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation>(aggregations_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder> aggregationsBuilder_; - - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation> getAggregationsList() { - if (aggregationsBuilder_ == null) { - return java.util.Collections.unmodifiableList(aggregations_); - } else { - return aggregationsBuilder_.getMessageList(); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public int getAggregationsCount() { - if (aggregationsBuilder_ == null) { - return aggregations_.size(); - } else { - return aggregationsBuilder_.getCount(); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getAggregations(int index) { - if (aggregationsBuilder_ == null) { - return aggregations_.get(index); - } else { - return aggregationsBuilder_.getMessage(index); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder setAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation value) { - if (aggregationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAggregationsIsMutable(); - aggregations_.set(index, value); - onChanged(); - } else { - aggregationsBuilder_.setMessage(index, value); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder setAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder builderForValue) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.set(index, builderForValue.build()); - onChanged(); - } else { - aggregationsBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder addAggregations(com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation value) { - if (aggregationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAggregationsIsMutable(); - aggregations_.add(value); - onChanged(); - } else { - aggregationsBuilder_.addMessage(value); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder addAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation value) { - if (aggregationsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAggregationsIsMutable(); - aggregations_.add(index, value); - onChanged(); - } else { - aggregationsBuilder_.addMessage(index, value); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder addAggregations( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder builderForValue) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.add(builderForValue.build()); - onChanged(); - } else { - aggregationsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder addAggregations( - int index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder builderForValue) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.add(index, builderForValue.build()); - onChanged(); - } else { - aggregationsBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder addAllAggregations( - java.lang.Iterable<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation> values) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll( - values, aggregations_); - onChanged(); - } else { - aggregationsBuilder_.addAllMessages(values); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder clearAggregations() { - if (aggregationsBuilder_ == null) { - aggregations_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - aggregationsBuilder_.clear(); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public Builder removeAggregations(int index) { - if (aggregationsBuilder_ == null) { - ensureAggregationsIsMutable(); - aggregations_.remove(index); - onChanged(); - } else { - aggregationsBuilder_.remove(index); - } - return this; - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder getAggregationsBuilder( - int index) { - return getAggregationsFieldBuilder().getBuilder(index); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder getAggregationsOrBuilder( - int index) { - if (aggregationsBuilder_ == null) { - return aggregations_.get(index); } else { - return aggregationsBuilder_.getMessageOrBuilder(index); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public java.util.List<? extends com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder> - getAggregationsOrBuilderList() { - if (aggregationsBuilder_ != null) { - return aggregationsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(aggregations_); - } - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder addAggregationsBuilder() { - return getAggregationsFieldBuilder().addBuilder( - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.getDefaultInstance()); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder addAggregationsBuilder( - int index) { - return getAggregationsFieldBuilder().addBuilder( - index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.getDefaultInstance()); - } - /** - * <pre> - * Aggregations - each will have a unique set of tag values for the tag_keys - * associated with the corresponding View. - * </pre> - * - * <code>repeated .google.instrumentation.IntervalAggregation aggregations = 1;</code> - */ - public java.util.List<com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder> - getAggregationsBuilderList() { - return getAggregationsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder> - getAggregationsFieldBuilder() { - if (aggregationsBuilder_ == null) { - aggregationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder>( - aggregations_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - aggregations_ = null; - } - return aggregationsBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.IntervalView) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.IntervalView) - private static final com.google.instrumentation.stats.proto.CensusProto.IntervalView DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.IntervalView(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.IntervalView getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<IntervalView> - PARSER = new com.google.protobuf.AbstractParser<IntervalView>() { - public IntervalView parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new IntervalView(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<IntervalView> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<IntervalView> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.IntervalView getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - public interface ViewOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.instrumentation.View) - com.google.protobuf.MessageOrBuilder { - - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - java.lang.String getViewName(); - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - com.google.protobuf.ByteString - getViewNameBytes(); - - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - boolean hasDistributionView(); - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionView getDistributionView(); - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder getDistributionViewOrBuilder(); - - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - boolean hasIntervalView(); - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalView getIntervalView(); - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder getIntervalViewOrBuilder(); - - public com.google.instrumentation.stats.proto.CensusProto.View.ViewCase getViewCase(); - } - /** - * <pre> - * A View contains the aggregations based on a ViewDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.View} - */ - public static final class View extends - com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.instrumentation.View) - ViewOrBuilder { - private static final long serialVersionUID = 0L; - // Use View.newBuilder() to construct. - private View(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { - super(builder); - } - private View() { - viewName_ = ""; - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private View( - 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; - default: { - if (!parseUnknownFieldProto3( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - viewName_ = s; - break; - } - case 18: { - com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder subBuilder = null; - if (viewCase_ == 2) { - subBuilder = ((com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_).toBuilder(); - } - view_ = - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.DistributionView.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_); - view_ = subBuilder.buildPartial(); - } - viewCase_ = 2; - break; - } - case 26: { - com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder subBuilder = null; - if (viewCase_ == 3) { - subBuilder = ((com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_).toBuilder(); - } - view_ = - input.readMessage(com.google.instrumentation.stats.proto.CensusProto.IntervalView.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_); - view_ = subBuilder.buildPartial(); - } - viewCase_ = 3; - 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 { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_View_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_View_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.View.class, com.google.instrumentation.stats.proto.CensusProto.View.Builder.class); - } - - private int viewCase_ = 0; - private java.lang.Object view_; - public enum ViewCase - implements com.google.protobuf.Internal.EnumLite { - DISTRIBUTION_VIEW(2), - INTERVAL_VIEW(3), - VIEW_NOT_SET(0); - private final int value; - private ViewCase(int value) { - this.value = value; - } - /** - * @deprecated Use {@link #forNumber(int)} instead. - */ - @java.lang.Deprecated - public static ViewCase valueOf(int value) { - return forNumber(value); - } - - public static ViewCase forNumber(int value) { - switch (value) { - case 2: return DISTRIBUTION_VIEW; - case 3: return INTERVAL_VIEW; - case 0: return VIEW_NOT_SET; - default: return null; - } - } - public int getNumber() { - return this.value; - } - }; - - public ViewCase - getViewCase() { - return ViewCase.forNumber( - viewCase_); - } - - public static final int VIEW_NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object viewName_; - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public java.lang.String getViewName() { - java.lang.Object ref = viewName_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - viewName_ = s; - return s; - } - } - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public com.google.protobuf.ByteString - getViewNameBytes() { - java.lang.Object ref = viewName_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - viewName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int DISTRIBUTION_VIEW_FIELD_NUMBER = 2; - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public boolean hasDistributionView() { - return viewCase_ == 2; - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionView getDistributionView() { - if (viewCase_ == 2) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder getDistributionViewOrBuilder() { - if (viewCase_ == 2) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } - - public static final int INTERVAL_VIEW_FIELD_NUMBER = 3; - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public boolean hasIntervalView() { - return viewCase_ == 3; - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalView getIntervalView() { - if (viewCase_ == 3) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder getIntervalViewOrBuilder() { - if (viewCase_ == 3) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } - - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - public void writeTo(com.google.protobuf.CodedOutputStream output) - throws java.io.IOException { - if (!getViewNameBytes().isEmpty()) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, viewName_); - } - if (viewCase_ == 2) { - output.writeMessage(2, (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_); - } - if (viewCase_ == 3) { - output.writeMessage(3, (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_); - } - unknownFields.writeTo(output); - } - - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!getViewNameBytes().isEmpty()) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, viewName_); - } - if (viewCase_ == 2) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_); - } - if (viewCase_ == 3) { - size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_); - } - 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 com.google.instrumentation.stats.proto.CensusProto.View)) { - return super.equals(obj); - } - com.google.instrumentation.stats.proto.CensusProto.View other = (com.google.instrumentation.stats.proto.CensusProto.View) obj; - - boolean result = true; - result = result && getViewName() - .equals(other.getViewName()); - result = result && getViewCase().equals( - other.getViewCase()); - if (!result) return false; - switch (viewCase_) { - case 2: - result = result && getDistributionView() - .equals(other.getDistributionView()); - break; - case 3: - result = result && getIntervalView() - .equals(other.getIntervalView()); - break; - case 0: - default: - } - result = result && unknownFields.equals(other.unknownFields); - return result; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + VIEW_NAME_FIELD_NUMBER; - hash = (53 * hash) + getViewName().hashCode(); - switch (viewCase_) { - case 2: - hash = (37 * hash) + DISTRIBUTION_VIEW_FIELD_NUMBER; - hash = (53 * hash) + getDistributionView().hashCode(); - break; - case 3: - hash = (37 * hash) + INTERVAL_VIEW_FIELD_NUMBER; - hash = (53 * hash) + getIntervalView().hashCode(); - break; - case 0: - default: - } - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - java.nio.ByteBuffer data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - byte[] data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.View 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 com.google.instrumentation.stats.proto.CensusProto.View parseDelimitedFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseDelimitedWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.View 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 com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - com.google.protobuf.CodedInputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input); - } - public static com.google.instrumentation.stats.proto.CensusProto.View parseFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3 - .parseWithIOException(PARSER, input, extensionRegistry); - } - - public Builder newBuilderForType() { return newBuilder(); } - public static Builder newBuilder() { - return DEFAULT_INSTANCE.toBuilder(); - } - public static Builder newBuilder(com.google.instrumentation.stats.proto.CensusProto.View prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - 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; - } - /** - * <pre> - * A View contains the aggregations based on a ViewDescriptor. - * </pre> - * - * Protobuf type {@code google.instrumentation.View} - */ - public static final class Builder extends - com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements - // @@protoc_insertion_point(builder_implements:google.instrumentation.View) - com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_View_descriptor; - } - - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_View_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.instrumentation.stats.proto.CensusProto.View.class, com.google.instrumentation.stats.proto.CensusProto.View.Builder.class); - } - - // Construct using com.google.instrumentation.stats.proto.CensusProto.View.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder( - com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } - } - public Builder clear() { - super.clear(); - viewName_ = ""; - - viewCase_ = 0; - view_ = null; - return this; - } - - public com.google.protobuf.Descriptors.Descriptor - getDescriptorForType() { - return com.google.instrumentation.stats.proto.CensusProto.internal_static_google_instrumentation_View_descriptor; - } - - public com.google.instrumentation.stats.proto.CensusProto.View getDefaultInstanceForType() { - return com.google.instrumentation.stats.proto.CensusProto.View.getDefaultInstance(); - } - - public com.google.instrumentation.stats.proto.CensusProto.View build() { - com.google.instrumentation.stats.proto.CensusProto.View result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - public com.google.instrumentation.stats.proto.CensusProto.View buildPartial() { - com.google.instrumentation.stats.proto.CensusProto.View result = new com.google.instrumentation.stats.proto.CensusProto.View(this); - result.viewName_ = viewName_; - if (viewCase_ == 2) { - if (distributionViewBuilder_ == null) { - result.view_ = view_; - } else { - result.view_ = distributionViewBuilder_.build(); - } - } - if (viewCase_ == 3) { - if (intervalViewBuilder_ == null) { - result.view_ = view_; - } else { - result.view_ = intervalViewBuilder_.build(); - } - } - result.viewCase_ = viewCase_; - onBuilt(); - return result; - } - - public Builder clone() { - return (Builder) super.clone(); - } - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.setField(field, value); - } - public Builder clearField( - com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); - } - public Builder clearOneof( - com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); - } - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); - } - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, - java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); - } - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.instrumentation.stats.proto.CensusProto.View) { - return mergeFrom((com.google.instrumentation.stats.proto.CensusProto.View)other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.instrumentation.stats.proto.CensusProto.View other) { - if (other == com.google.instrumentation.stats.proto.CensusProto.View.getDefaultInstance()) return this; - if (!other.getViewName().isEmpty()) { - viewName_ = other.viewName_; - onChanged(); - } - switch (other.getViewCase()) { - case DISTRIBUTION_VIEW: { - mergeDistributionView(other.getDistributionView()); - break; - } - case INTERVAL_VIEW: { - mergeIntervalView(other.getIntervalView()); - break; - } - case VIEW_NOT_SET: { - break; - } - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.instrumentation.stats.proto.CensusProto.View parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.instrumentation.stats.proto.CensusProto.View) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - private int viewCase_ = 0; - private java.lang.Object view_; - public ViewCase - getViewCase() { - return ViewCase.forNumber( - viewCase_); - } - - public Builder clearView() { - viewCase_ = 0; - view_ = null; - onChanged(); - return this; - } - - - private java.lang.Object viewName_ = ""; - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public java.lang.String getViewName() { - java.lang.Object ref = viewName_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - viewName_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public com.google.protobuf.ByteString - getViewNameBytes() { - java.lang.Object ref = viewName_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8( - (java.lang.String) ref); - viewName_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public Builder setViewName( - java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - viewName_ = value; - onChanged(); - return this; - } - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public Builder clearViewName() { - - viewName_ = getDefaultInstance().getViewName(); - onChanged(); - return this; - } - /** - * <pre> - * ViewDescriptor name associated with this set of View. - * </pre> - * - * <code>string view_name = 1;</code> - */ - public Builder setViewNameBytes( - com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - viewName_ = value; - onChanged(); - return this; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionView, com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder> distributionViewBuilder_; - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public boolean hasDistributionView() { - return viewCase_ == 2; - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionView getDistributionView() { - if (distributionViewBuilder_ == null) { - if (viewCase_ == 2) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } else { - if (viewCase_ == 2) { - return distributionViewBuilder_.getMessage(); - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public Builder setDistributionView(com.google.instrumentation.stats.proto.CensusProto.DistributionView value) { - if (distributionViewBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - view_ = value; - onChanged(); - } else { - distributionViewBuilder_.setMessage(value); - } - viewCase_ = 2; - return this; - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public Builder setDistributionView( - com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder builderForValue) { - if (distributionViewBuilder_ == null) { - view_ = builderForValue.build(); - onChanged(); - } else { - distributionViewBuilder_.setMessage(builderForValue.build()); - } - viewCase_ = 2; - return this; - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public Builder mergeDistributionView(com.google.instrumentation.stats.proto.CensusProto.DistributionView value) { - if (distributionViewBuilder_ == null) { - if (viewCase_ == 2 && - view_ != com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance()) { - view_ = com.google.instrumentation.stats.proto.CensusProto.DistributionView.newBuilder((com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_) - .mergeFrom(value).buildPartial(); - } else { - view_ = value; - } - onChanged(); - } else { - if (viewCase_ == 2) { - distributionViewBuilder_.mergeFrom(value); - } - distributionViewBuilder_.setMessage(value); - } - viewCase_ = 2; - return this; - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public Builder clearDistributionView() { - if (distributionViewBuilder_ == null) { - if (viewCase_ == 2) { - viewCase_ = 0; - view_ = null; - onChanged(); - } - } else { - if (viewCase_ == 2) { - viewCase_ = 0; - view_ = null; - } - distributionViewBuilder_.clear(); - } - return this; - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder getDistributionViewBuilder() { - return getDistributionViewFieldBuilder().getBuilder(); - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder getDistributionViewOrBuilder() { - if ((viewCase_ == 2) && (distributionViewBuilder_ != null)) { - return distributionViewBuilder_.getMessageOrBuilder(); - } else { - if (viewCase_ == 2) { - return (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.DistributionView distribution_view = 2;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionView, com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder> - getDistributionViewFieldBuilder() { - if (distributionViewBuilder_ == null) { - if (!(viewCase_ == 2)) { - view_ = com.google.instrumentation.stats.proto.CensusProto.DistributionView.getDefaultInstance(); - } - distributionViewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.DistributionView, com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder, com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder>( - (com.google.instrumentation.stats.proto.CensusProto.DistributionView) view_, - getParentForChildren(), - isClean()); - view_ = null; - } - viewCase_ = 2; - onChanged();; - return distributionViewBuilder_; - } - - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalView, com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder> intervalViewBuilder_; - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public boolean hasIntervalView() { - return viewCase_ == 3; - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalView getIntervalView() { - if (intervalViewBuilder_ == null) { - if (viewCase_ == 3) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } else { - if (viewCase_ == 3) { - return intervalViewBuilder_.getMessage(); - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public Builder setIntervalView(com.google.instrumentation.stats.proto.CensusProto.IntervalView value) { - if (intervalViewBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - view_ = value; - onChanged(); - } else { - intervalViewBuilder_.setMessage(value); - } - viewCase_ = 3; - return this; - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public Builder setIntervalView( - com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder builderForValue) { - if (intervalViewBuilder_ == null) { - view_ = builderForValue.build(); - onChanged(); - } else { - intervalViewBuilder_.setMessage(builderForValue.build()); - } - viewCase_ = 3; - return this; - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public Builder mergeIntervalView(com.google.instrumentation.stats.proto.CensusProto.IntervalView value) { - if (intervalViewBuilder_ == null) { - if (viewCase_ == 3 && - view_ != com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance()) { - view_ = com.google.instrumentation.stats.proto.CensusProto.IntervalView.newBuilder((com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_) - .mergeFrom(value).buildPartial(); - } else { - view_ = value; - } - onChanged(); - } else { - if (viewCase_ == 3) { - intervalViewBuilder_.mergeFrom(value); - } - intervalViewBuilder_.setMessage(value); - } - viewCase_ = 3; - return this; - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public Builder clearIntervalView() { - if (intervalViewBuilder_ == null) { - if (viewCase_ == 3) { - viewCase_ = 0; - view_ = null; - onChanged(); - } - } else { - if (viewCase_ == 3) { - viewCase_ = 0; - view_ = null; - } - intervalViewBuilder_.clear(); - } - return this; - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder getIntervalViewBuilder() { - return getIntervalViewFieldBuilder().getBuilder(); - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - public com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder getIntervalViewOrBuilder() { - if ((viewCase_ == 3) && (intervalViewBuilder_ != null)) { - return intervalViewBuilder_.getMessageOrBuilder(); - } else { - if (viewCase_ == 3) { - return (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_; - } - return com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } - } - /** - * <code>.google.instrumentation.IntervalView interval_view = 3;</code> - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalView, com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder> - getIntervalViewFieldBuilder() { - if (intervalViewBuilder_ == null) { - if (!(viewCase_ == 3)) { - view_ = com.google.instrumentation.stats.proto.CensusProto.IntervalView.getDefaultInstance(); - } - intervalViewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< - com.google.instrumentation.stats.proto.CensusProto.IntervalView, com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder, com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder>( - (com.google.instrumentation.stats.proto.CensusProto.IntervalView) view_, - getParentForChildren(), - isClean()); - view_ = null; - } - viewCase_ = 3; - onChanged();; - return intervalViewBuilder_; - } - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); - } - - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - - // @@protoc_insertion_point(builder_scope:google.instrumentation.View) - } - - // @@protoc_insertion_point(class_scope:google.instrumentation.View) - private static final com.google.instrumentation.stats.proto.CensusProto.View DEFAULT_INSTANCE; - static { - DEFAULT_INSTANCE = new com.google.instrumentation.stats.proto.CensusProto.View(); - } - - public static com.google.instrumentation.stats.proto.CensusProto.View getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser<View> - PARSER = new com.google.protobuf.AbstractParser<View>() { - public View parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new View(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser<View> parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser<View> getParserForType() { - return PARSER; - } - - public com.google.instrumentation.stats.proto.CensusProto.View getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - - } - - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_Duration_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_Duration_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_Timestamp_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_Timestamp_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_MeasurementDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_MeasurementDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_DistributionAggregation_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_DistributionAggregation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_DistributionAggregation_Range_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_DistributionAggregation_Range_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_DistributionAggregationDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_DistributionAggregationDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_IntervalAggregation_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_IntervalAggregation_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_IntervalAggregation_Interval_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_IntervalAggregation_Interval_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_IntervalAggregationDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_IntervalAggregationDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_Tag_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_Tag_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_ViewDescriptor_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_ViewDescriptor_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_DistributionView_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_DistributionView_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_IntervalView_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_IntervalView_fieldAccessorTable; - private static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_instrumentation_View_descriptor; - private static final - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_instrumentation_View_fieldAccessorTable; - - public static com.google.protobuf.Descriptors.FileDescriptor - getDescriptor() { - return descriptor; - } - private static com.google.protobuf.Descriptors.FileDescriptor - descriptor; - static { - java.lang.String[] descriptorData = { - "\n#google/instrumentation/census.proto\022\026g" + - "oogle.instrumentation\"*\n\010Duration\022\017\n\007sec" + - "onds\030\001 \001(\003\022\r\n\005nanos\030\002 \001(\005\"+\n\tTimestamp\022\017" + - "\n\007seconds\030\001 \001(\003\022\r\n\005nanos\030\002 \001(\005\"\252\003\n\025Measu" + - "rementDescriptor\022\014\n\004name\030\001 \001(\t\022\023\n\013descri" + - "ption\030\002 \001(\t\022K\n\004unit\030\003 \001(\0132=.google.instr" + - "umentation.MeasurementDescriptor.Measure" + - "mentUnit\032\276\001\n\017MeasurementUnit\022\017\n\007power10\030" + - "\001 \001(\005\022K\n\nnumerators\030\002 \003(\01627.google.instr" + - "umentation.MeasurementDescriptor.BasicUn" + - "it\022M\n\014denominators\030\003 \003(\01627.google.instru" + - "mentation.MeasurementDescriptor.BasicUni" + - "t\"`\n\tBasicUnit\022\013\n\007UNKNOWN\020\000\022\n\n\006SCALAR\020\001\022" + - "\010\n\004BITS\020\002\022\t\n\005BYTES\020\003\022\013\n\007SECONDS\020\004\022\t\n\005COR" + - "ES\020\005\022\r\n\tMAX_UNITS\020\006\"\356\001\n\027DistributionAggr" + - "egation\022\r\n\005count\030\001 \001(\003\022\014\n\004mean\030\002 \001(\001\022\013\n\003" + - "sum\030\003 \001(\001\022D\n\005range\030\004 \001(\01325.google.instru" + - "mentation.DistributionAggregation.Range\022" + - "\025\n\rbucket_counts\030\005 \003(\003\022)\n\004tags\030\006 \003(\0132\033.g" + - "oogle.instrumentation.Tag\032!\n\005Range\022\013\n\003mi" + - "n\030\001 \001(\001\022\013\n\003max\030\002 \001(\001\":\n!DistributionAggr" + - "egationDescriptor\022\025\n\rbucket_bounds\030\001 \003(\001" + - "\"\352\001\n\023IntervalAggregation\022G\n\tintervals\030\001 " + - "\003(\01324.google.instrumentation.IntervalAgg" + - "regation.Interval\022)\n\004tags\030\002 \003(\0132\033.google" + - ".instrumentation.Tag\032_\n\010Interval\0227\n\rinte" + - "rval_size\030\001 \001(\0132 .google.instrumentation" + - ".Duration\022\r\n\005count\030\002 \001(\001\022\013\n\003sum\030\003 \001(\001\"r\n" + - "\035IntervalAggregationDescriptor\022\027\n\017n_sub_" + - "intervals\030\001 \001(\005\0228\n\016interval_sizes\030\002 \003(\0132" + - " .google.instrumentation.Duration\"!\n\003Tag" + - "\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t\"\257\002\n\016ViewDes" + - "criptor\022\014\n\004name\030\001 \001(\t\022\023\n\013description\030\002 \001" + - "(\t\022#\n\033measurement_descriptor_name\030\003 \001(\t\022" + - "U\n\024interval_aggregation\030\004 \001(\01325.google.i" + - "nstrumentation.IntervalAggregationDescri" + - "ptorH\000\022]\n\030distribution_aggregation\030\005 \001(\013" + - "29.google.instrumentation.DistributionAg" + - "gregationDescriptorH\000\022\020\n\010tag_keys\030\006 \003(\tB" + - "\r\n\013aggregation\"\273\001\n\020DistributionView\022E\n\014a" + - "ggregations\030\001 \003(\0132/.google.instrumentati" + - "on.DistributionAggregation\0220\n\005start\030\002 \001(" + - "\0132!.google.instrumentation.Timestamp\022.\n\003" + - "end\030\003 \001(\0132!.google.instrumentation.Times" + - "tamp\"Q\n\014IntervalView\022A\n\014aggregations\030\001 \003" + - "(\0132+.google.instrumentation.IntervalAggr" + - "egation\"\247\001\n\004View\022\021\n\tview_name\030\001 \001(\t\022E\n\021d" + - "istribution_view\030\002 \001(\0132(.google.instrume" + - "ntation.DistributionViewH\000\022=\n\rinterval_v" + - "iew\030\003 \001(\0132$.google.instrumentation.Inter" + - "valViewH\000B\006\n\004viewB5\n&com.google.instrume" + - "ntation.stats.protoB\013CensusProtob\006proto3" - }; - com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = - new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( - com.google.protobuf.Descriptors.FileDescriptor root) { - descriptor = root; - return null; - } - }; - com.google.protobuf.Descriptors.FileDescriptor - .internalBuildGeneratedFileFrom(descriptorData, - new com.google.protobuf.Descriptors.FileDescriptor[] { - }, assigner); - internal_static_google_instrumentation_Duration_descriptor = - getDescriptor().getMessageTypes().get(0); - internal_static_google_instrumentation_Duration_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_Duration_descriptor, - new java.lang.String[] { "Seconds", "Nanos", }); - internal_static_google_instrumentation_Timestamp_descriptor = - getDescriptor().getMessageTypes().get(1); - internal_static_google_instrumentation_Timestamp_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_Timestamp_descriptor, - new java.lang.String[] { "Seconds", "Nanos", }); - internal_static_google_instrumentation_MeasurementDescriptor_descriptor = - getDescriptor().getMessageTypes().get(2); - internal_static_google_instrumentation_MeasurementDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_MeasurementDescriptor_descriptor, - new java.lang.String[] { "Name", "Description", "Unit", }); - internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_descriptor = - internal_static_google_instrumentation_MeasurementDescriptor_descriptor.getNestedTypes().get(0); - internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_MeasurementDescriptor_MeasurementUnit_descriptor, - new java.lang.String[] { "Power10", "Numerators", "Denominators", }); - internal_static_google_instrumentation_DistributionAggregation_descriptor = - getDescriptor().getMessageTypes().get(3); - internal_static_google_instrumentation_DistributionAggregation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_DistributionAggregation_descriptor, - new java.lang.String[] { "Count", "Mean", "Sum", "Range", "BucketCounts", "Tags", }); - internal_static_google_instrumentation_DistributionAggregation_Range_descriptor = - internal_static_google_instrumentation_DistributionAggregation_descriptor.getNestedTypes().get(0); - internal_static_google_instrumentation_DistributionAggregation_Range_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_DistributionAggregation_Range_descriptor, - new java.lang.String[] { "Min", "Max", }); - internal_static_google_instrumentation_DistributionAggregationDescriptor_descriptor = - getDescriptor().getMessageTypes().get(4); - internal_static_google_instrumentation_DistributionAggregationDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_DistributionAggregationDescriptor_descriptor, - new java.lang.String[] { "BucketBounds", }); - internal_static_google_instrumentation_IntervalAggregation_descriptor = - getDescriptor().getMessageTypes().get(5); - internal_static_google_instrumentation_IntervalAggregation_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_IntervalAggregation_descriptor, - new java.lang.String[] { "Intervals", "Tags", }); - internal_static_google_instrumentation_IntervalAggregation_Interval_descriptor = - internal_static_google_instrumentation_IntervalAggregation_descriptor.getNestedTypes().get(0); - internal_static_google_instrumentation_IntervalAggregation_Interval_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_IntervalAggregation_Interval_descriptor, - new java.lang.String[] { "IntervalSize", "Count", "Sum", }); - internal_static_google_instrumentation_IntervalAggregationDescriptor_descriptor = - getDescriptor().getMessageTypes().get(6); - internal_static_google_instrumentation_IntervalAggregationDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_IntervalAggregationDescriptor_descriptor, - new java.lang.String[] { "NSubIntervals", "IntervalSizes", }); - internal_static_google_instrumentation_Tag_descriptor = - getDescriptor().getMessageTypes().get(7); - internal_static_google_instrumentation_Tag_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_Tag_descriptor, - new java.lang.String[] { "Key", "Value", }); - internal_static_google_instrumentation_ViewDescriptor_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_instrumentation_ViewDescriptor_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_ViewDescriptor_descriptor, - new java.lang.String[] { "Name", "Description", "MeasurementDescriptorName", "IntervalAggregation", "DistributionAggregation", "TagKeys", "Aggregation", }); - internal_static_google_instrumentation_DistributionView_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_instrumentation_DistributionView_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_DistributionView_descriptor, - new java.lang.String[] { "Aggregations", "Start", "End", }); - internal_static_google_instrumentation_IntervalView_descriptor = - getDescriptor().getMessageTypes().get(10); - internal_static_google_instrumentation_IntervalView_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_IntervalView_descriptor, - new java.lang.String[] { "Aggregations", }); - internal_static_google_instrumentation_View_descriptor = - getDescriptor().getMessageTypes().get(11); - internal_static_google_instrumentation_View_fieldAccessorTable = new - com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_instrumentation_View_descriptor, - new java.lang.String[] { "ViewName", "DistributionView", "IntervalView", "View", }); - } - - // @@protoc_insertion_point(outer_class_scope) -} diff --git a/services/src/main/proto/google/instrumentation/census.proto b/services/src/main/proto/google/instrumentation/census.proto deleted file mode 100644 index 12c942d26..000000000 --- a/services/src/main/proto/google/instrumentation/census.proto +++ /dev/null @@ -1,317 +0,0 @@ -// Copyright 2017 The gRPC Authors -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// http://www.apache.org/licenses/LICENSE-2.0 -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This is copied from https://github.com/google/instrumentation-proto/. -// TODO(ericgribkoff) Sync this proto with grpc/grpc-proto. -syntax = "proto3"; - -package google.instrumentation; - -option java_package = "com.google.instrumentation.stats.proto"; -option java_outer_classname = "CensusProto"; - -// All the census protos. -// -// Nomenclature notes: -// * Capitalized names below (like View) are protos. -// * Protos which describe types are named with a Descriptor suffix (e.g. -// MesurementDescriptor). -// -// Census lets you define the type and description of the data being measured -// (e.g. the latency of an RPC or the number of CPU cycles spent on an -// operation using MeasurementDescriptor. As individual measurements (a double -// value) for are recorded, they are aggregated together into an -// Aggregation. There are two Aggregation types available: Distribution -// (describes the distribution of all measurements, possibly with a histogram) -// and IntervalStats (the count and mean of measurements across specified time -// periods). An Aggregation is described by an AggregationDescriptor. -// -// You can define how your measurements (described by a MeasurementDescriptor) -// are broken down by Tag values and which Aggregations to use through a -// ViewDescriptor. The output (all measurements broken down by tag values into -// specific Aggregations) is called a View. - - -// The following two types are copied from -// google/protobuf/{duration,timestamp}.proto. Ideally, we would be able to -// import them, but this causes compilation issues on C-based systems -// (e.g. https://koti.kapsi.fi/jpa/nanopb/), which cannot process the C++ -// headers generated from the standard protobuf distribution. See the relevant -// proto files for full documentation of these types. - -message Duration { - // Signed seconds of the span of time. Must be from -315,576,000,000 - // to +315,576,000,000 inclusive. - int64 seconds = 1; - - // Signed fractions of a second at nanosecond resolution of the span - // of time. Durations less than one second are represented with a 0 - // `seconds` field and a positive or negative `nanos` field. For durations - // of one second or more, a non-zero value for the `nanos` field must be - // of the same sign as the `seconds` field. Must be from -999,999,999 - // to +999,999,999 inclusive. - int32 nanos = 2; -} - -message Timestamp { - // Represents seconds of UTC time since Unix epoch - // 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to - // 9999-12-31T23:59:59Z inclusive. - int64 seconds = 1; - - // Non-negative fractions of a second at nanosecond resolution. Negative - // second values with fractions must still have non-negative nanos values - // that count forward in time. Must be from 0 to 999,999,999 - // inclusive. - int32 nanos = 2; -} - -// MeasurementDescriptor describes a data point (measurement) type. -message MeasurementDescriptor { - // A descriptive name, e.g. rpc_latency, cpu. Must be unique. - string name = 1; - - // More detailed description of the resource, used in documentation. - string description = 2; - - // Fundamental units of measurement supported by Census - // TODO(aveitch): expand this to include other S.I. units? - enum BasicUnit { - UNKNOWN = 0; // Implementations should not use this - SCALAR = 1; // Dimensionless - BITS = 2; // A single bit - BYTES = 3; // An 8-bit byte - SECONDS = 4; // S.I. unit - CORES = 5; // CPU core usage - MAX_UNITS = 6; // Last defined value; implementations should only use - // this for validation. - } - - // MeasurementUnit lets you build compound units of the form - // 10^n * (A * B * ...) / (X * Y * ...), - // where the elements in the numerator and denominator are all BasicUnits. A - // MeasurementUnit must have at least one BasicUnit in its numerator. - // - // To specify multiplication in the numerator or denominator, simply specify - // multiple numerator or denominator fields. For example: - // - // - byte-seconds (i.e. bytes * seconds): - // numerator: BYTES - // numerator: SECS - // - // - events/sec^2 (i.e. rate of change of events/sec): - // numerator: SCALAR - // denominator: SECS - // denominator: SECS - // - // To specify multiples (in power of 10) of units, specify a non-zero - // 'power10' value, for example: - // - // - MB/s (i.e. megabytes / s): - // power10: 6 - // numerator: BYTES - // denominator: SECS - // - // - nanoseconds - // power10: -9 - // numerator: SECS - message MeasurementUnit { - int32 power10 = 1; - repeated BasicUnit numerators = 2; - repeated BasicUnit denominators = 3; - } - - // The units used by this type of measurement. - MeasurementUnit unit = 3; -} - -// An aggregation summarizes a series of individual measurements. There are -// two types of aggregation (IntervalAggregation and DistributionAggregation), -// unique types of each can be set using descriptors for each. - -// DistributionAggregation contains summary statistics for a population of -// values and, optionally, a histogram representing the distribution of those -// values across a specified set of histogram buckets, as defined in -// DistributionAggregationDescriptor.bucket_bounds. -// -// The summary statistics are the count, mean, minimum, and the maximum of the -// set of population of values. -// -// Although it is not forbidden, it is generally a bad idea to include -// non-finite values (infinities or NaNs) in the population of values, as this -// will render the `mean` field meaningless. -message DistributionAggregation { - // The number of values in the population. Must be non-negative. - int64 count = 1; - - // The arithmetic mean of the values in the population. If `count` is zero - // then this field must be zero. - double mean = 2; - - // The sum of the values in the population. If `count` is zero then this - // field must be zero. - double sum = 3; - - // Describes a range of population values. - message Range { - // The minimum of the population values. - double min = 1; - // The maximum of the population values. - double max = 2; - } - - // The range of the population values. If `count` is zero, this field will not - // be defined. - Range range = 4; - - // A Distribution may optionally contain a histogram of the values in the - // population. The histogram is given in `bucket_count` as counts of values - // that fall into one of a sequence of non-overlapping buckets, as described - // by `DistributionAggregationDescriptor.bucket_boundaries`. The sum of the - // values in `bucket_counts` must equal the value in `count`. - // - // Bucket counts are given in order under the numbering scheme described - // above (the underflow bucket has number 0; the finite buckets, if any, - // have numbers 1 through N-2; the overflow bucket has number N-1). - // - // The size of `bucket_count` must be no greater than N as defined in - // `bucket_boundaries`. - // - // Any suffix of trailing zero bucket_count fields may be omitted. - repeated int64 bucket_counts = 5; - - // Tags associated with this DistributionAggregation. These will be filled - // in based on the View specification. - repeated Tag tags = 6; -} - -message DistributionAggregationDescriptor { - // A Distribution may optionally contain a histogram of the values in the - // population. The bucket boundaries for that histogram are described by - // `bucket_bounds`. This defines `size(bucket_bounds) + 1` (= N) - // buckets. The boundaries for bucket index i are: - // - // [-infinity, bucket_bounds[i]) for i == 0 - // [bucket_bounds[i-1], bucket_bounds[i]) for 0 < i < N-2 - // [bucket_bounds[i-1], +infinity) for i == N-1 - // - // i.e. an underflow bucket (number 0), zero or more finite buckets (1 - // through N - 2, and an overflow bucket (N - 1), with inclusive lower - // bounds and exclusive upper bounds. - // - // If `bucket_bounds` has no elements (zero size), then there is no - // histogram associated with the Distribution. If `bucket_bounds` has only - // one element, there are no finite buckets, and that single element is the - // common boundary of the overflow and underflow buckets. The values must - // be monotonically increasing. - repeated double bucket_bounds = 1; -} - -// An IntervalAggreation records summary stats over various time -// windows. These stats are approximate, with the degree of accuracy -// controlled by setting the n_sub_intervals parameter in the -// IntervalAggregationDescriptor. -message IntervalAggregation { - // Summary statistic over a single time interval. - message Interval { - // The interval duration. Must be positive. - Duration interval_size = 1; - // Approximate number of measurements recorded in this interval. - double count = 2; - // The cumulative sum of measurements in this interval. - double sum = 3; - } - - // Full set of intervals for this aggregation. - repeated Interval intervals = 1; - - // Tags associated with this IntervalAggregation. These will be filled in - // based on the View specification. - repeated Tag tags = 2; -} - -// An IntervalAggreationDescriptor specifies time intervals for an -// IntervalAggregation. -message IntervalAggregationDescriptor { - // Number of internal sub-intervals to use when collecting stats for each - // interval. The max error in interval measurements will be approximately - // 1/n_sub_intervals (although in practice, this will only be approached in - // the presence of very large and bursty workload changes), and underlying - // memory usage will be roughly proportional to the value of this - // field. Must be in the range [2, 20]. A value of 5 will be used if this is - // unspecified. - int32 n_sub_intervals = 1; - - // The size of each interval, as a time duration. Must have at least one - // element. - repeated Duration interval_sizes = 2; -} - -// A Tag: key-value pair. -message Tag { - string key = 1; - string value = 2; -} - -// A ViewDescriptor specifies an AggregationDescriptor and a set of tag -// keys. Views instantiated from this descriptor will contain Aggregations -// broken down by the unique set of matching tag values for each measurement. -message ViewDescriptor { - // Name of view. Must be unique. - string name = 1; - - // More detailed description, for documentation purposes. - string description = 2; - - // Name of a MeasurementDescriptor to be used for this view. - string measurement_descriptor_name = 3; - - // Aggregation type to associate with View. - oneof aggregation { - IntervalAggregationDescriptor interval_aggregation = 4; - DistributionAggregationDescriptor distribution_aggregation = 5; - } - - // Tag keys to match with a given measurement. If no keys are specified, - // then all stats are recorded. Keys must be unique. - repeated string tag_keys = 6; -} - -// DistributionView contains all aggregations for a view specified using a -// DistributionAggregationDescriptor. -message DistributionView { - // Aggregations - each will have a unique set of tag values for the tag_keys - // associated with the corresponding View. - repeated DistributionAggregation aggregations = 1; - - // Start and end timestamps over which aggregations was accumulated. - Timestamp start = 2; - Timestamp end = 3; -} - -// IntervalView contains all aggregations for a view specified using a -// IntervalAggregationDescriptor. -message IntervalView { - // Aggregations - each will have a unique set of tag values for the tag_keys - // associated with the corresponding View. - repeated IntervalAggregation aggregations = 1; -} - -// A View contains the aggregations based on a ViewDescriptor. -message View { - // ViewDescriptor name associated with this set of View. - string view_name = 1; - - oneof view { - DistributionView distribution_view = 2; - IntervalView interval_view = 3; - } -} |