From f2beea6e9cc288935fec7b87d0995f9a1e80a443 Mon Sep 17 00:00:00 2001 From: Eric Gribkoff Date: Thu, 2 Mar 2017 15:04:46 -0800 Subject: [PATCH] services: add monitoring service --- .../v1alpha/MonitoringGrpc.java | 500 + .../stats/proto/CensusProto.java | 15362 ++++++++++++++++ .../v1alpha/CanonicalRpcStats.java | 4456 +++++ .../v1alpha/CanonicalRpcStatsOrBuilder.java | 242 + .../v1alpha/CustomMonitoringData.java | 604 + .../CustomMonitoringDataOrBuilder.java | 34 + .../v1alpha/MonitoringDataGroup.java | 522 + .../v1alpha/MonitoringDataGroupOrBuilder.java | 27 + .../v1alpha/MonitoringProto.java | 204 + .../instrumentation/v1alpha/StatsRequest.java | 374 + .../v1alpha/StatsRequestOrBuilder.java | 9 + .../v1alpha/StatsResponse.java | 374 + .../v1alpha/StatsResponseOrBuilder.java | 9 + .../instrumentation/v1alpha/TraceRequest.java | 374 + .../v1alpha/TraceRequestOrBuilder.java | 9 + .../v1alpha/TraceResponse.java | 374 + .../v1alpha/TraceResponseOrBuilder.java | 9 + .../io/grpc/services/MonitoringService.java | 111 + .../java/io/grpc/services/MonitoringUtil.java | 276 + .../proto/google/instrumentation/census.proto | 317 + .../instrumentation/v1alpha/monitoring.proto | 131 + .../grpc/services/MonitoringServiceTest.java | 117 + .../io/grpc/services/MonitoringUtilTest.java | 365 + 23 files changed, 24800 insertions(+) create mode 100644 services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java create mode 100644 services/src/generated/main/java/com/google/instrumentation/stats/proto/CensusProto.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStats.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStatsOrBuilder.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringData.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringDataOrBuilder.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroup.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroupOrBuilder.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringProto.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequest.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequestOrBuilder.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponse.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponseOrBuilder.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequest.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequestOrBuilder.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponse.java create mode 100644 services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponseOrBuilder.java create mode 100644 services/src/main/java/io/grpc/services/MonitoringService.java create mode 100644 services/src/main/java/io/grpc/services/MonitoringUtil.java create mode 100644 services/src/main/proto/google/instrumentation/census.proto create mode 100644 services/src/main/proto/grpc/instrumentation/v1alpha/monitoring.proto create mode 100644 services/src/test/java/io/grpc/services/MonitoringServiceTest.java create mode 100644 services/src/test/java/io/grpc/services/MonitoringUtilTest.java diff --git a/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java b/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java new file mode 100644 index 0000000000..eb9eb45ed9 --- /dev/null +++ b/services/src/generated/main/grpc/io/grpc/instrumentation/v1alpha/MonitoringGrpc.java @@ -0,0 +1,500 @@ +package io.grpc.instrumentation.v1alpha; + +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.asyncServerStreamingCall; +import static io.grpc.stub.ClientCalls.asyncClientStreamingCall; +import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.blockingServerStreamingCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncServerStreamingCall; +import static io.grpc.stub.ServerCalls.asyncClientStreamingCall; +import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall; + +/** + */ +@javax.annotation.Generated( + value = "by gRPC proto compiler (version 1.2.0-SNAPSHOT)", + comments = "Source: grpc/instrumentation/v1alpha/monitoring.proto") +public final class MonitoringGrpc { + + private MonitoringGrpc() {} + + public static final String SERVICE_NAME = "grpc.instrumentation.v1alpha.Monitoring"; + + // Static method descriptors that strictly reflect the proto. + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static final io.grpc.MethodDescriptor METHOD_GET_CANONICAL_RPC_STATS = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "grpc.instrumentation.v1alpha.Monitoring", "GetCanonicalRpcStats"), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.Empty.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.getDefaultInstance())); + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static final io.grpc.MethodDescriptor METHOD_GET_STATS = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "grpc.instrumentation.v1alpha.Monitoring", "GetStats"), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.StatsRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.StatsResponse.getDefaultInstance())); + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static final io.grpc.MethodDescriptor METHOD_WATCH_STATS = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING, + generateFullMethodName( + "grpc.instrumentation.v1alpha.Monitoring", "WatchStats"), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.StatsRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.StatsResponse.getDefaultInstance())); + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static final io.grpc.MethodDescriptor METHOD_GET_REQUEST_TRACES = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "grpc.instrumentation.v1alpha.Monitoring", "GetRequestTraces"), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.TraceRequest.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.TraceResponse.getDefaultInstance())); + @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901") + public static final io.grpc.MethodDescriptor METHOD_GET_CUSTOM_MONITORING_DATA = + io.grpc.MethodDescriptor.create( + io.grpc.MethodDescriptor.MethodType.UNARY, + generateFullMethodName( + "grpc.instrumentation.v1alpha.Monitoring", "GetCustomMonitoringData"), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.MonitoringDataGroup.getDefaultInstance()), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.instrumentation.v1alpha.CustomMonitoringData.getDefaultInstance())); + + /** + * Creates a new async stub that supports all call types for the service + */ + public static MonitoringStub newStub(io.grpc.Channel channel) { + return new MonitoringStub(channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static MonitoringBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new MonitoringBlockingStub(channel); + } + + /** + * Creates a new ListenableFuture-style stub that supports unary and streaming output calls on the service + */ + public static MonitoringFutureStub newFutureStub( + io.grpc.Channel channel) { + return new MonitoringFutureStub(channel); + } + + /** + */ + public static abstract class MonitoringImplBase implements io.grpc.BindableService { + + /** + *
+     * Return canonical RPC stats
+     * 
+ */ + public void getCanonicalRpcStats(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(METHOD_GET_CANONICAL_RPC_STATS, responseObserver); + } + + /** + *
+     * Query the server for specific stats
+     * 
+ */ + public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(METHOD_GET_STATS, responseObserver); + } + + /** + *
+     * Request the server to stream back snapshots of the requested stats
+     * 
+ */ + public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(METHOD_WATCH_STATS, responseObserver); + } + + /** + *
+     * Return request traces.
+     * 
+ */ + public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(METHOD_GET_REQUEST_TRACES, responseObserver); + } + + /** + *
+     * Return application-defined groups of monitoring data.
+     * This is a low level facility to allow extension of the monitoring API to
+     * application-specific monitoring data. Frameworks may use this to define
+     * additional groups of monitoring data made available by servers.
+     * 
+ */ + public void getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(METHOD_GET_CUSTOM_MONITORING_DATA, responseObserver); + } + + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + METHOD_GET_CANONICAL_RPC_STATS, + asyncUnaryCall( + new MethodHandlers< + com.google.protobuf.Empty, + io.grpc.instrumentation.v1alpha.CanonicalRpcStats>( + this, METHODID_GET_CANONICAL_RPC_STATS))) + .addMethod( + METHOD_GET_STATS, + asyncUnaryCall( + new MethodHandlers< + io.grpc.instrumentation.v1alpha.StatsRequest, + io.grpc.instrumentation.v1alpha.StatsResponse>( + this, METHODID_GET_STATS))) + .addMethod( + METHOD_WATCH_STATS, + asyncServerStreamingCall( + new MethodHandlers< + io.grpc.instrumentation.v1alpha.StatsRequest, + io.grpc.instrumentation.v1alpha.StatsResponse>( + this, METHODID_WATCH_STATS))) + .addMethod( + METHOD_GET_REQUEST_TRACES, + asyncUnaryCall( + new MethodHandlers< + io.grpc.instrumentation.v1alpha.TraceRequest, + io.grpc.instrumentation.v1alpha.TraceResponse>( + this, METHODID_GET_REQUEST_TRACES))) + .addMethod( + METHOD_GET_CUSTOM_MONITORING_DATA, + asyncUnaryCall( + new MethodHandlers< + io.grpc.instrumentation.v1alpha.MonitoringDataGroup, + io.grpc.instrumentation.v1alpha.CustomMonitoringData>( + this, METHODID_GET_CUSTOM_MONITORING_DATA))) + .build(); + } + } + + /** + */ + public static final class MonitoringStub extends io.grpc.stub.AbstractStub { + private MonitoringStub(io.grpc.Channel channel) { + super(channel); + } + + private MonitoringStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MonitoringStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new MonitoringStub(channel, callOptions); + } + + /** + *
+     * Return canonical RPC stats
+     * 
+ */ + public void getCanonicalRpcStats(com.google.protobuf.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_GET_CANONICAL_RPC_STATS, getCallOptions()), request, responseObserver); + } + + /** + *
+     * Query the server for specific stats
+     * 
+ */ + public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_GET_STATS, getCallOptions()), request, responseObserver); + } + + /** + *
+     * Request the server to stream back snapshots of the requested stats
+     * 
+ */ + public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + getChannel().newCall(METHOD_WATCH_STATS, getCallOptions()), request, responseObserver); + } + + /** + *
+     * Return request traces.
+     * 
+ */ + public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_GET_REQUEST_TRACES, getCallOptions()), request, responseObserver); + } + + /** + *
+     * Return application-defined groups of monitoring data.
+     * This is a low level facility to allow extension of the monitoring API to
+     * application-specific monitoring data. Frameworks may use this to define
+     * additional groups of monitoring data made available by servers.
+     * 
+ */ + public void getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(METHOD_GET_CUSTOM_MONITORING_DATA, getCallOptions()), request, responseObserver); + } + } + + /** + */ + public static final class MonitoringBlockingStub extends io.grpc.stub.AbstractStub { + private MonitoringBlockingStub(io.grpc.Channel channel) { + super(channel); + } + + private MonitoringBlockingStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MonitoringBlockingStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new MonitoringBlockingStub(channel, callOptions); + } + + /** + *
+     * Return canonical RPC stats
+     * 
+ */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats getCanonicalRpcStats(com.google.protobuf.Empty request) { + return blockingUnaryCall( + getChannel(), METHOD_GET_CANONICAL_RPC_STATS, getCallOptions(), request); + } + + /** + *
+     * Query the server for specific stats
+     * 
+ */ + public io.grpc.instrumentation.v1alpha.StatsResponse getStats(io.grpc.instrumentation.v1alpha.StatsRequest request) { + return blockingUnaryCall( + getChannel(), METHOD_GET_STATS, getCallOptions(), request); + } + + /** + *
+     * Request the server to stream back snapshots of the requested stats
+     * 
+ */ + public java.util.Iterator watchStats( + io.grpc.instrumentation.v1alpha.StatsRequest request) { + return blockingServerStreamingCall( + getChannel(), METHOD_WATCH_STATS, getCallOptions(), request); + } + + /** + *
+     * Return request traces.
+     * 
+ */ + public io.grpc.instrumentation.v1alpha.TraceResponse getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request) { + return blockingUnaryCall( + getChannel(), METHOD_GET_REQUEST_TRACES, getCallOptions(), request); + } + + /** + *
+     * Return application-defined groups of monitoring data.
+     * This is a low level facility to allow extension of the monitoring API to
+     * application-specific monitoring data. Frameworks may use this to define
+     * additional groups of monitoring data made available by servers.
+     * 
+ */ + public io.grpc.instrumentation.v1alpha.CustomMonitoringData getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request) { + return blockingUnaryCall( + getChannel(), METHOD_GET_CUSTOM_MONITORING_DATA, getCallOptions(), request); + } + } + + /** + */ + public static final class MonitoringFutureStub extends io.grpc.stub.AbstractStub { + private MonitoringFutureStub(io.grpc.Channel channel) { + super(channel); + } + + private MonitoringFutureStub(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected MonitoringFutureStub build(io.grpc.Channel channel, + io.grpc.CallOptions callOptions) { + return new MonitoringFutureStub(channel, callOptions); + } + + /** + *
+     * Return canonical RPC stats
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getCanonicalRpcStats( + com.google.protobuf.Empty request) { + return futureUnaryCall( + getChannel().newCall(METHOD_GET_CANONICAL_RPC_STATS, getCallOptions()), request); + } + + /** + *
+     * Query the server for specific stats
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getStats( + io.grpc.instrumentation.v1alpha.StatsRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_GET_STATS, getCallOptions()), request); + } + + /** + *
+     * Return request traces.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getRequestTraces( + io.grpc.instrumentation.v1alpha.TraceRequest request) { + return futureUnaryCall( + getChannel().newCall(METHOD_GET_REQUEST_TRACES, getCallOptions()), request); + } + + /** + *
+     * Return application-defined groups of monitoring data.
+     * This is a low level facility to allow extension of the monitoring API to
+     * application-specific monitoring data. Frameworks may use this to define
+     * additional groups of monitoring data made available by servers.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture getCustomMonitoringData( + io.grpc.instrumentation.v1alpha.MonitoringDataGroup request) { + return futureUnaryCall( + getChannel().newCall(METHOD_GET_CUSTOM_MONITORING_DATA, getCallOptions()), request); + } + } + + private static final int METHODID_GET_CANONICAL_RPC_STATS = 0; + private static final int METHODID_GET_STATS = 1; + private static final int METHODID_WATCH_STATS = 2; + private static final int METHODID_GET_REQUEST_TRACES = 3; + private static final int METHODID_GET_CUSTOM_MONITORING_DATA = 4; + + private static final class MethodHandlers implements + io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final MonitoringImplBase serviceImpl; + private final int methodId; + + MethodHandlers(MonitoringImplBase serviceImpl, int methodId) { + this.serviceImpl = serviceImpl; + this.methodId = methodId; + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public void invoke(Req request, io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + case METHODID_GET_CANONICAL_RPC_STATS: + serviceImpl.getCanonicalRpcStats((com.google.protobuf.Empty) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_STATS: + serviceImpl.getStats((io.grpc.instrumentation.v1alpha.StatsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_WATCH_STATS: + serviceImpl.watchStats((io.grpc.instrumentation.v1alpha.StatsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_REQUEST_TRACES: + serviceImpl.getRequestTraces((io.grpc.instrumentation.v1alpha.TraceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_CUSTOM_MONITORING_DATA: + serviceImpl.getCustomMonitoringData((io.grpc.instrumentation.v1alpha.MonitoringDataGroup) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + default: + throw new AssertionError(); + } + } + + @java.lang.Override + @java.lang.SuppressWarnings("unchecked") + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + switch (methodId) { + default: + throw new AssertionError(); + } + } + } + + private static final class MonitoringDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier { + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.getDescriptor(); + } + } + + private static volatile io.grpc.ServiceDescriptor serviceDescriptor; + + public static io.grpc.ServiceDescriptor getServiceDescriptor() { + io.grpc.ServiceDescriptor result = serviceDescriptor; + if (result == null) { + synchronized (MonitoringGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new MonitoringDescriptorSupplier()) + .addMethod(METHOD_GET_CANONICAL_RPC_STATS) + .addMethod(METHOD_GET_STATS) + .addMethod(METHOD_WATCH_STATS) + .addMethod(METHOD_GET_REQUEST_TRACES) + .addMethod(METHOD_GET_CUSTOM_MONITORING_DATA) + .build(); + } + } + } + return result; + } +} 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 new file mode 100644 index 0000000000..eb4bb5efa5 --- /dev/null +++ b/services/src/generated/main/java/com/google/instrumentation/stats/proto/CensusProto.java @@ -0,0 +1,15362 @@ +// 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 { + + /** + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ * + * int64 seconds = 1; + */ + long getSeconds(); + + /** + *
+     * 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; + */ + 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Duration( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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_; + /** + *
+     * Signed seconds of the span of time. Must be from -315,576,000,000
+     * to +315,576,000,000 inclusive.
+     * 
+ * + * int64 seconds = 1; + */ + public long getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 2; + private int nanos_; + /** + *
+     * 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; + */ + 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_); + } + } + + 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_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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 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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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()); + } + 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_ ; + /** + *
+       * Signed seconds of the span of time. Must be from -315,576,000,000
+       * to +315,576,000,000 inclusive.
+       * 
+ * + * int64 seconds = 1; + */ + public long getSeconds() { + return seconds_; + } + /** + *
+       * Signed seconds of the span of time. Must be from -315,576,000,000
+       * to +315,576,000,000 inclusive.
+       * 
+ * + * int64 seconds = 1; + */ + public Builder setSeconds(long value) { + + seconds_ = value; + onChanged(); + return this; + } + /** + *
+       * Signed seconds of the span of time. Must be from -315,576,000,000
+       * to +315,576,000,000 inclusive.
+       * 
+ * + * int64 seconds = 1; + */ + public Builder clearSeconds() { + + seconds_ = 0L; + onChanged(); + return this; + } + + private int nanos_ ; + /** + *
+       * 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; + */ + public int getNanos() { + return nanos_; + } + /** + *
+       * 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; + */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * 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; + */ + long getSeconds(); + + /** + *
+     * 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; + */ + 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Timestamp( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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_; + /** + *
+     * 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; + */ + public long getSeconds() { + return seconds_; + } + + public static final int NANOS_FIELD_NUMBER = 2; + private int nanos_; + /** + *
+     * 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; + */ + 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_); + } + } + + 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_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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 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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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()); + } + 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_ ; + /** + *
+       * 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; + */ + public long getSeconds() { + return seconds_; + } + /** + *
+       * 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; + */ + public Builder setSeconds(long value) { + + seconds_ = value; + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder clearSeconds() { + + seconds_ = 0L; + onChanged(); + return this; + } + + private int nanos_ ; + /** + *
+       * 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; + */ + public int getNanos() { + return nanos_; + } + /** + *
+       * 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; + */ + public Builder setNanos(int value) { + + nanos_ = value; + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder clearNanos() { + + nanos_ = 0; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * More detailed description of the resource, used in documentation.
+     * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + *
+     * More detailed description of the resource, used in documentation.
+     * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * The units used by this type of measurement.
+     * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + boolean hasUnit(); + /** + *
+     * The units used by this type of measurement.
+     * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getUnit(); + /** + *
+     * The units used by this type of measurement.
+     * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnitOrBuilder getUnitOrBuilder(); + } + /** + *
+   * MeasurementDescriptor describes a data point (measurement) type.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MeasurementDescriptor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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); + } + + /** + *
+     * Fundamental units of measurement supported by Census
+     * TODO(aveitch): expand this to include other S.I. units?
+     * 
+ * + * Protobuf enum {@code google.instrumentation.MeasurementDescriptor.BasicUnit} + */ + public enum BasicUnit + implements com.google.protobuf.ProtocolMessageEnum { + /** + *
+       * Implementations should not use this
+       * 
+ * + * UNKNOWN = 0; + */ + UNKNOWN(0), + /** + *
+       * Dimensionless
+       * 
+ * + * SCALAR = 1; + */ + SCALAR(1), + /** + *
+       * A single bit
+       * 
+ * + * BITS = 2; + */ + BITS(2), + /** + *
+       * An 8-bit byte
+       * 
+ * + * BYTES = 3; + */ + BYTES(3), + /** + *
+       * S.I. unit
+       * 
+ * + * SECONDS = 4; + */ + SECONDS(4), + /** + *
+       * CPU core usage
+       * 
+ * + * CORES = 5; + */ + CORES(5), + /** + *
+       * Last defined value; implementations should only use
+       * 
+ * + * MAX_UNITS = 6; + */ + MAX_UNITS(6), + UNRECOGNIZED(-1), + ; + + /** + *
+       * Implementations should not use this
+       * 
+ * + * UNKNOWN = 0; + */ + public static final int UNKNOWN_VALUE = 0; + /** + *
+       * Dimensionless
+       * 
+ * + * SCALAR = 1; + */ + public static final int SCALAR_VALUE = 1; + /** + *
+       * A single bit
+       * 
+ * + * BITS = 2; + */ + public static final int BITS_VALUE = 2; + /** + *
+       * An 8-bit byte
+       * 
+ * + * BYTES = 3; + */ + public static final int BYTES_VALUE = 3; + /** + *
+       * S.I. unit
+       * 
+ * + * SECONDS = 4; + */ + public static final int SECONDS_VALUE = 4; + /** + *
+       * CPU core usage
+       * 
+ * + * CORES = 5; + */ + public static final int CORES_VALUE = 5; + /** + *
+       * Last defined value; implementations should only use
+       * 
+ * + * MAX_UNITS = 6; + */ + 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 + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + BasicUnit> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + 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 { + + /** + * int32 power10 = 1; + */ + int getPower10(); + + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + java.util.List getNumeratorsList(); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + int getNumeratorsCount(); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getNumerators(int index); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + java.util.List + getNumeratorsValueList(); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + int getNumeratorsValue(int index); + + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + java.util.List getDenominatorsList(); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + int getDenominatorsCount(); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getDenominators(int index); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + java.util.List + getDenominatorsValueList(); + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + int getDenominatorsValue(int index); + } + /** + *
+     * 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
+     * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MeasurementUnit( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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(); + 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(); + 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(); + 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(); + 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_); + } + 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_; + /** + * int32 power10 = 1; + */ + public int getPower10() { + return power10_; + } + + public static final int NUMERATORS_FIELD_NUMBER = 2; + private java.util.List 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; + } + }; + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public java.util.List getNumeratorsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(numerators_, numerators_converter_); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public int getNumeratorsCount() { + return numerators_.size(); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getNumerators(int index) { + return numerators_converter_.convert(numerators_.get(index)); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public java.util.List + getNumeratorsValueList() { + return numerators_; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public int getNumeratorsValue(int index) { + return numerators_.get(index); + } + private int numeratorsMemoizedSerializedSize; + + public static final int DENOMINATORS_FIELD_NUMBER = 3; + private java.util.List 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; + } + }; + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public java.util.List getDenominatorsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(denominators_, denominators_converter_); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public int getDenominatorsCount() { + return denominators_.size(); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getDenominators(int index) { + return denominators_converter_.convert(denominators_.get(index)); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public java.util.List + getDenominatorsValueList() { + return denominators_; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + 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)); + } + } + + 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; + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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_); + 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( + 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; + } + /** + *
+       * 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
+       * 
+ * + * Protobuf type {@code google.instrumentation.MeasurementDescriptor.MeasurementUnit} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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(); + } + 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_ ; + /** + * int32 power10 = 1; + */ + public int getPower10() { + return power10_; + } + /** + * int32 power10 = 1; + */ + public Builder setPower10(int value) { + + power10_ = value; + onChanged(); + return this; + } + /** + * int32 power10 = 1; + */ + public Builder clearPower10() { + + power10_ = 0; + onChanged(); + return this; + } + + private java.util.List numerators_ = + java.util.Collections.emptyList(); + private void ensureNumeratorsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + numerators_ = new java.util.ArrayList(numerators_); + bitField0_ |= 0x00000002; + } + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public java.util.List getNumeratorsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(numerators_, numerators_converter_); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public int getNumeratorsCount() { + return numerators_.size(); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getNumerators(int index) { + return numerators_converter_.convert(numerators_.get(index)); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + 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; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + 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; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public Builder addAllNumerators( + java.lang.Iterable values) { + ensureNumeratorsIsMutable(); + for (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value : values) { + numerators_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public Builder clearNumerators() { + numerators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public java.util.List + getNumeratorsValueList() { + return java.util.Collections.unmodifiableList(numerators_); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public int getNumeratorsValue(int index) { + return numerators_.get(index); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public Builder setNumeratorsValue( + int index, int value) { + ensureNumeratorsIsMutable(); + numerators_.set(index, value); + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public Builder addNumeratorsValue(int value) { + ensureNumeratorsIsMutable(); + numerators_.add(value); + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit numerators = 2; + */ + public Builder addAllNumeratorsValue( + java.lang.Iterable values) { + ensureNumeratorsIsMutable(); + for (int value : values) { + numerators_.add(value); + } + onChanged(); + return this; + } + + private java.util.List denominators_ = + java.util.Collections.emptyList(); + private void ensureDenominatorsIsMutable() { + if (!((bitField0_ & 0x00000004) == 0x00000004)) { + denominators_ = new java.util.ArrayList(denominators_); + bitField0_ |= 0x00000004; + } + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public java.util.List getDenominatorsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit>(denominators_, denominators_converter_); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public int getDenominatorsCount() { + return denominators_.size(); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit getDenominators(int index) { + return denominators_converter_.convert(denominators_.get(index)); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + 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; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + 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; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public Builder addAllDenominators( + java.lang.Iterable values) { + ensureDenominatorsIsMutable(); + for (com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.BasicUnit value : values) { + denominators_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public Builder clearDenominators() { + denominators_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public java.util.List + getDenominatorsValueList() { + return java.util.Collections.unmodifiableList(denominators_); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public int getDenominatorsValue(int index) { + return denominators_.get(index); + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public Builder setDenominatorsValue( + int index, int value) { + ensureDenominatorsIsMutable(); + denominators_.set(index, value); + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public Builder addDenominatorsValue(int value) { + ensureDenominatorsIsMutable(); + denominators_.add(value); + onChanged(); + return this; + } + /** + * repeated .google.instrumentation.MeasurementDescriptor.BasicUnit denominators = 3; + */ + public Builder addAllDenominatorsValue( + java.lang.Iterable values) { + ensureDenominatorsIsMutable(); + for (int value : values) { + denominators_.add(value); + } + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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_; + /** + *
+     * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+     * 
+ * + * string name = 1; + */ + 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_; + /** + *
+     * More detailed description of the resource, used in documentation.
+     * 
+ * + * string description = 2; + */ + 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; + } + } + /** + *
+     * More detailed description of the resource, used in documentation.
+     * 
+ * + * string description = 2; + */ + 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_; + /** + *
+     * The units used by this type of measurement.
+     * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + public boolean hasUnit() { + return unit_ != null; + } + /** + *
+     * The units used by this type of measurement.
+     * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit getUnit() { + return unit_ == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.getDefaultInstance() : unit_; + } + /** + *
+     * The units used by this type of measurement.
+     * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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()); + } + } + + 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()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + } + 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( + 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; + } + /** + *
+     * MeasurementDescriptor describes a data point (measurement) type.
+     * 
+ * + * Protobuf type {@code google.instrumentation.MeasurementDescriptor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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()); + } + 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_ = ""; + /** + *
+       * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+       * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+       * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+       * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+       * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * A descriptive name, e.g. rpc_latency, cpu. Must be unique.
+       * 
+ * + * string name = 1; + */ + 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_ = ""; + /** + *
+       * More detailed description of the resource, used in documentation.
+       * 
+ * + * string description = 2; + */ + 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; + } + } + /** + *
+       * More detailed description of the resource, used in documentation.
+       * 
+ * + * string description = 2; + */ + 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; + } + } + /** + *
+       * More detailed description of the resource, used in documentation.
+       * 
+ * + * string description = 2; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * More detailed description of the resource, used in documentation.
+       * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * More detailed description of the resource, used in documentation.
+       * 
+ * + * string description = 2; + */ + 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_; + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + public boolean hasUnit() { + return unitBuilder_ != null || unit_ != null; + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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(); + } + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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; + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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; + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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; + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + public Builder clearUnit() { + if (unitBuilder_ == null) { + unit_ = null; + onChanged(); + } else { + unit_ = null; + unitBuilder_ = null; + } + + return this; + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.MeasurementUnit.Builder getUnitBuilder() { + + onChanged(); + return getUnitFieldBuilder().getBuilder(); + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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_; + } + } + /** + *
+       * The units used by this type of measurement.
+       * 
+ * + * .google.instrumentation.MeasurementDescriptor.MeasurementUnit unit = 3; + */ + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * The number of values in the population. Must be non-negative.
+     * 
+ * + * int64 count = 1; + */ + long getCount(); + + /** + *
+     * The arithmetic mean of the values in the population. If `count` is zero
+     * then this field must be zero.
+     * 
+ * + * double mean = 2; + */ + double getMean(); + + /** + *
+     * The sum of the values in the population.  If `count` is zero then this
+     * field must be zero.
+     * 
+ * + * double sum = 3; + */ + double getSum(); + + /** + *
+     * The range of the population values. If `count` is zero, this field will not
+     * be defined.
+     * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + boolean hasRange(); + /** + *
+     * The range of the population values. If `count` is zero, this field will not
+     * be defined.
+     * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getRange(); + /** + *
+     * The range of the population values. If `count` is zero, this field will not
+     * be defined.
+     * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.RangeOrBuilder getRangeOrBuilder(); + + /** + *
+     * 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; + */ + java.util.List getBucketCountsList(); + /** + *
+     * 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; + */ + int getBucketCountsCount(); + /** + *
+     * 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; + */ + long getBucketCounts(int index); + + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + java.util.List + getTagsList(); + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index); + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + int getTagsCount(); + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + java.util.List + getTagsOrBuilderList(); + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( + int index); + } + /** + *
+   * 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.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DistributionAggregation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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(); + 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(); + 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(); + 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_); + } + 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 { + + /** + *
+       * The minimum of the population values.
+       * 
+ * + * double min = 1; + */ + double getMin(); + + /** + *
+       * The maximum of the population values.
+       * 
+ * + * double max = 2; + */ + double getMax(); + } + /** + *
+     * Describes a range of population values.
+     * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Range( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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_; + /** + *
+       * The minimum of the population values.
+       * 
+ * + * double min = 1; + */ + public double getMin() { + return min_; + } + + public static final int MAX_FIELD_NUMBER = 2; + private double max_; + /** + *
+       * The maximum of the population values.
+       * 
+ * + * double max = 2; + */ + 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_); + } + } + + 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_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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())); + 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( + 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; + } + /** + *
+       * Describes a range of population values.
+       * 
+ * + * Protobuf type {@code google.instrumentation.DistributionAggregation.Range} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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()); + } + 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_ ; + /** + *
+         * The minimum of the population values.
+         * 
+ * + * double min = 1; + */ + public double getMin() { + return min_; + } + /** + *
+         * The minimum of the population values.
+         * 
+ * + * double min = 1; + */ + public Builder setMin(double value) { + + min_ = value; + onChanged(); + return this; + } + /** + *
+         * The minimum of the population values.
+         * 
+ * + * double min = 1; + */ + public Builder clearMin() { + + min_ = 0D; + onChanged(); + return this; + } + + private double max_ ; + /** + *
+         * The maximum of the population values.
+         * 
+ * + * double max = 2; + */ + public double getMax() { + return max_; + } + /** + *
+         * The maximum of the population values.
+         * 
+ * + * double max = 2; + */ + public Builder setMax(double value) { + + max_ = value; + onChanged(); + return this; + } + /** + *
+         * The maximum of the population values.
+         * 
+ * + * double max = 2; + */ + public Builder clearMax() { + + max_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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_; + /** + *
+     * The number of values in the population. Must be non-negative.
+     * 
+ * + * int64 count = 1; + */ + public long getCount() { + return count_; + } + + public static final int MEAN_FIELD_NUMBER = 2; + private double mean_; + /** + *
+     * The arithmetic mean of the values in the population. If `count` is zero
+     * then this field must be zero.
+     * 
+ * + * double mean = 2; + */ + public double getMean() { + return mean_; + } + + public static final int SUM_FIELD_NUMBER = 3; + private double sum_; + /** + *
+     * The sum of the values in the population.  If `count` is zero then this
+     * field must be zero.
+     * 
+ * + * double sum = 3; + */ + public double getSum() { + return sum_; + } + + public static final int RANGE_FIELD_NUMBER = 4; + private com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range range_; + /** + *
+     * The range of the population values. If `count` is zero, this field will not
+     * be defined.
+     * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + public boolean hasRange() { + return range_ != null; + } + /** + *
+     * The range of the population values. If `count` is zero, this field will not
+     * be defined.
+     * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range getRange() { + return range_ == null ? com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.getDefaultInstance() : range_; + } + /** + *
+     * The range of the population values. If `count` is zero, this field will not
+     * be defined.
+     * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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 bucketCounts_; + /** + *
+     * 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; + */ + public java.util.List + getBucketCountsList() { + return bucketCounts_; + } + /** + *
+     * 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; + */ + public int getBucketCountsCount() { + return bucketCounts_.size(); + } + /** + *
+     * 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; + */ + 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 tags_; + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public java.util.List getTagsList() { + return tags_; + } + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public java.util.List + getTagsOrBuilderList() { + return tags_; + } + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { + return tags_.get(index); + } + /** + *
+     * Tags associated with this DistributionAggregation. These will be filled
+     * in based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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)); + } + } + + 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)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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; + } + /** + *
+     * 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.
+     * 
+ * + * Protobuf type {@code google.instrumentation.DistributionAggregation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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_); + } + } + } + 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_ ; + /** + *
+       * The number of values in the population. Must be non-negative.
+       * 
+ * + * int64 count = 1; + */ + public long getCount() { + return count_; + } + /** + *
+       * The number of values in the population. Must be non-negative.
+       * 
+ * + * int64 count = 1; + */ + public Builder setCount(long value) { + + count_ = value; + onChanged(); + return this; + } + /** + *
+       * The number of values in the population. Must be non-negative.
+       * 
+ * + * int64 count = 1; + */ + public Builder clearCount() { + + count_ = 0L; + onChanged(); + return this; + } + + private double mean_ ; + /** + *
+       * The arithmetic mean of the values in the population. If `count` is zero
+       * then this field must be zero.
+       * 
+ * + * double mean = 2; + */ + public double getMean() { + return mean_; + } + /** + *
+       * The arithmetic mean of the values in the population. If `count` is zero
+       * then this field must be zero.
+       * 
+ * + * double mean = 2; + */ + public Builder setMean(double value) { + + mean_ = value; + onChanged(); + return this; + } + /** + *
+       * The arithmetic mean of the values in the population. If `count` is zero
+       * then this field must be zero.
+       * 
+ * + * double mean = 2; + */ + public Builder clearMean() { + + mean_ = 0D; + onChanged(); + return this; + } + + private double sum_ ; + /** + *
+       * The sum of the values in the population.  If `count` is zero then this
+       * field must be zero.
+       * 
+ * + * double sum = 3; + */ + public double getSum() { + return sum_; + } + /** + *
+       * The sum of the values in the population.  If `count` is zero then this
+       * field must be zero.
+       * 
+ * + * double sum = 3; + */ + public Builder setSum(double value) { + + sum_ = value; + onChanged(); + return this; + } + /** + *
+       * The sum of the values in the population.  If `count` is zero then this
+       * field must be zero.
+       * 
+ * + * double sum = 3; + */ + 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_; + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + public boolean hasRange() { + return rangeBuilder_ != null || range_ != null; + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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(); + } + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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; + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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; + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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; + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + public Builder clearRange() { + if (rangeBuilder_ == null) { + range_ = null; + onChanged(); + } else { + range_ = null; + rangeBuilder_ = null; + } + + return this; + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Range.Builder getRangeBuilder() { + + onChanged(); + return getRangeFieldBuilder().getBuilder(); + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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_; + } + } + /** + *
+       * The range of the population values. If `count` is zero, this field will not
+       * be defined.
+       * 
+ * + * .google.instrumentation.DistributionAggregation.Range range = 4; + */ + 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 bucketCounts_ = java.util.Collections.emptyList(); + private void ensureBucketCountsIsMutable() { + if (!((bitField0_ & 0x00000010) == 0x00000010)) { + bucketCounts_ = new java.util.ArrayList(bucketCounts_); + bitField0_ |= 0x00000010; + } + } + /** + *
+       * 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; + */ + public java.util.List + getBucketCountsList() { + return java.util.Collections.unmodifiableList(bucketCounts_); + } + /** + *
+       * 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; + */ + public int getBucketCountsCount() { + return bucketCounts_.size(); + } + /** + *
+       * 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; + */ + public long getBucketCounts(int index) { + return bucketCounts_.get(index); + } + /** + *
+       * 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; + */ + public Builder setBucketCounts( + int index, long value) { + ensureBucketCountsIsMutable(); + bucketCounts_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder addBucketCounts(long value) { + ensureBucketCountsIsMutable(); + bucketCounts_.add(value); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder addAllBucketCounts( + java.lang.Iterable values) { + ensureBucketCountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketCounts_); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder clearBucketCounts() { + bucketCounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000010); + onChanged(); + return this; + } + + private java.util.List tags_ = + java.util.Collections.emptyList(); + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000020) == 0x00000020)) { + tags_ = new java.util.ArrayList(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_; + + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public java.util.List getTagsList() { + if (tagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tags_); + } else { + return tagsBuilder_.getMessageList(); + } + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public int getTagsCount() { + if (tagsBuilder_ == null) { + return tags_.size(); + } else { + return tagsBuilder_.getCount(); + } + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); + } else { + return tagsBuilder_.getMessage(index); + } + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + 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; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public Builder addAllTags( + java.lang.Iterable values) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + } else { + tagsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public Builder clearTags() { + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + } else { + tagsBuilder_.clear(); + } + return this; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public Builder removeTags(int index) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.remove(index); + onChanged(); + } else { + tagsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder getTagsBuilder( + int index) { + return getTagsFieldBuilder().getBuilder(index); + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( + int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); } else { + return tagsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public java.util.List + getTagsOrBuilderList() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tags_); + } + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder() { + return getTagsFieldBuilder().addBuilder( + com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder( + int index) { + return getTagsFieldBuilder().addBuilder( + index, com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); + } + /** + *
+       * Tags associated with this DistributionAggregation. These will be filled
+       * in based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 6; + */ + public java.util.List + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * 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; + */ + java.util.List getBucketBoundsList(); + /** + *
+     * 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; + */ + int getBucketBoundsCount(); + /** + *
+     * 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; + */ + 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DistributionAggregationDescriptor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 9: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + bucketBounds_ = new java.util.ArrayList(); + 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(); + 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_); + } + 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 bucketBounds_; + /** + *
+     * 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; + */ + public java.util.List + getBucketBoundsList() { + return bucketBounds_; + } + /** + *
+     * 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; + */ + public int getBucketBoundsCount() { + return bucketBounds_.size(); + } + /** + *
+     * 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; + */ + 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)); + } + } + + 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; + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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 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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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(); + } + 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 bucketBounds_ = java.util.Collections.emptyList(); + private void ensureBucketBoundsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + bucketBounds_ = new java.util.ArrayList(bucketBounds_); + bitField0_ |= 0x00000001; + } + } + /** + *
+       * 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; + */ + public java.util.List + getBucketBoundsList() { + return java.util.Collections.unmodifiableList(bucketBounds_); + } + /** + *
+       * 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; + */ + public int getBucketBoundsCount() { + return bucketBounds_.size(); + } + /** + *
+       * 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; + */ + public double getBucketBounds(int index) { + return bucketBounds_.get(index); + } + /** + *
+       * 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; + */ + public Builder setBucketBounds( + int index, double value) { + ensureBucketBoundsIsMutable(); + bucketBounds_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder addBucketBounds(double value) { + ensureBucketBoundsIsMutable(); + bucketBounds_.add(value); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder addAllBucketBounds( + java.lang.Iterable values) { + ensureBucketBoundsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucketBounds_); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + java.util.List + getIntervalsList(); + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getIntervals(int index); + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + int getIntervalsCount(); + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + java.util.List + getIntervalsOrBuilderList(); + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder getIntervalsOrBuilder( + int index); + + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + java.util.List + getTagsList(); + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index); + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + int getTagsCount(); + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + java.util.List + getTagsOrBuilderList(); + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( + int index); + } + /** + *
+   * 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.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private IntervalAggregation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + intervals_ = new java.util.ArrayList(); + 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(); + 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_); + } + 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 { + + /** + *
+       * The interval duration. Must be positive.
+       * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + boolean hasIntervalSize(); + /** + *
+       * The interval duration. Must be positive.
+       * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSize(); + /** + *
+       * The interval duration. Must be positive.
+       * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizeOrBuilder(); + + /** + *
+       * Approximate number of measurements recorded in this interval.
+       * 
+ * + * double count = 2; + */ + double getCount(); + + /** + *
+       * The cumulative sum of measurements in this interval.
+       * 
+ * + * double sum = 3; + */ + double getSum(); + } + /** + *
+     * Summary statistic over a single time interval.
+     * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Interval( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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_; + /** + *
+       * The interval duration. Must be positive.
+       * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + public boolean hasIntervalSize() { + return intervalSize_ != null; + } + /** + *
+       * The interval duration. Must be positive.
+       * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSize() { + return intervalSize_ == null ? com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance() : intervalSize_; + } + /** + *
+       * The interval duration. Must be positive.
+       * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizeOrBuilder() { + return getIntervalSize(); + } + + public static final int COUNT_FIELD_NUMBER = 2; + private double count_; + /** + *
+       * Approximate number of measurements recorded in this interval.
+       * 
+ * + * double count = 2; + */ + public double getCount() { + return count_; + } + + public static final int SUM_FIELD_NUMBER = 3; + private double sum_; + /** + *
+       * The cumulative sum of measurements in this interval.
+       * 
+ * + * double sum = 3; + */ + 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_); + } + } + + 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_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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())); + 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( + 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; + } + /** + *
+       * Summary statistic over a single time interval.
+       * 
+ * + * Protobuf type {@code google.instrumentation.IntervalAggregation.Interval} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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()); + } + 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_; + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + public boolean hasIntervalSize() { + return intervalSizeBuilder_ != null || intervalSize_ != null; + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + 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(); + } + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + 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; + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + 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; + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + 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; + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + public Builder clearIntervalSize() { + if (intervalSizeBuilder_ == null) { + intervalSize_ = null; + onChanged(); + } else { + intervalSize_ = null; + intervalSizeBuilder_ = null; + } + + return this; + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder getIntervalSizeBuilder() { + + onChanged(); + return getIntervalSizeFieldBuilder().getBuilder(); + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + 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_; + } + } + /** + *
+         * The interval duration. Must be positive.
+         * 
+ * + * .google.instrumentation.Duration interval_size = 1; + */ + 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_ ; + /** + *
+         * Approximate number of measurements recorded in this interval.
+         * 
+ * + * double count = 2; + */ + public double getCount() { + return count_; + } + /** + *
+         * Approximate number of measurements recorded in this interval.
+         * 
+ * + * double count = 2; + */ + public Builder setCount(double value) { + + count_ = value; + onChanged(); + return this; + } + /** + *
+         * Approximate number of measurements recorded in this interval.
+         * 
+ * + * double count = 2; + */ + public Builder clearCount() { + + count_ = 0D; + onChanged(); + return this; + } + + private double sum_ ; + /** + *
+         * The cumulative sum of measurements in this interval.
+         * 
+ * + * double sum = 3; + */ + public double getSum() { + return sum_; + } + /** + *
+         * The cumulative sum of measurements in this interval.
+         * 
+ * + * double sum = 3; + */ + public Builder setSum(double value) { + + sum_ = value; + onChanged(); + return this; + } + /** + *
+         * The cumulative sum of measurements in this interval.
+         * 
+ * + * double sum = 3; + */ + public Builder clearSum() { + + sum_ = 0D; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 intervals_; + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public java.util.List getIntervalsList() { + return intervals_; + } + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public java.util.List + getIntervalsOrBuilderList() { + return intervals_; + } + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public int getIntervalsCount() { + return intervals_.size(); + } + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getIntervals(int index) { + return intervals_.get(index); + } + /** + *
+     * Full set of intervals for this aggregation.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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 tags_; + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public java.util.List getTagsList() { + return tags_; + } + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public java.util.List + getTagsOrBuilderList() { + return tags_; + } + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public int getTagsCount() { + return tags_.size(); + } + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { + return tags_.get(index); + } + /** + *
+     * Tags associated with this IntervalAggregation. These will be filled in
+     * based on the View specification.
+     * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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)); + } + } + + 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)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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; + } + /** + *
+     * 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.
+     * 
+ * + * Protobuf type {@code google.instrumentation.IntervalAggregation} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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_); + } + } + } + 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 intervals_ = + java.util.Collections.emptyList(); + private void ensureIntervalsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + intervals_ = new java.util.ArrayList(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_; + + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public java.util.List getIntervalsList() { + if (intervalsBuilder_ == null) { + return java.util.Collections.unmodifiableList(intervals_); + } else { + return intervalsBuilder_.getMessageList(); + } + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public int getIntervalsCount() { + if (intervalsBuilder_ == null) { + return intervals_.size(); + } else { + return intervalsBuilder_.getCount(); + } + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval getIntervals(int index) { + if (intervalsBuilder_ == null) { + return intervals_.get(index); + } else { + return intervalsBuilder_.getMessage(index); + } + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public Builder addAllIntervals( + java.lang.Iterable values) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, intervals_); + onChanged(); + } else { + intervalsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public Builder clearIntervals() { + if (intervalsBuilder_ == null) { + intervals_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + intervalsBuilder_.clear(); + } + return this; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public Builder removeIntervals(int index) { + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.remove(index); + onChanged(); + } else { + intervalsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder getIntervalsBuilder( + int index) { + return getIntervalsFieldBuilder().getBuilder(index); + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.IntervalOrBuilder getIntervalsOrBuilder( + int index) { + if (intervalsBuilder_ == null) { + return intervals_.get(index); } else { + return intervalsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public java.util.List + getIntervalsOrBuilderList() { + if (intervalsBuilder_ != null) { + return intervalsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intervals_); + } + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.Builder addIntervalsBuilder() { + return getIntervalsFieldBuilder().addBuilder( + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Interval.getDefaultInstance()); + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + 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()); + } + /** + *
+       * Full set of intervals for this aggregation.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation.Interval intervals = 1; + */ + public java.util.List + 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 tags_ = + java.util.Collections.emptyList(); + private void ensureTagsIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + tags_ = new java.util.ArrayList(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_; + + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public java.util.List getTagsList() { + if (tagsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tags_); + } else { + return tagsBuilder_.getMessageList(); + } + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public int getTagsCount() { + if (tagsBuilder_ == null) { + return tags_.size(); + } else { + return tagsBuilder_.getCount(); + } + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag getTags(int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); + } else { + return tagsBuilder_.getMessage(index); + } + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + 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; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public Builder addAllTags( + java.lang.Iterable values) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tags_); + onChanged(); + } else { + tagsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public Builder clearTags() { + if (tagsBuilder_ == null) { + tags_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + tagsBuilder_.clear(); + } + return this; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public Builder removeTags(int index) { + if (tagsBuilder_ == null) { + ensureTagsIsMutable(); + tags_.remove(index); + onChanged(); + } else { + tagsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder getTagsBuilder( + int index) { + return getTagsFieldBuilder().getBuilder(index); + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.TagOrBuilder getTagsOrBuilder( + int index) { + if (tagsBuilder_ == null) { + return tags_.get(index); } else { + return tagsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public java.util.List + getTagsOrBuilderList() { + if (tagsBuilder_ != null) { + return tagsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tags_); + } + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder() { + return getTagsFieldBuilder().addBuilder( + com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Tag.Builder addTagsBuilder( + int index) { + return getTagsFieldBuilder().addBuilder( + index, com.google.instrumentation.stats.proto.CensusProto.Tag.getDefaultInstance()); + } + /** + *
+       * Tags associated with this IntervalAggregation. These will be filled in
+       * based on the View specification.
+       * 
+ * + * repeated .google.instrumentation.Tag tags = 2; + */ + public java.util.List + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * 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; + */ + int getNSubIntervals(); + + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + java.util.List + getIntervalSizesList(); + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSizes(int index); + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + int getIntervalSizesCount(); + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + java.util.List + getIntervalSizesOrBuilderList(); + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizesOrBuilder( + int index); + } + /** + *
+   * An IntervalAggreationDescriptor specifies time intervals for an
+   * IntervalAggregation.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private IntervalAggregationDescriptor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 8: { + + nSubIntervals_ = input.readInt32(); + break; + } + case 18: { + if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + intervalSizes_ = new java.util.ArrayList(); + 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_); + } + 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_; + /** + *
+     * 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; + */ + public int getNSubIntervals() { + return nSubIntervals_; + } + + public static final int INTERVAL_SIZES_FIELD_NUMBER = 2; + private java.util.List intervalSizes_; + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public java.util.List getIntervalSizesList() { + return intervalSizes_; + } + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public java.util.List + getIntervalSizesOrBuilderList() { + return intervalSizes_; + } + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public int getIntervalSizesCount() { + return intervalSizes_.size(); + } + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSizes(int index) { + return intervalSizes_.get(index); + } + /** + *
+     * The size of each interval, as a time duration. Must have at least one
+     * element.
+     * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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)); + } + } + + 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)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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; + } + /** + *
+     * An IntervalAggreationDescriptor specifies time intervals for an
+     * IntervalAggregation.
+     * 
+ * + * Protobuf type {@code google.instrumentation.IntervalAggregationDescriptor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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_); + } + } + } + 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_ ; + /** + *
+       * 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; + */ + public int getNSubIntervals() { + return nSubIntervals_; + } + /** + *
+       * 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; + */ + public Builder setNSubIntervals(int value) { + + nSubIntervals_ = value; + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder clearNSubIntervals() { + + nSubIntervals_ = 0; + onChanged(); + return this; + } + + private java.util.List intervalSizes_ = + java.util.Collections.emptyList(); + private void ensureIntervalSizesIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + intervalSizes_ = new java.util.ArrayList(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_; + + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public java.util.List getIntervalSizesList() { + if (intervalSizesBuilder_ == null) { + return java.util.Collections.unmodifiableList(intervalSizes_); + } else { + return intervalSizesBuilder_.getMessageList(); + } + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public int getIntervalSizesCount() { + if (intervalSizesBuilder_ == null) { + return intervalSizes_.size(); + } else { + return intervalSizesBuilder_.getCount(); + } + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration getIntervalSizes(int index) { + if (intervalSizesBuilder_ == null) { + return intervalSizes_.get(index); + } else { + return intervalSizesBuilder_.getMessage(index); + } + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + 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; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public Builder addAllIntervalSizes( + java.lang.Iterable values) { + if (intervalSizesBuilder_ == null) { + ensureIntervalSizesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, intervalSizes_); + onChanged(); + } else { + intervalSizesBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public Builder clearIntervalSizes() { + if (intervalSizesBuilder_ == null) { + intervalSizes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + intervalSizesBuilder_.clear(); + } + return this; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public Builder removeIntervalSizes(int index) { + if (intervalSizesBuilder_ == null) { + ensureIntervalSizesIsMutable(); + intervalSizes_.remove(index); + onChanged(); + } else { + intervalSizesBuilder_.remove(index); + } + return this; + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder getIntervalSizesBuilder( + int index) { + return getIntervalSizesFieldBuilder().getBuilder(index); + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.DurationOrBuilder getIntervalSizesOrBuilder( + int index) { + if (intervalSizesBuilder_ == null) { + return intervalSizes_.get(index); } else { + return intervalSizesBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public java.util.List + getIntervalSizesOrBuilderList() { + if (intervalSizesBuilder_ != null) { + return intervalSizesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(intervalSizes_); + } + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder addIntervalSizesBuilder() { + return getIntervalSizesFieldBuilder().addBuilder( + com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance()); + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Duration.Builder addIntervalSizesBuilder( + int index) { + return getIntervalSizesFieldBuilder().addBuilder( + index, com.google.instrumentation.stats.proto.CensusProto.Duration.getDefaultInstance()); + } + /** + *
+       * The size of each interval, as a time duration. Must have at least one
+       * element.
+       * 
+ * + * repeated .google.instrumentation.Duration interval_sizes = 2; + */ + public java.util.List + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + * string key = 1; + */ + java.lang.String getKey(); + /** + * string key = 1; + */ + com.google.protobuf.ByteString + getKeyBytes(); + + /** + * string value = 2; + */ + java.lang.String getValue(); + /** + * string value = 2; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + *
+   * A Tag: key-value pair.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Tag( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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_; + /** + * string key = 1; + */ + 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; + } + } + /** + * string key = 1; + */ + 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_; + /** + * string value = 2; + */ + 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; + } + } + /** + * string value = 2; + */ + 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_); + } + } + + 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_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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; + } + /** + *
+     * A Tag: key-value pair.
+     * 
+ * + * Protobuf type {@code google.instrumentation.Tag} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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(); + } + 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_ = ""; + /** + * string key = 1; + */ + 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; + } + } + /** + * string key = 1; + */ + 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; + } + } + /** + * string key = 1; + */ + public Builder setKey( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + key_ = value; + onChanged(); + return this; + } + /** + * string key = 1; + */ + public Builder clearKey() { + + key_ = getDefaultInstance().getKey(); + onChanged(); + return this; + } + /** + * string key = 1; + */ + 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_ = ""; + /** + * string value = 2; + */ + 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; + } + } + /** + * string value = 2; + */ + 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; + } + } + /** + * string value = 2; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * string value = 2; + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * string value = 2; + */ + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * Name of view. Must be unique.
+     * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+     * Name of view. Must be unique.
+     * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + *
+     * More detailed description, for documentation purposes.
+     * 
+ * + * string description = 2; + */ + java.lang.String getDescription(); + /** + *
+     * More detailed description, for documentation purposes.
+     * 
+ * + * string description = 2; + */ + com.google.protobuf.ByteString + getDescriptionBytes(); + + /** + *
+     * Name of a MeasurementDescriptor to be used for this view.
+     * 
+ * + * string measurement_descriptor_name = 3; + */ + java.lang.String getMeasurementDescriptorName(); + /** + *
+     * Name of a MeasurementDescriptor to be used for this view.
+     * 
+ * + * string measurement_descriptor_name = 3; + */ + com.google.protobuf.ByteString + getMeasurementDescriptorNameBytes(); + + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor getIntervalAggregation(); + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptorOrBuilder getIntervalAggregationOrBuilder(); + + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor getDistributionAggregation(); + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptorOrBuilder getDistributionAggregationOrBuilder(); + + /** + *
+     * 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; + */ + java.util.List + getTagKeysList(); + /** + *
+     * 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; + */ + int getTagKeysCount(); + /** + *
+     * 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; + */ + java.lang.String getTagKeys(int index); + /** + *
+     * 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; + */ + com.google.protobuf.ByteString + getTagKeysBytes(int index); + + public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.AggregationCase getAggregationCase(); + } + /** + *
+   * 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.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private ViewDescriptor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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(); + } + 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_; + /** + *
+     * Name of view. Must be unique.
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * Name of view. Must be unique.
+     * 
+ * + * string name = 1; + */ + 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_; + /** + *
+     * More detailed description, for documentation purposes.
+     * 
+ * + * string description = 2; + */ + 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; + } + } + /** + *
+     * More detailed description, for documentation purposes.
+     * 
+ * + * string description = 2; + */ + 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_; + /** + *
+     * Name of a MeasurementDescriptor to be used for this view.
+     * 
+ * + * string measurement_descriptor_name = 3; + */ + 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; + } + } + /** + *
+     * Name of a MeasurementDescriptor to be used for this view.
+     * 
+ * + * string measurement_descriptor_name = 3; + */ + 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; + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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(); + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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; + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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(); + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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_; + /** + *
+     * 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; + */ + public com.google.protobuf.ProtocolStringList + getTagKeysList() { + return tagKeys_; + } + /** + *
+     * 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; + */ + public int getTagKeysCount() { + return tagKeys_.size(); + } + /** + *
+     * 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; + */ + public java.lang.String getTagKeys(int index) { + return tagKeys_.get(index); + } + /** + *
+     * 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; + */ + 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)); + } + } + + 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(); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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: + } + 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( + 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; + } + /** + *
+     * 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.
+     * 
+ * + * Protobuf type {@code google.instrumentation.ViewDescriptor} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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; + } + } + 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_ = ""; + /** + *
+       * Name of view. Must be unique.
+       * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+       * Name of view. Must be unique.
+       * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+       * Name of view. Must be unique.
+       * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of view. Must be unique.
+       * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+       * Name of view. Must be unique.
+       * 
+ * + * string name = 1; + */ + 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_ = ""; + /** + *
+       * More detailed description, for documentation purposes.
+       * 
+ * + * string description = 2; + */ + 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; + } + } + /** + *
+       * More detailed description, for documentation purposes.
+       * 
+ * + * string description = 2; + */ + 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; + } + } + /** + *
+       * More detailed description, for documentation purposes.
+       * 
+ * + * string description = 2; + */ + public Builder setDescription( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + *
+       * More detailed description, for documentation purposes.
+       * 
+ * + * string description = 2; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + *
+       * More detailed description, for documentation purposes.
+       * 
+ * + * string description = 2; + */ + 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_ = ""; + /** + *
+       * Name of a MeasurementDescriptor to be used for this view.
+       * 
+ * + * string measurement_descriptor_name = 3; + */ + 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; + } + } + /** + *
+       * Name of a MeasurementDescriptor to be used for this view.
+       * 
+ * + * string measurement_descriptor_name = 3; + */ + 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; + } + } + /** + *
+       * Name of a MeasurementDescriptor to be used for this view.
+       * 
+ * + * string measurement_descriptor_name = 3; + */ + public Builder setMeasurementDescriptorName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + measurementDescriptorName_ = value; + onChanged(); + return this; + } + /** + *
+       * Name of a MeasurementDescriptor to be used for this view.
+       * 
+ * + * string measurement_descriptor_name = 3; + */ + public Builder clearMeasurementDescriptorName() { + + measurementDescriptorName_ = getDefaultInstance().getMeasurementDescriptorName(); + onChanged(); + return this; + } + /** + *
+       * Name of a MeasurementDescriptor to be used for this view.
+       * 
+ * + * string measurement_descriptor_name = 3; + */ + 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_; + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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(); + } + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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; + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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; + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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; + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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; + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationDescriptor.Builder getIntervalAggregationBuilder() { + return getIntervalAggregationFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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(); + } + } + /** + * .google.instrumentation.IntervalAggregationDescriptor interval_aggregation = 4; + */ + 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_; + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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(); + } + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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; + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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; + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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; + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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; + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationDescriptor.Builder getDistributionAggregationBuilder() { + return getDistributionAggregationFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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(); + } + } + /** + * .google.instrumentation.DistributionAggregationDescriptor distribution_aggregation = 5; + */ + 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; + } + } + /** + *
+       * 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; + */ + public com.google.protobuf.ProtocolStringList + getTagKeysList() { + return tagKeys_.getUnmodifiableView(); + } + /** + *
+       * 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; + */ + public int getTagKeysCount() { + return tagKeys_.size(); + } + /** + *
+       * 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; + */ + public java.lang.String getTagKeys(int index) { + return tagKeys_.get(index); + } + /** + *
+       * 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; + */ + public com.google.protobuf.ByteString + getTagKeysBytes(int index) { + return tagKeys_.getByteString(index); + } + /** + *
+       * 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; + */ + public Builder setTagKeys( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagKeysIsMutable(); + tagKeys_.set(index, value); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder addTagKeys( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureTagKeysIsMutable(); + tagKeys_.add(value); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder addAllTagKeys( + java.lang.Iterable values) { + ensureTagKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, tagKeys_); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + public Builder clearTagKeys() { + tagKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000020); + onChanged(); + return this; + } + /** + *
+       * 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; + */ + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + java.util.List + getAggregationsList(); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getAggregations(int index); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + int getAggregationsCount(); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + java.util.List + getAggregationsOrBuilderList(); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder getAggregationsOrBuilder( + int index); + + /** + *
+     * Start and end timestamps over which aggregations was accumulated.
+     * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + boolean hasStart(); + /** + *
+     * Start and end timestamps over which aggregations was accumulated.
+     * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.Timestamp getStart(); + /** + *
+     * Start and end timestamps over which aggregations was accumulated.
+     * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getStartOrBuilder(); + + /** + * .google.instrumentation.Timestamp end = 3; + */ + boolean hasEnd(); + /** + * .google.instrumentation.Timestamp end = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.Timestamp getEnd(); + /** + * .google.instrumentation.Timestamp end = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.TimestampOrBuilder getEndOrBuilder(); + } + /** + *
+   * DistributionView contains all aggregations for a view specified using a
+   * DistributionAggregationDescriptor.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private DistributionView( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + aggregations_ = new java.util.ArrayList(); + 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_); + } + 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 aggregations_; + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public java.util.List getAggregationsList() { + return aggregations_; + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public java.util.List + getAggregationsOrBuilderList() { + return aggregations_; + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public int getAggregationsCount() { + return aggregations_.size(); + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getAggregations(int index) { + return aggregations_.get(index); + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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_; + /** + *
+     * Start and end timestamps over which aggregations was accumulated.
+     * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + public boolean hasStart() { + return start_ != null; + } + /** + *
+     * Start and end timestamps over which aggregations was accumulated.
+     * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Timestamp getStart() { + return start_ == null ? com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : start_; + } + /** + *
+     * Start and end timestamps over which aggregations was accumulated.
+     * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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_; + /** + * .google.instrumentation.Timestamp end = 3; + */ + public boolean hasEnd() { + return end_ != null; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.Timestamp getEnd() { + return end_ == null ? com.google.instrumentation.stats.proto.CensusProto.Timestamp.getDefaultInstance() : end_; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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()); + } + } + + 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()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + } + 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( + 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; + } + /** + *
+     * DistributionView contains all aggregations for a view specified using a
+     * DistributionAggregationDescriptor.
+     * 
+ * + * Protobuf type {@code google.instrumentation.DistributionView} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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()); + } + 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 aggregations_ = + java.util.Collections.emptyList(); + private void ensureAggregationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + aggregations_ = new java.util.ArrayList(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_; + + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public java.util.List getAggregationsList() { + if (aggregationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggregations_); + } else { + return aggregationsBuilder_.getMessageList(); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public int getAggregationsCount() { + if (aggregationsBuilder_ == null) { + return aggregations_.size(); + } else { + return aggregationsBuilder_.getCount(); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation getAggregations(int index) { + if (aggregationsBuilder_ == null) { + return aggregations_.get(index); + } else { + return aggregationsBuilder_.getMessage(index); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public Builder addAllAggregations( + java.lang.Iterable values) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aggregations_); + onChanged(); + } else { + aggregationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public Builder clearAggregations() { + if (aggregationsBuilder_ == null) { + aggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + aggregationsBuilder_.clear(); + } + return this; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public Builder removeAggregations(int index) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.remove(index); + onChanged(); + } else { + aggregationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder getAggregationsBuilder( + int index) { + return getAggregationsFieldBuilder().getBuilder(index); + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregationOrBuilder getAggregationsOrBuilder( + int index) { + if (aggregationsBuilder_ == null) { + return aggregations_.get(index); } else { + return aggregationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public java.util.List + getAggregationsOrBuilderList() { + if (aggregationsBuilder_ != null) { + return aggregationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggregations_); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder addAggregationsBuilder() { + return getAggregationsFieldBuilder().addBuilder( + com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.getDefaultInstance()); + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.Builder addAggregationsBuilder( + int index) { + return getAggregationsFieldBuilder().addBuilder( + index, com.google.instrumentation.stats.proto.CensusProto.DistributionAggregation.getDefaultInstance()); + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.DistributionAggregation aggregations = 1; + */ + public java.util.List + 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_; + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + public boolean hasStart() { + return startBuilder_ != null || start_ != null; + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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(); + } + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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; + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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; + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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; + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + public Builder clearStart() { + if (startBuilder_ == null) { + start_ = null; + onChanged(); + } else { + start_ = null; + startBuilder_ = null; + } + + return this; + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder getStartBuilder() { + + onChanged(); + return getStartFieldBuilder().getBuilder(); + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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_; + } + } + /** + *
+       * Start and end timestamps over which aggregations was accumulated.
+       * 
+ * + * .google.instrumentation.Timestamp start = 2; + */ + 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_; + /** + * .google.instrumentation.Timestamp end = 3; + */ + public boolean hasEnd() { + return endBuilder_ != null || end_ != null; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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(); + } + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + public Builder clearEnd() { + if (endBuilder_ == null) { + end_ = null; + onChanged(); + } else { + end_ = null; + endBuilder_ = null; + } + + return this; + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.Timestamp.Builder getEndBuilder() { + + onChanged(); + return getEndFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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_; + } + } + /** + * .google.instrumentation.Timestamp end = 3; + */ + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + java.util.List + getAggregationsList(); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getAggregations(int index); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + int getAggregationsCount(); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + java.util.List + getAggregationsOrBuilderList(); + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder getAggregationsOrBuilder( + int index); + } + /** + *
+   * IntervalView contains all aggregations for a view specified using a
+   * IntervalAggregationDescriptor.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private IntervalView( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + aggregations_ = new java.util.ArrayList(); + 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_); + } + 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 aggregations_; + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public java.util.List getAggregationsList() { + return aggregations_; + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public java.util.List + getAggregationsOrBuilderList() { + return aggregations_; + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public int getAggregationsCount() { + return aggregations_.size(); + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getAggregations(int index) { + return aggregations_.get(index); + } + /** + *
+     * Aggregations - each will have a unique set of tag values for the tag_keys
+     * associated with the corresponding View.
+     * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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)); + } + } + + 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)); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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()); + 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( + 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; + } + /** + *
+     * IntervalView contains all aggregations for a view specified using a
+     * IntervalAggregationDescriptor.
+     * 
+ * + * Protobuf type {@code google.instrumentation.IntervalView} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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_); + } + } + } + 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 aggregations_ = + java.util.Collections.emptyList(); + private void ensureAggregationsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + aggregations_ = new java.util.ArrayList(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_; + + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public java.util.List getAggregationsList() { + if (aggregationsBuilder_ == null) { + return java.util.Collections.unmodifiableList(aggregations_); + } else { + return aggregationsBuilder_.getMessageList(); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public int getAggregationsCount() { + if (aggregationsBuilder_ == null) { + return aggregations_.size(); + } else { + return aggregationsBuilder_.getCount(); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation getAggregations(int index) { + if (aggregationsBuilder_ == null) { + return aggregations_.get(index); + } else { + return aggregationsBuilder_.getMessage(index); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + 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; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public Builder addAllAggregations( + java.lang.Iterable values) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, aggregations_); + onChanged(); + } else { + aggregationsBuilder_.addAllMessages(values); + } + return this; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public Builder clearAggregations() { + if (aggregationsBuilder_ == null) { + aggregations_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + aggregationsBuilder_.clear(); + } + return this; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public Builder removeAggregations(int index) { + if (aggregationsBuilder_ == null) { + ensureAggregationsIsMutable(); + aggregations_.remove(index); + onChanged(); + } else { + aggregationsBuilder_.remove(index); + } + return this; + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder getAggregationsBuilder( + int index) { + return getAggregationsFieldBuilder().getBuilder(index); + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregationOrBuilder getAggregationsOrBuilder( + int index) { + if (aggregationsBuilder_ == null) { + return aggregations_.get(index); } else { + return aggregationsBuilder_.getMessageOrBuilder(index); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public java.util.List + getAggregationsOrBuilderList() { + if (aggregationsBuilder_ != null) { + return aggregationsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(aggregations_); + } + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder addAggregationsBuilder() { + return getAggregationsFieldBuilder().addBuilder( + com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.getDefaultInstance()); + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.Builder addAggregationsBuilder( + int index) { + return getAggregationsFieldBuilder().addBuilder( + index, com.google.instrumentation.stats.proto.CensusProto.IntervalAggregation.getDefaultInstance()); + } + /** + *
+       * Aggregations - each will have a unique set of tag values for the tag_keys
+       * associated with the corresponding View.
+       * 
+ * + * repeated .google.instrumentation.IntervalAggregation aggregations = 1; + */ + public java.util.List + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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 { + + /** + *
+     * ViewDescriptor name associated with this set of View.
+     * 
+ * + * string view_name = 1; + */ + java.lang.String getViewName(); + /** + *
+     * ViewDescriptor name associated with this set of View.
+     * 
+ * + * string view_name = 1; + */ + com.google.protobuf.ByteString + getViewNameBytes(); + + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionView getDistributionView(); + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.DistributionViewOrBuilder getDistributionViewOrBuilder(); + + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalView getIntervalView(); + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.IntervalViewOrBuilder getIntervalViewOrBuilder(); + + public com.google.instrumentation.stats.proto.CensusProto.View.ViewCase getViewCase(); + } + /** + *
+   * A View contains the aggregations based on a ViewDescriptor.
+   * 
+ * + * 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 { + // 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 com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private View( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(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 { + 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_; + /** + *
+     * ViewDescriptor name associated with this set of View.
+     * 
+ * + * string view_name = 1; + */ + 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; + } + } + /** + *
+     * ViewDescriptor name associated with this set of View.
+     * 
+ * + * string view_name = 1; + */ + 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; + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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(); + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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; + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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(); + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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_); + } + } + + 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_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @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: + } + 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( + 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; + } + /** + *
+     * A View contains the aggregations based on a ViewDescriptor.
+     * 
+ * + * Protobuf type {@code google.instrumentation.View} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.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, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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; + } + } + 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_ = ""; + /** + *
+       * ViewDescriptor name associated with this set of View.
+       * 
+ * + * string view_name = 1; + */ + 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; + } + } + /** + *
+       * ViewDescriptor name associated with this set of View.
+       * 
+ * + * string view_name = 1; + */ + 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; + } + } + /** + *
+       * ViewDescriptor name associated with this set of View.
+       * 
+ * + * string view_name = 1; + */ + public Builder setViewName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + viewName_ = value; + onChanged(); + return this; + } + /** + *
+       * ViewDescriptor name associated with this set of View.
+       * 
+ * + * string view_name = 1; + */ + public Builder clearViewName() { + + viewName_ = getDefaultInstance().getViewName(); + onChanged(); + return this; + } + /** + *
+       * ViewDescriptor name associated with this set of View.
+       * 
+ * + * string view_name = 1; + */ + 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_; + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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(); + } + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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; + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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; + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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; + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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; + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.DistributionView.Builder getDistributionViewBuilder() { + return getDistributionViewFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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(); + } + } + /** + * .google.instrumentation.DistributionView distribution_view = 2; + */ + 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_; + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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(); + } + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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; + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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; + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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; + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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; + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.IntervalView.Builder getIntervalViewBuilder() { + return getIntervalViewFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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(); + } + } + /** + * .google.instrumentation.IntervalView interval_view = 3; + */ + 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 this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@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 + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser 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/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStats.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStats.java new file mode 100644 index 0000000000..9a62cbfacc --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStats.java @@ -0,0 +1,4456 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + *
+ * Canonical RPC stats exported by gRPC.
+ * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.CanonicalRpcStats} + */ +public final class CanonicalRpcStats extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.CanonicalRpcStats) + CanonicalRpcStatsOrBuilder { + // Use CanonicalRpcStats.newBuilder() to construct. + private CanonicalRpcStats(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CanonicalRpcStats() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CanonicalRpcStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientErrors_ != null) { + subBuilder = rpcClientErrors_.toBuilder(); + } + rpcClientErrors_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientErrors_); + rpcClientErrors_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientCompletedRpcs_ != null) { + subBuilder = rpcClientCompletedRpcs_.toBuilder(); + } + rpcClientCompletedRpcs_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientCompletedRpcs_); + rpcClientCompletedRpcs_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientStartedRpcs_ != null) { + subBuilder = rpcClientStartedRpcs_.toBuilder(); + } + rpcClientStartedRpcs_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientStartedRpcs_); + rpcClientStartedRpcs_ = subBuilder.buildPartial(); + } + + break; + } + case 34: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientElapsedTime_ != null) { + subBuilder = rpcClientElapsedTime_.toBuilder(); + } + rpcClientElapsedTime_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientElapsedTime_); + rpcClientElapsedTime_ = subBuilder.buildPartial(); + } + + break; + } + case 42: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientServerElapsedTime_ != null) { + subBuilder = rpcClientServerElapsedTime_.toBuilder(); + } + rpcClientServerElapsedTime_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientServerElapsedTime_); + rpcClientServerElapsedTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientRequestBytes_ != null) { + subBuilder = rpcClientRequestBytes_.toBuilder(); + } + rpcClientRequestBytes_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientRequestBytes_); + rpcClientRequestBytes_ = subBuilder.buildPartial(); + } + + break; + } + case 58: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientResponseBytes_ != null) { + subBuilder = rpcClientResponseBytes_.toBuilder(); + } + rpcClientResponseBytes_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientResponseBytes_); + rpcClientResponseBytes_ = subBuilder.buildPartial(); + } + + break; + } + case 66: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientRequestCount_ != null) { + subBuilder = rpcClientRequestCount_.toBuilder(); + } + rpcClientRequestCount_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientRequestCount_); + rpcClientRequestCount_ = subBuilder.buildPartial(); + } + + break; + } + case 74: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcClientResponseCount_ != null) { + subBuilder = rpcClientResponseCount_.toBuilder(); + } + rpcClientResponseCount_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcClientResponseCount_); + rpcClientResponseCount_ = subBuilder.buildPartial(); + } + + break; + } + case 82: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerErrors_ != null) { + subBuilder = rpcServerErrors_.toBuilder(); + } + rpcServerErrors_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerErrors_); + rpcServerErrors_ = subBuilder.buildPartial(); + } + + break; + } + case 90: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerCompletedRpcs_ != null) { + subBuilder = rpcServerCompletedRpcs_.toBuilder(); + } + rpcServerCompletedRpcs_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerCompletedRpcs_); + rpcServerCompletedRpcs_ = subBuilder.buildPartial(); + } + + break; + } + case 98: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerServerElapsedTime_ != null) { + subBuilder = rpcServerServerElapsedTime_.toBuilder(); + } + rpcServerServerElapsedTime_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerServerElapsedTime_); + rpcServerServerElapsedTime_ = subBuilder.buildPartial(); + } + + break; + } + case 106: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerRequestBytes_ != null) { + subBuilder = rpcServerRequestBytes_.toBuilder(); + } + rpcServerRequestBytes_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerRequestBytes_); + rpcServerRequestBytes_ = subBuilder.buildPartial(); + } + + break; + } + case 114: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerResponseBytes_ != null) { + subBuilder = rpcServerResponseBytes_.toBuilder(); + } + rpcServerResponseBytes_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerResponseBytes_); + rpcServerResponseBytes_ = subBuilder.buildPartial(); + } + + break; + } + case 122: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerRequestCount_ != null) { + subBuilder = rpcServerRequestCount_.toBuilder(); + } + rpcServerRequestCount_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerRequestCount_); + rpcServerRequestCount_ = subBuilder.buildPartial(); + } + + break; + } + case 130: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerResponseCount_ != null) { + subBuilder = rpcServerResponseCount_.toBuilder(); + } + rpcServerResponseCount_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerResponseCount_); + rpcServerResponseCount_ = subBuilder.buildPartial(); + } + + break; + } + case 138: { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder subBuilder = null; + if (rpcServerElapsedTime_ != null) { + subBuilder = rpcServerElapsedTime_.toBuilder(); + } + rpcServerElapsedTime_ = input.readMessage(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rpcServerElapsedTime_); + rpcServerElapsedTime_ = 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.class, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.Builder.class); + } + + public interface ViewOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.CanonicalRpcStats.View) + com.google.protobuf.MessageOrBuilder { + + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + boolean hasMeasurementDescriptor(); + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getMeasurementDescriptor(); + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder getMeasurementDescriptorOrBuilder(); + + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + boolean hasViewDescriptor(); + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getViewDescriptor(); + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder getViewDescriptorOrBuilder(); + + /** + * .google.instrumentation.View view = 3; + */ + boolean hasView(); + /** + * .google.instrumentation.View view = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.View getView(); + /** + * .google.instrumentation.View view = 3; + */ + com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder getViewOrBuilder(); + } + /** + *
+   * Wrapper combining View and ViewDescriptor.
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.CanonicalRpcStats.View} + */ + public static final class View extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.CanonicalRpcStats.View) + ViewOrBuilder { + // Use View.newBuilder() to construct. + private View(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private View() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private View( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder subBuilder = null; + if (measurementDescriptor_ != null) { + subBuilder = measurementDescriptor_.toBuilder(); + } + measurementDescriptor_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(measurementDescriptor_); + measurementDescriptor_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder subBuilder = null; + if (viewDescriptor_ != null) { + subBuilder = viewDescriptor_.toBuilder(); + } + viewDescriptor_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(viewDescriptor_); + viewDescriptor_ = subBuilder.buildPartial(); + } + + break; + } + case 26: { + com.google.instrumentation.stats.proto.CensusProto.View.Builder subBuilder = null; + if (view_ != null) { + subBuilder = view_.toBuilder(); + } + view_ = input.readMessage(com.google.instrumentation.stats.proto.CensusProto.View.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(view_); + view_ = 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.class, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder.class); + } + + public static final int MEASUREMENT_DESCRIPTOR_FIELD_NUMBER = 1; + private com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor measurementDescriptor_; + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public boolean hasMeasurementDescriptor() { + return measurementDescriptor_ != null; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getMeasurementDescriptor() { + return measurementDescriptor_ == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.getDefaultInstance() : measurementDescriptor_; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder getMeasurementDescriptorOrBuilder() { + return getMeasurementDescriptor(); + } + + public static final int VIEW_DESCRIPTOR_FIELD_NUMBER = 2; + private com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor viewDescriptor_; + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public boolean hasViewDescriptor() { + return viewDescriptor_ != null; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getViewDescriptor() { + return viewDescriptor_ == null ? com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.getDefaultInstance() : viewDescriptor_; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder getViewDescriptorOrBuilder() { + return getViewDescriptor(); + } + + public static final int VIEW_FIELD_NUMBER = 3; + private com.google.instrumentation.stats.proto.CensusProto.View view_; + /** + * .google.instrumentation.View view = 3; + */ + public boolean hasView() { + return view_ != null; + } + /** + * .google.instrumentation.View view = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.View getView() { + return view_ == null ? com.google.instrumentation.stats.proto.CensusProto.View.getDefaultInstance() : view_; + } + /** + * .google.instrumentation.View view = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder getViewOrBuilder() { + return getView(); + } + + 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 (measurementDescriptor_ != null) { + output.writeMessage(1, getMeasurementDescriptor()); + } + if (viewDescriptor_ != null) { + output.writeMessage(2, getViewDescriptor()); + } + if (view_ != null) { + output.writeMessage(3, getView()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (measurementDescriptor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getMeasurementDescriptor()); + } + if (viewDescriptor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getViewDescriptor()); + } + if (view_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getView()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View other = (io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View) obj; + + boolean result = true; + result = result && (hasMeasurementDescriptor() == other.hasMeasurementDescriptor()); + if (hasMeasurementDescriptor()) { + result = result && getMeasurementDescriptor() + .equals(other.getMeasurementDescriptor()); + } + result = result && (hasViewDescriptor() == other.hasViewDescriptor()); + if (hasViewDescriptor()) { + result = result && getViewDescriptor() + .equals(other.getViewDescriptor()); + } + result = result && (hasView() == other.hasView()); + if (hasView()) { + result = result && getView() + .equals(other.getView()); + } + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasMeasurementDescriptor()) { + hash = (37 * hash) + MEASUREMENT_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getMeasurementDescriptor().hashCode(); + } + if (hasViewDescriptor()) { + hash = (37 * hash) + VIEW_DESCRIPTOR_FIELD_NUMBER; + hash = (53 * hash) + getViewDescriptor().hashCode(); + } + if (hasView()) { + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + getView().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.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 io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.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 io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.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(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.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; + } + /** + *
+     * Wrapper combining View and ViewDescriptor.
+     * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.CanonicalRpcStats.View} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.CanonicalRpcStats.View) + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.class, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.CanonicalRpcStats.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(); + if (measurementDescriptorBuilder_ == null) { + measurementDescriptor_ = null; + } else { + measurementDescriptor_ = null; + measurementDescriptorBuilder_ = null; + } + if (viewDescriptorBuilder_ == null) { + viewDescriptor_ = null; + } else { + viewDescriptor_ = null; + viewDescriptorBuilder_ = null; + } + if (viewBuilder_ == null) { + view_ = null; + } else { + view_ = null; + viewBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_descriptor; + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View build() { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View buildPartial() { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View result = new io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View(this); + if (measurementDescriptorBuilder_ == null) { + result.measurementDescriptor_ = measurementDescriptor_; + } else { + result.measurementDescriptor_ = measurementDescriptorBuilder_.build(); + } + if (viewDescriptorBuilder_ == null) { + result.viewDescriptor_ = viewDescriptor_; + } else { + result.viewDescriptor_ = viewDescriptorBuilder_.build(); + } + if (viewBuilder_ == null) { + result.view_ = view_; + } else { + result.view_ = viewBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View) { + return mergeFrom((io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View other) { + if (other == io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance()) return this; + if (other.hasMeasurementDescriptor()) { + mergeMeasurementDescriptor(other.getMeasurementDescriptor()); + } + if (other.hasViewDescriptor()) { + mergeViewDescriptor(other.getViewDescriptor()); + } + if (other.hasView()) { + mergeView(other.getView()); + } + 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 { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor measurementDescriptor_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder> measurementDescriptorBuilder_; + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public boolean hasMeasurementDescriptor() { + return measurementDescriptorBuilder_ != null || measurementDescriptor_ != null; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getMeasurementDescriptor() { + if (measurementDescriptorBuilder_ == null) { + return measurementDescriptor_ == null ? com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.getDefaultInstance() : measurementDescriptor_; + } else { + return measurementDescriptorBuilder_.getMessage(); + } + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public Builder setMeasurementDescriptor(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor value) { + if (measurementDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + measurementDescriptor_ = value; + onChanged(); + } else { + measurementDescriptorBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public Builder setMeasurementDescriptor( + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder builderForValue) { + if (measurementDescriptorBuilder_ == null) { + measurementDescriptor_ = builderForValue.build(); + onChanged(); + } else { + measurementDescriptorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public Builder mergeMeasurementDescriptor(com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor value) { + if (measurementDescriptorBuilder_ == null) { + if (measurementDescriptor_ != null) { + measurementDescriptor_ = + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.newBuilder(measurementDescriptor_).mergeFrom(value).buildPartial(); + } else { + measurementDescriptor_ = value; + } + onChanged(); + } else { + measurementDescriptorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public Builder clearMeasurementDescriptor() { + if (measurementDescriptorBuilder_ == null) { + measurementDescriptor_ = null; + onChanged(); + } else { + measurementDescriptor_ = null; + measurementDescriptorBuilder_ = null; + } + + return this; + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder getMeasurementDescriptorBuilder() { + + onChanged(); + return getMeasurementDescriptorFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + public com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder getMeasurementDescriptorOrBuilder() { + if (measurementDescriptorBuilder_ != null) { + return measurementDescriptorBuilder_.getMessageOrBuilder(); + } else { + return measurementDescriptor_ == null ? + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.getDefaultInstance() : measurementDescriptor_; + } + } + /** + * .google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder> + getMeasurementDescriptorFieldBuilder() { + if (measurementDescriptorBuilder_ == null) { + measurementDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder>( + getMeasurementDescriptor(), + getParentForChildren(), + isClean()); + measurementDescriptor_ = null; + } + return measurementDescriptorBuilder_; + } + + private com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor viewDescriptor_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder> viewDescriptorBuilder_; + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public boolean hasViewDescriptor() { + return viewDescriptorBuilder_ != null || viewDescriptor_ != null; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getViewDescriptor() { + if (viewDescriptorBuilder_ == null) { + return viewDescriptor_ == null ? com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.getDefaultInstance() : viewDescriptor_; + } else { + return viewDescriptorBuilder_.getMessage(); + } + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public Builder setViewDescriptor(com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor value) { + if (viewDescriptorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + viewDescriptor_ = value; + onChanged(); + } else { + viewDescriptorBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public Builder setViewDescriptor( + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder builderForValue) { + if (viewDescriptorBuilder_ == null) { + viewDescriptor_ = builderForValue.build(); + onChanged(); + } else { + viewDescriptorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public Builder mergeViewDescriptor(com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor value) { + if (viewDescriptorBuilder_ == null) { + if (viewDescriptor_ != null) { + viewDescriptor_ = + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.newBuilder(viewDescriptor_).mergeFrom(value).buildPartial(); + } else { + viewDescriptor_ = value; + } + onChanged(); + } else { + viewDescriptorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public Builder clearViewDescriptor() { + if (viewDescriptorBuilder_ == null) { + viewDescriptor_ = null; + onChanged(); + } else { + viewDescriptor_ = null; + viewDescriptorBuilder_ = null; + } + + return this; + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder getViewDescriptorBuilder() { + + onChanged(); + return getViewDescriptorFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder getViewDescriptorOrBuilder() { + if (viewDescriptorBuilder_ != null) { + return viewDescriptorBuilder_.getMessageOrBuilder(); + } else { + return viewDescriptor_ == null ? + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.getDefaultInstance() : viewDescriptor_; + } + } + /** + * .google.instrumentation.ViewDescriptor view_descriptor = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder> + getViewDescriptorFieldBuilder() { + if (viewDescriptorBuilder_ == null) { + viewDescriptorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor.Builder, com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder>( + getViewDescriptor(), + getParentForChildren(), + isClean()); + viewDescriptor_ = null; + } + return viewDescriptorBuilder_; + } + + private com.google.instrumentation.stats.proto.CensusProto.View view_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.View, com.google.instrumentation.stats.proto.CensusProto.View.Builder, com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder> viewBuilder_; + /** + * .google.instrumentation.View view = 3; + */ + public boolean hasView() { + return viewBuilder_ != null || view_ != null; + } + /** + * .google.instrumentation.View view = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.View getView() { + if (viewBuilder_ == null) { + return view_ == null ? com.google.instrumentation.stats.proto.CensusProto.View.getDefaultInstance() : view_; + } else { + return viewBuilder_.getMessage(); + } + } + /** + * .google.instrumentation.View view = 3; + */ + public Builder setView(com.google.instrumentation.stats.proto.CensusProto.View value) { + if (viewBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + view_ = value; + onChanged(); + } else { + viewBuilder_.setMessage(value); + } + + return this; + } + /** + * .google.instrumentation.View view = 3; + */ + public Builder setView( + com.google.instrumentation.stats.proto.CensusProto.View.Builder builderForValue) { + if (viewBuilder_ == null) { + view_ = builderForValue.build(); + onChanged(); + } else { + viewBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .google.instrumentation.View view = 3; + */ + public Builder mergeView(com.google.instrumentation.stats.proto.CensusProto.View value) { + if (viewBuilder_ == null) { + if (view_ != null) { + view_ = + com.google.instrumentation.stats.proto.CensusProto.View.newBuilder(view_).mergeFrom(value).buildPartial(); + } else { + view_ = value; + } + onChanged(); + } else { + viewBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .google.instrumentation.View view = 3; + */ + public Builder clearView() { + if (viewBuilder_ == null) { + view_ = null; + onChanged(); + } else { + view_ = null; + viewBuilder_ = null; + } + + return this; + } + /** + * .google.instrumentation.View view = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.View.Builder getViewBuilder() { + + onChanged(); + return getViewFieldBuilder().getBuilder(); + } + /** + * .google.instrumentation.View view = 3; + */ + public com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder getViewOrBuilder() { + if (viewBuilder_ != null) { + return viewBuilder_.getMessageOrBuilder(); + } else { + return view_ == null ? + com.google.instrumentation.stats.proto.CensusProto.View.getDefaultInstance() : view_; + } + } + /** + * .google.instrumentation.View view = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.View, com.google.instrumentation.stats.proto.CensusProto.View.Builder, com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder> + getViewFieldBuilder() { + if (viewBuilder_ == null) { + viewBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.instrumentation.stats.proto.CensusProto.View, com.google.instrumentation.stats.proto.CensusProto.View.Builder, com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder>( + getView(), + getParentForChildren(), + isClean()); + view_ = null; + } + return viewBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.CanonicalRpcStats.View) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.CanonicalRpcStats.View) + private static final io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View(); + } + + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + 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 parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + public static final int RPC_CLIENT_ERRORS_FIELD_NUMBER = 1; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientErrors_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public boolean hasRpcClientErrors() { + return rpcClientErrors_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientErrors() { + return rpcClientErrors_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientErrors_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientErrorsOrBuilder() { + return getRpcClientErrors(); + } + + public static final int RPC_CLIENT_COMPLETED_RPCS_FIELD_NUMBER = 2; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientCompletedRpcs_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public boolean hasRpcClientCompletedRpcs() { + return rpcClientCompletedRpcs_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientCompletedRpcs() { + return rpcClientCompletedRpcs_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientCompletedRpcs_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientCompletedRpcsOrBuilder() { + return getRpcClientCompletedRpcs(); + } + + public static final int RPC_CLIENT_STARTED_RPCS_FIELD_NUMBER = 3; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientStartedRpcs_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public boolean hasRpcClientStartedRpcs() { + return rpcClientStartedRpcs_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientStartedRpcs() { + return rpcClientStartedRpcs_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientStartedRpcs_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientStartedRpcsOrBuilder() { + return getRpcClientStartedRpcs(); + } + + public static final int RPC_CLIENT_ELAPSED_TIME_FIELD_NUMBER = 4; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientElapsedTime_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public boolean hasRpcClientElapsedTime() { + return rpcClientElapsedTime_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientElapsedTime() { + return rpcClientElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientElapsedTime_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientElapsedTimeOrBuilder() { + return getRpcClientElapsedTime(); + } + + public static final int RPC_CLIENT_SERVER_ELAPSED_TIME_FIELD_NUMBER = 5; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientServerElapsedTime_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public boolean hasRpcClientServerElapsedTime() { + return rpcClientServerElapsedTime_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientServerElapsedTime() { + return rpcClientServerElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientServerElapsedTime_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientServerElapsedTimeOrBuilder() { + return getRpcClientServerElapsedTime(); + } + + public static final int RPC_CLIENT_REQUEST_BYTES_FIELD_NUMBER = 6; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientRequestBytes_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public boolean hasRpcClientRequestBytes() { + return rpcClientRequestBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientRequestBytes() { + return rpcClientRequestBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientRequestBytes_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientRequestBytesOrBuilder() { + return getRpcClientRequestBytes(); + } + + public static final int RPC_CLIENT_RESPONSE_BYTES_FIELD_NUMBER = 7; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientResponseBytes_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public boolean hasRpcClientResponseBytes() { + return rpcClientResponseBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientResponseBytes() { + return rpcClientResponseBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientResponseBytes_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientResponseBytesOrBuilder() { + return getRpcClientResponseBytes(); + } + + public static final int RPC_CLIENT_REQUEST_COUNT_FIELD_NUMBER = 8; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientRequestCount_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public boolean hasRpcClientRequestCount() { + return rpcClientRequestCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientRequestCount() { + return rpcClientRequestCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientRequestCount_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientRequestCountOrBuilder() { + return getRpcClientRequestCount(); + } + + public static final int RPC_CLIENT_RESPONSE_COUNT_FIELD_NUMBER = 9; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientResponseCount_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public boolean hasRpcClientResponseCount() { + return rpcClientResponseCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientResponseCount() { + return rpcClientResponseCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientResponseCount_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientResponseCountOrBuilder() { + return getRpcClientResponseCount(); + } + + public static final int RPC_SERVER_ERRORS_FIELD_NUMBER = 10; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerErrors_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public boolean hasRpcServerErrors() { + return rpcServerErrors_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerErrors() { + return rpcServerErrors_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerErrors_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerErrorsOrBuilder() { + return getRpcServerErrors(); + } + + public static final int RPC_SERVER_COMPLETED_RPCS_FIELD_NUMBER = 11; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerCompletedRpcs_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public boolean hasRpcServerCompletedRpcs() { + return rpcServerCompletedRpcs_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerCompletedRpcs() { + return rpcServerCompletedRpcs_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerCompletedRpcs_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerCompletedRpcsOrBuilder() { + return getRpcServerCompletedRpcs(); + } + + public static final int RPC_SERVER_SERVER_ELAPSED_TIME_FIELD_NUMBER = 12; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerServerElapsedTime_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public boolean hasRpcServerServerElapsedTime() { + return rpcServerServerElapsedTime_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerServerElapsedTime() { + return rpcServerServerElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerServerElapsedTime_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerServerElapsedTimeOrBuilder() { + return getRpcServerServerElapsedTime(); + } + + public static final int RPC_SERVER_REQUEST_BYTES_FIELD_NUMBER = 13; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerRequestBytes_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public boolean hasRpcServerRequestBytes() { + return rpcServerRequestBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerRequestBytes() { + return rpcServerRequestBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerRequestBytes_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerRequestBytesOrBuilder() { + return getRpcServerRequestBytes(); + } + + public static final int RPC_SERVER_RESPONSE_BYTES_FIELD_NUMBER = 14; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerResponseBytes_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public boolean hasRpcServerResponseBytes() { + return rpcServerResponseBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerResponseBytes() { + return rpcServerResponseBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerResponseBytes_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerResponseBytesOrBuilder() { + return getRpcServerResponseBytes(); + } + + public static final int RPC_SERVER_REQUEST_COUNT_FIELD_NUMBER = 15; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerRequestCount_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public boolean hasRpcServerRequestCount() { + return rpcServerRequestCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerRequestCount() { + return rpcServerRequestCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerRequestCount_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerRequestCountOrBuilder() { + return getRpcServerRequestCount(); + } + + public static final int RPC_SERVER_RESPONSE_COUNT_FIELD_NUMBER = 16; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerResponseCount_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public boolean hasRpcServerResponseCount() { + return rpcServerResponseCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerResponseCount() { + return rpcServerResponseCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerResponseCount_; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerResponseCountOrBuilder() { + return getRpcServerResponseCount(); + } + + public static final int RPC_SERVER_ELAPSED_TIME_FIELD_NUMBER = 17; + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerElapsedTime_; + /** + *
+   *TODO(ericgribkoff) Add minute-hour interval stats.
+   * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public boolean hasRpcServerElapsedTime() { + return rpcServerElapsedTime_ != null; + } + /** + *
+   *TODO(ericgribkoff) Add minute-hour interval stats.
+   * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerElapsedTime() { + return rpcServerElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerElapsedTime_; + } + /** + *
+   *TODO(ericgribkoff) Add minute-hour interval stats.
+   * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerElapsedTimeOrBuilder() { + return getRpcServerElapsedTime(); + } + + 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 (rpcClientErrors_ != null) { + output.writeMessage(1, getRpcClientErrors()); + } + if (rpcClientCompletedRpcs_ != null) { + output.writeMessage(2, getRpcClientCompletedRpcs()); + } + if (rpcClientStartedRpcs_ != null) { + output.writeMessage(3, getRpcClientStartedRpcs()); + } + if (rpcClientElapsedTime_ != null) { + output.writeMessage(4, getRpcClientElapsedTime()); + } + if (rpcClientServerElapsedTime_ != null) { + output.writeMessage(5, getRpcClientServerElapsedTime()); + } + if (rpcClientRequestBytes_ != null) { + output.writeMessage(6, getRpcClientRequestBytes()); + } + if (rpcClientResponseBytes_ != null) { + output.writeMessage(7, getRpcClientResponseBytes()); + } + if (rpcClientRequestCount_ != null) { + output.writeMessage(8, getRpcClientRequestCount()); + } + if (rpcClientResponseCount_ != null) { + output.writeMessage(9, getRpcClientResponseCount()); + } + if (rpcServerErrors_ != null) { + output.writeMessage(10, getRpcServerErrors()); + } + if (rpcServerCompletedRpcs_ != null) { + output.writeMessage(11, getRpcServerCompletedRpcs()); + } + if (rpcServerServerElapsedTime_ != null) { + output.writeMessage(12, getRpcServerServerElapsedTime()); + } + if (rpcServerRequestBytes_ != null) { + output.writeMessage(13, getRpcServerRequestBytes()); + } + if (rpcServerResponseBytes_ != null) { + output.writeMessage(14, getRpcServerResponseBytes()); + } + if (rpcServerRequestCount_ != null) { + output.writeMessage(15, getRpcServerRequestCount()); + } + if (rpcServerResponseCount_ != null) { + output.writeMessage(16, getRpcServerResponseCount()); + } + if (rpcServerElapsedTime_ != null) { + output.writeMessage(17, getRpcServerElapsedTime()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (rpcClientErrors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getRpcClientErrors()); + } + if (rpcClientCompletedRpcs_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getRpcClientCompletedRpcs()); + } + if (rpcClientStartedRpcs_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getRpcClientStartedRpcs()); + } + if (rpcClientElapsedTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(4, getRpcClientElapsedTime()); + } + if (rpcClientServerElapsedTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(5, getRpcClientServerElapsedTime()); + } + if (rpcClientRequestBytes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(6, getRpcClientRequestBytes()); + } + if (rpcClientResponseBytes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, getRpcClientResponseBytes()); + } + if (rpcClientRequestCount_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(8, getRpcClientRequestCount()); + } + if (rpcClientResponseCount_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(9, getRpcClientResponseCount()); + } + if (rpcServerErrors_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(10, getRpcServerErrors()); + } + if (rpcServerCompletedRpcs_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(11, getRpcServerCompletedRpcs()); + } + if (rpcServerServerElapsedTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(12, getRpcServerServerElapsedTime()); + } + if (rpcServerRequestBytes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(13, getRpcServerRequestBytes()); + } + if (rpcServerResponseBytes_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(14, getRpcServerResponseBytes()); + } + if (rpcServerRequestCount_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(15, getRpcServerRequestCount()); + } + if (rpcServerResponseCount_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(16, getRpcServerResponseCount()); + } + if (rpcServerElapsedTime_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(17, getRpcServerElapsedTime()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.CanonicalRpcStats)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.CanonicalRpcStats other = (io.grpc.instrumentation.v1alpha.CanonicalRpcStats) obj; + + boolean result = true; + result = result && (hasRpcClientErrors() == other.hasRpcClientErrors()); + if (hasRpcClientErrors()) { + result = result && getRpcClientErrors() + .equals(other.getRpcClientErrors()); + } + result = result && (hasRpcClientCompletedRpcs() == other.hasRpcClientCompletedRpcs()); + if (hasRpcClientCompletedRpcs()) { + result = result && getRpcClientCompletedRpcs() + .equals(other.getRpcClientCompletedRpcs()); + } + result = result && (hasRpcClientStartedRpcs() == other.hasRpcClientStartedRpcs()); + if (hasRpcClientStartedRpcs()) { + result = result && getRpcClientStartedRpcs() + .equals(other.getRpcClientStartedRpcs()); + } + result = result && (hasRpcClientElapsedTime() == other.hasRpcClientElapsedTime()); + if (hasRpcClientElapsedTime()) { + result = result && getRpcClientElapsedTime() + .equals(other.getRpcClientElapsedTime()); + } + result = result && (hasRpcClientServerElapsedTime() == other.hasRpcClientServerElapsedTime()); + if (hasRpcClientServerElapsedTime()) { + result = result && getRpcClientServerElapsedTime() + .equals(other.getRpcClientServerElapsedTime()); + } + result = result && (hasRpcClientRequestBytes() == other.hasRpcClientRequestBytes()); + if (hasRpcClientRequestBytes()) { + result = result && getRpcClientRequestBytes() + .equals(other.getRpcClientRequestBytes()); + } + result = result && (hasRpcClientResponseBytes() == other.hasRpcClientResponseBytes()); + if (hasRpcClientResponseBytes()) { + result = result && getRpcClientResponseBytes() + .equals(other.getRpcClientResponseBytes()); + } + result = result && (hasRpcClientRequestCount() == other.hasRpcClientRequestCount()); + if (hasRpcClientRequestCount()) { + result = result && getRpcClientRequestCount() + .equals(other.getRpcClientRequestCount()); + } + result = result && (hasRpcClientResponseCount() == other.hasRpcClientResponseCount()); + if (hasRpcClientResponseCount()) { + result = result && getRpcClientResponseCount() + .equals(other.getRpcClientResponseCount()); + } + result = result && (hasRpcServerErrors() == other.hasRpcServerErrors()); + if (hasRpcServerErrors()) { + result = result && getRpcServerErrors() + .equals(other.getRpcServerErrors()); + } + result = result && (hasRpcServerCompletedRpcs() == other.hasRpcServerCompletedRpcs()); + if (hasRpcServerCompletedRpcs()) { + result = result && getRpcServerCompletedRpcs() + .equals(other.getRpcServerCompletedRpcs()); + } + result = result && (hasRpcServerServerElapsedTime() == other.hasRpcServerServerElapsedTime()); + if (hasRpcServerServerElapsedTime()) { + result = result && getRpcServerServerElapsedTime() + .equals(other.getRpcServerServerElapsedTime()); + } + result = result && (hasRpcServerRequestBytes() == other.hasRpcServerRequestBytes()); + if (hasRpcServerRequestBytes()) { + result = result && getRpcServerRequestBytes() + .equals(other.getRpcServerRequestBytes()); + } + result = result && (hasRpcServerResponseBytes() == other.hasRpcServerResponseBytes()); + if (hasRpcServerResponseBytes()) { + result = result && getRpcServerResponseBytes() + .equals(other.getRpcServerResponseBytes()); + } + result = result && (hasRpcServerRequestCount() == other.hasRpcServerRequestCount()); + if (hasRpcServerRequestCount()) { + result = result && getRpcServerRequestCount() + .equals(other.getRpcServerRequestCount()); + } + result = result && (hasRpcServerResponseCount() == other.hasRpcServerResponseCount()); + if (hasRpcServerResponseCount()) { + result = result && getRpcServerResponseCount() + .equals(other.getRpcServerResponseCount()); + } + result = result && (hasRpcServerElapsedTime() == other.hasRpcServerElapsedTime()); + if (hasRpcServerElapsedTime()) { + result = result && getRpcServerElapsedTime() + .equals(other.getRpcServerElapsedTime()); + } + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasRpcClientErrors()) { + hash = (37 * hash) + RPC_CLIENT_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientErrors().hashCode(); + } + if (hasRpcClientCompletedRpcs()) { + hash = (37 * hash) + RPC_CLIENT_COMPLETED_RPCS_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientCompletedRpcs().hashCode(); + } + if (hasRpcClientStartedRpcs()) { + hash = (37 * hash) + RPC_CLIENT_STARTED_RPCS_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientStartedRpcs().hashCode(); + } + if (hasRpcClientElapsedTime()) { + hash = (37 * hash) + RPC_CLIENT_ELAPSED_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientElapsedTime().hashCode(); + } + if (hasRpcClientServerElapsedTime()) { + hash = (37 * hash) + RPC_CLIENT_SERVER_ELAPSED_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientServerElapsedTime().hashCode(); + } + if (hasRpcClientRequestBytes()) { + hash = (37 * hash) + RPC_CLIENT_REQUEST_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientRequestBytes().hashCode(); + } + if (hasRpcClientResponseBytes()) { + hash = (37 * hash) + RPC_CLIENT_RESPONSE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientResponseBytes().hashCode(); + } + if (hasRpcClientRequestCount()) { + hash = (37 * hash) + RPC_CLIENT_REQUEST_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientRequestCount().hashCode(); + } + if (hasRpcClientResponseCount()) { + hash = (37 * hash) + RPC_CLIENT_RESPONSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRpcClientResponseCount().hashCode(); + } + if (hasRpcServerErrors()) { + hash = (37 * hash) + RPC_SERVER_ERRORS_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerErrors().hashCode(); + } + if (hasRpcServerCompletedRpcs()) { + hash = (37 * hash) + RPC_SERVER_COMPLETED_RPCS_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerCompletedRpcs().hashCode(); + } + if (hasRpcServerServerElapsedTime()) { + hash = (37 * hash) + RPC_SERVER_SERVER_ELAPSED_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerServerElapsedTime().hashCode(); + } + if (hasRpcServerRequestBytes()) { + hash = (37 * hash) + RPC_SERVER_REQUEST_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerRequestBytes().hashCode(); + } + if (hasRpcServerResponseBytes()) { + hash = (37 * hash) + RPC_SERVER_RESPONSE_BYTES_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerResponseBytes().hashCode(); + } + if (hasRpcServerRequestCount()) { + hash = (37 * hash) + RPC_SERVER_REQUEST_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerRequestCount().hashCode(); + } + if (hasRpcServerResponseCount()) { + hash = (37 * hash) + RPC_SERVER_RESPONSE_COUNT_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerResponseCount().hashCode(); + } + if (hasRpcServerElapsedTime()) { + hash = (37 * hash) + RPC_SERVER_ELAPSED_TIME_FIELD_NUMBER; + hash = (53 * hash) + getRpcServerElapsedTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats 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(io.grpc.instrumentation.v1alpha.CanonicalRpcStats 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; + } + /** + *
+   * Canonical RPC stats exported by gRPC.
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.CanonicalRpcStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.CanonicalRpcStats) + io.grpc.instrumentation.v1alpha.CanonicalRpcStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.class, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.CanonicalRpcStats.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 (rpcClientErrorsBuilder_ == null) { + rpcClientErrors_ = null; + } else { + rpcClientErrors_ = null; + rpcClientErrorsBuilder_ = null; + } + if (rpcClientCompletedRpcsBuilder_ == null) { + rpcClientCompletedRpcs_ = null; + } else { + rpcClientCompletedRpcs_ = null; + rpcClientCompletedRpcsBuilder_ = null; + } + if (rpcClientStartedRpcsBuilder_ == null) { + rpcClientStartedRpcs_ = null; + } else { + rpcClientStartedRpcs_ = null; + rpcClientStartedRpcsBuilder_ = null; + } + if (rpcClientElapsedTimeBuilder_ == null) { + rpcClientElapsedTime_ = null; + } else { + rpcClientElapsedTime_ = null; + rpcClientElapsedTimeBuilder_ = null; + } + if (rpcClientServerElapsedTimeBuilder_ == null) { + rpcClientServerElapsedTime_ = null; + } else { + rpcClientServerElapsedTime_ = null; + rpcClientServerElapsedTimeBuilder_ = null; + } + if (rpcClientRequestBytesBuilder_ == null) { + rpcClientRequestBytes_ = null; + } else { + rpcClientRequestBytes_ = null; + rpcClientRequestBytesBuilder_ = null; + } + if (rpcClientResponseBytesBuilder_ == null) { + rpcClientResponseBytes_ = null; + } else { + rpcClientResponseBytes_ = null; + rpcClientResponseBytesBuilder_ = null; + } + if (rpcClientRequestCountBuilder_ == null) { + rpcClientRequestCount_ = null; + } else { + rpcClientRequestCount_ = null; + rpcClientRequestCountBuilder_ = null; + } + if (rpcClientResponseCountBuilder_ == null) { + rpcClientResponseCount_ = null; + } else { + rpcClientResponseCount_ = null; + rpcClientResponseCountBuilder_ = null; + } + if (rpcServerErrorsBuilder_ == null) { + rpcServerErrors_ = null; + } else { + rpcServerErrors_ = null; + rpcServerErrorsBuilder_ = null; + } + if (rpcServerCompletedRpcsBuilder_ == null) { + rpcServerCompletedRpcs_ = null; + } else { + rpcServerCompletedRpcs_ = null; + rpcServerCompletedRpcsBuilder_ = null; + } + if (rpcServerServerElapsedTimeBuilder_ == null) { + rpcServerServerElapsedTime_ = null; + } else { + rpcServerServerElapsedTime_ = null; + rpcServerServerElapsedTimeBuilder_ = null; + } + if (rpcServerRequestBytesBuilder_ == null) { + rpcServerRequestBytes_ = null; + } else { + rpcServerRequestBytes_ = null; + rpcServerRequestBytesBuilder_ = null; + } + if (rpcServerResponseBytesBuilder_ == null) { + rpcServerResponseBytes_ = null; + } else { + rpcServerResponseBytes_ = null; + rpcServerResponseBytesBuilder_ = null; + } + if (rpcServerRequestCountBuilder_ == null) { + rpcServerRequestCount_ = null; + } else { + rpcServerRequestCount_ = null; + rpcServerRequestCountBuilder_ = null; + } + if (rpcServerResponseCountBuilder_ == null) { + rpcServerResponseCount_ = null; + } else { + rpcServerResponseCount_ = null; + rpcServerResponseCountBuilder_ = null; + } + if (rpcServerElapsedTimeBuilder_ == null) { + rpcServerElapsedTime_ = null; + } else { + rpcServerElapsedTime_ = null; + rpcServerElapsedTimeBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor; + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.CanonicalRpcStats.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats build() { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats buildPartial() { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats result = new io.grpc.instrumentation.v1alpha.CanonicalRpcStats(this); + if (rpcClientErrorsBuilder_ == null) { + result.rpcClientErrors_ = rpcClientErrors_; + } else { + result.rpcClientErrors_ = rpcClientErrorsBuilder_.build(); + } + if (rpcClientCompletedRpcsBuilder_ == null) { + result.rpcClientCompletedRpcs_ = rpcClientCompletedRpcs_; + } else { + result.rpcClientCompletedRpcs_ = rpcClientCompletedRpcsBuilder_.build(); + } + if (rpcClientStartedRpcsBuilder_ == null) { + result.rpcClientStartedRpcs_ = rpcClientStartedRpcs_; + } else { + result.rpcClientStartedRpcs_ = rpcClientStartedRpcsBuilder_.build(); + } + if (rpcClientElapsedTimeBuilder_ == null) { + result.rpcClientElapsedTime_ = rpcClientElapsedTime_; + } else { + result.rpcClientElapsedTime_ = rpcClientElapsedTimeBuilder_.build(); + } + if (rpcClientServerElapsedTimeBuilder_ == null) { + result.rpcClientServerElapsedTime_ = rpcClientServerElapsedTime_; + } else { + result.rpcClientServerElapsedTime_ = rpcClientServerElapsedTimeBuilder_.build(); + } + if (rpcClientRequestBytesBuilder_ == null) { + result.rpcClientRequestBytes_ = rpcClientRequestBytes_; + } else { + result.rpcClientRequestBytes_ = rpcClientRequestBytesBuilder_.build(); + } + if (rpcClientResponseBytesBuilder_ == null) { + result.rpcClientResponseBytes_ = rpcClientResponseBytes_; + } else { + result.rpcClientResponseBytes_ = rpcClientResponseBytesBuilder_.build(); + } + if (rpcClientRequestCountBuilder_ == null) { + result.rpcClientRequestCount_ = rpcClientRequestCount_; + } else { + result.rpcClientRequestCount_ = rpcClientRequestCountBuilder_.build(); + } + if (rpcClientResponseCountBuilder_ == null) { + result.rpcClientResponseCount_ = rpcClientResponseCount_; + } else { + result.rpcClientResponseCount_ = rpcClientResponseCountBuilder_.build(); + } + if (rpcServerErrorsBuilder_ == null) { + result.rpcServerErrors_ = rpcServerErrors_; + } else { + result.rpcServerErrors_ = rpcServerErrorsBuilder_.build(); + } + if (rpcServerCompletedRpcsBuilder_ == null) { + result.rpcServerCompletedRpcs_ = rpcServerCompletedRpcs_; + } else { + result.rpcServerCompletedRpcs_ = rpcServerCompletedRpcsBuilder_.build(); + } + if (rpcServerServerElapsedTimeBuilder_ == null) { + result.rpcServerServerElapsedTime_ = rpcServerServerElapsedTime_; + } else { + result.rpcServerServerElapsedTime_ = rpcServerServerElapsedTimeBuilder_.build(); + } + if (rpcServerRequestBytesBuilder_ == null) { + result.rpcServerRequestBytes_ = rpcServerRequestBytes_; + } else { + result.rpcServerRequestBytes_ = rpcServerRequestBytesBuilder_.build(); + } + if (rpcServerResponseBytesBuilder_ == null) { + result.rpcServerResponseBytes_ = rpcServerResponseBytes_; + } else { + result.rpcServerResponseBytes_ = rpcServerResponseBytesBuilder_.build(); + } + if (rpcServerRequestCountBuilder_ == null) { + result.rpcServerRequestCount_ = rpcServerRequestCount_; + } else { + result.rpcServerRequestCount_ = rpcServerRequestCountBuilder_.build(); + } + if (rpcServerResponseCountBuilder_ == null) { + result.rpcServerResponseCount_ = rpcServerResponseCount_; + } else { + result.rpcServerResponseCount_ = rpcServerResponseCountBuilder_.build(); + } + if (rpcServerElapsedTimeBuilder_ == null) { + result.rpcServerElapsedTime_ = rpcServerElapsedTime_; + } else { + result.rpcServerElapsedTime_ = rpcServerElapsedTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.CanonicalRpcStats) { + return mergeFrom((io.grpc.instrumentation.v1alpha.CanonicalRpcStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.CanonicalRpcStats other) { + if (other == io.grpc.instrumentation.v1alpha.CanonicalRpcStats.getDefaultInstance()) return this; + if (other.hasRpcClientErrors()) { + mergeRpcClientErrors(other.getRpcClientErrors()); + } + if (other.hasRpcClientCompletedRpcs()) { + mergeRpcClientCompletedRpcs(other.getRpcClientCompletedRpcs()); + } + if (other.hasRpcClientStartedRpcs()) { + mergeRpcClientStartedRpcs(other.getRpcClientStartedRpcs()); + } + if (other.hasRpcClientElapsedTime()) { + mergeRpcClientElapsedTime(other.getRpcClientElapsedTime()); + } + if (other.hasRpcClientServerElapsedTime()) { + mergeRpcClientServerElapsedTime(other.getRpcClientServerElapsedTime()); + } + if (other.hasRpcClientRequestBytes()) { + mergeRpcClientRequestBytes(other.getRpcClientRequestBytes()); + } + if (other.hasRpcClientResponseBytes()) { + mergeRpcClientResponseBytes(other.getRpcClientResponseBytes()); + } + if (other.hasRpcClientRequestCount()) { + mergeRpcClientRequestCount(other.getRpcClientRequestCount()); + } + if (other.hasRpcClientResponseCount()) { + mergeRpcClientResponseCount(other.getRpcClientResponseCount()); + } + if (other.hasRpcServerErrors()) { + mergeRpcServerErrors(other.getRpcServerErrors()); + } + if (other.hasRpcServerCompletedRpcs()) { + mergeRpcServerCompletedRpcs(other.getRpcServerCompletedRpcs()); + } + if (other.hasRpcServerServerElapsedTime()) { + mergeRpcServerServerElapsedTime(other.getRpcServerServerElapsedTime()); + } + if (other.hasRpcServerRequestBytes()) { + mergeRpcServerRequestBytes(other.getRpcServerRequestBytes()); + } + if (other.hasRpcServerResponseBytes()) { + mergeRpcServerResponseBytes(other.getRpcServerResponseBytes()); + } + if (other.hasRpcServerRequestCount()) { + mergeRpcServerRequestCount(other.getRpcServerRequestCount()); + } + if (other.hasRpcServerResponseCount()) { + mergeRpcServerResponseCount(other.getRpcServerResponseCount()); + } + if (other.hasRpcServerElapsedTime()) { + mergeRpcServerElapsedTime(other.getRpcServerElapsedTime()); + } + 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 { + io.grpc.instrumentation.v1alpha.CanonicalRpcStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.CanonicalRpcStats) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientErrors_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientErrorsBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public boolean hasRpcClientErrors() { + return rpcClientErrorsBuilder_ != null || rpcClientErrors_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientErrors() { + if (rpcClientErrorsBuilder_ == null) { + return rpcClientErrors_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientErrors_; + } else { + return rpcClientErrorsBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public Builder setRpcClientErrors(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientErrors_ = value; + onChanged(); + } else { + rpcClientErrorsBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public Builder setRpcClientErrors( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientErrorsBuilder_ == null) { + rpcClientErrors_ = builderForValue.build(); + onChanged(); + } else { + rpcClientErrorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public Builder mergeRpcClientErrors(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientErrorsBuilder_ == null) { + if (rpcClientErrors_ != null) { + rpcClientErrors_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientErrors_).mergeFrom(value).buildPartial(); + } else { + rpcClientErrors_ = value; + } + onChanged(); + } else { + rpcClientErrorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public Builder clearRpcClientErrors() { + if (rpcClientErrorsBuilder_ == null) { + rpcClientErrors_ = null; + onChanged(); + } else { + rpcClientErrors_ = null; + rpcClientErrorsBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientErrorsBuilder() { + + onChanged(); + return getRpcClientErrorsFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientErrorsOrBuilder() { + if (rpcClientErrorsBuilder_ != null) { + return rpcClientErrorsBuilder_.getMessageOrBuilder(); + } else { + return rpcClientErrors_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientErrors_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientErrorsFieldBuilder() { + if (rpcClientErrorsBuilder_ == null) { + rpcClientErrorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientErrors(), + getParentForChildren(), + isClean()); + rpcClientErrors_ = null; + } + return rpcClientErrorsBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientCompletedRpcs_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientCompletedRpcsBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public boolean hasRpcClientCompletedRpcs() { + return rpcClientCompletedRpcsBuilder_ != null || rpcClientCompletedRpcs_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientCompletedRpcs() { + if (rpcClientCompletedRpcsBuilder_ == null) { + return rpcClientCompletedRpcs_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientCompletedRpcs_; + } else { + return rpcClientCompletedRpcsBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public Builder setRpcClientCompletedRpcs(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientCompletedRpcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientCompletedRpcs_ = value; + onChanged(); + } else { + rpcClientCompletedRpcsBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public Builder setRpcClientCompletedRpcs( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientCompletedRpcsBuilder_ == null) { + rpcClientCompletedRpcs_ = builderForValue.build(); + onChanged(); + } else { + rpcClientCompletedRpcsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public Builder mergeRpcClientCompletedRpcs(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientCompletedRpcsBuilder_ == null) { + if (rpcClientCompletedRpcs_ != null) { + rpcClientCompletedRpcs_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientCompletedRpcs_).mergeFrom(value).buildPartial(); + } else { + rpcClientCompletedRpcs_ = value; + } + onChanged(); + } else { + rpcClientCompletedRpcsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public Builder clearRpcClientCompletedRpcs() { + if (rpcClientCompletedRpcsBuilder_ == null) { + rpcClientCompletedRpcs_ = null; + onChanged(); + } else { + rpcClientCompletedRpcs_ = null; + rpcClientCompletedRpcsBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientCompletedRpcsBuilder() { + + onChanged(); + return getRpcClientCompletedRpcsFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientCompletedRpcsOrBuilder() { + if (rpcClientCompletedRpcsBuilder_ != null) { + return rpcClientCompletedRpcsBuilder_.getMessageOrBuilder(); + } else { + return rpcClientCompletedRpcs_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientCompletedRpcs_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientCompletedRpcsFieldBuilder() { + if (rpcClientCompletedRpcsBuilder_ == null) { + rpcClientCompletedRpcsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientCompletedRpcs(), + getParentForChildren(), + isClean()); + rpcClientCompletedRpcs_ = null; + } + return rpcClientCompletedRpcsBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientStartedRpcs_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientStartedRpcsBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public boolean hasRpcClientStartedRpcs() { + return rpcClientStartedRpcsBuilder_ != null || rpcClientStartedRpcs_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientStartedRpcs() { + if (rpcClientStartedRpcsBuilder_ == null) { + return rpcClientStartedRpcs_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientStartedRpcs_; + } else { + return rpcClientStartedRpcsBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public Builder setRpcClientStartedRpcs(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientStartedRpcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientStartedRpcs_ = value; + onChanged(); + } else { + rpcClientStartedRpcsBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public Builder setRpcClientStartedRpcs( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientStartedRpcsBuilder_ == null) { + rpcClientStartedRpcs_ = builderForValue.build(); + onChanged(); + } else { + rpcClientStartedRpcsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public Builder mergeRpcClientStartedRpcs(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientStartedRpcsBuilder_ == null) { + if (rpcClientStartedRpcs_ != null) { + rpcClientStartedRpcs_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientStartedRpcs_).mergeFrom(value).buildPartial(); + } else { + rpcClientStartedRpcs_ = value; + } + onChanged(); + } else { + rpcClientStartedRpcsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public Builder clearRpcClientStartedRpcs() { + if (rpcClientStartedRpcsBuilder_ == null) { + rpcClientStartedRpcs_ = null; + onChanged(); + } else { + rpcClientStartedRpcs_ = null; + rpcClientStartedRpcsBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientStartedRpcsBuilder() { + + onChanged(); + return getRpcClientStartedRpcsFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientStartedRpcsOrBuilder() { + if (rpcClientStartedRpcsBuilder_ != null) { + return rpcClientStartedRpcsBuilder_.getMessageOrBuilder(); + } else { + return rpcClientStartedRpcs_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientStartedRpcs_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientStartedRpcsFieldBuilder() { + if (rpcClientStartedRpcsBuilder_ == null) { + rpcClientStartedRpcsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientStartedRpcs(), + getParentForChildren(), + isClean()); + rpcClientStartedRpcs_ = null; + } + return rpcClientStartedRpcsBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientElapsedTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientElapsedTimeBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public boolean hasRpcClientElapsedTime() { + return rpcClientElapsedTimeBuilder_ != null || rpcClientElapsedTime_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientElapsedTime() { + if (rpcClientElapsedTimeBuilder_ == null) { + return rpcClientElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientElapsedTime_; + } else { + return rpcClientElapsedTimeBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public Builder setRpcClientElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientElapsedTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientElapsedTime_ = value; + onChanged(); + } else { + rpcClientElapsedTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public Builder setRpcClientElapsedTime( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientElapsedTimeBuilder_ == null) { + rpcClientElapsedTime_ = builderForValue.build(); + onChanged(); + } else { + rpcClientElapsedTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public Builder mergeRpcClientElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientElapsedTimeBuilder_ == null) { + if (rpcClientElapsedTime_ != null) { + rpcClientElapsedTime_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientElapsedTime_).mergeFrom(value).buildPartial(); + } else { + rpcClientElapsedTime_ = value; + } + onChanged(); + } else { + rpcClientElapsedTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public Builder clearRpcClientElapsedTime() { + if (rpcClientElapsedTimeBuilder_ == null) { + rpcClientElapsedTime_ = null; + onChanged(); + } else { + rpcClientElapsedTime_ = null; + rpcClientElapsedTimeBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientElapsedTimeBuilder() { + + onChanged(); + return getRpcClientElapsedTimeFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientElapsedTimeOrBuilder() { + if (rpcClientElapsedTimeBuilder_ != null) { + return rpcClientElapsedTimeBuilder_.getMessageOrBuilder(); + } else { + return rpcClientElapsedTime_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientElapsedTime_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientElapsedTimeFieldBuilder() { + if (rpcClientElapsedTimeBuilder_ == null) { + rpcClientElapsedTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientElapsedTime(), + getParentForChildren(), + isClean()); + rpcClientElapsedTime_ = null; + } + return rpcClientElapsedTimeBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientServerElapsedTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientServerElapsedTimeBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public boolean hasRpcClientServerElapsedTime() { + return rpcClientServerElapsedTimeBuilder_ != null || rpcClientServerElapsedTime_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientServerElapsedTime() { + if (rpcClientServerElapsedTimeBuilder_ == null) { + return rpcClientServerElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientServerElapsedTime_; + } else { + return rpcClientServerElapsedTimeBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public Builder setRpcClientServerElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientServerElapsedTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientServerElapsedTime_ = value; + onChanged(); + } else { + rpcClientServerElapsedTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public Builder setRpcClientServerElapsedTime( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientServerElapsedTimeBuilder_ == null) { + rpcClientServerElapsedTime_ = builderForValue.build(); + onChanged(); + } else { + rpcClientServerElapsedTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public Builder mergeRpcClientServerElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientServerElapsedTimeBuilder_ == null) { + if (rpcClientServerElapsedTime_ != null) { + rpcClientServerElapsedTime_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientServerElapsedTime_).mergeFrom(value).buildPartial(); + } else { + rpcClientServerElapsedTime_ = value; + } + onChanged(); + } else { + rpcClientServerElapsedTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public Builder clearRpcClientServerElapsedTime() { + if (rpcClientServerElapsedTimeBuilder_ == null) { + rpcClientServerElapsedTime_ = null; + onChanged(); + } else { + rpcClientServerElapsedTime_ = null; + rpcClientServerElapsedTimeBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientServerElapsedTimeBuilder() { + + onChanged(); + return getRpcClientServerElapsedTimeFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientServerElapsedTimeOrBuilder() { + if (rpcClientServerElapsedTimeBuilder_ != null) { + return rpcClientServerElapsedTimeBuilder_.getMessageOrBuilder(); + } else { + return rpcClientServerElapsedTime_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientServerElapsedTime_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientServerElapsedTimeFieldBuilder() { + if (rpcClientServerElapsedTimeBuilder_ == null) { + rpcClientServerElapsedTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientServerElapsedTime(), + getParentForChildren(), + isClean()); + rpcClientServerElapsedTime_ = null; + } + return rpcClientServerElapsedTimeBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientRequestBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientRequestBytesBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public boolean hasRpcClientRequestBytes() { + return rpcClientRequestBytesBuilder_ != null || rpcClientRequestBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientRequestBytes() { + if (rpcClientRequestBytesBuilder_ == null) { + return rpcClientRequestBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientRequestBytes_; + } else { + return rpcClientRequestBytesBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public Builder setRpcClientRequestBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientRequestBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientRequestBytes_ = value; + onChanged(); + } else { + rpcClientRequestBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public Builder setRpcClientRequestBytes( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientRequestBytesBuilder_ == null) { + rpcClientRequestBytes_ = builderForValue.build(); + onChanged(); + } else { + rpcClientRequestBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public Builder mergeRpcClientRequestBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientRequestBytesBuilder_ == null) { + if (rpcClientRequestBytes_ != null) { + rpcClientRequestBytes_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientRequestBytes_).mergeFrom(value).buildPartial(); + } else { + rpcClientRequestBytes_ = value; + } + onChanged(); + } else { + rpcClientRequestBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public Builder clearRpcClientRequestBytes() { + if (rpcClientRequestBytesBuilder_ == null) { + rpcClientRequestBytes_ = null; + onChanged(); + } else { + rpcClientRequestBytes_ = null; + rpcClientRequestBytesBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientRequestBytesBuilder() { + + onChanged(); + return getRpcClientRequestBytesFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientRequestBytesOrBuilder() { + if (rpcClientRequestBytesBuilder_ != null) { + return rpcClientRequestBytesBuilder_.getMessageOrBuilder(); + } else { + return rpcClientRequestBytes_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientRequestBytes_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientRequestBytesFieldBuilder() { + if (rpcClientRequestBytesBuilder_ == null) { + rpcClientRequestBytesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientRequestBytes(), + getParentForChildren(), + isClean()); + rpcClientRequestBytes_ = null; + } + return rpcClientRequestBytesBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientResponseBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientResponseBytesBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public boolean hasRpcClientResponseBytes() { + return rpcClientResponseBytesBuilder_ != null || rpcClientResponseBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientResponseBytes() { + if (rpcClientResponseBytesBuilder_ == null) { + return rpcClientResponseBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientResponseBytes_; + } else { + return rpcClientResponseBytesBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public Builder setRpcClientResponseBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientResponseBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientResponseBytes_ = value; + onChanged(); + } else { + rpcClientResponseBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public Builder setRpcClientResponseBytes( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientResponseBytesBuilder_ == null) { + rpcClientResponseBytes_ = builderForValue.build(); + onChanged(); + } else { + rpcClientResponseBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public Builder mergeRpcClientResponseBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientResponseBytesBuilder_ == null) { + if (rpcClientResponseBytes_ != null) { + rpcClientResponseBytes_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientResponseBytes_).mergeFrom(value).buildPartial(); + } else { + rpcClientResponseBytes_ = value; + } + onChanged(); + } else { + rpcClientResponseBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public Builder clearRpcClientResponseBytes() { + if (rpcClientResponseBytesBuilder_ == null) { + rpcClientResponseBytes_ = null; + onChanged(); + } else { + rpcClientResponseBytes_ = null; + rpcClientResponseBytesBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientResponseBytesBuilder() { + + onChanged(); + return getRpcClientResponseBytesFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientResponseBytesOrBuilder() { + if (rpcClientResponseBytesBuilder_ != null) { + return rpcClientResponseBytesBuilder_.getMessageOrBuilder(); + } else { + return rpcClientResponseBytes_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientResponseBytes_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientResponseBytesFieldBuilder() { + if (rpcClientResponseBytesBuilder_ == null) { + rpcClientResponseBytesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientResponseBytes(), + getParentForChildren(), + isClean()); + rpcClientResponseBytes_ = null; + } + return rpcClientResponseBytesBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientRequestCount_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientRequestCountBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public boolean hasRpcClientRequestCount() { + return rpcClientRequestCountBuilder_ != null || rpcClientRequestCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientRequestCount() { + if (rpcClientRequestCountBuilder_ == null) { + return rpcClientRequestCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientRequestCount_; + } else { + return rpcClientRequestCountBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public Builder setRpcClientRequestCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientRequestCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientRequestCount_ = value; + onChanged(); + } else { + rpcClientRequestCountBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public Builder setRpcClientRequestCount( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientRequestCountBuilder_ == null) { + rpcClientRequestCount_ = builderForValue.build(); + onChanged(); + } else { + rpcClientRequestCountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public Builder mergeRpcClientRequestCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientRequestCountBuilder_ == null) { + if (rpcClientRequestCount_ != null) { + rpcClientRequestCount_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientRequestCount_).mergeFrom(value).buildPartial(); + } else { + rpcClientRequestCount_ = value; + } + onChanged(); + } else { + rpcClientRequestCountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public Builder clearRpcClientRequestCount() { + if (rpcClientRequestCountBuilder_ == null) { + rpcClientRequestCount_ = null; + onChanged(); + } else { + rpcClientRequestCount_ = null; + rpcClientRequestCountBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientRequestCountBuilder() { + + onChanged(); + return getRpcClientRequestCountFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientRequestCountOrBuilder() { + if (rpcClientRequestCountBuilder_ != null) { + return rpcClientRequestCountBuilder_.getMessageOrBuilder(); + } else { + return rpcClientRequestCount_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientRequestCount_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientRequestCountFieldBuilder() { + if (rpcClientRequestCountBuilder_ == null) { + rpcClientRequestCountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientRequestCount(), + getParentForChildren(), + isClean()); + rpcClientRequestCount_ = null; + } + return rpcClientRequestCountBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcClientResponseCount_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcClientResponseCountBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public boolean hasRpcClientResponseCount() { + return rpcClientResponseCountBuilder_ != null || rpcClientResponseCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientResponseCount() { + if (rpcClientResponseCountBuilder_ == null) { + return rpcClientResponseCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientResponseCount_; + } else { + return rpcClientResponseCountBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public Builder setRpcClientResponseCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientResponseCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcClientResponseCount_ = value; + onChanged(); + } else { + rpcClientResponseCountBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public Builder setRpcClientResponseCount( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcClientResponseCountBuilder_ == null) { + rpcClientResponseCount_ = builderForValue.build(); + onChanged(); + } else { + rpcClientResponseCountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public Builder mergeRpcClientResponseCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcClientResponseCountBuilder_ == null) { + if (rpcClientResponseCount_ != null) { + rpcClientResponseCount_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcClientResponseCount_).mergeFrom(value).buildPartial(); + } else { + rpcClientResponseCount_ = value; + } + onChanged(); + } else { + rpcClientResponseCountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public Builder clearRpcClientResponseCount() { + if (rpcClientResponseCountBuilder_ == null) { + rpcClientResponseCount_ = null; + onChanged(); + } else { + rpcClientResponseCount_ = null; + rpcClientResponseCountBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcClientResponseCountBuilder() { + + onChanged(); + return getRpcClientResponseCountFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientResponseCountOrBuilder() { + if (rpcClientResponseCountBuilder_ != null) { + return rpcClientResponseCountBuilder_.getMessageOrBuilder(); + } else { + return rpcClientResponseCount_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcClientResponseCount_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcClientResponseCountFieldBuilder() { + if (rpcClientResponseCountBuilder_ == null) { + rpcClientResponseCountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcClientResponseCount(), + getParentForChildren(), + isClean()); + rpcClientResponseCount_ = null; + } + return rpcClientResponseCountBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerErrors_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerErrorsBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public boolean hasRpcServerErrors() { + return rpcServerErrorsBuilder_ != null || rpcServerErrors_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerErrors() { + if (rpcServerErrorsBuilder_ == null) { + return rpcServerErrors_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerErrors_; + } else { + return rpcServerErrorsBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public Builder setRpcServerErrors(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerErrorsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerErrors_ = value; + onChanged(); + } else { + rpcServerErrorsBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public Builder setRpcServerErrors( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerErrorsBuilder_ == null) { + rpcServerErrors_ = builderForValue.build(); + onChanged(); + } else { + rpcServerErrorsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public Builder mergeRpcServerErrors(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerErrorsBuilder_ == null) { + if (rpcServerErrors_ != null) { + rpcServerErrors_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerErrors_).mergeFrom(value).buildPartial(); + } else { + rpcServerErrors_ = value; + } + onChanged(); + } else { + rpcServerErrorsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public Builder clearRpcServerErrors() { + if (rpcServerErrorsBuilder_ == null) { + rpcServerErrors_ = null; + onChanged(); + } else { + rpcServerErrors_ = null; + rpcServerErrorsBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerErrorsBuilder() { + + onChanged(); + return getRpcServerErrorsFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerErrorsOrBuilder() { + if (rpcServerErrorsBuilder_ != null) { + return rpcServerErrorsBuilder_.getMessageOrBuilder(); + } else { + return rpcServerErrors_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerErrors_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerErrorsFieldBuilder() { + if (rpcServerErrorsBuilder_ == null) { + rpcServerErrorsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerErrors(), + getParentForChildren(), + isClean()); + rpcServerErrors_ = null; + } + return rpcServerErrorsBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerCompletedRpcs_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerCompletedRpcsBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public boolean hasRpcServerCompletedRpcs() { + return rpcServerCompletedRpcsBuilder_ != null || rpcServerCompletedRpcs_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerCompletedRpcs() { + if (rpcServerCompletedRpcsBuilder_ == null) { + return rpcServerCompletedRpcs_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerCompletedRpcs_; + } else { + return rpcServerCompletedRpcsBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public Builder setRpcServerCompletedRpcs(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerCompletedRpcsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerCompletedRpcs_ = value; + onChanged(); + } else { + rpcServerCompletedRpcsBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public Builder setRpcServerCompletedRpcs( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerCompletedRpcsBuilder_ == null) { + rpcServerCompletedRpcs_ = builderForValue.build(); + onChanged(); + } else { + rpcServerCompletedRpcsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public Builder mergeRpcServerCompletedRpcs(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerCompletedRpcsBuilder_ == null) { + if (rpcServerCompletedRpcs_ != null) { + rpcServerCompletedRpcs_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerCompletedRpcs_).mergeFrom(value).buildPartial(); + } else { + rpcServerCompletedRpcs_ = value; + } + onChanged(); + } else { + rpcServerCompletedRpcsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public Builder clearRpcServerCompletedRpcs() { + if (rpcServerCompletedRpcsBuilder_ == null) { + rpcServerCompletedRpcs_ = null; + onChanged(); + } else { + rpcServerCompletedRpcs_ = null; + rpcServerCompletedRpcsBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerCompletedRpcsBuilder() { + + onChanged(); + return getRpcServerCompletedRpcsFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerCompletedRpcsOrBuilder() { + if (rpcServerCompletedRpcsBuilder_ != null) { + return rpcServerCompletedRpcsBuilder_.getMessageOrBuilder(); + } else { + return rpcServerCompletedRpcs_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerCompletedRpcs_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerCompletedRpcsFieldBuilder() { + if (rpcServerCompletedRpcsBuilder_ == null) { + rpcServerCompletedRpcsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerCompletedRpcs(), + getParentForChildren(), + isClean()); + rpcServerCompletedRpcs_ = null; + } + return rpcServerCompletedRpcsBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerServerElapsedTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerServerElapsedTimeBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public boolean hasRpcServerServerElapsedTime() { + return rpcServerServerElapsedTimeBuilder_ != null || rpcServerServerElapsedTime_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerServerElapsedTime() { + if (rpcServerServerElapsedTimeBuilder_ == null) { + return rpcServerServerElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerServerElapsedTime_; + } else { + return rpcServerServerElapsedTimeBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public Builder setRpcServerServerElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerServerElapsedTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerServerElapsedTime_ = value; + onChanged(); + } else { + rpcServerServerElapsedTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public Builder setRpcServerServerElapsedTime( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerServerElapsedTimeBuilder_ == null) { + rpcServerServerElapsedTime_ = builderForValue.build(); + onChanged(); + } else { + rpcServerServerElapsedTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public Builder mergeRpcServerServerElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerServerElapsedTimeBuilder_ == null) { + if (rpcServerServerElapsedTime_ != null) { + rpcServerServerElapsedTime_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerServerElapsedTime_).mergeFrom(value).buildPartial(); + } else { + rpcServerServerElapsedTime_ = value; + } + onChanged(); + } else { + rpcServerServerElapsedTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public Builder clearRpcServerServerElapsedTime() { + if (rpcServerServerElapsedTimeBuilder_ == null) { + rpcServerServerElapsedTime_ = null; + onChanged(); + } else { + rpcServerServerElapsedTime_ = null; + rpcServerServerElapsedTimeBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerServerElapsedTimeBuilder() { + + onChanged(); + return getRpcServerServerElapsedTimeFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerServerElapsedTimeOrBuilder() { + if (rpcServerServerElapsedTimeBuilder_ != null) { + return rpcServerServerElapsedTimeBuilder_.getMessageOrBuilder(); + } else { + return rpcServerServerElapsedTime_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerServerElapsedTime_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerServerElapsedTimeFieldBuilder() { + if (rpcServerServerElapsedTimeBuilder_ == null) { + rpcServerServerElapsedTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerServerElapsedTime(), + getParentForChildren(), + isClean()); + rpcServerServerElapsedTime_ = null; + } + return rpcServerServerElapsedTimeBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerRequestBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerRequestBytesBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public boolean hasRpcServerRequestBytes() { + return rpcServerRequestBytesBuilder_ != null || rpcServerRequestBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerRequestBytes() { + if (rpcServerRequestBytesBuilder_ == null) { + return rpcServerRequestBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerRequestBytes_; + } else { + return rpcServerRequestBytesBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public Builder setRpcServerRequestBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerRequestBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerRequestBytes_ = value; + onChanged(); + } else { + rpcServerRequestBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public Builder setRpcServerRequestBytes( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerRequestBytesBuilder_ == null) { + rpcServerRequestBytes_ = builderForValue.build(); + onChanged(); + } else { + rpcServerRequestBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public Builder mergeRpcServerRequestBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerRequestBytesBuilder_ == null) { + if (rpcServerRequestBytes_ != null) { + rpcServerRequestBytes_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerRequestBytes_).mergeFrom(value).buildPartial(); + } else { + rpcServerRequestBytes_ = value; + } + onChanged(); + } else { + rpcServerRequestBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public Builder clearRpcServerRequestBytes() { + if (rpcServerRequestBytesBuilder_ == null) { + rpcServerRequestBytes_ = null; + onChanged(); + } else { + rpcServerRequestBytes_ = null; + rpcServerRequestBytesBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerRequestBytesBuilder() { + + onChanged(); + return getRpcServerRequestBytesFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerRequestBytesOrBuilder() { + if (rpcServerRequestBytesBuilder_ != null) { + return rpcServerRequestBytesBuilder_.getMessageOrBuilder(); + } else { + return rpcServerRequestBytes_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerRequestBytes_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerRequestBytesFieldBuilder() { + if (rpcServerRequestBytesBuilder_ == null) { + rpcServerRequestBytesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerRequestBytes(), + getParentForChildren(), + isClean()); + rpcServerRequestBytes_ = null; + } + return rpcServerRequestBytesBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerResponseBytes_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerResponseBytesBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public boolean hasRpcServerResponseBytes() { + return rpcServerResponseBytesBuilder_ != null || rpcServerResponseBytes_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerResponseBytes() { + if (rpcServerResponseBytesBuilder_ == null) { + return rpcServerResponseBytes_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerResponseBytes_; + } else { + return rpcServerResponseBytesBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public Builder setRpcServerResponseBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerResponseBytesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerResponseBytes_ = value; + onChanged(); + } else { + rpcServerResponseBytesBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public Builder setRpcServerResponseBytes( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerResponseBytesBuilder_ == null) { + rpcServerResponseBytes_ = builderForValue.build(); + onChanged(); + } else { + rpcServerResponseBytesBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public Builder mergeRpcServerResponseBytes(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerResponseBytesBuilder_ == null) { + if (rpcServerResponseBytes_ != null) { + rpcServerResponseBytes_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerResponseBytes_).mergeFrom(value).buildPartial(); + } else { + rpcServerResponseBytes_ = value; + } + onChanged(); + } else { + rpcServerResponseBytesBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public Builder clearRpcServerResponseBytes() { + if (rpcServerResponseBytesBuilder_ == null) { + rpcServerResponseBytes_ = null; + onChanged(); + } else { + rpcServerResponseBytes_ = null; + rpcServerResponseBytesBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerResponseBytesBuilder() { + + onChanged(); + return getRpcServerResponseBytesFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerResponseBytesOrBuilder() { + if (rpcServerResponseBytesBuilder_ != null) { + return rpcServerResponseBytesBuilder_.getMessageOrBuilder(); + } else { + return rpcServerResponseBytes_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerResponseBytes_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerResponseBytesFieldBuilder() { + if (rpcServerResponseBytesBuilder_ == null) { + rpcServerResponseBytesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerResponseBytes(), + getParentForChildren(), + isClean()); + rpcServerResponseBytes_ = null; + } + return rpcServerResponseBytesBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerRequestCount_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerRequestCountBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public boolean hasRpcServerRequestCount() { + return rpcServerRequestCountBuilder_ != null || rpcServerRequestCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerRequestCount() { + if (rpcServerRequestCountBuilder_ == null) { + return rpcServerRequestCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerRequestCount_; + } else { + return rpcServerRequestCountBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public Builder setRpcServerRequestCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerRequestCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerRequestCount_ = value; + onChanged(); + } else { + rpcServerRequestCountBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public Builder setRpcServerRequestCount( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerRequestCountBuilder_ == null) { + rpcServerRequestCount_ = builderForValue.build(); + onChanged(); + } else { + rpcServerRequestCountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public Builder mergeRpcServerRequestCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerRequestCountBuilder_ == null) { + if (rpcServerRequestCount_ != null) { + rpcServerRequestCount_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerRequestCount_).mergeFrom(value).buildPartial(); + } else { + rpcServerRequestCount_ = value; + } + onChanged(); + } else { + rpcServerRequestCountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public Builder clearRpcServerRequestCount() { + if (rpcServerRequestCountBuilder_ == null) { + rpcServerRequestCount_ = null; + onChanged(); + } else { + rpcServerRequestCount_ = null; + rpcServerRequestCountBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerRequestCountBuilder() { + + onChanged(); + return getRpcServerRequestCountFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerRequestCountOrBuilder() { + if (rpcServerRequestCountBuilder_ != null) { + return rpcServerRequestCountBuilder_.getMessageOrBuilder(); + } else { + return rpcServerRequestCount_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerRequestCount_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerRequestCountFieldBuilder() { + if (rpcServerRequestCountBuilder_ == null) { + rpcServerRequestCountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerRequestCount(), + getParentForChildren(), + isClean()); + rpcServerRequestCount_ = null; + } + return rpcServerRequestCountBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerResponseCount_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerResponseCountBuilder_; + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public boolean hasRpcServerResponseCount() { + return rpcServerResponseCountBuilder_ != null || rpcServerResponseCount_ != null; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerResponseCount() { + if (rpcServerResponseCountBuilder_ == null) { + return rpcServerResponseCount_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerResponseCount_; + } else { + return rpcServerResponseCountBuilder_.getMessage(); + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public Builder setRpcServerResponseCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerResponseCountBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerResponseCount_ = value; + onChanged(); + } else { + rpcServerResponseCountBuilder_.setMessage(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public Builder setRpcServerResponseCount( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerResponseCountBuilder_ == null) { + rpcServerResponseCount_ = builderForValue.build(); + onChanged(); + } else { + rpcServerResponseCountBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public Builder mergeRpcServerResponseCount(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerResponseCountBuilder_ == null) { + if (rpcServerResponseCount_ != null) { + rpcServerResponseCount_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerResponseCount_).mergeFrom(value).buildPartial(); + } else { + rpcServerResponseCount_ = value; + } + onChanged(); + } else { + rpcServerResponseCountBuilder_.mergeFrom(value); + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public Builder clearRpcServerResponseCount() { + if (rpcServerResponseCountBuilder_ == null) { + rpcServerResponseCount_ = null; + onChanged(); + } else { + rpcServerResponseCount_ = null; + rpcServerResponseCountBuilder_ = null; + } + + return this; + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerResponseCountBuilder() { + + onChanged(); + return getRpcServerResponseCountFieldBuilder().getBuilder(); + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerResponseCountOrBuilder() { + if (rpcServerResponseCountBuilder_ != null) { + return rpcServerResponseCountBuilder_.getMessageOrBuilder(); + } else { + return rpcServerResponseCount_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerResponseCount_; + } + } + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerResponseCountFieldBuilder() { + if (rpcServerResponseCountBuilder_ == null) { + rpcServerResponseCountBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerResponseCount(), + getParentForChildren(), + isClean()); + rpcServerResponseCount_ = null; + } + return rpcServerResponseCountBuilder_; + } + + private io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpcServerElapsedTime_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> rpcServerElapsedTimeBuilder_; + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public boolean hasRpcServerElapsedTime() { + return rpcServerElapsedTimeBuilder_ != null || rpcServerElapsedTime_ != null; + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerElapsedTime() { + if (rpcServerElapsedTimeBuilder_ == null) { + return rpcServerElapsedTime_ == null ? io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerElapsedTime_; + } else { + return rpcServerElapsedTimeBuilder_.getMessage(); + } + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public Builder setRpcServerElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerElapsedTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rpcServerElapsedTime_ = value; + onChanged(); + } else { + rpcServerElapsedTimeBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public Builder setRpcServerElapsedTime( + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder builderForValue) { + if (rpcServerElapsedTimeBuilder_ == null) { + rpcServerElapsedTime_ = builderForValue.build(); + onChanged(); + } else { + rpcServerElapsedTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public Builder mergeRpcServerElapsedTime(io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View value) { + if (rpcServerElapsedTimeBuilder_ == null) { + if (rpcServerElapsedTime_ != null) { + rpcServerElapsedTime_ = + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.newBuilder(rpcServerElapsedTime_).mergeFrom(value).buildPartial(); + } else { + rpcServerElapsedTime_ = value; + } + onChanged(); + } else { + rpcServerElapsedTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public Builder clearRpcServerElapsedTime() { + if (rpcServerElapsedTimeBuilder_ == null) { + rpcServerElapsedTime_ = null; + onChanged(); + } else { + rpcServerElapsedTime_ = null; + rpcServerElapsedTimeBuilder_ = null; + } + + return this; + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder getRpcServerElapsedTimeBuilder() { + + onChanged(); + return getRpcServerElapsedTimeFieldBuilder().getBuilder(); + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerElapsedTimeOrBuilder() { + if (rpcServerElapsedTimeBuilder_ != null) { + return rpcServerElapsedTimeBuilder_.getMessageOrBuilder(); + } else { + return rpcServerElapsedTime_ == null ? + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.getDefaultInstance() : rpcServerElapsedTime_; + } + } + /** + *
+     *TODO(ericgribkoff) Add minute-hour interval stats.
+     * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + private com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder> + getRpcServerElapsedTimeFieldBuilder() { + if (rpcServerElapsedTimeBuilder_ == null) { + rpcServerElapsedTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View.Builder, io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder>( + getRpcServerElapsedTime(), + getParentForChildren(), + isClean()); + rpcServerElapsedTime_ = null; + } + return rpcServerElapsedTimeBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.CanonicalRpcStats) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.CanonicalRpcStats) + private static final io.grpc.instrumentation.v1alpha.CanonicalRpcStats DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.CanonicalRpcStats(); + } + + public static io.grpc.instrumentation.v1alpha.CanonicalRpcStats getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CanonicalRpcStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CanonicalRpcStats(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.CanonicalRpcStats getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStatsOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStatsOrBuilder.java new file mode 100644 index 0000000000..fc9fee8b22 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CanonicalRpcStatsOrBuilder.java @@ -0,0 +1,242 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface CanonicalRpcStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.CanonicalRpcStats) + com.google.protobuf.MessageOrBuilder { + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + boolean hasRpcClientErrors(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientErrors(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_errors = 1; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientErrorsOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + boolean hasRpcClientCompletedRpcs(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientCompletedRpcs(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_completed_rpcs = 2; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientCompletedRpcsOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + boolean hasRpcClientStartedRpcs(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientStartedRpcs(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_started_rpcs = 3; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientStartedRpcsOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + boolean hasRpcClientElapsedTime(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientElapsedTime(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_elapsed_time = 4; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientElapsedTimeOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + boolean hasRpcClientServerElapsedTime(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientServerElapsedTime(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_server_elapsed_time = 5; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientServerElapsedTimeOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + boolean hasRpcClientRequestBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientRequestBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_bytes = 6; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientRequestBytesOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + boolean hasRpcClientResponseBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientResponseBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_bytes = 7; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientResponseBytesOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + boolean hasRpcClientRequestCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientRequestCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_request_count = 8; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientRequestCountOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + boolean hasRpcClientResponseCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcClientResponseCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_client_response_count = 9; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcClientResponseCountOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + boolean hasRpcServerErrors(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerErrors(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_errors = 10; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerErrorsOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + boolean hasRpcServerCompletedRpcs(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerCompletedRpcs(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_completed_rpcs = 11; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerCompletedRpcsOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + boolean hasRpcServerServerElapsedTime(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerServerElapsedTime(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_server_elapsed_time = 12; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerServerElapsedTimeOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + boolean hasRpcServerRequestBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerRequestBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_bytes = 13; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerRequestBytesOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + boolean hasRpcServerResponseBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerResponseBytes(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_bytes = 14; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerResponseBytesOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + boolean hasRpcServerRequestCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerRequestCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_request_count = 15; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerRequestCountOrBuilder(); + + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + boolean hasRpcServerResponseCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerResponseCount(); + /** + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_response_count = 16; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerResponseCountOrBuilder(); + + /** + *
+   *TODO(ericgribkoff) Add minute-hour interval stats.
+   * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + boolean hasRpcServerElapsedTime(); + /** + *
+   *TODO(ericgribkoff) Add minute-hour interval stats.
+   * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.View getRpcServerElapsedTime(); + /** + *
+   *TODO(ericgribkoff) Add minute-hour interval stats.
+   * 
+ * + * .grpc.instrumentation.v1alpha.CanonicalRpcStats.View rpc_server_elapsed_time = 17; + */ + io.grpc.instrumentation.v1alpha.CanonicalRpcStats.ViewOrBuilder getRpcServerElapsedTimeOrBuilder(); +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringData.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringData.java new file mode 100644 index 0000000000..6e8c4ae60a --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringData.java @@ -0,0 +1,604 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + *
+ * The wrapper for custom monitoring data.
+ * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.CustomMonitoringData} + */ +public final class CustomMonitoringData extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.CustomMonitoringData) + CustomMonitoringDataOrBuilder { + // Use CustomMonitoringData.newBuilder() to construct. + private CustomMonitoringData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private CustomMonitoringData() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private CustomMonitoringData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.Any.Builder subBuilder = null; + if (contents_ != null) { + subBuilder = contents_.toBuilder(); + } + contents_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(contents_); + contents_ = 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.CustomMonitoringData.class, io.grpc.instrumentation.v1alpha.CustomMonitoringData.Builder.class); + } + + public static final int CONTENTS_FIELD_NUMBER = 1; + private com.google.protobuf.Any contents_; + /** + *
+   * can be any application specific monitoring data
+   * 
+ * + * .google.protobuf.Any contents = 1; + */ + public boolean hasContents() { + return contents_ != null; + } + /** + *
+   * can be any application specific monitoring data
+   * 
+ * + * .google.protobuf.Any contents = 1; + */ + public com.google.protobuf.Any getContents() { + return contents_ == null ? com.google.protobuf.Any.getDefaultInstance() : contents_; + } + /** + *
+   * can be any application specific monitoring data
+   * 
+ * + * .google.protobuf.Any contents = 1; + */ + public com.google.protobuf.AnyOrBuilder getContentsOrBuilder() { + return getContents(); + } + + 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 (contents_ != null) { + output.writeMessage(1, getContents()); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (contents_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getContents()); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.CustomMonitoringData)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.CustomMonitoringData other = (io.grpc.instrumentation.v1alpha.CustomMonitoringData) obj; + + boolean result = true; + result = result && (hasContents() == other.hasContents()); + if (hasContents()) { + result = result && getContents() + .equals(other.getContents()); + } + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasContents()) { + hash = (37 * hash) + CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getContents().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData 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(io.grpc.instrumentation.v1alpha.CustomMonitoringData 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; + } + /** + *
+   * The wrapper for custom monitoring data.
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.CustomMonitoringData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.CustomMonitoringData) + io.grpc.instrumentation.v1alpha.CustomMonitoringDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.CustomMonitoringData.class, io.grpc.instrumentation.v1alpha.CustomMonitoringData.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.CustomMonitoringData.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 (contentsBuilder_ == null) { + contents_ = null; + } else { + contents_ = null; + contentsBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor; + } + + public io.grpc.instrumentation.v1alpha.CustomMonitoringData getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.CustomMonitoringData.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.CustomMonitoringData build() { + io.grpc.instrumentation.v1alpha.CustomMonitoringData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.CustomMonitoringData buildPartial() { + io.grpc.instrumentation.v1alpha.CustomMonitoringData result = new io.grpc.instrumentation.v1alpha.CustomMonitoringData(this); + if (contentsBuilder_ == null) { + result.contents_ = contents_; + } else { + result.contents_ = contentsBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.CustomMonitoringData) { + return mergeFrom((io.grpc.instrumentation.v1alpha.CustomMonitoringData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.CustomMonitoringData other) { + if (other == io.grpc.instrumentation.v1alpha.CustomMonitoringData.getDefaultInstance()) return this; + if (other.hasContents()) { + mergeContents(other.getContents()); + } + 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 { + io.grpc.instrumentation.v1alpha.CustomMonitoringData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.CustomMonitoringData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Any contents_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> contentsBuilder_; + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public boolean hasContents() { + return contentsBuilder_ != null || contents_ != null; + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public com.google.protobuf.Any getContents() { + if (contentsBuilder_ == null) { + return contents_ == null ? com.google.protobuf.Any.getDefaultInstance() : contents_; + } else { + return contentsBuilder_.getMessage(); + } + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public Builder setContents(com.google.protobuf.Any value) { + if (contentsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + contents_ = value; + onChanged(); + } else { + contentsBuilder_.setMessage(value); + } + + return this; + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public Builder setContents( + com.google.protobuf.Any.Builder builderForValue) { + if (contentsBuilder_ == null) { + contents_ = builderForValue.build(); + onChanged(); + } else { + contentsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public Builder mergeContents(com.google.protobuf.Any value) { + if (contentsBuilder_ == null) { + if (contents_ != null) { + contents_ = + com.google.protobuf.Any.newBuilder(contents_).mergeFrom(value).buildPartial(); + } else { + contents_ = value; + } + onChanged(); + } else { + contentsBuilder_.mergeFrom(value); + } + + return this; + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public Builder clearContents() { + if (contentsBuilder_ == null) { + contents_ = null; + onChanged(); + } else { + contents_ = null; + contentsBuilder_ = null; + } + + return this; + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public com.google.protobuf.Any.Builder getContentsBuilder() { + + onChanged(); + return getContentsFieldBuilder().getBuilder(); + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + public com.google.protobuf.AnyOrBuilder getContentsOrBuilder() { + if (contentsBuilder_ != null) { + return contentsBuilder_.getMessageOrBuilder(); + } else { + return contents_ == null ? + com.google.protobuf.Any.getDefaultInstance() : contents_; + } + } + /** + *
+     * can be any application specific monitoring data
+     * 
+ * + * .google.protobuf.Any contents = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> + getContentsFieldBuilder() { + if (contentsBuilder_ == null) { + contentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>( + getContents(), + getParentForChildren(), + isClean()); + contents_ = null; + } + return contentsBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.CustomMonitoringData) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.CustomMonitoringData) + private static final io.grpc.instrumentation.v1alpha.CustomMonitoringData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.CustomMonitoringData(); + } + + public static io.grpc.instrumentation.v1alpha.CustomMonitoringData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public CustomMonitoringData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomMonitoringData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.CustomMonitoringData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringDataOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringDataOrBuilder.java new file mode 100644 index 0000000000..cab2cca1f4 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/CustomMonitoringDataOrBuilder.java @@ -0,0 +1,34 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface CustomMonitoringDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.CustomMonitoringData) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * can be any application specific monitoring data
+   * 
+ * + * .google.protobuf.Any contents = 1; + */ + boolean hasContents(); + /** + *
+   * can be any application specific monitoring data
+   * 
+ * + * .google.protobuf.Any contents = 1; + */ + com.google.protobuf.Any getContents(); + /** + *
+   * can be any application specific monitoring data
+   * 
+ * + * .google.protobuf.Any contents = 1; + */ + com.google.protobuf.AnyOrBuilder getContentsOrBuilder(); +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroup.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroup.java new file mode 100644 index 0000000000..9697aa3f0b --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroup.java @@ -0,0 +1,522 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + * Protobuf type {@code grpc.instrumentation.v1alpha.MonitoringDataGroup} + */ +public final class MonitoringDataGroup extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.MonitoringDataGroup) + MonitoringDataGroupOrBuilder { + // Use MonitoringDataGroup.newBuilder() to construct. + private MonitoringDataGroup(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private MonitoringDataGroup() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private MonitoringDataGroup( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = 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 { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.MonitoringDataGroup.class, io.grpc.instrumentation.v1alpha.MonitoringDataGroup.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + *
+   * name of a group of monitoring data
+   * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+   * name of a group of monitoring data
+   * 
+ * + * string name = 1; + */ + 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; + } + } + + 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_); + } + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.MonitoringDataGroup)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.MonitoringDataGroup other = (io.grpc.instrumentation.v1alpha.MonitoringDataGroup) obj; + + boolean result = true; + result = result && getName() + .equals(other.getName()); + 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 = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup 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(io.grpc.instrumentation.v1alpha.MonitoringDataGroup 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 grpc.instrumentation.v1alpha.MonitoringDataGroup} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.MonitoringDataGroup) + io.grpc.instrumentation.v1alpha.MonitoringDataGroupOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.MonitoringDataGroup.class, io.grpc.instrumentation.v1alpha.MonitoringDataGroup.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.MonitoringDataGroup.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_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor; + } + + public io.grpc.instrumentation.v1alpha.MonitoringDataGroup getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.MonitoringDataGroup.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.MonitoringDataGroup build() { + io.grpc.instrumentation.v1alpha.MonitoringDataGroup result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.MonitoringDataGroup buildPartial() { + io.grpc.instrumentation.v1alpha.MonitoringDataGroup result = new io.grpc.instrumentation.v1alpha.MonitoringDataGroup(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.MonitoringDataGroup) { + return mergeFrom((io.grpc.instrumentation.v1alpha.MonitoringDataGroup)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.MonitoringDataGroup other) { + if (other == io.grpc.instrumentation.v1alpha.MonitoringDataGroup.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + 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 { + io.grpc.instrumentation.v1alpha.MonitoringDataGroup parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.MonitoringDataGroup) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + *
+     * name of a group of monitoring data
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * name of a group of monitoring data
+     * 
+ * + * string name = 1; + */ + 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; + } + } + /** + *
+     * name of a group of monitoring data
+     * 
+ * + * string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + *
+     * name of a group of monitoring data
+     * 
+ * + * string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + *
+     * name of a group of monitoring data
+     * 
+ * + * string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.MonitoringDataGroup) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.MonitoringDataGroup) + private static final io.grpc.instrumentation.v1alpha.MonitoringDataGroup DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.MonitoringDataGroup(); + } + + public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public MonitoringDataGroup parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MonitoringDataGroup(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.MonitoringDataGroup getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroupOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroupOrBuilder.java new file mode 100644 index 0000000000..423ed76043 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringDataGroupOrBuilder.java @@ -0,0 +1,27 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface MonitoringDataGroupOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.MonitoringDataGroup) + com.google.protobuf.MessageOrBuilder { + + /** + *
+   * name of a group of monitoring data
+   * 
+ * + * string name = 1; + */ + java.lang.String getName(); + /** + *
+   * name of a group of monitoring data
+   * 
+ * + * string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringProto.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringProto.java new file mode 100644 index 0000000000..34a8a6f5ac --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/MonitoringProto.java @@ -0,0 +1,204 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public final class MonitoringProto { + private MonitoringProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_StatsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_StatsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor; + static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_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-grpc/instrumentation/v1alpha/monitorin" + + "g.proto\022\034grpc.instrumentation.v1alpha\032#g" + + "oogle/instrumentation/census.proto\032\031goog" + + "le/protobuf/any.proto\032\033google/protobuf/e" + + "mpty.proto\"\261\r\n\021CanonicalRpcStats\022O\n\021rpc_" + + "client_errors\030\001 \001(\01324.grpc.instrumentati" + + "on.v1alpha.CanonicalRpcStats.View\022W\n\031rpc" + + "_client_completed_rpcs\030\002 \001(\01324.grpc.inst" + + "rumentation.v1alpha.CanonicalRpcStats.Vi" + + "ew\022U\n\027rpc_client_started_rpcs\030\003 \001(\01324.gr", + "pc.instrumentation.v1alpha.CanonicalRpcS" + + "tats.View\022U\n\027rpc_client_elapsed_time\030\004 \001" + + "(\01324.grpc.instrumentation.v1alpha.Canoni" + + "calRpcStats.View\022\\\n\036rpc_client_server_el" + + "apsed_time\030\005 \001(\01324.grpc.instrumentation." + + "v1alpha.CanonicalRpcStats.View\022V\n\030rpc_cl" + + "ient_request_bytes\030\006 \001(\01324.grpc.instrume" + + "ntation.v1alpha.CanonicalRpcStats.View\022W" + + "\n\031rpc_client_response_bytes\030\007 \001(\01324.grpc" + + ".instrumentation.v1alpha.CanonicalRpcSta", + "ts.View\022V\n\030rpc_client_request_count\030\010 \001(" + + "\01324.grpc.instrumentation.v1alpha.Canonic" + + "alRpcStats.View\022W\n\031rpc_client_response_c" + + "ount\030\t \001(\01324.grpc.instrumentation.v1alph" + + "a.CanonicalRpcStats.View\022O\n\021rpc_server_e" + + "rrors\030\n \001(\01324.grpc.instrumentation.v1alp" + + "ha.CanonicalRpcStats.View\022W\n\031rpc_server_" + + "completed_rpcs\030\013 \001(\01324.grpc.instrumentat" + + "ion.v1alpha.CanonicalRpcStats.View\022\\\n\036rp" + + "c_server_server_elapsed_time\030\014 \001(\01324.grp", + "c.instrumentation.v1alpha.CanonicalRpcSt" + + "ats.View\022V\n\030rpc_server_request_bytes\030\r \001" + + "(\01324.grpc.instrumentation.v1alpha.Canoni" + + "calRpcStats.View\022W\n\031rpc_server_response_" + + "bytes\030\016 \001(\01324.grpc.instrumentation.v1alp" + + "ha.CanonicalRpcStats.View\022V\n\030rpc_server_" + + "request_count\030\017 \001(\01324.grpc.instrumentati" + + "on.v1alpha.CanonicalRpcStats.View\022W\n\031rpc" + + "_server_response_count\030\020 \001(\01324.grpc.inst" + + "rumentation.v1alpha.CanonicalRpcStats.Vi", + "ew\022U\n\027rpc_server_elapsed_time\030\021 \001(\01324.gr" + + "pc.instrumentation.v1alpha.CanonicalRpcS" + + "tats.View\032\302\001\n\004View\022M\n\026measurement_descri" + + "ptor\030\001 \001(\0132-.google.instrumentation.Meas" + + "urementDescriptor\022?\n\017view_descriptor\030\002 \001" + + "(\0132&.google.instrumentation.ViewDescript" + + "or\022*\n\004view\030\003 \001(\0132\034.google.instrumentatio" + + "n.View\"\016\n\014StatsRequest\"\017\n\rStatsResponse\"" + + "\016\n\014TraceRequest\"\017\n\rTraceResponse\"#\n\023Moni" + + "toringDataGroup\022\014\n\004name\030\001 \001(\t\">\n\024CustomM", + "onitoringData\022&\n\010contents\030\001 \001(\0132\024.google" + + ".protobuf.Any2\265\004\n\nMonitoring\022a\n\024GetCanon" + + "icalRpcStats\022\026.google.protobuf.Empty\032/.g" + + "rpc.instrumentation.v1alpha.CanonicalRpc" + + "Stats\"\000\022e\n\010GetStats\022*.grpc.instrumentati" + + "on.v1alpha.StatsRequest\032+.grpc.instrumen" + + "tation.v1alpha.StatsResponse\"\000\022i\n\nWatchS" + + "tats\022*.grpc.instrumentation.v1alpha.Stat" + + "sRequest\032+.grpc.instrumentation.v1alpha." + + "StatsResponse\"\0000\001\022m\n\020GetRequestTraces\022*.", + "grpc.instrumentation.v1alpha.TraceReques" + + "t\032+.grpc.instrumentation.v1alpha.TraceRe" + + "sponse\"\000\022\202\001\n\027GetCustomMonitoringData\0221.g" + + "rpc.instrumentation.v1alpha.MonitoringDa" + + "taGroup\0322.grpc.instrumentation.v1alpha.C" + + "ustomMonitoringData\"\000B4\n\037io.grpc.instrum" + + "entation.v1alphaB\017MonitoringProtoP\001b\006pro" + + "to3" + }; + 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[] { + com.google.instrumentation.stats.proto.CensusProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + }, assigner); + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor, + new java.lang.String[] { "RpcClientErrors", "RpcClientCompletedRpcs", "RpcClientStartedRpcs", "RpcClientElapsedTime", "RpcClientServerElapsedTime", "RpcClientRequestBytes", "RpcClientResponseBytes", "RpcClientRequestCount", "RpcClientResponseCount", "RpcServerErrors", "RpcServerCompletedRpcs", "RpcServerServerElapsedTime", "RpcServerRequestBytes", "RpcServerResponseBytes", "RpcServerRequestCount", "RpcServerResponseCount", "RpcServerElapsedTime", }); + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_descriptor = + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor.getNestedTypes().get(0); + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_View_descriptor, + new java.lang.String[] { "MeasurementDescriptor", "ViewDescriptor", "View", }); + internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grpc_instrumentation_v1alpha_StatsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor, + new java.lang.String[] { }); + internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grpc_instrumentation_v1alpha_StatsResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor, + new java.lang.String[] { }); + internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor, + new java.lang.String[] { }); + internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor, + new java.lang.String[] { }); + internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor, + new java.lang.String[] { "Name", }); + internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor, + new java.lang.String[] { "Contents", }); + com.google.instrumentation.stats.proto.CensusProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequest.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequest.java new file mode 100644 index 0000000000..93216c627c --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequest.java @@ -0,0 +1,374 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + *
+ * TODO(aveitch): Complete definition of this type
+ * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.StatsRequest} + */ +public final class StatsRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.StatsRequest) + StatsRequestOrBuilder { + // Use StatsRequest.newBuilder() to construct. + private StatsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StatsRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private StatsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.StatsRequest.class, io.grpc.instrumentation.v1alpha.StatsRequest.Builder.class); + } + + 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 { + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.StatsRequest)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.StatsRequest other = (io.grpc.instrumentation.v1alpha.StatsRequest) obj; + + boolean result = true; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.StatsRequest 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(io.grpc.instrumentation.v1alpha.StatsRequest 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; + } + /** + *
+   * TODO(aveitch): Complete definition of this type
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.StatsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.StatsRequest) + io.grpc.instrumentation.v1alpha.StatsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.StatsRequest.class, io.grpc.instrumentation.v1alpha.StatsRequest.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.StatsRequest.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(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor; + } + + public io.grpc.instrumentation.v1alpha.StatsRequest getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.StatsRequest.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.StatsRequest build() { + io.grpc.instrumentation.v1alpha.StatsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.StatsRequest buildPartial() { + io.grpc.instrumentation.v1alpha.StatsRequest result = new io.grpc.instrumentation.v1alpha.StatsRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.StatsRequest) { + return mergeFrom((io.grpc.instrumentation.v1alpha.StatsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.StatsRequest other) { + if (other == io.grpc.instrumentation.v1alpha.StatsRequest.getDefaultInstance()) return this; + 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 { + io.grpc.instrumentation.v1alpha.StatsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.StatsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.StatsRequest) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.StatsRequest) + private static final io.grpc.instrumentation.v1alpha.StatsRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.StatsRequest(); + } + + public static io.grpc.instrumentation.v1alpha.StatsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StatsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StatsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.StatsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequestOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequestOrBuilder.java new file mode 100644 index 0000000000..f5c3b7efc1 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsRequestOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface StatsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.StatsRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponse.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponse.java new file mode 100644 index 0000000000..de31a83660 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponse.java @@ -0,0 +1,374 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + *
+ * TODO(aveitch): Complete definition of this type
+ * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.StatsResponse} + */ +public final class StatsResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.StatsResponse) + StatsResponseOrBuilder { + // Use StatsResponse.newBuilder() to construct. + private StatsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private StatsResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private StatsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.StatsResponse.class, io.grpc.instrumentation.v1alpha.StatsResponse.Builder.class); + } + + 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 { + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.StatsResponse)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.StatsResponse other = (io.grpc.instrumentation.v1alpha.StatsResponse) obj; + + boolean result = true; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.StatsResponse 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(io.grpc.instrumentation.v1alpha.StatsResponse 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; + } + /** + *
+   * TODO(aveitch): Complete definition of this type
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.StatsResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.StatsResponse) + io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.StatsResponse.class, io.grpc.instrumentation.v1alpha.StatsResponse.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.StatsResponse.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(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor; + } + + public io.grpc.instrumentation.v1alpha.StatsResponse getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.StatsResponse.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.StatsResponse build() { + io.grpc.instrumentation.v1alpha.StatsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.StatsResponse buildPartial() { + io.grpc.instrumentation.v1alpha.StatsResponse result = new io.grpc.instrumentation.v1alpha.StatsResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.StatsResponse) { + return mergeFrom((io.grpc.instrumentation.v1alpha.StatsResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.StatsResponse other) { + if (other == io.grpc.instrumentation.v1alpha.StatsResponse.getDefaultInstance()) return this; + 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 { + io.grpc.instrumentation.v1alpha.StatsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.StatsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.StatsResponse) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.StatsResponse) + private static final io.grpc.instrumentation.v1alpha.StatsResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.StatsResponse(); + } + + public static io.grpc.instrumentation.v1alpha.StatsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public StatsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StatsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.StatsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponseOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponseOrBuilder.java new file mode 100644 index 0000000000..4f43c26dc2 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/StatsResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface StatsResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.StatsResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequest.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequest.java new file mode 100644 index 0000000000..72eac6a0a4 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequest.java @@ -0,0 +1,374 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + *
+ * TODO(aveitch): Complete definition of this type
+ * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.TraceRequest} + */ +public final class TraceRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.TraceRequest) + TraceRequestOrBuilder { + // Use TraceRequest.newBuilder() to construct. + private TraceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TraceRequest() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private TraceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.TraceRequest.class, io.grpc.instrumentation.v1alpha.TraceRequest.Builder.class); + } + + 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 { + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.TraceRequest)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.TraceRequest other = (io.grpc.instrumentation.v1alpha.TraceRequest) obj; + + boolean result = true; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.TraceRequest 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(io.grpc.instrumentation.v1alpha.TraceRequest 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; + } + /** + *
+   * TODO(aveitch): Complete definition of this type
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.TraceRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.TraceRequest) + io.grpc.instrumentation.v1alpha.TraceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.TraceRequest.class, io.grpc.instrumentation.v1alpha.TraceRequest.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.TraceRequest.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(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor; + } + + public io.grpc.instrumentation.v1alpha.TraceRequest getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.TraceRequest.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.TraceRequest build() { + io.grpc.instrumentation.v1alpha.TraceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.TraceRequest buildPartial() { + io.grpc.instrumentation.v1alpha.TraceRequest result = new io.grpc.instrumentation.v1alpha.TraceRequest(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.TraceRequest) { + return mergeFrom((io.grpc.instrumentation.v1alpha.TraceRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.TraceRequest other) { + if (other == io.grpc.instrumentation.v1alpha.TraceRequest.getDefaultInstance()) return this; + 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 { + io.grpc.instrumentation.v1alpha.TraceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.TraceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.TraceRequest) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.TraceRequest) + private static final io.grpc.instrumentation.v1alpha.TraceRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.TraceRequest(); + } + + public static io.grpc.instrumentation.v1alpha.TraceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TraceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TraceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.TraceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequestOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequestOrBuilder.java new file mode 100644 index 0000000000..8de0081094 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceRequestOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface TraceRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.TraceRequest) + com.google.protobuf.MessageOrBuilder { +} diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponse.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponse.java new file mode 100644 index 0000000000..a39d721a02 --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponse.java @@ -0,0 +1,374 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +/** + *
+ * TODO(aveitch): Complete definition of this type
+ * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.TraceResponse} + */ +public final class TraceResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.TraceResponse) + TraceResponseOrBuilder { + // Use TraceResponse.newBuilder() to construct. + private TraceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private TraceResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private TraceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.TraceResponse.class, io.grpc.instrumentation.v1alpha.TraceResponse.Builder.class); + } + + 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 { + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + memoizedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.grpc.instrumentation.v1alpha.TraceResponse)) { + return super.equals(obj); + } + io.grpc.instrumentation.v1alpha.TraceResponse other = (io.grpc.instrumentation.v1alpha.TraceResponse) obj; + + boolean result = true; + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.grpc.instrumentation.v1alpha.TraceResponse 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(io.grpc.instrumentation.v1alpha.TraceResponse 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; + } + /** + *
+   * TODO(aveitch): Complete definition of this type
+   * 
+ * + * Protobuf type {@code grpc.instrumentation.v1alpha.TraceResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.TraceResponse) + io.grpc.instrumentation.v1alpha.TraceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.instrumentation.v1alpha.TraceResponse.class, io.grpc.instrumentation.v1alpha.TraceResponse.Builder.class); + } + + // Construct using io.grpc.instrumentation.v1alpha.TraceResponse.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(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor; + } + + public io.grpc.instrumentation.v1alpha.TraceResponse getDefaultInstanceForType() { + return io.grpc.instrumentation.v1alpha.TraceResponse.getDefaultInstance(); + } + + public io.grpc.instrumentation.v1alpha.TraceResponse build() { + io.grpc.instrumentation.v1alpha.TraceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.instrumentation.v1alpha.TraceResponse buildPartial() { + io.grpc.instrumentation.v1alpha.TraceResponse result = new io.grpc.instrumentation.v1alpha.TraceResponse(this); + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + 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, Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.instrumentation.v1alpha.TraceResponse) { + return mergeFrom((io.grpc.instrumentation.v1alpha.TraceResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.instrumentation.v1alpha.TraceResponse other) { + if (other == io.grpc.instrumentation.v1alpha.TraceResponse.getDefaultInstance()) return this; + 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 { + io.grpc.instrumentation.v1alpha.TraceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.instrumentation.v1alpha.TraceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return this; + } + + + // @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.TraceResponse) + } + + // @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.TraceResponse) + private static final io.grpc.instrumentation.v1alpha.TraceResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.TraceResponse(); + } + + public static io.grpc.instrumentation.v1alpha.TraceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + public TraceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TraceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public io.grpc.instrumentation.v1alpha.TraceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + +} + diff --git a/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponseOrBuilder.java b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponseOrBuilder.java new file mode 100644 index 0000000000..61ee42f8cb --- /dev/null +++ b/services/src/generated/main/java/io/grpc/instrumentation/v1alpha/TraceResponseOrBuilder.java @@ -0,0 +1,9 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: grpc/instrumentation/v1alpha/monitoring.proto + +package io.grpc.instrumentation.v1alpha; + +public interface TraceResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.TraceResponse) + com.google.protobuf.MessageOrBuilder { +} diff --git a/services/src/main/java/io/grpc/services/MonitoringService.java b/services/src/main/java/io/grpc/services/MonitoringService.java new file mode 100644 index 0000000000..0d8c5e8308 --- /dev/null +++ b/services/src/main/java/io/grpc/services/MonitoringService.java @@ -0,0 +1,111 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.grpc.services; + +import static com.google.common.base.Preconditions.checkNotNull; + +import com.google.common.annotations.VisibleForTesting; +import com.google.instrumentation.stats.RpcConstants; +import com.google.instrumentation.stats.Stats; +import com.google.instrumentation.stats.StatsManager; +import com.google.protobuf.Empty; +import io.grpc.ExperimentalApi; +import io.grpc.instrumentation.v1alpha.CanonicalRpcStats; +import io.grpc.instrumentation.v1alpha.MonitoringGrpc; +import io.grpc.stub.StreamObserver; + +/** + * An implementation of the gRPC monitoring service. + * + *

An implementation of {@link StatsManager} must be available at runtime (determined via {@link + * Stats#getStatsManager}) or instantiating this service will fail. + */ +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2776") +public final class MonitoringService extends MonitoringGrpc.MonitoringImplBase { + private static MonitoringService instance; + + private final StatsManager statsManager; + + @VisibleForTesting + MonitoringService(StatsManager statsManager) { + checkNotNull(statsManager, "StatsManager implementation unavailable"); + this.statsManager = statsManager; + } + + /** + * Gets the singleton instance of the MonitoringService. + * + * @throws IllegalStateException if {@link Stats#getStatsManager} returns null + */ + public static synchronized MonitoringService getInstance() { + if (instance == null) { + instance = new MonitoringService(Stats.getStatsManager()); + } + return instance; + } + + // TODO(ericgribkoff) Add remaining CanonicalRpcStats fields when they are included in + // instrumentation. + @Override + public void getCanonicalRpcStats( + Empty request, StreamObserver responseObserver) { + CanonicalRpcStats response = + CanonicalRpcStats.newBuilder() + .setRpcClientElapsedTime( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_CLIENT_ROUNDTRIP_LATENCY_VIEW))) + .setRpcClientServerElapsedTime( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_CLIENT_SERVER_ELAPSED_TIME_VIEW))) + .setRpcClientRequestBytes( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_CLIENT_REQUEST_BYTES_VIEW))) + .setRpcClientResponseBytes( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_CLIENT_RESPONSE_BYTES_VIEW))) + .setRpcServerServerElapsedTime( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_SERVER_SERVER_LATENCY_VIEW))) + .setRpcServerRequestBytes( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_SERVER_REQUEST_BYTES_VIEW))) + .setRpcServerResponseBytes( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_SERVER_RESPONSE_BYTES_VIEW))) + .setRpcServerElapsedTime( + MonitoringUtil.buildCanonicalRpcStatsView( + statsManager.getView(RpcConstants.RPC_SERVER_SERVER_ELAPSED_TIME_VIEW))) + .build(); + responseObserver.onNext(response); + responseObserver.onCompleted(); + } +} diff --git a/services/src/main/java/io/grpc/services/MonitoringUtil.java b/services/src/main/java/io/grpc/services/MonitoringUtil.java new file mode 100644 index 0000000000..917b063efb --- /dev/null +++ b/services/src/main/java/io/grpc/services/MonitoringUtil.java @@ -0,0 +1,276 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.grpc.services; + +import com.google.common.annotations.VisibleForTesting; +import com.google.instrumentation.common.Duration; +import com.google.instrumentation.common.Timestamp; +import com.google.instrumentation.stats.DistributionAggregation; +import com.google.instrumentation.stats.DistributionAggregationDescriptor; +import com.google.instrumentation.stats.IntervalAggregation; +import com.google.instrumentation.stats.IntervalAggregation.Interval; +import com.google.instrumentation.stats.IntervalAggregationDescriptor; +import com.google.instrumentation.stats.MeasurementDescriptor; +import com.google.instrumentation.stats.MeasurementDescriptor.BasicUnit; +import com.google.instrumentation.stats.MeasurementDescriptor.MeasurementUnit; +import com.google.instrumentation.stats.Tag; +import com.google.instrumentation.stats.TagKey; +import com.google.instrumentation.stats.View; +import com.google.instrumentation.stats.View.DistributionView; +import com.google.instrumentation.stats.View.IntervalView; +import com.google.instrumentation.stats.ViewDescriptor; +import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor; +import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor; +import com.google.instrumentation.stats.proto.CensusProto; +import io.grpc.ExperimentalApi; +import io.grpc.instrumentation.v1alpha.CanonicalRpcStats; + +/** Utility methods to support {@link MonitoringService}. */ +@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2776") +final class MonitoringUtil { + + private MonitoringUtil() {} + + /** Serialize a {@link View} and associated descriptors to a {@link CanonicalRpcStats.View}. */ + static CanonicalRpcStats.View buildCanonicalRpcStatsView(View view) { + return CanonicalRpcStats.View.newBuilder() + .setMeasurementDescriptor( + serializeMeasurementDescriptor(view.getViewDescriptor().getMeasurementDescriptor())) + .setViewDescriptor(serializeViewDescriptor(view.getViewDescriptor())) + .setView(serializeView(view)) + .build(); + } + + @VisibleForTesting + static CensusProto.MeasurementDescriptor serializeMeasurementDescriptor( + MeasurementDescriptor measurementDescriptor) { + return CensusProto.MeasurementDescriptor.newBuilder() + .setName(measurementDescriptor.getName()) + .setDescription(measurementDescriptor.getDescription()) + .setUnit(serializeMeasurementUnit(measurementDescriptor.getUnit())) + .build(); + } + + @VisibleForTesting + static CensusProto.MeasurementDescriptor.MeasurementUnit serializeMeasurementUnit( + MeasurementUnit unit) { + CensusProto.MeasurementDescriptor.MeasurementUnit.Builder unitBuilder = + CensusProto.MeasurementDescriptor.MeasurementUnit.newBuilder() + .setPower10(unit.getPower10()); + for (BasicUnit basicUnit : unit.getNumerators()) { + unitBuilder.addNumerators(serializeBasicUnit(basicUnit)); + } + for (BasicUnit basicUnit : unit.getDenominators()) { + unitBuilder.addDenominators(serializeBasicUnit(basicUnit)); + } + return unitBuilder.build(); + } + + @VisibleForTesting + static CensusProto.MeasurementDescriptor.BasicUnit serializeBasicUnit(BasicUnit basicUnit) { + switch (basicUnit) { + case SCALAR: + return CensusProto.MeasurementDescriptor.BasicUnit.SCALAR; + case BITS: + return CensusProto.MeasurementDescriptor.BasicUnit.BITS; + case BYTES: + return CensusProto.MeasurementDescriptor.BasicUnit.BYTES; + case SECONDS: + return CensusProto.MeasurementDescriptor.BasicUnit.SECONDS; + case CORES: + return CensusProto.MeasurementDescriptor.BasicUnit.CORES; + default: + return CensusProto.MeasurementDescriptor.BasicUnit.UNKNOWN; + } + } + + @VisibleForTesting + static CensusProto.ViewDescriptor serializeViewDescriptor(ViewDescriptor viewDescriptor) { + CensusProto.ViewDescriptor.Builder viewDescriptorBuilder = + CensusProto.ViewDescriptor.newBuilder() + .setName(viewDescriptor.getName()) + .setDescription(viewDescriptor.getDescription()) + .setMeasurementDescriptorName(viewDescriptor.getMeasurementDescriptor().getName()); + for (TagKey tagKey : viewDescriptor.getTagKeys()) { + viewDescriptorBuilder.addTagKeys(tagKey.toString()); + } + + if (viewDescriptor instanceof DistributionViewDescriptor) { + viewDescriptorBuilder.setDistributionAggregation( + serializeDistributionAggregationDescriptor( + ((DistributionViewDescriptor) viewDescriptor) + .getDistributionAggregationDescriptor())); + } else { + viewDescriptorBuilder.setIntervalAggregation( + serializeIntervalAggregationDescriptor( + ((IntervalViewDescriptor) viewDescriptor).getIntervalAggregationDescriptor())); + } + + return viewDescriptorBuilder.build(); + } + + @VisibleForTesting + static CensusProto.DistributionAggregationDescriptor serializeDistributionAggregationDescriptor( + DistributionAggregationDescriptor distributionAggregationDescriptor) { + CensusProto.DistributionAggregationDescriptor.Builder distributionAggregationDescriptorBuilder = + CensusProto.DistributionAggregationDescriptor.newBuilder(); + if (distributionAggregationDescriptor.getBucketBoundaries() != null) { + distributionAggregationDescriptorBuilder.addAllBucketBounds( + distributionAggregationDescriptor.getBucketBoundaries()); + } + return distributionAggregationDescriptorBuilder.build(); + } + + @VisibleForTesting + static CensusProto.IntervalAggregationDescriptor serializeIntervalAggregationDescriptor( + IntervalAggregationDescriptor intervalAggregationDescriptor) { + CensusProto.IntervalAggregationDescriptor.Builder intervalAggregationDescriptorBuilder = + CensusProto.IntervalAggregationDescriptor.newBuilder() + .setNSubIntervals(intervalAggregationDescriptor.getNumSubIntervals()); + for (Duration intervalSize : intervalAggregationDescriptor.getIntervalSizes()) { + intervalAggregationDescriptorBuilder.addIntervalSizes(serializeDuration(intervalSize)); + } + return intervalAggregationDescriptorBuilder.build(); + } + + @VisibleForTesting + static CensusProto.Duration serializeDuration(Duration duration) { + return CensusProto.Duration.newBuilder() + .setSeconds(duration.getSeconds()) + .setNanos(duration.getNanos()) + .build(); + } + + @VisibleForTesting + static CensusProto.View serializeView(View view) { + CensusProto.View.Builder viewBuilder = + CensusProto.View.newBuilder().setViewName(view.getViewDescriptor().getName()); + + if (view instanceof DistributionView) { + viewBuilder.setDistributionView(serializeDistributionView((DistributionView) view)); + } else { + viewBuilder.setIntervalView(serializeIntervalView((IntervalView) view)); + } + + return viewBuilder.build(); + } + + @VisibleForTesting + static CensusProto.DistributionView serializeDistributionView(DistributionView distributionView) { + CensusProto.DistributionView.Builder distributionViewBuilder = + CensusProto.DistributionView.newBuilder(); + //TODO(ericgribkoff) Re-enable once getter methods are public in instrumentation. + //distributionViewBuilder.setStart(serializeTimestamp(distributionView.getStart())) + //distributionViewBuilder.setEnd(serializeTimestamp(distributionView.getEnd())); + for (DistributionAggregation aggregation : distributionView.getDistributionAggregations()) { + distributionViewBuilder.addAggregations(serializeDistributionAggregation(aggregation)); + } + return distributionViewBuilder.build(); + } + + @VisibleForTesting + static CensusProto.Timestamp serializeTimestamp(Timestamp timestamp) { + return CensusProto.Timestamp.newBuilder() + .setSeconds(timestamp.getSeconds()) + .setNanos(timestamp.getNanos()) + .build(); + } + + @VisibleForTesting + static CensusProto.DistributionAggregation serializeDistributionAggregation( + DistributionAggregation aggregation) { + CensusProto.DistributionAggregation.Builder aggregationBuilder = + CensusProto.DistributionAggregation.newBuilder() + .setCount(aggregation.getCount()) + .setMean(aggregation.getMean()) + .setSum(aggregation.getSum()) + .setRange(serializeRange(aggregation.getRange())); + if (aggregation.getBucketCounts() != null) { + aggregationBuilder.addAllBucketCounts(aggregation.getBucketCounts()); + } + for (Tag tag : aggregation.getTags()) { + aggregationBuilder.addTags(serializeTag(tag)); + } + return aggregationBuilder.build(); + } + + @VisibleForTesting + static CensusProto.DistributionAggregation.Range serializeRange( + DistributionAggregation.Range range) { + CensusProto.DistributionAggregation.Range.Builder builder = + CensusProto.DistributionAggregation.Range.newBuilder(); + if (range != null) { + builder.setMin(range.getMin()).setMax(range.getMax()); + } + return builder.build(); + } + + @VisibleForTesting + static CensusProto.Tag serializeTag(Tag tag) { + return CensusProto.Tag.newBuilder() + .setKey(tag.getKey().toString()) + .setValue(tag.getValue().toString()) + .build(); + } + + @VisibleForTesting + static CensusProto.IntervalView serializeIntervalView(IntervalView intervalView) { + CensusProto.IntervalView.Builder intervalViewBuilder = CensusProto.IntervalView.newBuilder(); + for (IntervalAggregation aggregation : intervalView.getIntervalAggregations()) { + intervalViewBuilder.addAggregations(serializeIntervalAggregation(aggregation)); + } + return intervalViewBuilder.build(); + } + + @VisibleForTesting + static CensusProto.IntervalAggregation serializeIntervalAggregation( + IntervalAggregation aggregation) { + CensusProto.IntervalAggregation.Builder aggregationBuilder = + CensusProto.IntervalAggregation.newBuilder(); + for (Interval interval : aggregation.getIntervals()) { + aggregationBuilder.addIntervals(serializeInterval(interval)); + } + for (Tag tag : aggregation.getTags()) { + aggregationBuilder.addTags(serializeTag(tag)); + } + return aggregationBuilder.build(); + } + + @VisibleForTesting + static CensusProto.IntervalAggregation.Interval serializeInterval(Interval interval) { + return CensusProto.IntervalAggregation.Interval.newBuilder() + .setIntervalSize(serializeDuration(interval.getIntervalSize())) + .setCount(interval.getCount()) + .setSum(interval.getSum()) + .build(); + } +} diff --git a/services/src/main/proto/google/instrumentation/census.proto b/services/src/main/proto/google/instrumentation/census.proto new file mode 100644 index 0000000000..081706f9b5 --- /dev/null +++ b/services/src/main/proto/google/instrumentation/census.proto @@ -0,0 +1,317 @@ +// Copyright 2017, Google Inc. +// 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; + } +} diff --git a/services/src/main/proto/grpc/instrumentation/v1alpha/monitoring.proto b/services/src/main/proto/grpc/instrumentation/v1alpha/monitoring.proto new file mode 100644 index 0000000000..645a0ff642 --- /dev/null +++ b/services/src/main/proto/grpc/instrumentation/v1alpha/monitoring.proto @@ -0,0 +1,131 @@ +// Copyright 2017, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// This file defines an interface for exporting monitoring information +// out of gRPC servers. +syntax = "proto3"; + +// TODO(ericgribkoff) Figure out how to manage the external Census proto +// dependency. +import "google/instrumentation/census.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/empty.proto"; + +package grpc.instrumentation.v1alpha; + +option java_multiple_files = true; +option java_package = "io.grpc.instrumentation.v1alpha"; +option java_outer_classname = "MonitoringProto"; + +service Monitoring { + // Return canonical RPC stats + rpc GetCanonicalRpcStats(google.protobuf.Empty) returns (CanonicalRpcStats) { + } + + // Query the server for specific stats + rpc GetStats(StatsRequest) returns (StatsResponse) { + // TODO(aveitch, ericgribkoff): Pease define the stats response message + // StatsRequest would specifically identify the stats to be returned. + } + + // Request the server to stream back snapshots of the requested stats + rpc WatchStats(StatsRequest) returns (stream StatsResponse) { + } + + + // Return request traces. + rpc GetRequestTraces(TraceRequest) returns(TraceResponse) { + // TODO(aveitch): Please define the messages here + } + + // Return application-defined groups of monitoring data. + // This is a low level facility to allow extension of the monitoring API to + // application-specific monitoring data. Frameworks may use this to define + // additional groups of monitoring data made available by servers. + rpc GetCustomMonitoringData(MonitoringDataGroup) + returns (CustomMonitoringData) { + } + +} + +// Canonical RPC stats exported by gRPC. +message CanonicalRpcStats { + // Wrapper combining View and ViewDescriptor. + message View { + google.instrumentation.MeasurementDescriptor measurement_descriptor = 1; + google.instrumentation.ViewDescriptor view_descriptor = 2; + google.instrumentation.View view = 3; + } + + View rpc_client_errors = 1; + View rpc_client_completed_rpcs = 2; + View rpc_client_started_rpcs = 3; + View rpc_client_elapsed_time = 4; + View rpc_client_server_elapsed_time = 5; + View rpc_client_request_bytes = 6; + View rpc_client_response_bytes = 7; + View rpc_client_request_count = 8; + View rpc_client_response_count = 9; + View rpc_server_errors = 10; + View rpc_server_completed_rpcs = 11; + View rpc_server_server_elapsed_time = 12; + View rpc_server_request_bytes = 13; + View rpc_server_response_bytes = 14; + View rpc_server_request_count = 15; + View rpc_server_response_count = 16; + View rpc_server_elapsed_time = 17; + //TODO(ericgribkoff) Add minute-hour interval stats. +} + +message StatsRequest { + // TODO(aveitch): Complete definition of this type +} + +message StatsResponse { + // TODO(aveitch): Complete definition of this type +} + +message TraceRequest { + // TODO(aveitch): Complete definition of this type +} + +message TraceResponse { + // TODO(aveitch): Complete definition of this type +} + +message MonitoringDataGroup { + string name = 1; // name of a group of monitoring data +} + +// The wrapper for custom monitoring data. +message CustomMonitoringData { + // can be any application specific monitoring data + google.protobuf.Any contents = 1; +} + diff --git a/services/src/test/java/io/grpc/services/MonitoringServiceTest.java b/services/src/test/java/io/grpc/services/MonitoringServiceTest.java new file mode 100644 index 0000000000..0c014d1cf9 --- /dev/null +++ b/services/src/test/java/io/grpc/services/MonitoringServiceTest.java @@ -0,0 +1,117 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.grpc.services; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoMoreInteractions; +import static org.mockito.Mockito.when; + +import com.google.instrumentation.stats.RpcConstants; +import com.google.instrumentation.stats.StatsManager; +import com.google.instrumentation.stats.View; +import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor; +import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor; +import com.google.protobuf.Empty; +import io.grpc.instrumentation.v1alpha.CanonicalRpcStats; +import io.grpc.stub.StreamObserver; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; +import org.mockito.ArgumentCaptor; +import org.mockito.Captor; +import org.mockito.Mock; +import org.mockito.MockitoAnnotations; + +/** Unit tests for {@link MonitoringService}. */ +@RunWith(JUnit4.class) +public class MonitoringServiceTest { + @Mock private StatsManager statsManager; + + @Captor private ArgumentCaptor> responseObserverCaptor; + + private MonitoringService monitoringService; + + @Before + public void setup() { + MockitoAnnotations.initMocks(this); + View view = mock(View.class); + when(statsManager.getView(any(DistributionViewDescriptor.class))) + .thenReturn(MonitoringUtilTest.DISTRIBUTION_VIEW); + when(statsManager.getView(any(IntervalViewDescriptor.class))) + .thenReturn(MonitoringUtilTest.INTERVAL_VIEW); + monitoringService = new MonitoringService(statsManager); + } + + @Test + public void getCanonicalRpcStats() throws Exception { + @SuppressWarnings("unchecked") + StreamObserver observer = mock(StreamObserver.class); + ArgumentCaptor statsResponse = + ArgumentCaptor.forClass(CanonicalRpcStats.class); + + monitoringService.getCanonicalRpcStats(Empty.getDefaultInstance(), observer); + + verify(statsManager).getView(RpcConstants.RPC_CLIENT_ROUNDTRIP_LATENCY_VIEW); + verify(statsManager).getView(RpcConstants.RPC_CLIENT_SERVER_ELAPSED_TIME_VIEW); + verify(statsManager).getView(RpcConstants.RPC_CLIENT_REQUEST_BYTES_VIEW); + verify(statsManager).getView(RpcConstants.RPC_CLIENT_RESPONSE_BYTES_VIEW); + verify(statsManager).getView(RpcConstants.RPC_SERVER_SERVER_LATENCY_VIEW); + verify(statsManager).getView(RpcConstants.RPC_SERVER_REQUEST_BYTES_VIEW); + verify(statsManager).getView(RpcConstants.RPC_SERVER_RESPONSE_BYTES_VIEW); + verify(statsManager).getView(RpcConstants.RPC_SERVER_SERVER_ELAPSED_TIME_VIEW); + verifyNoMoreInteractions(statsManager); + + verify(observer).onNext(statsResponse.capture()); + assertFalse(statsResponse.getValue().hasRpcClientErrors()); + assertFalse(statsResponse.getValue().hasRpcClientCompletedRpcs()); + assertFalse(statsResponse.getValue().hasRpcClientStartedRpcs()); + assertTrue(statsResponse.getValue().hasRpcClientElapsedTime()); + assertTrue(statsResponse.getValue().hasRpcClientServerElapsedTime()); + assertTrue(statsResponse.getValue().hasRpcClientRequestBytes()); + assertTrue(statsResponse.getValue().hasRpcClientResponseBytes()); + assertFalse(statsResponse.getValue().hasRpcClientRequestCount()); + assertFalse(statsResponse.getValue().hasRpcClientResponseCount()); + assertFalse(statsResponse.getValue().hasRpcServerErrors()); + assertFalse(statsResponse.getValue().hasRpcServerCompletedRpcs()); + assertTrue(statsResponse.getValue().hasRpcServerServerElapsedTime()); + assertTrue(statsResponse.getValue().hasRpcServerRequestBytes()); + assertTrue(statsResponse.getValue().hasRpcServerResponseBytes()); + assertFalse(statsResponse.getValue().hasRpcServerRequestCount()); + assertFalse(statsResponse.getValue().hasRpcServerResponseCount()); + assertTrue(statsResponse.getValue().hasRpcServerElapsedTime()); + } +} diff --git a/services/src/test/java/io/grpc/services/MonitoringUtilTest.java b/services/src/test/java/io/grpc/services/MonitoringUtilTest.java new file mode 100644 index 0000000000..1e05c7cdf0 --- /dev/null +++ b/services/src/test/java/io/grpc/services/MonitoringUtilTest.java @@ -0,0 +1,365 @@ +/* + * Copyright 2017, Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +package io.grpc.services; + +import static org.junit.Assert.assertEquals; + +import com.google.instrumentation.common.Duration; +import com.google.instrumentation.common.Timestamp; +import com.google.instrumentation.stats.DistributionAggregation; +import com.google.instrumentation.stats.DistributionAggregation.Range; +import com.google.instrumentation.stats.DistributionAggregationDescriptor; +import com.google.instrumentation.stats.IntervalAggregation; +import com.google.instrumentation.stats.IntervalAggregation.Interval; +import com.google.instrumentation.stats.IntervalAggregationDescriptor; +import com.google.instrumentation.stats.MeasurementDescriptor; +import com.google.instrumentation.stats.MeasurementDescriptor.BasicUnit; +import com.google.instrumentation.stats.MeasurementDescriptor.MeasurementUnit; +import com.google.instrumentation.stats.Tag; +import com.google.instrumentation.stats.TagKey; +import com.google.instrumentation.stats.TagValue; +import com.google.instrumentation.stats.View.DistributionView; +import com.google.instrumentation.stats.View.IntervalView; +import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor; +import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor; +import com.google.instrumentation.stats.proto.CensusProto; +import io.grpc.instrumentation.v1alpha.CanonicalRpcStats; +import java.util.Arrays; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.JUnit4; + +/** Unit tests for {@link MonitoringUtil}. */ +@RunWith(JUnit4.class) +public class MonitoringUtilTest { + @Test + public void buildCanonicalRpcStatsViewForDistributionView() throws Exception { + assertEquals( + DISTRIBUTION_CANONICAL_STATS_PROTO, + MonitoringUtil.buildCanonicalRpcStatsView(DISTRIBUTION_VIEW)); + } + + @Test + public void buildCanonicalRpcStatsViewForIntervalView() throws Exception { + assertEquals( + INTERVAL_CANONICAL_STATS_PROTO, MonitoringUtil.buildCanonicalRpcStatsView(INTERVAL_VIEW)); + } + + @Test + public void serializeMeasurementDescriptor() throws Exception { + assertEquals( + MEASUREMENT_DESC_PROTO, + MonitoringUtil.serializeMeasurementDescriptor(measurementDescriptor)); + } + + @Test + public void serializeMeasurementUnit() throws Exception { + assertEquals(MEASUREMENT_UNIT_PROTO, MonitoringUtil.serializeMeasurementUnit(MEASUREMENT_UNIT)); + } + + @Test + public void serializeViewDescriptorForDistributionView() throws Exception { + assertEquals( + DISTRIBUTION_VIEW_DESC_PROTO, + MonitoringUtil.serializeViewDescriptor(DISTRIBUTION_VIEW_DESC)); + } + + @Test + public void serializeViewDescriptorForIntervalView() throws Exception { + assertEquals( + INTERVAL_VIEW_DESC_PROTO, MonitoringUtil.serializeViewDescriptor(INTERVAL_VIEW_DESC)); + } + + @Test + public void serializeDistributionAggregationDescriptor() throws Exception { + assertEquals( + DISTRIBUTION_AGG_DESC_PROTO, + MonitoringUtil.serializeDistributionAggregationDescriptor(DISTRIBUTION_AGG_DESC)); + } + + @Test + public void serializeIntervalAggregationDescriptor() throws Exception { + assertEquals( + INTERVAL_AGG_DESC_PROTO, + MonitoringUtil.serializeIntervalAggregationDescriptor(INTERVAL_AGG_DESC)); + } + + @Test + public void serializeDuration() throws Exception { + assertEquals(DURATION_PROTO, MonitoringUtil.serializeDuration(DURATION)); + } + + @Test + public void serializeViewWithDistributionView() throws Exception { + assertEquals( + VIEW_WITH_DISTRIBUTION_VIEW_PROTO, MonitoringUtil.serializeView(DISTRIBUTION_VIEW)); + } + + @Test + public void serializeViewWithIntervalView() throws Exception { + assertEquals(VIEW_WITH_INTERVAL_VIEW_PROTO, MonitoringUtil.serializeView(INTERVAL_VIEW)); + } + + @Test + public void serializeDistributionView() throws Exception { + assertEquals( + DISTRIBUTION_VIEW_PROTO, MonitoringUtil.serializeDistributionView(DISTRIBUTION_VIEW)); + } + + @Test + public void serializeTimestamp() throws Exception { + assertEquals(START_TIMESTAMP_PROTO, MonitoringUtil.serializeTimestamp(START_TIMESTAMP)); + } + + @Test + public void serializeDistributionAggregation() throws Exception { + assertEquals( + DISTRIBUTION_AGG_PROTO, MonitoringUtil.serializeDistributionAggregation(DISTRIBUTION_AGG)); + } + + @Test + public void serializeRange() throws Exception { + assertEquals(RANGE_PROTO, MonitoringUtil.serializeRange(RANGE)); + } + + @Test + public void serializeTag() throws Exception { + assertEquals(TAG_PROTO, MonitoringUtil.serializeTag(TAG)); + } + + @Test + public void serializeIntervalView() throws Exception { + assertEquals(INTERVAL_VIEW_PROTO, MonitoringUtil.serializeIntervalView(INTERVAL_VIEW)); + } + + @Test + public void serializeIntervalAggregation() throws Exception { + assertEquals(INTERVAL_AGG_PROTO, MonitoringUtil.serializeIntervalAggregation(INTERVAL_AGG)); + } + + @Test + public void serializeInterval() throws Exception { + assertEquals(INTERVAL_PROTO, MonitoringUtil.serializeInterval(INTERVAL)); + } + + private static final int UNIT_POWER = -3; + private static final MeasurementUnit MEASUREMENT_UNIT = + MeasurementUnit.create( + UNIT_POWER, + Arrays.asList(BasicUnit.SCALAR), + Arrays.asList(BasicUnit.SECONDS, BasicUnit.SECONDS)); + private static final CensusProto.MeasurementDescriptor.MeasurementUnit MEASUREMENT_UNIT_PROTO = + CensusProto.MeasurementDescriptor.MeasurementUnit.newBuilder() + .setPower10(UNIT_POWER) + .addNumerators(MonitoringUtil.serializeBasicUnit(BasicUnit.SCALAR)) + .addDenominators(MonitoringUtil.serializeBasicUnit(BasicUnit.SECONDS)) + .addDenominators(MonitoringUtil.serializeBasicUnit(BasicUnit.SECONDS)) + .build(); + + private static final String MEASUREMENT_DESC_NAME = "measurement descriptor name"; + private static final String MEASUREMENT_DESC_DESCRIPTION = "measurement descriptor description"; + private static final MeasurementDescriptor measurementDescriptor = + MeasurementDescriptor.create( + MEASUREMENT_DESC_NAME, MEASUREMENT_DESC_DESCRIPTION, MEASUREMENT_UNIT); + private static final CensusProto.MeasurementDescriptor MEASUREMENT_DESC_PROTO = + CensusProto.MeasurementDescriptor.newBuilder() + .setName(MEASUREMENT_DESC_NAME) + .setDescription(MEASUREMENT_DESC_DESCRIPTION) + .setUnit(MEASUREMENT_UNIT_PROTO) + .build(); + + private static final long START_SECONDS = 1L; + private static final int START_NANOS = 1; + private static final long END_SECONDS = 100000L; + private static final int END_NANOS = 9999; + private static final Timestamp START_TIMESTAMP = Timestamp.create(START_SECONDS, START_NANOS); + private static final Timestamp END_TIMESTAMP = Timestamp.create(END_SECONDS, END_NANOS); + private static final CensusProto.Timestamp START_TIMESTAMP_PROTO = + CensusProto.Timestamp.newBuilder().setSeconds(START_SECONDS).setNanos(START_NANOS).build(); + private static final CensusProto.Timestamp END_TIMESTAMP_PROTO = + CensusProto.Timestamp.newBuilder().setSeconds(END_SECONDS).setNanos(END_NANOS).build(); + + private static final String TAG_KEY = "tag key"; + private static final String TAG_VALUE = "tag value"; + private static final Tag TAG = Tag.create(TagKey.create(TAG_KEY), TagValue.create(TAG_VALUE)); + private static final CensusProto.Tag TAG_PROTO = + CensusProto.Tag.newBuilder().setKey(TAG_KEY).setValue(TAG_VALUE).build(); + + private static final double RANGE_MIN = 0.1; + private static final double RANGE_MAX = 999.9; + private static final Range RANGE = Range.create(RANGE_MIN, RANGE_MAX); + private static final CensusProto.DistributionAggregation.Range RANGE_PROTO = + CensusProto.DistributionAggregation.Range.newBuilder() + .setMin(RANGE_MIN) + .setMax(RANGE_MAX) + .build(); + + private static final long DISTRIBUTION_AGG_COUNT = 100L; + private static final double DISTRIBUTION_AGG_MEAN = 55.1; + private static final double DISTRIBUTION_AGG_SUM = 4098.5; + private static final long BUCKET_COUNT = 11L; + private static final DistributionAggregation DISTRIBUTION_AGG = + DistributionAggregation.create( + DISTRIBUTION_AGG_COUNT, + DISTRIBUTION_AGG_MEAN, + DISTRIBUTION_AGG_SUM, + RANGE, + Arrays.asList(TAG), + Arrays.asList(BUCKET_COUNT)); + private static final CensusProto.DistributionAggregation DISTRIBUTION_AGG_PROTO = + CensusProto.DistributionAggregation.newBuilder() + .setCount(DISTRIBUTION_AGG_COUNT) + .setMean(DISTRIBUTION_AGG_MEAN) + .setSum(DISTRIBUTION_AGG_SUM) + .setRange(RANGE_PROTO) + .addAllBucketCounts(Arrays.asList(BUCKET_COUNT)) + .addTags(TAG_PROTO) + .build(); + + private static final double BUCKET_BOUNDARY = 14.0; + private static final DistributionAggregationDescriptor DISTRIBUTION_AGG_DESC = + DistributionAggregationDescriptor.create(Arrays.asList(BUCKET_BOUNDARY)); + private static final CensusProto.DistributionAggregationDescriptor DISTRIBUTION_AGG_DESC_PROTO = + CensusProto.DistributionAggregationDescriptor.newBuilder() + .addBucketBounds(BUCKET_BOUNDARY) + .build(); + + private static final String DISTRIBUTION_VIEW_NAME = "distribution view name"; + private static final String DISTRIBUTION_VIEW_DESCRIPTION = "distribution view description"; + private static final DistributionViewDescriptor DISTRIBUTION_VIEW_DESC = + DistributionViewDescriptor.create( + DISTRIBUTION_VIEW_NAME, + DISTRIBUTION_VIEW_DESCRIPTION, + measurementDescriptor, + DISTRIBUTION_AGG_DESC, + Arrays.asList(TagKey.create(TAG_KEY))); + private static final CensusProto.ViewDescriptor DISTRIBUTION_VIEW_DESC_PROTO = + CensusProto.ViewDescriptor.newBuilder() + .setName(DISTRIBUTION_VIEW_NAME) + .setDescription(DISTRIBUTION_VIEW_DESCRIPTION) + .setMeasurementDescriptorName(MEASUREMENT_DESC_NAME) + .setDistributionAggregation(DISTRIBUTION_AGG_DESC_PROTO) + .addTagKeys(TAG_KEY) + .build(); + + static final DistributionView DISTRIBUTION_VIEW = + DistributionView.create( + DISTRIBUTION_VIEW_DESC, Arrays.asList(DISTRIBUTION_AGG), START_TIMESTAMP, END_TIMESTAMP); + private static final CensusProto.DistributionView DISTRIBUTION_VIEW_PROTO = + CensusProto.DistributionView.newBuilder() + .addAggregations(DISTRIBUTION_AGG_PROTO) + // TODO(ericgribkoff) Re-enable once getter methods are public in instrumentation. + //.setStart(START_TIMESTAMP_PROTO) + //.setEnd(END_TIMESTAMP_PROTO) + .build(); + private static final CensusProto.View VIEW_WITH_DISTRIBUTION_VIEW_PROTO = + CensusProto.View.newBuilder() + .setViewName(DISTRIBUTION_VIEW_NAME) + .setDistributionView(DISTRIBUTION_VIEW_PROTO) + .build(); + private static final CanonicalRpcStats.View DISTRIBUTION_CANONICAL_STATS_PROTO = + CanonicalRpcStats.View.newBuilder() + .setMeasurementDescriptor(MEASUREMENT_DESC_PROTO) + .setViewDescriptor(DISTRIBUTION_VIEW_DESC_PROTO) + .setView(VIEW_WITH_DISTRIBUTION_VIEW_PROTO) + .build(); + + private static final long DURATION_SECONDS = 100L; + private static final int DURATION_NANOS = 9999; + private static final Duration DURATION = Duration.create(DURATION_SECONDS, DURATION_NANOS); + private static final CensusProto.Duration DURATION_PROTO = + CensusProto.Duration.newBuilder() + .setSeconds(DURATION_SECONDS) + .setNanos(DURATION_NANOS) + .build(); + + private static final int NUM_SUB_INTERVALS = 2; + private static final IntervalAggregationDescriptor INTERVAL_AGG_DESC = + IntervalAggregationDescriptor.create(NUM_SUB_INTERVALS, Arrays.asList(DURATION)); + private static final CensusProto.IntervalAggregationDescriptor INTERVAL_AGG_DESC_PROTO = + CensusProto.IntervalAggregationDescriptor.newBuilder() + .setNSubIntervals(NUM_SUB_INTERVALS) + .addIntervalSizes(DURATION_PROTO) + .build(); + + private static final String INTERVAL_VIEW_NAME = "interval view name"; + private static final String INTERVAL_VIEW_DESCRIPTION = "interval view description"; + private static final IntervalViewDescriptor INTERVAL_VIEW_DESC = + IntervalViewDescriptor.create( + INTERVAL_VIEW_NAME, + INTERVAL_VIEW_DESCRIPTION, + measurementDescriptor, + INTERVAL_AGG_DESC, + Arrays.asList(TagKey.create(TAG_KEY))); + private static final CensusProto.ViewDescriptor INTERVAL_VIEW_DESC_PROTO = + CensusProto.ViewDescriptor.newBuilder() + .setName(INTERVAL_VIEW_NAME) + .setDescription(INTERVAL_VIEW_DESCRIPTION) + .setMeasurementDescriptorName(MEASUREMENT_DESC_NAME) + .setIntervalAggregation(INTERVAL_AGG_DESC_PROTO) + .addTagKeys(TAG_KEY) + .build(); + + private static final double INTERVAL_COUNT = 6.0; + private static final double INTERVAL_SUM = 98.5; + private static final Interval INTERVAL = Interval.create(DURATION, INTERVAL_COUNT, INTERVAL_SUM); + private static final CensusProto.IntervalAggregation.Interval INTERVAL_PROTO = + CensusProto.IntervalAggregation.Interval.newBuilder() + .setIntervalSize(DURATION_PROTO) + .setCount(INTERVAL_COUNT) + .setSum(INTERVAL_SUM) + .build(); + + private static final IntervalAggregation INTERVAL_AGG = + IntervalAggregation.create(Arrays.asList(TAG), Arrays.asList(INTERVAL)); + private static final CensusProto.IntervalAggregation INTERVAL_AGG_PROTO = + CensusProto.IntervalAggregation.newBuilder() + .addIntervals(INTERVAL_PROTO) + .addTags(TAG_PROTO) + .build(); + + static final IntervalView INTERVAL_VIEW = + IntervalView.create(INTERVAL_VIEW_DESC, Arrays.asList(INTERVAL_AGG)); + private static final CensusProto.IntervalView INTERVAL_VIEW_PROTO = + CensusProto.IntervalView.newBuilder().addAggregations(INTERVAL_AGG_PROTO).build(); + private static final CensusProto.View VIEW_WITH_INTERVAL_VIEW_PROTO = + CensusProto.View.newBuilder() + .setViewName(INTERVAL_VIEW_NAME) + .setIntervalView(INTERVAL_VIEW_PROTO) + .build(); + private static final CanonicalRpcStats.View INTERVAL_CANONICAL_STATS_PROTO = + CanonicalRpcStats.View.newBuilder() + .setMeasurementDescriptor(MEASUREMENT_DESC_PROTO) + .setViewDescriptor(INTERVAL_VIEW_DESC_PROTO) + .setView(VIEW_WITH_INTERVAL_VIEW_PROTO) + .build(); +}