aboutsummaryrefslogtreecommitdiff
path: root/testing-proto
diff options
context:
space:
mode:
authorZHANG Dapeng <zdapeng@google.com>2017-07-06 15:26:08 -0700
committerGitHub <noreply@github.com>2017-07-06 15:26:08 -0700
commit0a36c9d8a3704a1a03937dfbd4667c9bccc700fe (patch)
treed598e70a1ffdf1e14f69ddb401ddb84471272abe /testing-proto
parent2f6e2c87ab1aeda591fcb7764a8ad6bb20855a2a (diff)
downloadgrpc-grpc-java-0a36c9d8a3704a1a03937dfbd4667c9bccc700fe.tar.gz
all: migrate .proto files from testing-proto to interop-testing
and provide a simple protobuf service for test in testing-proto instead.
Diffstat (limited to 'testing-proto')
-rw-r--r--testing-proto/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java305
-rw-r--r--testing-proto/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java303
-rw-r--r--testing-proto/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java685
-rw-r--r--testing-proto/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java265
-rw-r--r--testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java407
-rw-r--r--testing-proto/src/generated/main/java/com/google/protobuf/EmptyProtos.java458
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/integration/Messages.java9619
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/integration/Metrics.java1898
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/integration/Test.java74
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequest.java385
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequestOrBuilder.java9
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponse.java385
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponseOrBuilder.java9
-rw-r--r--testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleServiceProto.java77
-rw-r--r--testing-proto/src/main/proto/io/grpc/testing/integration/empty.proto30
-rw-r--r--testing-proto/src/main/proto/io/grpc/testing/integration/messages.proto163
-rw-r--r--testing-proto/src/main/proto/io/grpc/testing/integration/metrics.proto51
-rw-r--r--testing-proto/src/main/proto/io/grpc/testing/integration/test.proto79
-rw-r--r--testing-proto/src/main/proto/io/grpc/testing/protobuf/simpleservice.proto47
-rw-r--r--testing-proto/src/test/java/io/grpc/testing/protobuf/SimpleServiceTest.java54
20 files changed, 1373 insertions, 13930 deletions
diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
deleted file mode 100644
index dd6495e3a..000000000
--- a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/MetricsServiceGrpc.java
+++ /dev/null
@@ -1,305 +0,0 @@
-package io.grpc.testing.integration;
-
-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.6.0-SNAPSHOT)",
- comments = "Source: io/grpc/testing/integration/metrics.proto")
-public final class MetricsServiceGrpc {
-
- private MetricsServiceGrpc() {}
-
- public static final String SERVICE_NAME = "grpc.testing.MetricsService";
-
- // 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<io.grpc.testing.integration.Metrics.EmptyMessage,
- io.grpc.testing.integration.Metrics.GaugeResponse> METHOD_GET_ALL_GAUGES =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Metrics.EmptyMessage, io.grpc.testing.integration.Metrics.GaugeResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.MetricsService", "GetAllGauges"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Metrics.EmptyMessage.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Metrics.GaugeRequest,
- io.grpc.testing.integration.Metrics.GaugeResponse> METHOD_GET_GAUGE =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Metrics.GaugeRequest, io.grpc.testing.integration.Metrics.GaugeResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.MetricsService", "GetGauge"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Metrics.GaugeRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance()))
- .build();
-
- /**
- * Creates a new async stub that supports all call types for the service
- */
- public static MetricsServiceStub newStub(io.grpc.Channel channel) {
- return new MetricsServiceStub(channel);
- }
-
- /**
- * Creates a new blocking-style stub that supports unary and streaming output calls on the service
- */
- public static MetricsServiceBlockingStub newBlockingStub(
- io.grpc.Channel channel) {
- return new MetricsServiceBlockingStub(channel);
- }
-
- /**
- * Creates a new ListenableFuture-style stub that supports unary calls on the service
- */
- public static MetricsServiceFutureStub newFutureStub(
- io.grpc.Channel channel) {
- return new MetricsServiceFutureStub(channel);
- }
-
- /**
- */
- public static abstract class MetricsServiceImplBase implements io.grpc.BindableService {
-
- /**
- * <pre>
- * Returns the values of all the gauges that are currently being maintained by
- * the service
- * </pre>
- */
- public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_GET_ALL_GAUGES, responseObserver);
- }
-
- /**
- * <pre>
- * Returns the value of one gauge
- * </pre>
- */
- public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_GET_GAUGE, responseObserver);
- }
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- METHOD_GET_ALL_GAUGES,
- asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Metrics.EmptyMessage,
- io.grpc.testing.integration.Metrics.GaugeResponse>(
- this, METHODID_GET_ALL_GAUGES)))
- .addMethod(
- METHOD_GET_GAUGE,
- asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Metrics.GaugeRequest,
- io.grpc.testing.integration.Metrics.GaugeResponse>(
- this, METHODID_GET_GAUGE)))
- .build();
- }
- }
-
- /**
- */
- public static final class MetricsServiceStub extends io.grpc.stub.AbstractStub<MetricsServiceStub> {
- private MetricsServiceStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private MetricsServiceStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected MetricsServiceStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new MetricsServiceStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * Returns the values of all the gauges that are currently being maintained by
- * the service
- * </pre>
- */
- public void getAllGauges(io.grpc.testing.integration.Metrics.EmptyMessage request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse> responseObserver) {
- asyncServerStreamingCall(
- getChannel().newCall(METHOD_GET_ALL_GAUGES, getCallOptions()), request, responseObserver);
- }
-
- /**
- * <pre>
- * Returns the value of one gauge
- * </pre>
- */
- public void getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_GET_GAUGE, getCallOptions()), request, responseObserver);
- }
- }
-
- /**
- */
- public static final class MetricsServiceBlockingStub extends io.grpc.stub.AbstractStub<MetricsServiceBlockingStub> {
- private MetricsServiceBlockingStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private MetricsServiceBlockingStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected MetricsServiceBlockingStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new MetricsServiceBlockingStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * Returns the values of all the gauges that are currently being maintained by
- * the service
- * </pre>
- */
- public java.util.Iterator<io.grpc.testing.integration.Metrics.GaugeResponse> getAllGauges(
- io.grpc.testing.integration.Metrics.EmptyMessage request) {
- return blockingServerStreamingCall(
- getChannel(), METHOD_GET_ALL_GAUGES, getCallOptions(), request);
- }
-
- /**
- * <pre>
- * Returns the value of one gauge
- * </pre>
- */
- public io.grpc.testing.integration.Metrics.GaugeResponse getGauge(io.grpc.testing.integration.Metrics.GaugeRequest request) {
- return blockingUnaryCall(
- getChannel(), METHOD_GET_GAUGE, getCallOptions(), request);
- }
- }
-
- /**
- */
- public static final class MetricsServiceFutureStub extends io.grpc.stub.AbstractStub<MetricsServiceFutureStub> {
- private MetricsServiceFutureStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private MetricsServiceFutureStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected MetricsServiceFutureStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new MetricsServiceFutureStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * Returns the value of one gauge
- * </pre>
- */
- public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Metrics.GaugeResponse> getGauge(
- io.grpc.testing.integration.Metrics.GaugeRequest request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_GET_GAUGE, getCallOptions()), request);
- }
- }
-
- private static final int METHODID_GET_ALL_GAUGES = 0;
- private static final int METHODID_GET_GAUGE = 1;
-
- private static final class MethodHandlers<Req, Resp> implements
- io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
- private final MetricsServiceImplBase serviceImpl;
- private final int methodId;
-
- MethodHandlers(MetricsServiceImplBase 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<Resp> responseObserver) {
- switch (methodId) {
- case METHODID_GET_ALL_GAUGES:
- serviceImpl.getAllGauges((io.grpc.testing.integration.Metrics.EmptyMessage) request,
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>) responseObserver);
- break;
- case METHODID_GET_GAUGE:
- serviceImpl.getGauge((io.grpc.testing.integration.Metrics.GaugeRequest) request,
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Metrics.GaugeResponse>) responseObserver);
- break;
- default:
- throw new AssertionError();
- }
- }
-
- @java.lang.Override
- @java.lang.SuppressWarnings("unchecked")
- public io.grpc.stub.StreamObserver<Req> invoke(
- io.grpc.stub.StreamObserver<Resp> responseObserver) {
- switch (methodId) {
- default:
- throw new AssertionError();
- }
- }
- }
-
- private static final class MetricsServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
- @java.lang.Override
- public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
- return io.grpc.testing.integration.Metrics.getDescriptor();
- }
- }
-
- private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
-
- public static io.grpc.ServiceDescriptor getServiceDescriptor() {
- io.grpc.ServiceDescriptor result = serviceDescriptor;
- if (result == null) {
- synchronized (MetricsServiceGrpc.class) {
- result = serviceDescriptor;
- if (result == null) {
- serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
- .setSchemaDescriptor(new MetricsServiceDescriptorSupplier())
- .addMethod(METHOD_GET_ALL_GAUGES)
- .addMethod(METHOD_GET_GAUGE)
- .build();
- }
- }
- }
- return result;
- }
-}
diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
deleted file mode 100644
index f00799512..000000000
--- a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/ReconnectServiceGrpc.java
+++ /dev/null
@@ -1,303 +0,0 @@
-package io.grpc.testing.integration;
-
-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;
-
-/**
- * <pre>
- * A service used to control reconnect server.
- * </pre>
- */
-@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.6.0-SNAPSHOT)",
- comments = "Source: io/grpc/testing/integration/test.proto")
-public final class ReconnectServiceGrpc {
-
- private ReconnectServiceGrpc() {}
-
- public static final String SERVICE_NAME = "grpc.testing.ReconnectService";
-
- // 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<com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty> METHOD_START =
- io.grpc.MethodDescriptor.<com.google.protobuf.EmptyProtos.Empty, com.google.protobuf.EmptyProtos.Empty>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.ReconnectService", "Start"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<com.google.protobuf.EmptyProtos.Empty,
- io.grpc.testing.integration.Messages.ReconnectInfo> METHOD_STOP =
- io.grpc.MethodDescriptor.<com.google.protobuf.EmptyProtos.Empty, io.grpc.testing.integration.Messages.ReconnectInfo>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.ReconnectService", "Stop"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.ReconnectInfo.getDefaultInstance()))
- .build();
-
- /**
- * Creates a new async stub that supports all call types for the service
- */
- public static ReconnectServiceStub newStub(io.grpc.Channel channel) {
- return new ReconnectServiceStub(channel);
- }
-
- /**
- * Creates a new blocking-style stub that supports unary and streaming output calls on the service
- */
- public static ReconnectServiceBlockingStub newBlockingStub(
- io.grpc.Channel channel) {
- return new ReconnectServiceBlockingStub(channel);
- }
-
- /**
- * Creates a new ListenableFuture-style stub that supports unary calls on the service
- */
- public static ReconnectServiceFutureStub newFutureStub(
- io.grpc.Channel channel) {
- return new ReconnectServiceFutureStub(channel);
- }
-
- /**
- * <pre>
- * A service used to control reconnect server.
- * </pre>
- */
- public static abstract class ReconnectServiceImplBase implements io.grpc.BindableService {
-
- /**
- */
- public void start(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_START, responseObserver);
- }
-
- /**
- */
- public void stop(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ReconnectInfo> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_STOP, responseObserver);
- }
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- METHOD_START,
- asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty>(
- this, METHODID_START)))
- .addMethod(
- METHOD_STOP,
- asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.EmptyProtos.Empty,
- io.grpc.testing.integration.Messages.ReconnectInfo>(
- this, METHODID_STOP)))
- .build();
- }
- }
-
- /**
- * <pre>
- * A service used to control reconnect server.
- * </pre>
- */
- public static final class ReconnectServiceStub extends io.grpc.stub.AbstractStub<ReconnectServiceStub> {
- private ReconnectServiceStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private ReconnectServiceStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected ReconnectServiceStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new ReconnectServiceStub(channel, callOptions);
- }
-
- /**
- */
- public void start(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_START, getCallOptions()), request, responseObserver);
- }
-
- /**
- */
- public void stop(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ReconnectInfo> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_STOP, getCallOptions()), request, responseObserver);
- }
- }
-
- /**
- * <pre>
- * A service used to control reconnect server.
- * </pre>
- */
- public static final class ReconnectServiceBlockingStub extends io.grpc.stub.AbstractStub<ReconnectServiceBlockingStub> {
- private ReconnectServiceBlockingStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private ReconnectServiceBlockingStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected ReconnectServiceBlockingStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new ReconnectServiceBlockingStub(channel, callOptions);
- }
-
- /**
- */
- public com.google.protobuf.EmptyProtos.Empty start(com.google.protobuf.EmptyProtos.Empty request) {
- return blockingUnaryCall(
- getChannel(), METHOD_START, getCallOptions(), request);
- }
-
- /**
- */
- public io.grpc.testing.integration.Messages.ReconnectInfo stop(com.google.protobuf.EmptyProtos.Empty request) {
- return blockingUnaryCall(
- getChannel(), METHOD_STOP, getCallOptions(), request);
- }
- }
-
- /**
- * <pre>
- * A service used to control reconnect server.
- * </pre>
- */
- public static final class ReconnectServiceFutureStub extends io.grpc.stub.AbstractStub<ReconnectServiceFutureStub> {
- private ReconnectServiceFutureStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private ReconnectServiceFutureStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected ReconnectServiceFutureStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new ReconnectServiceFutureStub(channel, callOptions);
- }
-
- /**
- */
- public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.EmptyProtos.Empty> start(
- com.google.protobuf.EmptyProtos.Empty request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_START, getCallOptions()), request);
- }
-
- /**
- */
- public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.ReconnectInfo> stop(
- com.google.protobuf.EmptyProtos.Empty request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_STOP, getCallOptions()), request);
- }
- }
-
- private static final int METHODID_START = 0;
- private static final int METHODID_STOP = 1;
-
- private static final class MethodHandlers<Req, Resp> implements
- io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
- private final ReconnectServiceImplBase serviceImpl;
- private final int methodId;
-
- MethodHandlers(ReconnectServiceImplBase 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<Resp> responseObserver) {
- switch (methodId) {
- case METHODID_START:
- serviceImpl.start((com.google.protobuf.EmptyProtos.Empty) request,
- (io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty>) responseObserver);
- break;
- case METHODID_STOP:
- serviceImpl.stop((com.google.protobuf.EmptyProtos.Empty) request,
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.ReconnectInfo>) responseObserver);
- break;
- default:
- throw new AssertionError();
- }
- }
-
- @java.lang.Override
- @java.lang.SuppressWarnings("unchecked")
- public io.grpc.stub.StreamObserver<Req> invoke(
- io.grpc.stub.StreamObserver<Resp> responseObserver) {
- switch (methodId) {
- default:
- throw new AssertionError();
- }
- }
- }
-
- private static final class ReconnectServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
- @java.lang.Override
- public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
- return io.grpc.testing.integration.Test.getDescriptor();
- }
- }
-
- private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
-
- public static io.grpc.ServiceDescriptor getServiceDescriptor() {
- io.grpc.ServiceDescriptor result = serviceDescriptor;
- if (result == null) {
- synchronized (ReconnectServiceGrpc.class) {
- result = serviceDescriptor;
- if (result == null) {
- serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
- .setSchemaDescriptor(new ReconnectServiceDescriptorSupplier())
- .addMethod(METHOD_START)
- .addMethod(METHOD_STOP)
- .build();
- }
- }
- }
- return result;
- }
-}
diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java
deleted file mode 100644
index debb0ad9b..000000000
--- a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/TestServiceGrpc.java
+++ /dev/null
@@ -1,685 +0,0 @@
-package io.grpc.testing.integration;
-
-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;
-
-/**
- * <pre>
- * A simple service to test the various types of RPCs and experiment with
- * performance with various types of payload.
- * </pre>
- */
-@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.6.0-SNAPSHOT)",
- comments = "Source: io/grpc/testing/integration/test.proto")
-public final class TestServiceGrpc {
-
- private TestServiceGrpc() {}
-
- public static final String SERVICE_NAME = "grpc.testing.TestService";
-
- // 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<com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty> METHOD_EMPTY_CALL =
- io.grpc.MethodDescriptor.<com.google.protobuf.EmptyProtos.Empty, com.google.protobuf.EmptyProtos.Empty>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "EmptyCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse> METHOD_UNARY_CALL =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "UnaryCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse> METHOD_CACHEABLE_UNARY_CALL =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.SimpleRequest, io.grpc.testing.integration.Messages.SimpleResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "CacheableUnaryCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_STREAMING_OUTPUT_CALL =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "StreamingOutputCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingInputCallRequest,
- io.grpc.testing.integration.Messages.StreamingInputCallResponse> METHOD_STREAMING_INPUT_CALL =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingInputCallRequest, io.grpc.testing.integration.Messages.StreamingInputCallResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "StreamingInputCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingInputCallRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingInputCallResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_FULL_DUPLEX_CALL =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "FullDuplexCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse> METHOD_HALF_DUPLEX_CALL =
- io.grpc.MethodDescriptor.<io.grpc.testing.integration.Messages.StreamingOutputCallRequest, io.grpc.testing.integration.Messages.StreamingOutputCallResponse>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "HalfDuplexCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()))
- .build();
- @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
- public static final io.grpc.MethodDescriptor<com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty> METHOD_UNIMPLEMENTED_CALL =
- io.grpc.MethodDescriptor.<com.google.protobuf.EmptyProtos.Empty, com.google.protobuf.EmptyProtos.Empty>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.TestService", "UnimplementedCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .build();
-
- /**
- * Creates a new async stub that supports all call types for the service
- */
- public static TestServiceStub newStub(io.grpc.Channel channel) {
- return new TestServiceStub(channel);
- }
-
- /**
- * Creates a new blocking-style stub that supports unary and streaming output calls on the service
- */
- public static TestServiceBlockingStub newBlockingStub(
- io.grpc.Channel channel) {
- return new TestServiceBlockingStub(channel);
- }
-
- /**
- * Creates a new ListenableFuture-style stub that supports unary calls on the service
- */
- public static TestServiceFutureStub newFutureStub(
- io.grpc.Channel channel) {
- return new TestServiceFutureStub(channel);
- }
-
- /**
- * <pre>
- * A simple service to test the various types of RPCs and experiment with
- * performance with various types of payload.
- * </pre>
- */
- public static abstract class TestServiceImplBase implements io.grpc.BindableService {
-
- /**
- * <pre>
- * One empty request followed by one empty response.
- * </pre>
- */
- public void emptyCall(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_EMPTY_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * One request followed by one response.
- * </pre>
- */
- public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_UNARY_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * One request followed by one response. Response has cache control
- * headers set such that a caching HTTP proxy (such as GFE) can
- * satisfy subsequent requests.
- * </pre>
- */
- public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_CACHEABLE_UNARY_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * One request followed by a sequence of responses (streamed download).
- * The server returns the payload with client desired type and sizes.
- * </pre>
- */
- public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_STREAMING_OUTPUT_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * A sequence of requests followed by one response (streamed upload).
- * The server returns the aggregated size of client payload as the result.
- * </pre>
- */
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallRequest> streamingInputCall(
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver) {
- return asyncUnimplementedStreamingCall(METHOD_STREAMING_INPUT_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * A sequence of requests with each request served by the server immediately.
- * As one request could lead to multiple responses, this interface
- * demonstrates the idea of full duplexing.
- * </pre>
- */
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall(
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- return asyncUnimplementedStreamingCall(METHOD_FULL_DUPLEX_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * A sequence of requests followed by a sequence of responses.
- * The server buffers all the client requests and then serves them in order. A
- * stream of responses are returned to the client when the server starts with
- * first request.
- * </pre>
- */
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> halfDuplexCall(
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- return asyncUnimplementedStreamingCall(METHOD_HALF_DUPLEX_CALL, responseObserver);
- }
-
- /**
- * <pre>
- * The test server will not implement this method. It will be used
- * to test the behavior when clients call unimplemented methods.
- * </pre>
- */
- public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_UNIMPLEMENTED_CALL, responseObserver);
- }
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- METHOD_EMPTY_CALL,
- asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty>(
- this, METHODID_EMPTY_CALL)))
- .addMethod(
- METHOD_UNARY_CALL,
- asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse>(
- this, METHODID_UNARY_CALL)))
- .addMethod(
- METHOD_CACHEABLE_UNARY_CALL,
- asyncUnaryCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.SimpleRequest,
- io.grpc.testing.integration.Messages.SimpleResponse>(
- this, METHODID_CACHEABLE_UNARY_CALL)))
- .addMethod(
- METHOD_STREAMING_OUTPUT_CALL,
- asyncServerStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_STREAMING_OUTPUT_CALL)))
- .addMethod(
- METHOD_STREAMING_INPUT_CALL,
- asyncClientStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingInputCallRequest,
- io.grpc.testing.integration.Messages.StreamingInputCallResponse>(
- this, METHODID_STREAMING_INPUT_CALL)))
- .addMethod(
- METHOD_FULL_DUPLEX_CALL,
- asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_FULL_DUPLEX_CALL)))
- .addMethod(
- METHOD_HALF_DUPLEX_CALL,
- asyncBidiStreamingCall(
- new MethodHandlers<
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest,
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse>(
- this, METHODID_HALF_DUPLEX_CALL)))
- .addMethod(
- METHOD_UNIMPLEMENTED_CALL,
- asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty>(
- this, METHODID_UNIMPLEMENTED_CALL)))
- .build();
- }
- }
-
- /**
- * <pre>
- * A simple service to test the various types of RPCs and experiment with
- * performance with various types of payload.
- * </pre>
- */
- public static final class TestServiceStub extends io.grpc.stub.AbstractStub<TestServiceStub> {
- private TestServiceStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private TestServiceStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected TestServiceStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new TestServiceStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * One empty request followed by one empty response.
- * </pre>
- */
- public void emptyCall(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_EMPTY_CALL, getCallOptions()), request, responseObserver);
- }
-
- /**
- * <pre>
- * One request followed by one response.
- * </pre>
- */
- public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request, responseObserver);
- }
-
- /**
- * <pre>
- * One request followed by one response. Response has cache control
- * headers set such that a caching HTTP proxy (such as GFE) can
- * satisfy subsequent requests.
- * </pre>
- */
- public void cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_CACHEABLE_UNARY_CALL, getCallOptions()), request, responseObserver);
- }
-
- /**
- * <pre>
- * One request followed by a sequence of responses (streamed download).
- * The server returns the payload with client desired type and sizes.
- * </pre>
- */
- public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request,
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- asyncServerStreamingCall(
- getChannel().newCall(METHOD_STREAMING_OUTPUT_CALL, getCallOptions()), request, responseObserver);
- }
-
- /**
- * <pre>
- * A sequence of requests followed by one response (streamed upload).
- * The server returns the aggregated size of client payload as the result.
- * </pre>
- */
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallRequest> streamingInputCall(
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse> responseObserver) {
- return asyncClientStreamingCall(
- getChannel().newCall(METHOD_STREAMING_INPUT_CALL, getCallOptions()), responseObserver);
- }
-
- /**
- * <pre>
- * A sequence of requests with each request served by the server immediately.
- * As one request could lead to multiple responses, this interface
- * demonstrates the idea of full duplexing.
- * </pre>
- */
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> fullDuplexCall(
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- return asyncBidiStreamingCall(
- getChannel().newCall(METHOD_FULL_DUPLEX_CALL, getCallOptions()), responseObserver);
- }
-
- /**
- * <pre>
- * A sequence of requests followed by a sequence of responses.
- * The server buffers all the client requests and then serves them in order. A
- * stream of responses are returned to the client when the server starts with
- * first request.
- * </pre>
- */
- public io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallRequest> halfDuplexCall(
- io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> responseObserver) {
- return asyncBidiStreamingCall(
- getChannel().newCall(METHOD_HALF_DUPLEX_CALL, getCallOptions()), responseObserver);
- }
-
- /**
- * <pre>
- * The test server will not implement this method. It will be used
- * to test the behavior when clients call unimplemented methods.
- * </pre>
- */
- public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_UNIMPLEMENTED_CALL, getCallOptions()), request, responseObserver);
- }
- }
-
- /**
- * <pre>
- * A simple service to test the various types of RPCs and experiment with
- * performance with various types of payload.
- * </pre>
- */
- public static final class TestServiceBlockingStub extends io.grpc.stub.AbstractStub<TestServiceBlockingStub> {
- private TestServiceBlockingStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private TestServiceBlockingStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected TestServiceBlockingStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new TestServiceBlockingStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * One empty request followed by one empty response.
- * </pre>
- */
- public com.google.protobuf.EmptyProtos.Empty emptyCall(com.google.protobuf.EmptyProtos.Empty request) {
- return blockingUnaryCall(
- getChannel(), METHOD_EMPTY_CALL, getCallOptions(), request);
- }
-
- /**
- * <pre>
- * One request followed by one response.
- * </pre>
- */
- public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) {
- return blockingUnaryCall(
- getChannel(), METHOD_UNARY_CALL, getCallOptions(), request);
- }
-
- /**
- * <pre>
- * One request followed by one response. Response has cache control
- * headers set such that a caching HTTP proxy (such as GFE) can
- * satisfy subsequent requests.
- * </pre>
- */
- public io.grpc.testing.integration.Messages.SimpleResponse cacheableUnaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) {
- return blockingUnaryCall(
- getChannel(), METHOD_CACHEABLE_UNARY_CALL, getCallOptions(), request);
- }
-
- /**
- * <pre>
- * One request followed by a sequence of responses (streamed download).
- * The server returns the payload with client desired type and sizes.
- * </pre>
- */
- public java.util.Iterator<io.grpc.testing.integration.Messages.StreamingOutputCallResponse> streamingOutputCall(
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) {
- return blockingServerStreamingCall(
- getChannel(), METHOD_STREAMING_OUTPUT_CALL, getCallOptions(), request);
- }
-
- /**
- * <pre>
- * The test server will not implement this method. It will be used
- * to test the behavior when clients call unimplemented methods.
- * </pre>
- */
- public com.google.protobuf.EmptyProtos.Empty unimplementedCall(com.google.protobuf.EmptyProtos.Empty request) {
- return blockingUnaryCall(
- getChannel(), METHOD_UNIMPLEMENTED_CALL, getCallOptions(), request);
- }
- }
-
- /**
- * <pre>
- * A simple service to test the various types of RPCs and experiment with
- * performance with various types of payload.
- * </pre>
- */
- public static final class TestServiceFutureStub extends io.grpc.stub.AbstractStub<TestServiceFutureStub> {
- private TestServiceFutureStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private TestServiceFutureStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected TestServiceFutureStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new TestServiceFutureStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * One empty request followed by one empty response.
- * </pre>
- */
- public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.EmptyProtos.Empty> emptyCall(
- com.google.protobuf.EmptyProtos.Empty request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_EMPTY_CALL, getCallOptions()), request);
- }
-
- /**
- * <pre>
- * One request followed by one response.
- * </pre>
- */
- public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.SimpleResponse> unaryCall(
- io.grpc.testing.integration.Messages.SimpleRequest request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_UNARY_CALL, getCallOptions()), request);
- }
-
- /**
- * <pre>
- * One request followed by one response. Response has cache control
- * headers set such that a caching HTTP proxy (such as GFE) can
- * satisfy subsequent requests.
- * </pre>
- */
- public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.integration.Messages.SimpleResponse> cacheableUnaryCall(
- io.grpc.testing.integration.Messages.SimpleRequest request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_CACHEABLE_UNARY_CALL, getCallOptions()), request);
- }
-
- /**
- * <pre>
- * The test server will not implement this method. It will be used
- * to test the behavior when clients call unimplemented methods.
- * </pre>
- */
- public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.EmptyProtos.Empty> unimplementedCall(
- com.google.protobuf.EmptyProtos.Empty request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_UNIMPLEMENTED_CALL, getCallOptions()), request);
- }
- }
-
- private static final int METHODID_EMPTY_CALL = 0;
- private static final int METHODID_UNARY_CALL = 1;
- private static final int METHODID_CACHEABLE_UNARY_CALL = 2;
- private static final int METHODID_STREAMING_OUTPUT_CALL = 3;
- private static final int METHODID_UNIMPLEMENTED_CALL = 4;
- private static final int METHODID_STREAMING_INPUT_CALL = 5;
- private static final int METHODID_FULL_DUPLEX_CALL = 6;
- private static final int METHODID_HALF_DUPLEX_CALL = 7;
-
- private static final class MethodHandlers<Req, Resp> implements
- io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
- private final TestServiceImplBase serviceImpl;
- private final int methodId;
-
- MethodHandlers(TestServiceImplBase 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<Resp> responseObserver) {
- switch (methodId) {
- case METHODID_EMPTY_CALL:
- serviceImpl.emptyCall((com.google.protobuf.EmptyProtos.Empty) request,
- (io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty>) responseObserver);
- break;
- case METHODID_UNARY_CALL:
- serviceImpl.unaryCall((io.grpc.testing.integration.Messages.SimpleRequest) request,
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse>) responseObserver);
- break;
- case METHODID_CACHEABLE_UNARY_CALL:
- serviceImpl.cacheableUnaryCall((io.grpc.testing.integration.Messages.SimpleRequest) request,
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.SimpleResponse>) responseObserver);
- break;
- case METHODID_STREAMING_OUTPUT_CALL:
- serviceImpl.streamingOutputCall((io.grpc.testing.integration.Messages.StreamingOutputCallRequest) request,
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver);
- break;
- case METHODID_UNIMPLEMENTED_CALL:
- serviceImpl.unimplementedCall((com.google.protobuf.EmptyProtos.Empty) request,
- (io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty>) responseObserver);
- break;
- default:
- throw new AssertionError();
- }
- }
-
- @java.lang.Override
- @java.lang.SuppressWarnings("unchecked")
- public io.grpc.stub.StreamObserver<Req> invoke(
- io.grpc.stub.StreamObserver<Resp> responseObserver) {
- switch (methodId) {
- case METHODID_STREAMING_INPUT_CALL:
- return (io.grpc.stub.StreamObserver<Req>) serviceImpl.streamingInputCall(
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingInputCallResponse>) responseObserver);
- case METHODID_FULL_DUPLEX_CALL:
- return (io.grpc.stub.StreamObserver<Req>) serviceImpl.fullDuplexCall(
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver);
- case METHODID_HALF_DUPLEX_CALL:
- return (io.grpc.stub.StreamObserver<Req>) serviceImpl.halfDuplexCall(
- (io.grpc.stub.StreamObserver<io.grpc.testing.integration.Messages.StreamingOutputCallResponse>) responseObserver);
- default:
- throw new AssertionError();
- }
- }
- }
-
- private static final class TestServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
- @java.lang.Override
- public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
- return io.grpc.testing.integration.Test.getDescriptor();
- }
- }
-
- private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
-
- public static io.grpc.ServiceDescriptor getServiceDescriptor() {
- io.grpc.ServiceDescriptor result = serviceDescriptor;
- if (result == null) {
- synchronized (TestServiceGrpc.class) {
- result = serviceDescriptor;
- if (result == null) {
- serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
- .setSchemaDescriptor(new TestServiceDescriptorSupplier())
- .addMethod(METHOD_EMPTY_CALL)
- .addMethod(METHOD_UNARY_CALL)
- .addMethod(METHOD_CACHEABLE_UNARY_CALL)
- .addMethod(METHOD_STREAMING_OUTPUT_CALL)
- .addMethod(METHOD_STREAMING_INPUT_CALL)
- .addMethod(METHOD_FULL_DUPLEX_CALL)
- .addMethod(METHOD_HALF_DUPLEX_CALL)
- .addMethod(METHOD_UNIMPLEMENTED_CALL)
- .build();
- }
- }
- }
- return result;
- }
-}
diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
deleted file mode 100644
index 6740ce4b1..000000000
--- a/testing-proto/src/generated/main/grpc/io/grpc/testing/integration/UnimplementedServiceGrpc.java
+++ /dev/null
@@ -1,265 +0,0 @@
-package io.grpc.testing.integration;
-
-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;
-
-/**
- * <pre>
- * A simple service NOT implemented at servers so clients can test for
- * that case.
- * </pre>
- */
-@javax.annotation.Generated(
- value = "by gRPC proto compiler (version 1.6.0-SNAPSHOT)",
- comments = "Source: io/grpc/testing/integration/test.proto")
-public final class UnimplementedServiceGrpc {
-
- private UnimplementedServiceGrpc() {}
-
- public static final String SERVICE_NAME = "grpc.testing.UnimplementedService";
-
- // 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<com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty> METHOD_UNIMPLEMENTED_CALL =
- io.grpc.MethodDescriptor.<com.google.protobuf.EmptyProtos.Empty, com.google.protobuf.EmptyProtos.Empty>newBuilder()
- .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
- .setFullMethodName(generateFullMethodName(
- "grpc.testing.UnimplementedService", "UnimplementedCall"))
- .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
- com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()))
- .build();
-
- /**
- * Creates a new async stub that supports all call types for the service
- */
- public static UnimplementedServiceStub newStub(io.grpc.Channel channel) {
- return new UnimplementedServiceStub(channel);
- }
-
- /**
- * Creates a new blocking-style stub that supports unary and streaming output calls on the service
- */
- public static UnimplementedServiceBlockingStub newBlockingStub(
- io.grpc.Channel channel) {
- return new UnimplementedServiceBlockingStub(channel);
- }
-
- /**
- * Creates a new ListenableFuture-style stub that supports unary calls on the service
- */
- public static UnimplementedServiceFutureStub newFutureStub(
- io.grpc.Channel channel) {
- return new UnimplementedServiceFutureStub(channel);
- }
-
- /**
- * <pre>
- * A simple service NOT implemented at servers so clients can test for
- * that case.
- * </pre>
- */
- public static abstract class UnimplementedServiceImplBase implements io.grpc.BindableService {
-
- /**
- * <pre>
- * A call that no server should implement
- * </pre>
- */
- public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnimplementedUnaryCall(METHOD_UNIMPLEMENTED_CALL, responseObserver);
- }
-
- @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
- return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
- .addMethod(
- METHOD_UNIMPLEMENTED_CALL,
- asyncUnaryCall(
- new MethodHandlers<
- com.google.protobuf.EmptyProtos.Empty,
- com.google.protobuf.EmptyProtos.Empty>(
- this, METHODID_UNIMPLEMENTED_CALL)))
- .build();
- }
- }
-
- /**
- * <pre>
- * A simple service NOT implemented at servers so clients can test for
- * that case.
- * </pre>
- */
- public static final class UnimplementedServiceStub extends io.grpc.stub.AbstractStub<UnimplementedServiceStub> {
- private UnimplementedServiceStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private UnimplementedServiceStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected UnimplementedServiceStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new UnimplementedServiceStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * A call that no server should implement
- * </pre>
- */
- public void unimplementedCall(com.google.protobuf.EmptyProtos.Empty request,
- io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty> responseObserver) {
- asyncUnaryCall(
- getChannel().newCall(METHOD_UNIMPLEMENTED_CALL, getCallOptions()), request, responseObserver);
- }
- }
-
- /**
- * <pre>
- * A simple service NOT implemented at servers so clients can test for
- * that case.
- * </pre>
- */
- public static final class UnimplementedServiceBlockingStub extends io.grpc.stub.AbstractStub<UnimplementedServiceBlockingStub> {
- private UnimplementedServiceBlockingStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private UnimplementedServiceBlockingStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected UnimplementedServiceBlockingStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new UnimplementedServiceBlockingStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * A call that no server should implement
- * </pre>
- */
- public com.google.protobuf.EmptyProtos.Empty unimplementedCall(com.google.protobuf.EmptyProtos.Empty request) {
- return blockingUnaryCall(
- getChannel(), METHOD_UNIMPLEMENTED_CALL, getCallOptions(), request);
- }
- }
-
- /**
- * <pre>
- * A simple service NOT implemented at servers so clients can test for
- * that case.
- * </pre>
- */
- public static final class UnimplementedServiceFutureStub extends io.grpc.stub.AbstractStub<UnimplementedServiceFutureStub> {
- private UnimplementedServiceFutureStub(io.grpc.Channel channel) {
- super(channel);
- }
-
- private UnimplementedServiceFutureStub(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- super(channel, callOptions);
- }
-
- @java.lang.Override
- protected UnimplementedServiceFutureStub build(io.grpc.Channel channel,
- io.grpc.CallOptions callOptions) {
- return new UnimplementedServiceFutureStub(channel, callOptions);
- }
-
- /**
- * <pre>
- * A call that no server should implement
- * </pre>
- */
- public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.EmptyProtos.Empty> unimplementedCall(
- com.google.protobuf.EmptyProtos.Empty request) {
- return futureUnaryCall(
- getChannel().newCall(METHOD_UNIMPLEMENTED_CALL, getCallOptions()), request);
- }
- }
-
- private static final int METHODID_UNIMPLEMENTED_CALL = 0;
-
- private static final class MethodHandlers<Req, Resp> implements
- io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
- io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
- private final UnimplementedServiceImplBase serviceImpl;
- private final int methodId;
-
- MethodHandlers(UnimplementedServiceImplBase 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<Resp> responseObserver) {
- switch (methodId) {
- case METHODID_UNIMPLEMENTED_CALL:
- serviceImpl.unimplementedCall((com.google.protobuf.EmptyProtos.Empty) request,
- (io.grpc.stub.StreamObserver<com.google.protobuf.EmptyProtos.Empty>) responseObserver);
- break;
- default:
- throw new AssertionError();
- }
- }
-
- @java.lang.Override
- @java.lang.SuppressWarnings("unchecked")
- public io.grpc.stub.StreamObserver<Req> invoke(
- io.grpc.stub.StreamObserver<Resp> responseObserver) {
- switch (methodId) {
- default:
- throw new AssertionError();
- }
- }
- }
-
- private static final class UnimplementedServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
- @java.lang.Override
- public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
- return io.grpc.testing.integration.Test.getDescriptor();
- }
- }
-
- private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
-
- public static io.grpc.ServiceDescriptor getServiceDescriptor() {
- io.grpc.ServiceDescriptor result = serviceDescriptor;
- if (result == null) {
- synchronized (UnimplementedServiceGrpc.class) {
- result = serviceDescriptor;
- if (result == null) {
- serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
- .setSchemaDescriptor(new UnimplementedServiceDescriptorSupplier())
- .addMethod(METHOD_UNIMPLEMENTED_CALL)
- .build();
- }
- }
- }
- return result;
- }
-}
diff --git a/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java b/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java
new file mode 100644
index 000000000..a18995361
--- /dev/null
+++ b/testing-proto/src/generated/main/grpc/io/grpc/testing/protobuf/SimpleServiceGrpc.java
@@ -0,0 +1,407 @@
+package io.grpc.testing.protobuf;
+
+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;
+
+/**
+ * <pre>
+ * A simple service for test.
+ * </pre>
+ */
+@javax.annotation.Generated(
+ value = "by gRPC proto compiler (version 1.6.0-SNAPSHOT)",
+ comments = "Source: io/grpc/testing/protobuf/simpleservice.proto")
+public final class SimpleServiceGrpc {
+
+ private SimpleServiceGrpc() {}
+
+ public static final String SERVICE_NAME = "grpc.testing.SimpleService";
+
+ // 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<io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse> METHOD_UNARY_RPC =
+ io.grpc.MethodDescriptor.<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+ .setFullMethodName(generateFullMethodName(
+ "grpc.testing.SimpleService", "UnaryRpc"))
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleRequest.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleResponse.getDefaultInstance()))
+ .build();
+ @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
+ public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse> METHOD_CLIENT_STREAMING_RPC =
+ io.grpc.MethodDescriptor.<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
+ .setFullMethodName(generateFullMethodName(
+ "grpc.testing.SimpleService", "ClientStreamingRpc"))
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleRequest.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleResponse.getDefaultInstance()))
+ .build();
+ @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
+ public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse> METHOD_SERVER_STREAMING_RPC =
+ io.grpc.MethodDescriptor.<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
+ .setFullMethodName(generateFullMethodName(
+ "grpc.testing.SimpleService", "ServerStreamingRpc"))
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleRequest.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleResponse.getDefaultInstance()))
+ .build();
+ @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
+ public static final io.grpc.MethodDescriptor<io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse> METHOD_BIDI_STREAMING_RPC =
+ io.grpc.MethodDescriptor.<io.grpc.testing.protobuf.SimpleRequest, io.grpc.testing.protobuf.SimpleResponse>newBuilder()
+ .setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
+ .setFullMethodName(generateFullMethodName(
+ "grpc.testing.SimpleService", "BidiStreamingRpc"))
+ .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleRequest.getDefaultInstance()))
+ .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+ io.grpc.testing.protobuf.SimpleResponse.getDefaultInstance()))
+ .build();
+
+ /**
+ * Creates a new async stub that supports all call types for the service
+ */
+ public static SimpleServiceStub newStub(io.grpc.Channel channel) {
+ return new SimpleServiceStub(channel);
+ }
+
+ /**
+ * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+ */
+ public static SimpleServiceBlockingStub newBlockingStub(
+ io.grpc.Channel channel) {
+ return new SimpleServiceBlockingStub(channel);
+ }
+
+ /**
+ * Creates a new ListenableFuture-style stub that supports unary calls on the service
+ */
+ public static SimpleServiceFutureStub newFutureStub(
+ io.grpc.Channel channel) {
+ return new SimpleServiceFutureStub(channel);
+ }
+
+ /**
+ * <pre>
+ * A simple service for test.
+ * </pre>
+ */
+ public static abstract class SimpleServiceImplBase implements io.grpc.BindableService {
+
+ /**
+ * <pre>
+ * Simple unary RPC.
+ * </pre>
+ */
+ public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request,
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ asyncUnimplementedUnaryCall(METHOD_UNARY_RPC, responseObserver);
+ }
+
+ /**
+ * <pre>
+ * Simple client-to-server streaming RPC.
+ * </pre>
+ */
+ public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> clientStreamingRpc(
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ return asyncUnimplementedStreamingCall(METHOD_CLIENT_STREAMING_RPC, responseObserver);
+ }
+
+ /**
+ * <pre>
+ * Simple server-to-client streaming RPC.
+ * </pre>
+ */
+ public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request,
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ asyncUnimplementedUnaryCall(METHOD_SERVER_STREAMING_RPC, responseObserver);
+ }
+
+ /**
+ * <pre>
+ * Simple bidirectional streaming RPC.
+ * </pre>
+ */
+ public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> bidiStreamingRpc(
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ return asyncUnimplementedStreamingCall(METHOD_BIDI_STREAMING_RPC, responseObserver);
+ }
+
+ @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
+ return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+ .addMethod(
+ METHOD_UNARY_RPC,
+ asyncUnaryCall(
+ new MethodHandlers<
+ io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse>(
+ this, METHODID_UNARY_RPC)))
+ .addMethod(
+ METHOD_CLIENT_STREAMING_RPC,
+ asyncClientStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse>(
+ this, METHODID_CLIENT_STREAMING_RPC)))
+ .addMethod(
+ METHOD_SERVER_STREAMING_RPC,
+ asyncServerStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse>(
+ this, METHODID_SERVER_STREAMING_RPC)))
+ .addMethod(
+ METHOD_BIDI_STREAMING_RPC,
+ asyncBidiStreamingCall(
+ new MethodHandlers<
+ io.grpc.testing.protobuf.SimpleRequest,
+ io.grpc.testing.protobuf.SimpleResponse>(
+ this, METHODID_BIDI_STREAMING_RPC)))
+ .build();
+ }
+ }
+
+ /**
+ * <pre>
+ * A simple service for test.
+ * </pre>
+ */
+ public static final class SimpleServiceStub extends io.grpc.stub.AbstractStub<SimpleServiceStub> {
+ private SimpleServiceStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private SimpleServiceStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @java.lang.Override
+ protected SimpleServiceStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new SimpleServiceStub(channel, callOptions);
+ }
+
+ /**
+ * <pre>
+ * Simple unary RPC.
+ * </pre>
+ */
+ public void unaryRpc(io.grpc.testing.protobuf.SimpleRequest request,
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ asyncUnaryCall(
+ getChannel().newCall(METHOD_UNARY_RPC, getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ * <pre>
+ * Simple client-to-server streaming RPC.
+ * </pre>
+ */
+ public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> clientStreamingRpc(
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ return asyncClientStreamingCall(
+ getChannel().newCall(METHOD_CLIENT_STREAMING_RPC, getCallOptions()), responseObserver);
+ }
+
+ /**
+ * <pre>
+ * Simple server-to-client streaming RPC.
+ * </pre>
+ */
+ public void serverStreamingRpc(io.grpc.testing.protobuf.SimpleRequest request,
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ asyncServerStreamingCall(
+ getChannel().newCall(METHOD_SERVER_STREAMING_RPC, getCallOptions()), request, responseObserver);
+ }
+
+ /**
+ * <pre>
+ * Simple bidirectional streaming RPC.
+ * </pre>
+ */
+ public io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleRequest> bidiStreamingRpc(
+ io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse> responseObserver) {
+ return asyncBidiStreamingCall(
+ getChannel().newCall(METHOD_BIDI_STREAMING_RPC, getCallOptions()), responseObserver);
+ }
+ }
+
+ /**
+ * <pre>
+ * A simple service for test.
+ * </pre>
+ */
+ public static final class SimpleServiceBlockingStub extends io.grpc.stub.AbstractStub<SimpleServiceBlockingStub> {
+ private SimpleServiceBlockingStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private SimpleServiceBlockingStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @java.lang.Override
+ protected SimpleServiceBlockingStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new SimpleServiceBlockingStub(channel, callOptions);
+ }
+
+ /**
+ * <pre>
+ * Simple unary RPC.
+ * </pre>
+ */
+ public io.grpc.testing.protobuf.SimpleResponse unaryRpc(io.grpc.testing.protobuf.SimpleRequest request) {
+ return blockingUnaryCall(
+ getChannel(), METHOD_UNARY_RPC, getCallOptions(), request);
+ }
+
+ /**
+ * <pre>
+ * Simple server-to-client streaming RPC.
+ * </pre>
+ */
+ public java.util.Iterator<io.grpc.testing.protobuf.SimpleResponse> serverStreamingRpc(
+ io.grpc.testing.protobuf.SimpleRequest request) {
+ return blockingServerStreamingCall(
+ getChannel(), METHOD_SERVER_STREAMING_RPC, getCallOptions(), request);
+ }
+ }
+
+ /**
+ * <pre>
+ * A simple service for test.
+ * </pre>
+ */
+ public static final class SimpleServiceFutureStub extends io.grpc.stub.AbstractStub<SimpleServiceFutureStub> {
+ private SimpleServiceFutureStub(io.grpc.Channel channel) {
+ super(channel);
+ }
+
+ private SimpleServiceFutureStub(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ super(channel, callOptions);
+ }
+
+ @java.lang.Override
+ protected SimpleServiceFutureStub build(io.grpc.Channel channel,
+ io.grpc.CallOptions callOptions) {
+ return new SimpleServiceFutureStub(channel, callOptions);
+ }
+
+ /**
+ * <pre>
+ * Simple unary RPC.
+ * </pre>
+ */
+ public com.google.common.util.concurrent.ListenableFuture<io.grpc.testing.protobuf.SimpleResponse> unaryRpc(
+ io.grpc.testing.protobuf.SimpleRequest request) {
+ return futureUnaryCall(
+ getChannel().newCall(METHOD_UNARY_RPC, getCallOptions()), request);
+ }
+ }
+
+ private static final int METHODID_UNARY_RPC = 0;
+ private static final int METHODID_SERVER_STREAMING_RPC = 1;
+ private static final int METHODID_CLIENT_STREAMING_RPC = 2;
+ private static final int METHODID_BIDI_STREAMING_RPC = 3;
+
+ private static final class MethodHandlers<Req, Resp> implements
+ io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+ io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+ private final SimpleServiceImplBase serviceImpl;
+ private final int methodId;
+
+ MethodHandlers(SimpleServiceImplBase 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<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_UNARY_RPC:
+ serviceImpl.unaryRpc((io.grpc.testing.protobuf.SimpleRequest) request,
+ (io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse>) responseObserver);
+ break;
+ case METHODID_SERVER_STREAMING_RPC:
+ serviceImpl.serverStreamingRpc((io.grpc.testing.protobuf.SimpleRequest) request,
+ (io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse>) responseObserver);
+ break;
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ @java.lang.Override
+ @java.lang.SuppressWarnings("unchecked")
+ public io.grpc.stub.StreamObserver<Req> invoke(
+ io.grpc.stub.StreamObserver<Resp> responseObserver) {
+ switch (methodId) {
+ case METHODID_CLIENT_STREAMING_RPC:
+ return (io.grpc.stub.StreamObserver<Req>) serviceImpl.clientStreamingRpc(
+ (io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse>) responseObserver);
+ case METHODID_BIDI_STREAMING_RPC:
+ return (io.grpc.stub.StreamObserver<Req>) serviceImpl.bidiStreamingRpc(
+ (io.grpc.stub.StreamObserver<io.grpc.testing.protobuf.SimpleResponse>) responseObserver);
+ default:
+ throw new AssertionError();
+ }
+ }
+ }
+
+ private static final class SimpleServiceDescriptorSupplier implements io.grpc.protobuf.ProtoFileDescriptorSupplier {
+ @java.lang.Override
+ public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.getDescriptor();
+ }
+ }
+
+ private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+ public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+ io.grpc.ServiceDescriptor result = serviceDescriptor;
+ if (result == null) {
+ synchronized (SimpleServiceGrpc.class) {
+ result = serviceDescriptor;
+ if (result == null) {
+ serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+ .setSchemaDescriptor(new SimpleServiceDescriptorSupplier())
+ .addMethod(METHOD_UNARY_RPC)
+ .addMethod(METHOD_CLIENT_STREAMING_RPC)
+ .addMethod(METHOD_SERVER_STREAMING_RPC)
+ .addMethod(METHOD_BIDI_STREAMING_RPC)
+ .build();
+ }
+ }
+ }
+ return result;
+ }
+}
diff --git a/testing-proto/src/generated/main/java/com/google/protobuf/EmptyProtos.java b/testing-proto/src/generated/main/java/com/google/protobuf/EmptyProtos.java
deleted file mode 100644
index b5cdcab56..000000000
--- a/testing-proto/src/generated/main/java/com/google/protobuf/EmptyProtos.java
+++ /dev/null
@@ -1,458 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: io/grpc/testing/integration/empty.proto
-
-package com.google.protobuf;
-
-public final class EmptyProtos {
- private EmptyProtos() {}
- 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 EmptyOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.Empty)
- com.google.protobuf.MessageOrBuilder {
- }
- /**
- * <pre>
- * An empty message that you can re-use to avoid defining duplicated empty
- * messages in your project. A typical example is to use it as argument or the
- * return value of a service API. For instance:
- * service Foo {
- * rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
- * };
- * </pre>
- *
- * Protobuf type {@code grpc.testing.Empty}
- */
- public static final class Empty extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.Empty)
- EmptyOrBuilder {
- // Use Empty.newBuilder() to construct.
- private Empty(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private Empty() {
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Empty(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.protobuf.EmptyProtos.internal_static_grpc_testing_Empty_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.protobuf.EmptyProtos.internal_static_grpc_testing_Empty_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.protobuf.EmptyProtos.Empty.class, com.google.protobuf.EmptyProtos.Empty.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 {
- unknownFields.writeTo(output);
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- size += unknownFields.getSerializedSize();
- 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.protobuf.EmptyProtos.Empty)) {
- return super.equals(obj);
- }
- com.google.protobuf.EmptyProtos.Empty other = (com.google.protobuf.EmptyProtos.Empty) obj;
-
- boolean result = true;
- result = result && unknownFields.equals(other.unknownFields);
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static com.google.protobuf.EmptyProtos.Empty parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.protobuf.EmptyProtos.Empty parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.protobuf.EmptyProtos.Empty parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.protobuf.EmptyProtos.Empty 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.protobuf.EmptyProtos.Empty parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static com.google.protobuf.EmptyProtos.Empty parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static com.google.protobuf.EmptyProtos.Empty parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.protobuf.EmptyProtos.Empty 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.protobuf.EmptyProtos.Empty parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static com.google.protobuf.EmptyProtos.Empty 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.protobuf.EmptyProtos.Empty parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static com.google.protobuf.EmptyProtos.Empty 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.protobuf.EmptyProtos.Empty prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * An empty message that you can re-use to avoid defining duplicated empty
- * messages in your project. A typical example is to use it as argument or the
- * return value of a service API. For instance:
- * service Foo {
- * rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
- * };
- * </pre>
- *
- * Protobuf type {@code grpc.testing.Empty}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.Empty)
- com.google.protobuf.EmptyProtos.EmptyOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return com.google.protobuf.EmptyProtos.internal_static_grpc_testing_Empty_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return com.google.protobuf.EmptyProtos.internal_static_grpc_testing_Empty_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- com.google.protobuf.EmptyProtos.Empty.class, com.google.protobuf.EmptyProtos.Empty.Builder.class);
- }
-
- // Construct using com.google.protobuf.EmptyProtos.Empty.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 com.google.protobuf.EmptyProtos.internal_static_grpc_testing_Empty_descriptor;
- }
-
- public com.google.protobuf.EmptyProtos.Empty getDefaultInstanceForType() {
- return com.google.protobuf.EmptyProtos.Empty.getDefaultInstance();
- }
-
- public com.google.protobuf.EmptyProtos.Empty build() {
- com.google.protobuf.EmptyProtos.Empty result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public com.google.protobuf.EmptyProtos.Empty buildPartial() {
- com.google.protobuf.EmptyProtos.Empty result = new com.google.protobuf.EmptyProtos.Empty(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 com.google.protobuf.EmptyProtos.Empty) {
- return mergeFrom((com.google.protobuf.EmptyProtos.Empty)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(com.google.protobuf.EmptyProtos.Empty other) {
- if (other == com.google.protobuf.EmptyProtos.Empty.getDefaultInstance()) return this;
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- public final boolean isInitialized() {
- return true;
- }
-
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.EmptyProtos.Empty parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (com.google.protobuf.EmptyProtos.Empty) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:grpc.testing.Empty)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.Empty)
- private static final com.google.protobuf.EmptyProtos.Empty DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new com.google.protobuf.EmptyProtos.Empty();
- }
-
- public static com.google.protobuf.EmptyProtos.Empty getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @java.lang.Deprecated public static final com.google.protobuf.Parser<Empty>
- PARSER = new com.google.protobuf.AbstractParser<Empty>() {
- public Empty parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Empty(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<Empty> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<Empty> getParserForType() {
- return PARSER;
- }
-
- public com.google.protobuf.EmptyProtos.Empty getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_Empty_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_Empty_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\'io/grpc/testing/integration/empty.prot" +
- "o\022\014grpc.testing\"\007\n\005EmptyB\"\n\023com.google.p" +
- "rotobufB\013EmptyProtos"
- };
- 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_grpc_testing_Empty_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_grpc_testing_Empty_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_Empty_descriptor,
- new java.lang.String[] { });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/integration/Messages.java b/testing-proto/src/generated/main/java/io/grpc/testing/integration/Messages.java
deleted file mode 100644
index 1949c1cfa..000000000
--- a/testing-proto/src/generated/main/java/io/grpc/testing/integration/Messages.java
+++ /dev/null
@@ -1,9619 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: io/grpc/testing/integration/messages.proto
-
-package io.grpc.testing.integration;
-
-public final class Messages {
- private Messages() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistryLite registry) {
- }
-
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- registerAllExtensions(
- (com.google.protobuf.ExtensionRegistryLite) registry);
- }
- /**
- * <pre>
- * The type of payload that should be returned.
- * </pre>
- *
- * Protobuf enum {@code grpc.testing.PayloadType}
- */
- public enum PayloadType
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * <pre>
- * Compressable text format.
- * </pre>
- *
- * <code>COMPRESSABLE = 0;</code>
- */
- COMPRESSABLE(0),
- /**
- * <pre>
- * Uncompressable binary format.
- * </pre>
- *
- * <code>UNCOMPRESSABLE = 1;</code>
- */
- UNCOMPRESSABLE(1),
- /**
- * <pre>
- * Randomly chosen from all other formats defined in this enum.
- * </pre>
- *
- * <code>RANDOM = 2;</code>
- */
- RANDOM(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * <pre>
- * Compressable text format.
- * </pre>
- *
- * <code>COMPRESSABLE = 0;</code>
- */
- public static final int COMPRESSABLE_VALUE = 0;
- /**
- * <pre>
- * Uncompressable binary format.
- * </pre>
- *
- * <code>UNCOMPRESSABLE = 1;</code>
- */
- public static final int UNCOMPRESSABLE_VALUE = 1;
- /**
- * <pre>
- * Randomly chosen from all other formats defined in this enum.
- * </pre>
- *
- * <code>RANDOM = 2;</code>
- */
- public static final int RANDOM_VALUE = 2;
-
-
- 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 PayloadType valueOf(int value) {
- return forNumber(value);
- }
-
- public static PayloadType forNumber(int value) {
- switch (value) {
- case 0: return COMPRESSABLE;
- case 1: return UNCOMPRESSABLE;
- case 2: return RANDOM;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<PayloadType>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- PayloadType> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<PayloadType>() {
- public PayloadType findValueByNumber(int number) {
- return PayloadType.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 io.grpc.testing.integration.Messages.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final PayloadType[] VALUES = values();
-
- public static PayloadType 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 PayloadType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:grpc.testing.PayloadType)
- }
-
- /**
- * <pre>
- * Compression algorithms
- * </pre>
- *
- * Protobuf enum {@code grpc.testing.CompressionType}
- */
- public enum CompressionType
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * <pre>
- * No compression
- * </pre>
- *
- * <code>NONE = 0;</code>
- */
- NONE(0),
- /**
- * <code>GZIP = 1;</code>
- */
- GZIP(1),
- /**
- * <code>DEFLATE = 2;</code>
- */
- DEFLATE(2),
- UNRECOGNIZED(-1),
- ;
-
- /**
- * <pre>
- * No compression
- * </pre>
- *
- * <code>NONE = 0;</code>
- */
- public static final int NONE_VALUE = 0;
- /**
- * <code>GZIP = 1;</code>
- */
- public static final int GZIP_VALUE = 1;
- /**
- * <code>DEFLATE = 2;</code>
- */
- public static final int DEFLATE_VALUE = 2;
-
-
- 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 CompressionType valueOf(int value) {
- return forNumber(value);
- }
-
- public static CompressionType forNumber(int value) {
- switch (value) {
- case 0: return NONE;
- case 1: return GZIP;
- case 2: return DEFLATE;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap<CompressionType>
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- CompressionType> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap<CompressionType>() {
- public CompressionType findValueByNumber(int number) {
- return CompressionType.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 io.grpc.testing.integration.Messages.getDescriptor().getEnumTypes().get(1);
- }
-
- private static final CompressionType[] VALUES = values();
-
- public static CompressionType 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 CompressionType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:grpc.testing.CompressionType)
- }
-
- public interface PayloadOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.Payload)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- int getTypeValue();
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- io.grpc.testing.integration.Messages.PayloadType getType();
-
- /**
- * <pre>
- * Primary contents of payload.
- * </pre>
- *
- * <code>bytes body = 2;</code>
- */
- com.google.protobuf.ByteString getBody();
- }
- /**
- * <pre>
- * A block of data, to simply increase gRPC message size.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.Payload}
- */
- public static final class Payload extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.Payload)
- PayloadOrBuilder {
- // Use Payload.newBuilder() to construct.
- private Payload(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private Payload() {
- type_ = 0;
- body_ = com.google.protobuf.ByteString.EMPTY;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private Payload(
- 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: {
- int rawValue = input.readEnum();
-
- type_ = rawValue;
- break;
- }
- case 18: {
-
- body_ = input.readBytes();
- 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.testing.integration.Messages.internal_static_grpc_testing_Payload_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_Payload_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.Payload.class, io.grpc.testing.integration.Messages.Payload.Builder.class);
- }
-
- public static final int TYPE_FIELD_NUMBER = 1;
- private int type_;
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public int getTypeValue() {
- return type_;
- }
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadType getType() {
- io.grpc.testing.integration.Messages.PayloadType result = io.grpc.testing.integration.Messages.PayloadType.valueOf(type_);
- return result == null ? io.grpc.testing.integration.Messages.PayloadType.UNRECOGNIZED : result;
- }
-
- public static final int BODY_FIELD_NUMBER = 2;
- private com.google.protobuf.ByteString body_;
- /**
- * <pre>
- * Primary contents of payload.
- * </pre>
- *
- * <code>bytes body = 2;</code>
- */
- public com.google.protobuf.ByteString getBody() {
- return body_;
- }
-
- 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 (type_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
- output.writeEnum(1, type_);
- }
- if (!body_.isEmpty()) {
- output.writeBytes(2, body_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (type_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, type_);
- }
- if (!body_.isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, body_);
- }
- 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.testing.integration.Messages.Payload)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.Payload other = (io.grpc.testing.integration.Messages.Payload) obj;
-
- boolean result = true;
- result = result && type_ == other.type_;
- result = result && getBody()
- .equals(other.getBody());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + TYPE_FIELD_NUMBER;
- hash = (53 * hash) + type_;
- hash = (37 * hash) + BODY_FIELD_NUMBER;
- hash = (53 * hash) + getBody().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.Payload parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.Payload parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.Payload parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.Payload 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.testing.integration.Messages.Payload parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.Payload parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.Payload parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.Payload 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.testing.integration.Messages.Payload parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.Payload 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.testing.integration.Messages.Payload parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.Payload 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.testing.integration.Messages.Payload prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * A block of data, to simply increase gRPC message size.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.Payload}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.Payload)
- io.grpc.testing.integration.Messages.PayloadOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_Payload_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_Payload_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.Payload.class, io.grpc.testing.integration.Messages.Payload.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.Payload.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();
- type_ = 0;
-
- body_ = com.google.protobuf.ByteString.EMPTY;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_Payload_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.Payload getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.Payload.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.Payload build() {
- io.grpc.testing.integration.Messages.Payload result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.Payload buildPartial() {
- io.grpc.testing.integration.Messages.Payload result = new io.grpc.testing.integration.Messages.Payload(this);
- result.type_ = type_;
- result.body_ = body_;
- 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.testing.integration.Messages.Payload) {
- return mergeFrom((io.grpc.testing.integration.Messages.Payload)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.Payload other) {
- if (other == io.grpc.testing.integration.Messages.Payload.getDefaultInstance()) return this;
- if (other.type_ != 0) {
- setTypeValue(other.getTypeValue());
- }
- if (other.getBody() != com.google.protobuf.ByteString.EMPTY) {
- setBody(other.getBody());
- }
- 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.testing.integration.Messages.Payload parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.Payload) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int type_ = 0;
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public int getTypeValue() {
- return type_;
- }
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public Builder setTypeValue(int value) {
- type_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadType getType() {
- io.grpc.testing.integration.Messages.PayloadType result = io.grpc.testing.integration.Messages.PayloadType.valueOf(type_);
- return result == null ? io.grpc.testing.integration.Messages.PayloadType.UNRECOGNIZED : result;
- }
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public Builder setType(io.grpc.testing.integration.Messages.PayloadType value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- type_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * The type of data in body.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType type = 1;</code>
- */
- public Builder clearType() {
-
- type_ = 0;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY;
- /**
- * <pre>
- * Primary contents of payload.
- * </pre>
- *
- * <code>bytes body = 2;</code>
- */
- public com.google.protobuf.ByteString getBody() {
- return body_;
- }
- /**
- * <pre>
- * Primary contents of payload.
- * </pre>
- *
- * <code>bytes body = 2;</code>
- */
- public Builder setBody(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- body_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Primary contents of payload.
- * </pre>
- *
- * <code>bytes body = 2;</code>
- */
- public Builder clearBody() {
-
- body_ = getDefaultInstance().getBody();
- 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.testing.Payload)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.Payload)
- private static final io.grpc.testing.integration.Messages.Payload DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.Payload();
- }
-
- public static io.grpc.testing.integration.Messages.Payload getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<Payload>
- PARSER = new com.google.protobuf.AbstractParser<Payload>() {
- public Payload parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Payload(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<Payload> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<Payload> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.Payload getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface EchoStatusOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.EchoStatus)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>int32 code = 1;</code>
- */
- int getCode();
-
- /**
- * <code>string message = 2;</code>
- */
- java.lang.String getMessage();
- /**
- * <code>string message = 2;</code>
- */
- com.google.protobuf.ByteString
- getMessageBytes();
- }
- /**
- * <pre>
- * A protobuf representation for grpc status. This is used by test
- * clients to specify a status that the server should attempt to return.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.EchoStatus}
- */
- public static final class EchoStatus extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.EchoStatus)
- EchoStatusOrBuilder {
- // Use EchoStatus.newBuilder() to construct.
- private EchoStatus(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private EchoStatus() {
- code_ = 0;
- message_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private EchoStatus(
- 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: {
-
- code_ = input.readInt32();
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- message_ = 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.testing.integration.Messages.internal_static_grpc_testing_EchoStatus_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_EchoStatus_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.EchoStatus.class, io.grpc.testing.integration.Messages.EchoStatus.Builder.class);
- }
-
- public static final int CODE_FIELD_NUMBER = 1;
- private int code_;
- /**
- * <code>int32 code = 1;</code>
- */
- public int getCode() {
- return code_;
- }
-
- public static final int MESSAGE_FIELD_NUMBER = 2;
- private volatile java.lang.Object message_;
- /**
- * <code>string message = 2;</code>
- */
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- 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();
- message_ = s;
- return s;
- }
- }
- /**
- * <code>string message = 2;</code>
- */
- public com.google.protobuf.ByteString
- getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- message_ = 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 (code_ != 0) {
- output.writeInt32(1, code_);
- }
- if (!getMessageBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, message_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (code_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, code_);
- }
- if (!getMessageBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, message_);
- }
- 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.testing.integration.Messages.EchoStatus)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.EchoStatus other = (io.grpc.testing.integration.Messages.EchoStatus) obj;
-
- boolean result = true;
- result = result && (getCode()
- == other.getCode());
- result = result && getMessage()
- .equals(other.getMessage());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + CODE_FIELD_NUMBER;
- hash = (53 * hash) + getCode();
- hash = (37 * hash) + MESSAGE_FIELD_NUMBER;
- hash = (53 * hash) + getMessage().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.EchoStatus parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus 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.testing.integration.Messages.EchoStatus parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus 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.testing.integration.Messages.EchoStatus parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus 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.testing.integration.Messages.EchoStatus parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.EchoStatus 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.testing.integration.Messages.EchoStatus prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * A protobuf representation for grpc status. This is used by test
- * clients to specify a status that the server should attempt to return.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.EchoStatus}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.EchoStatus)
- io.grpc.testing.integration.Messages.EchoStatusOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_EchoStatus_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_EchoStatus_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.EchoStatus.class, io.grpc.testing.integration.Messages.EchoStatus.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.EchoStatus.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();
- code_ = 0;
-
- message_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_EchoStatus_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.EchoStatus getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.EchoStatus build() {
- io.grpc.testing.integration.Messages.EchoStatus result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.EchoStatus buildPartial() {
- io.grpc.testing.integration.Messages.EchoStatus result = new io.grpc.testing.integration.Messages.EchoStatus(this);
- result.code_ = code_;
- result.message_ = message_;
- 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.testing.integration.Messages.EchoStatus) {
- return mergeFrom((io.grpc.testing.integration.Messages.EchoStatus)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.EchoStatus other) {
- if (other == io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance()) return this;
- if (other.getCode() != 0) {
- setCode(other.getCode());
- }
- if (!other.getMessage().isEmpty()) {
- message_ = other.message_;
- 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.testing.integration.Messages.EchoStatus parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.EchoStatus) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int code_ ;
- /**
- * <code>int32 code = 1;</code>
- */
- public int getCode() {
- return code_;
- }
- /**
- * <code>int32 code = 1;</code>
- */
- public Builder setCode(int value) {
-
- code_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>int32 code = 1;</code>
- */
- public Builder clearCode() {
-
- code_ = 0;
- onChanged();
- return this;
- }
-
- private java.lang.Object message_ = "";
- /**
- * <code>string message = 2;</code>
- */
- public java.lang.String getMessage() {
- java.lang.Object ref = message_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- message_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string message = 2;</code>
- */
- public com.google.protobuf.ByteString
- getMessageBytes() {
- java.lang.Object ref = message_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- message_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string message = 2;</code>
- */
- public Builder setMessage(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- message_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string message = 2;</code>
- */
- public Builder clearMessage() {
-
- message_ = getDefaultInstance().getMessage();
- onChanged();
- return this;
- }
- /**
- * <code>string message = 2;</code>
- */
- public Builder setMessageBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- message_ = 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.testing.EchoStatus)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.EchoStatus)
- private static final io.grpc.testing.integration.Messages.EchoStatus DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.EchoStatus();
- }
-
- public static io.grpc.testing.integration.Messages.EchoStatus getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<EchoStatus>
- PARSER = new com.google.protobuf.AbstractParser<EchoStatus>() {
- public EchoStatus parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new EchoStatus(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<EchoStatus> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<EchoStatus> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.EchoStatus getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface SimpleRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- int getResponseTypeValue();
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- io.grpc.testing.integration.Messages.PayloadType getResponseType();
-
- /**
- * <pre>
- * Desired payload size in the response from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 response_size = 2;</code>
- */
- int getResponseSize();
-
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- boolean hasPayload();
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- io.grpc.testing.integration.Messages.Payload getPayload();
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder();
-
- /**
- * <pre>
- * Whether SimpleResponse should include username.
- * </pre>
- *
- * <code>bool fill_username = 4;</code>
- */
- boolean getFillUsername();
-
- /**
- * <pre>
- * Whether SimpleResponse should include OAuth scope.
- * </pre>
- *
- * <code>bool fill_oauth_scope = 5;</code>
- */
- boolean getFillOauthScope();
-
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- int getResponseCompressionValue();
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- io.grpc.testing.integration.Messages.CompressionType getResponseCompression();
-
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- boolean hasResponseStatus();
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- io.grpc.testing.integration.Messages.EchoStatus getResponseStatus();
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- io.grpc.testing.integration.Messages.EchoStatusOrBuilder getResponseStatusOrBuilder();
- }
- /**
- * <pre>
- * Unary request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.SimpleRequest}
- */
- public static final class SimpleRequest extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.SimpleRequest)
- SimpleRequestOrBuilder {
- // Use SimpleRequest.newBuilder() to construct.
- private SimpleRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private SimpleRequest() {
- responseType_ = 0;
- responseSize_ = 0;
- fillUsername_ = false;
- fillOauthScope_ = false;
- responseCompression_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private SimpleRequest(
- 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: {
- int rawValue = input.readEnum();
-
- responseType_ = rawValue;
- break;
- }
- case 16: {
-
- responseSize_ = input.readInt32();
- break;
- }
- case 26: {
- io.grpc.testing.integration.Messages.Payload.Builder subBuilder = null;
- if (payload_ != null) {
- subBuilder = payload_.toBuilder();
- }
- payload_ = input.readMessage(io.grpc.testing.integration.Messages.Payload.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(payload_);
- payload_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 32: {
-
- fillUsername_ = input.readBool();
- break;
- }
- case 40: {
-
- fillOauthScope_ = input.readBool();
- break;
- }
- case 48: {
- int rawValue = input.readEnum();
-
- responseCompression_ = rawValue;
- break;
- }
- case 58: {
- io.grpc.testing.integration.Messages.EchoStatus.Builder subBuilder = null;
- if (responseStatus_ != null) {
- subBuilder = responseStatus_.toBuilder();
- }
- responseStatus_ = input.readMessage(io.grpc.testing.integration.Messages.EchoStatus.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(responseStatus_);
- responseStatus_ = 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.testing.integration.Messages.internal_static_grpc_testing_SimpleRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.SimpleRequest.class, io.grpc.testing.integration.Messages.SimpleRequest.Builder.class);
- }
-
- public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
- private int responseType_;
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public int getResponseTypeValue() {
- return responseType_;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadType getResponseType() {
- io.grpc.testing.integration.Messages.PayloadType result = io.grpc.testing.integration.Messages.PayloadType.valueOf(responseType_);
- return result == null ? io.grpc.testing.integration.Messages.PayloadType.UNRECOGNIZED : result;
- }
-
- public static final int RESPONSE_SIZE_FIELD_NUMBER = 2;
- private int responseSize_;
- /**
- * <pre>
- * Desired payload size in the response from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 response_size = 2;</code>
- */
- public int getResponseSize() {
- return responseSize_;
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 3;
- private io.grpc.testing.integration.Messages.Payload payload_;
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public boolean hasPayload() {
- return payload_ != null;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- return getPayload();
- }
-
- public static final int FILL_USERNAME_FIELD_NUMBER = 4;
- private boolean fillUsername_;
- /**
- * <pre>
- * Whether SimpleResponse should include username.
- * </pre>
- *
- * <code>bool fill_username = 4;</code>
- */
- public boolean getFillUsername() {
- return fillUsername_;
- }
-
- public static final int FILL_OAUTH_SCOPE_FIELD_NUMBER = 5;
- private boolean fillOauthScope_;
- /**
- * <pre>
- * Whether SimpleResponse should include OAuth scope.
- * </pre>
- *
- * <code>bool fill_oauth_scope = 5;</code>
- */
- public boolean getFillOauthScope() {
- return fillOauthScope_;
- }
-
- public static final int RESPONSE_COMPRESSION_FIELD_NUMBER = 6;
- private int responseCompression_;
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public int getResponseCompressionValue() {
- return responseCompression_;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public io.grpc.testing.integration.Messages.CompressionType getResponseCompression() {
- io.grpc.testing.integration.Messages.CompressionType result = io.grpc.testing.integration.Messages.CompressionType.valueOf(responseCompression_);
- return result == null ? io.grpc.testing.integration.Messages.CompressionType.UNRECOGNIZED : result;
- }
-
- public static final int RESPONSE_STATUS_FIELD_NUMBER = 7;
- private io.grpc.testing.integration.Messages.EchoStatus responseStatus_;
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public boolean hasResponseStatus() {
- return responseStatus_ != null;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatus getResponseStatus() {
- return responseStatus_ == null ? io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance() : responseStatus_;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatusOrBuilder getResponseStatusOrBuilder() {
- return getResponseStatus();
- }
-
- 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 (responseType_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
- output.writeEnum(1, responseType_);
- }
- if (responseSize_ != 0) {
- output.writeInt32(2, responseSize_);
- }
- if (payload_ != null) {
- output.writeMessage(3, getPayload());
- }
- if (fillUsername_ != false) {
- output.writeBool(4, fillUsername_);
- }
- if (fillOauthScope_ != false) {
- output.writeBool(5, fillOauthScope_);
- }
- if (responseCompression_ != io.grpc.testing.integration.Messages.CompressionType.NONE.getNumber()) {
- output.writeEnum(6, responseCompression_);
- }
- if (responseStatus_ != null) {
- output.writeMessage(7, getResponseStatus());
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (responseType_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, responseType_);
- }
- if (responseSize_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(2, responseSize_);
- }
- if (payload_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getPayload());
- }
- if (fillUsername_ != false) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(4, fillUsername_);
- }
- if (fillOauthScope_ != false) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(5, fillOauthScope_);
- }
- if (responseCompression_ != io.grpc.testing.integration.Messages.CompressionType.NONE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(6, responseCompression_);
- }
- if (responseStatus_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(7, getResponseStatus());
- }
- 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.testing.integration.Messages.SimpleRequest)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.SimpleRequest other = (io.grpc.testing.integration.Messages.SimpleRequest) obj;
-
- boolean result = true;
- result = result && responseType_ == other.responseType_;
- result = result && (getResponseSize()
- == other.getResponseSize());
- result = result && (hasPayload() == other.hasPayload());
- if (hasPayload()) {
- result = result && getPayload()
- .equals(other.getPayload());
- }
- result = result && (getFillUsername()
- == other.getFillUsername());
- result = result && (getFillOauthScope()
- == other.getFillOauthScope());
- result = result && responseCompression_ == other.responseCompression_;
- result = result && (hasResponseStatus() == other.hasResponseStatus());
- if (hasResponseStatus()) {
- result = result && getResponseStatus()
- .equals(other.getResponseStatus());
- }
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + RESPONSE_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + responseType_;
- hash = (37 * hash) + RESPONSE_SIZE_FIELD_NUMBER;
- hash = (53 * hash) + getResponseSize();
- if (hasPayload()) {
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- }
- hash = (37 * hash) + FILL_USERNAME_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getFillUsername());
- hash = (37 * hash) + FILL_OAUTH_SCOPE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getFillOauthScope());
- hash = (37 * hash) + RESPONSE_COMPRESSION_FIELD_NUMBER;
- hash = (53 * hash) + responseCompression_;
- if (hasResponseStatus()) {
- hash = (37 * hash) + RESPONSE_STATUS_FIELD_NUMBER;
- hash = (53 * hash) + getResponseStatus().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest 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.testing.integration.Messages.SimpleRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest 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.testing.integration.Messages.SimpleRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest 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.testing.integration.Messages.SimpleRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleRequest 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.testing.integration.Messages.SimpleRequest prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Unary request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.SimpleRequest}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleRequest)
- io.grpc.testing.integration.Messages.SimpleRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.SimpleRequest.class, io.grpc.testing.integration.Messages.SimpleRequest.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.SimpleRequest.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();
- responseType_ = 0;
-
- responseSize_ = 0;
-
- if (payloadBuilder_ == null) {
- payload_ = null;
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
- fillUsername_ = false;
-
- fillOauthScope_ = false;
-
- responseCompression_ = 0;
-
- if (responseStatusBuilder_ == null) {
- responseStatus_ = null;
- } else {
- responseStatus_ = null;
- responseStatusBuilder_ = null;
- }
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleRequest_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.SimpleRequest build() {
- io.grpc.testing.integration.Messages.SimpleRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.SimpleRequest buildPartial() {
- io.grpc.testing.integration.Messages.SimpleRequest result = new io.grpc.testing.integration.Messages.SimpleRequest(this);
- result.responseType_ = responseType_;
- result.responseSize_ = responseSize_;
- if (payloadBuilder_ == null) {
- result.payload_ = payload_;
- } else {
- result.payload_ = payloadBuilder_.build();
- }
- result.fillUsername_ = fillUsername_;
- result.fillOauthScope_ = fillOauthScope_;
- result.responseCompression_ = responseCompression_;
- if (responseStatusBuilder_ == null) {
- result.responseStatus_ = responseStatus_;
- } else {
- result.responseStatus_ = responseStatusBuilder_.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.testing.integration.Messages.SimpleRequest) {
- return mergeFrom((io.grpc.testing.integration.Messages.SimpleRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.SimpleRequest other) {
- if (other == io.grpc.testing.integration.Messages.SimpleRequest.getDefaultInstance()) return this;
- if (other.responseType_ != 0) {
- setResponseTypeValue(other.getResponseTypeValue());
- }
- if (other.getResponseSize() != 0) {
- setResponseSize(other.getResponseSize());
- }
- if (other.hasPayload()) {
- mergePayload(other.getPayload());
- }
- if (other.getFillUsername() != false) {
- setFillUsername(other.getFillUsername());
- }
- if (other.getFillOauthScope() != false) {
- setFillOauthScope(other.getFillOauthScope());
- }
- if (other.responseCompression_ != 0) {
- setResponseCompressionValue(other.getResponseCompressionValue());
- }
- if (other.hasResponseStatus()) {
- mergeResponseStatus(other.getResponseStatus());
- }
- 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.testing.integration.Messages.SimpleRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.SimpleRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int responseType_ = 0;
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public int getResponseTypeValue() {
- return responseType_;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public Builder setResponseTypeValue(int value) {
- responseType_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadType getResponseType() {
- io.grpc.testing.integration.Messages.PayloadType result = io.grpc.testing.integration.Messages.PayloadType.valueOf(responseType_);
- return result == null ? io.grpc.testing.integration.Messages.PayloadType.UNRECOGNIZED : result;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public Builder setResponseType(io.grpc.testing.integration.Messages.PayloadType value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- responseType_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, server randomly chooses one from other formats.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public Builder clearResponseType() {
-
- responseType_ = 0;
- onChanged();
- return this;
- }
-
- private int responseSize_ ;
- /**
- * <pre>
- * Desired payload size in the response from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 response_size = 2;</code>
- */
- public int getResponseSize() {
- return responseSize_;
- }
- /**
- * <pre>
- * Desired payload size in the response from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 response_size = 2;</code>
- */
- public Builder setResponseSize(int value) {
-
- responseSize_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired payload size in the response from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 response_size = 2;</code>
- */
- public Builder clearResponseSize() {
-
- responseSize_ = 0;
- onChanged();
- return this;
- }
-
- private io.grpc.testing.integration.Messages.Payload payload_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_;
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public boolean hasPayload() {
- return payloadBuilder_ != null || payload_ != null;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- if (payloadBuilder_ == null) {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- } else {
- return payloadBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder setPayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- payload_ = value;
- onChanged();
- } else {
- payloadBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder setPayload(
- io.grpc.testing.integration.Messages.Payload.Builder builderForValue) {
- if (payloadBuilder_ == null) {
- payload_ = builderForValue.build();
- onChanged();
- } else {
- payloadBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder mergePayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (payload_ != null) {
- payload_ =
- io.grpc.testing.integration.Messages.Payload.newBuilder(payload_).mergeFrom(value).buildPartial();
- } else {
- payload_ = value;
- }
- onChanged();
- } else {
- payloadBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder clearPayload() {
- if (payloadBuilder_ == null) {
- payload_ = null;
- onChanged();
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() {
-
- onChanged();
- return getPayloadFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- if (payloadBuilder_ != null) {
- return payloadBuilder_.getMessageOrBuilder();
- } else {
- return payload_ == null ?
- io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>
- getPayloadFieldBuilder() {
- if (payloadBuilder_ == null) {
- payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>(
- getPayload(),
- getParentForChildren(),
- isClean());
- payload_ = null;
- }
- return payloadBuilder_;
- }
-
- private boolean fillUsername_ ;
- /**
- * <pre>
- * Whether SimpleResponse should include username.
- * </pre>
- *
- * <code>bool fill_username = 4;</code>
- */
- public boolean getFillUsername() {
- return fillUsername_;
- }
- /**
- * <pre>
- * Whether SimpleResponse should include username.
- * </pre>
- *
- * <code>bool fill_username = 4;</code>
- */
- public Builder setFillUsername(boolean value) {
-
- fillUsername_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Whether SimpleResponse should include username.
- * </pre>
- *
- * <code>bool fill_username = 4;</code>
- */
- public Builder clearFillUsername() {
-
- fillUsername_ = false;
- onChanged();
- return this;
- }
-
- private boolean fillOauthScope_ ;
- /**
- * <pre>
- * Whether SimpleResponse should include OAuth scope.
- * </pre>
- *
- * <code>bool fill_oauth_scope = 5;</code>
- */
- public boolean getFillOauthScope() {
- return fillOauthScope_;
- }
- /**
- * <pre>
- * Whether SimpleResponse should include OAuth scope.
- * </pre>
- *
- * <code>bool fill_oauth_scope = 5;</code>
- */
- public Builder setFillOauthScope(boolean value) {
-
- fillOauthScope_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Whether SimpleResponse should include OAuth scope.
- * </pre>
- *
- * <code>bool fill_oauth_scope = 5;</code>
- */
- public Builder clearFillOauthScope() {
-
- fillOauthScope_ = false;
- onChanged();
- return this;
- }
-
- private int responseCompression_ = 0;
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public int getResponseCompressionValue() {
- return responseCompression_;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public Builder setResponseCompressionValue(int value) {
- responseCompression_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public io.grpc.testing.integration.Messages.CompressionType getResponseCompression() {
- io.grpc.testing.integration.Messages.CompressionType result = io.grpc.testing.integration.Messages.CompressionType.valueOf(responseCompression_);
- return result == null ? io.grpc.testing.integration.Messages.CompressionType.UNRECOGNIZED : result;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public Builder setResponseCompression(io.grpc.testing.integration.Messages.CompressionType value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- responseCompression_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public Builder clearResponseCompression() {
-
- responseCompression_ = 0;
- onChanged();
- return this;
- }
-
- private io.grpc.testing.integration.Messages.EchoStatus responseStatus_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.EchoStatus, io.grpc.testing.integration.Messages.EchoStatus.Builder, io.grpc.testing.integration.Messages.EchoStatusOrBuilder> responseStatusBuilder_;
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public boolean hasResponseStatus() {
- return responseStatusBuilder_ != null || responseStatus_ != null;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatus getResponseStatus() {
- if (responseStatusBuilder_ == null) {
- return responseStatus_ == null ? io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance() : responseStatus_;
- } else {
- return responseStatusBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder setResponseStatus(io.grpc.testing.integration.Messages.EchoStatus value) {
- if (responseStatusBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- responseStatus_ = value;
- onChanged();
- } else {
- responseStatusBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder setResponseStatus(
- io.grpc.testing.integration.Messages.EchoStatus.Builder builderForValue) {
- if (responseStatusBuilder_ == null) {
- responseStatus_ = builderForValue.build();
- onChanged();
- } else {
- responseStatusBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder mergeResponseStatus(io.grpc.testing.integration.Messages.EchoStatus value) {
- if (responseStatusBuilder_ == null) {
- if (responseStatus_ != null) {
- responseStatus_ =
- io.grpc.testing.integration.Messages.EchoStatus.newBuilder(responseStatus_).mergeFrom(value).buildPartial();
- } else {
- responseStatus_ = value;
- }
- onChanged();
- } else {
- responseStatusBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder clearResponseStatus() {
- if (responseStatusBuilder_ == null) {
- responseStatus_ = null;
- onChanged();
- } else {
- responseStatus_ = null;
- responseStatusBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatus.Builder getResponseStatusBuilder() {
-
- onChanged();
- return getResponseStatusFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatusOrBuilder getResponseStatusOrBuilder() {
- if (responseStatusBuilder_ != null) {
- return responseStatusBuilder_.getMessageOrBuilder();
- } else {
- return responseStatus_ == null ?
- io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance() : responseStatus_;
- }
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.EchoStatus, io.grpc.testing.integration.Messages.EchoStatus.Builder, io.grpc.testing.integration.Messages.EchoStatusOrBuilder>
- getResponseStatusFieldBuilder() {
- if (responseStatusBuilder_ == null) {
- responseStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.EchoStatus, io.grpc.testing.integration.Messages.EchoStatus.Builder, io.grpc.testing.integration.Messages.EchoStatusOrBuilder>(
- getResponseStatus(),
- getParentForChildren(),
- isClean());
- responseStatus_ = null;
- }
- return responseStatusBuilder_;
- }
- 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.testing.SimpleRequest)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest)
- private static final io.grpc.testing.integration.Messages.SimpleRequest DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.SimpleRequest();
- }
-
- public static io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<SimpleRequest>
- PARSER = new com.google.protobuf.AbstractParser<SimpleRequest>() {
- public SimpleRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleRequest(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<SimpleRequest> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleRequest> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface SimpleResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleResponse)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- boolean hasPayload();
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- io.grpc.testing.integration.Messages.Payload getPayload();
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder();
-
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- java.lang.String getUsername();
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- com.google.protobuf.ByteString
- getUsernameBytes();
-
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- java.lang.String getOauthScope();
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- com.google.protobuf.ByteString
- getOauthScopeBytes();
- }
- /**
- * <pre>
- * Unary response, as configured by the request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.SimpleResponse}
- */
- public static final class SimpleResponse extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.SimpleResponse)
- SimpleResponseOrBuilder {
- // Use SimpleResponse.newBuilder() to construct.
- private SimpleResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private SimpleResponse() {
- username_ = "";
- oauthScope_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private SimpleResponse(
- 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.testing.integration.Messages.Payload.Builder subBuilder = null;
- if (payload_ != null) {
- subBuilder = payload_.toBuilder();
- }
- payload_ = input.readMessage(io.grpc.testing.integration.Messages.Payload.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(payload_);
- payload_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 18: {
- java.lang.String s = input.readStringRequireUtf8();
-
- username_ = s;
- break;
- }
- case 26: {
- java.lang.String s = input.readStringRequireUtf8();
-
- oauthScope_ = 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.testing.integration.Messages.internal_static_grpc_testing_SimpleResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.SimpleResponse.class, io.grpc.testing.integration.Messages.SimpleResponse.Builder.class);
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 1;
- private io.grpc.testing.integration.Messages.Payload payload_;
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public boolean hasPayload() {
- return payload_ != null;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- return getPayload();
- }
-
- public static final int USERNAME_FIELD_NUMBER = 2;
- private volatile java.lang.Object username_;
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public java.lang.String getUsername() {
- java.lang.Object ref = username_;
- 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();
- username_ = s;
- return s;
- }
- }
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public com.google.protobuf.ByteString
- getUsernameBytes() {
- java.lang.Object ref = username_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- username_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int OAUTH_SCOPE_FIELD_NUMBER = 3;
- private volatile java.lang.Object oauthScope_;
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public java.lang.String getOauthScope() {
- java.lang.Object ref = oauthScope_;
- 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();
- oauthScope_ = s;
- return s;
- }
- }
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public com.google.protobuf.ByteString
- getOauthScopeBytes() {
- java.lang.Object ref = oauthScope_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- oauthScope_ = 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 (payload_ != null) {
- output.writeMessage(1, getPayload());
- }
- if (!getUsernameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 2, username_);
- }
- if (!getOauthScopeBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 3, oauthScope_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (payload_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getPayload());
- }
- if (!getUsernameBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, username_);
- }
- if (!getOauthScopeBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, oauthScope_);
- }
- 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.testing.integration.Messages.SimpleResponse)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.SimpleResponse other = (io.grpc.testing.integration.Messages.SimpleResponse) obj;
-
- boolean result = true;
- result = result && (hasPayload() == other.hasPayload());
- if (hasPayload()) {
- result = result && getPayload()
- .equals(other.getPayload());
- }
- result = result && getUsername()
- .equals(other.getUsername());
- result = result && getOauthScope()
- .equals(other.getOauthScope());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasPayload()) {
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- }
- hash = (37 * hash) + USERNAME_FIELD_NUMBER;
- hash = (53 * hash) + getUsername().hashCode();
- hash = (37 * hash) + OAUTH_SCOPE_FIELD_NUMBER;
- hash = (53 * hash) + getOauthScope().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse 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.testing.integration.Messages.SimpleResponse parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse 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.testing.integration.Messages.SimpleResponse parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse 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.testing.integration.Messages.SimpleResponse parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleResponse 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.testing.integration.Messages.SimpleResponse prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Unary response, as configured by the request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.SimpleResponse}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleResponse)
- io.grpc.testing.integration.Messages.SimpleResponseOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.SimpleResponse.class, io.grpc.testing.integration.Messages.SimpleResponse.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.SimpleResponse.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 (payloadBuilder_ == null) {
- payload_ = null;
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
- username_ = "";
-
- oauthScope_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleResponse_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.SimpleResponse build() {
- io.grpc.testing.integration.Messages.SimpleResponse result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.SimpleResponse buildPartial() {
- io.grpc.testing.integration.Messages.SimpleResponse result = new io.grpc.testing.integration.Messages.SimpleResponse(this);
- if (payloadBuilder_ == null) {
- result.payload_ = payload_;
- } else {
- result.payload_ = payloadBuilder_.build();
- }
- result.username_ = username_;
- result.oauthScope_ = oauthScope_;
- 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.testing.integration.Messages.SimpleResponse) {
- return mergeFrom((io.grpc.testing.integration.Messages.SimpleResponse)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.SimpleResponse other) {
- if (other == io.grpc.testing.integration.Messages.SimpleResponse.getDefaultInstance()) return this;
- if (other.hasPayload()) {
- mergePayload(other.getPayload());
- }
- if (!other.getUsername().isEmpty()) {
- username_ = other.username_;
- onChanged();
- }
- if (!other.getOauthScope().isEmpty()) {
- oauthScope_ = other.oauthScope_;
- 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.testing.integration.Messages.SimpleResponse parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.SimpleResponse) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private io.grpc.testing.integration.Messages.Payload payload_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_;
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public boolean hasPayload() {
- return payloadBuilder_ != null || payload_ != null;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- if (payloadBuilder_ == null) {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- } else {
- return payloadBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder setPayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- payload_ = value;
- onChanged();
- } else {
- payloadBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder setPayload(
- io.grpc.testing.integration.Messages.Payload.Builder builderForValue) {
- if (payloadBuilder_ == null) {
- payload_ = builderForValue.build();
- onChanged();
- } else {
- payloadBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder mergePayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (payload_ != null) {
- payload_ =
- io.grpc.testing.integration.Messages.Payload.newBuilder(payload_).mergeFrom(value).buildPartial();
- } else {
- payload_ = value;
- }
- onChanged();
- } else {
- payloadBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder clearPayload() {
- if (payloadBuilder_ == null) {
- payload_ = null;
- onChanged();
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() {
-
- onChanged();
- return getPayloadFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- if (payloadBuilder_ != null) {
- return payloadBuilder_.getMessageOrBuilder();
- } else {
- return payload_ == null ?
- io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- }
- /**
- * <pre>
- * Payload to increase message size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>
- getPayloadFieldBuilder() {
- if (payloadBuilder_ == null) {
- payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>(
- getPayload(),
- getParentForChildren(),
- isClean());
- payload_ = null;
- }
- return payloadBuilder_;
- }
-
- private java.lang.Object username_ = "";
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public java.lang.String getUsername() {
- java.lang.Object ref = username_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- username_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public com.google.protobuf.ByteString
- getUsernameBytes() {
- java.lang.Object ref = username_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- username_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public Builder setUsername(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- username_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public Builder clearUsername() {
-
- username_ = getDefaultInstance().getUsername();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * The user the request came from, for verifying authentication was
- * successful when the client expected it.
- * </pre>
- *
- * <code>string username = 2;</code>
- */
- public Builder setUsernameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- username_ = value;
- onChanged();
- return this;
- }
-
- private java.lang.Object oauthScope_ = "";
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public java.lang.String getOauthScope() {
- java.lang.Object ref = oauthScope_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- oauthScope_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public com.google.protobuf.ByteString
- getOauthScopeBytes() {
- java.lang.Object ref = oauthScope_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- oauthScope_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public Builder setOauthScope(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- oauthScope_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public Builder clearOauthScope() {
-
- oauthScope_ = getDefaultInstance().getOauthScope();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * OAuth scope.
- * </pre>
- *
- * <code>string oauth_scope = 3;</code>
- */
- public Builder setOauthScopeBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- oauthScope_ = 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.testing.SimpleResponse)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.SimpleResponse)
- private static final io.grpc.testing.integration.Messages.SimpleResponse DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.SimpleResponse();
- }
-
- public static io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<SimpleResponse>
- PARSER = new com.google.protobuf.AbstractParser<SimpleResponse>() {
- public SimpleResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleResponse(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<SimpleResponse> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleResponse> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface SimpleContextOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleContext)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string value = 1;</code>
- */
- java.lang.String getValue();
- /**
- * <code>string value = 1;</code>
- */
- com.google.protobuf.ByteString
- getValueBytes();
- }
- /**
- * Protobuf type {@code grpc.testing.SimpleContext}
- */
- public static final class SimpleContext extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.SimpleContext)
- SimpleContextOrBuilder {
- // Use SimpleContext.newBuilder() to construct.
- private SimpleContext(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private SimpleContext() {
- value_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private SimpleContext(
- 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();
-
- 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 io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleContext_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleContext_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.SimpleContext.class, io.grpc.testing.integration.Messages.SimpleContext.Builder.class);
- }
-
- public static final int VALUE_FIELD_NUMBER = 1;
- private volatile java.lang.Object value_;
- /**
- * <code>string value = 1;</code>
- */
- public java.lang.String getValue() {
- java.lang.Object ref = value_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- value_ = s;
- return s;
- }
- }
- /**
- * <code>string value = 1;</code>
- */
- public com.google.protobuf.ByteString
- getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (!getValueBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (!getValueBytes().isEmpty()) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, 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 io.grpc.testing.integration.Messages.SimpleContext)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.SimpleContext other = (io.grpc.testing.integration.Messages.SimpleContext) obj;
-
- boolean result = true;
- 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) + VALUE_FIELD_NUMBER;
- hash = (53 * hash) + getValue().hashCode();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.SimpleContext parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext 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.testing.integration.Messages.SimpleContext parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext 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.testing.integration.Messages.SimpleContext parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext 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.testing.integration.Messages.SimpleContext parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.SimpleContext 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.testing.integration.Messages.SimpleContext 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.testing.SimpleContext}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleContext)
- io.grpc.testing.integration.Messages.SimpleContextOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleContext_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleContext_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.SimpleContext.class, io.grpc.testing.integration.Messages.SimpleContext.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.SimpleContext.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();
- value_ = "";
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_SimpleContext_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.SimpleContext getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.SimpleContext.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.SimpleContext build() {
- io.grpc.testing.integration.Messages.SimpleContext result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.SimpleContext buildPartial() {
- io.grpc.testing.integration.Messages.SimpleContext result = new io.grpc.testing.integration.Messages.SimpleContext(this);
- 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 io.grpc.testing.integration.Messages.SimpleContext) {
- return mergeFrom((io.grpc.testing.integration.Messages.SimpleContext)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.SimpleContext other) {
- if (other == io.grpc.testing.integration.Messages.SimpleContext.getDefaultInstance()) return this;
- 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 {
- io.grpc.testing.integration.Messages.SimpleContext parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.SimpleContext) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object value_ = "";
- /**
- * <code>string value = 1;</code>
- */
- public java.lang.String getValue() {
- java.lang.Object ref = value_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- value_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string value = 1;</code>
- */
- public com.google.protobuf.ByteString
- getValueBytes() {
- java.lang.Object ref = value_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- value_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string value = 1;</code>
- */
- public Builder setValue(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- value_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string value = 1;</code>
- */
- public Builder clearValue() {
-
- value_ = getDefaultInstance().getValue();
- onChanged();
- return this;
- }
- /**
- * <code>string value = 1;</code>
- */
- public Builder setValueBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- value_ = value;
- onChanged();
- return this;
- }
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return this;
- }
-
-
- // @@protoc_insertion_point(builder_scope:grpc.testing.SimpleContext)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.SimpleContext)
- private static final io.grpc.testing.integration.Messages.SimpleContext DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.SimpleContext();
- }
-
- public static io.grpc.testing.integration.Messages.SimpleContext getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<SimpleContext>
- PARSER = new com.google.protobuf.AbstractParser<SimpleContext>() {
- public SimpleContext parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleContext(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<SimpleContext> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleContext> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.SimpleContext getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface StreamingInputCallRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingInputCallRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- boolean hasPayload();
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- io.grpc.testing.integration.Messages.Payload getPayload();
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder();
- }
- /**
- * <pre>
- * Client-streaming request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingInputCallRequest}
- */
- public static final class StreamingInputCallRequest extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.StreamingInputCallRequest)
- StreamingInputCallRequestOrBuilder {
- // Use StreamingInputCallRequest.newBuilder() to construct.
- private StreamingInputCallRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private StreamingInputCallRequest() {
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private StreamingInputCallRequest(
- 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.testing.integration.Messages.Payload.Builder subBuilder = null;
- if (payload_ != null) {
- subBuilder = payload_.toBuilder();
- }
- payload_ = input.readMessage(io.grpc.testing.integration.Messages.Payload.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(payload_);
- payload_ = 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.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingInputCallRequest.class, io.grpc.testing.integration.Messages.StreamingInputCallRequest.Builder.class);
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 1;
- private io.grpc.testing.integration.Messages.Payload payload_;
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public boolean hasPayload() {
- return payload_ != null;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- return getPayload();
- }
-
- 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 (payload_ != null) {
- output.writeMessage(1, getPayload());
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (payload_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getPayload());
- }
- 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.testing.integration.Messages.StreamingInputCallRequest)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.StreamingInputCallRequest other = (io.grpc.testing.integration.Messages.StreamingInputCallRequest) obj;
-
- boolean result = true;
- result = result && (hasPayload() == other.hasPayload());
- if (hasPayload()) {
- result = result && getPayload()
- .equals(other.getPayload());
- }
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasPayload()) {
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest 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.testing.integration.Messages.StreamingInputCallRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest 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.testing.integration.Messages.StreamingInputCallRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest 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.testing.integration.Messages.StreamingInputCallRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest 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.testing.integration.Messages.StreamingInputCallRequest prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Client-streaming request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingInputCallRequest}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.StreamingInputCallRequest)
- io.grpc.testing.integration.Messages.StreamingInputCallRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingInputCallRequest.class, io.grpc.testing.integration.Messages.StreamingInputCallRequest.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.StreamingInputCallRequest.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 (payloadBuilder_ == null) {
- payload_ = null;
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallRequest_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.StreamingInputCallRequest.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallRequest build() {
- io.grpc.testing.integration.Messages.StreamingInputCallRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallRequest buildPartial() {
- io.grpc.testing.integration.Messages.StreamingInputCallRequest result = new io.grpc.testing.integration.Messages.StreamingInputCallRequest(this);
- if (payloadBuilder_ == null) {
- result.payload_ = payload_;
- } else {
- result.payload_ = payloadBuilder_.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.testing.integration.Messages.StreamingInputCallRequest) {
- return mergeFrom((io.grpc.testing.integration.Messages.StreamingInputCallRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.StreamingInputCallRequest other) {
- if (other == io.grpc.testing.integration.Messages.StreamingInputCallRequest.getDefaultInstance()) return this;
- if (other.hasPayload()) {
- mergePayload(other.getPayload());
- }
- 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.testing.integration.Messages.StreamingInputCallRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.StreamingInputCallRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private io.grpc.testing.integration.Messages.Payload payload_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_;
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public boolean hasPayload() {
- return payloadBuilder_ != null || payload_ != null;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- if (payloadBuilder_ == null) {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- } else {
- return payloadBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder setPayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- payload_ = value;
- onChanged();
- } else {
- payloadBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder setPayload(
- io.grpc.testing.integration.Messages.Payload.Builder builderForValue) {
- if (payloadBuilder_ == null) {
- payload_ = builderForValue.build();
- onChanged();
- } else {
- payloadBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder mergePayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (payload_ != null) {
- payload_ =
- io.grpc.testing.integration.Messages.Payload.newBuilder(payload_).mergeFrom(value).buildPartial();
- } else {
- payload_ = value;
- }
- onChanged();
- } else {
- payloadBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder clearPayload() {
- if (payloadBuilder_ == null) {
- payload_ = null;
- onChanged();
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() {
-
- onChanged();
- return getPayloadFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- if (payloadBuilder_ != null) {
- return payloadBuilder_.getMessageOrBuilder();
- } else {
- return payload_ == null ?
- io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>
- getPayloadFieldBuilder() {
- if (payloadBuilder_ == null) {
- payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>(
- getPayload(),
- getParentForChildren(),
- isClean());
- payload_ = null;
- }
- return payloadBuilder_;
- }
- 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.testing.StreamingInputCallRequest)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.StreamingInputCallRequest)
- private static final io.grpc.testing.integration.Messages.StreamingInputCallRequest DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingInputCallRequest();
- }
-
- public static io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<StreamingInputCallRequest>
- PARSER = new com.google.protobuf.AbstractParser<StreamingInputCallRequest>() {
- public StreamingInputCallRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingInputCallRequest(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<StreamingInputCallRequest> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingInputCallRequest> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface StreamingInputCallResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingInputCallResponse)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Aggregated size of payloads received from the client.
- * </pre>
- *
- * <code>int32 aggregated_payload_size = 1;</code>
- */
- int getAggregatedPayloadSize();
- }
- /**
- * <pre>
- * Client-streaming response.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingInputCallResponse}
- */
- public static final class StreamingInputCallResponse extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.StreamingInputCallResponse)
- StreamingInputCallResponseOrBuilder {
- // Use StreamingInputCallResponse.newBuilder() to construct.
- private StreamingInputCallResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private StreamingInputCallResponse() {
- aggregatedPayloadSize_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private StreamingInputCallResponse(
- 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: {
-
- aggregatedPayloadSize_ = 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 io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingInputCallResponse.class, io.grpc.testing.integration.Messages.StreamingInputCallResponse.Builder.class);
- }
-
- public static final int AGGREGATED_PAYLOAD_SIZE_FIELD_NUMBER = 1;
- private int aggregatedPayloadSize_;
- /**
- * <pre>
- * Aggregated size of payloads received from the client.
- * </pre>
- *
- * <code>int32 aggregated_payload_size = 1;</code>
- */
- public int getAggregatedPayloadSize() {
- return aggregatedPayloadSize_;
- }
-
- 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 (aggregatedPayloadSize_ != 0) {
- output.writeInt32(1, aggregatedPayloadSize_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (aggregatedPayloadSize_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, aggregatedPayloadSize_);
- }
- 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.testing.integration.Messages.StreamingInputCallResponse)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.StreamingInputCallResponse other = (io.grpc.testing.integration.Messages.StreamingInputCallResponse) obj;
-
- boolean result = true;
- result = result && (getAggregatedPayloadSize()
- == other.getAggregatedPayloadSize());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + AGGREGATED_PAYLOAD_SIZE_FIELD_NUMBER;
- hash = (53 * hash) + getAggregatedPayloadSize();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse 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.testing.integration.Messages.StreamingInputCallResponse parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse 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.testing.integration.Messages.StreamingInputCallResponse parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse 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.testing.integration.Messages.StreamingInputCallResponse parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse 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.testing.integration.Messages.StreamingInputCallResponse prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Client-streaming response.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingInputCallResponse}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.StreamingInputCallResponse)
- io.grpc.testing.integration.Messages.StreamingInputCallResponseOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingInputCallResponse.class, io.grpc.testing.integration.Messages.StreamingInputCallResponse.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.StreamingInputCallResponse.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();
- aggregatedPayloadSize_ = 0;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingInputCallResponse_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.StreamingInputCallResponse.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallResponse build() {
- io.grpc.testing.integration.Messages.StreamingInputCallResponse result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallResponse buildPartial() {
- io.grpc.testing.integration.Messages.StreamingInputCallResponse result = new io.grpc.testing.integration.Messages.StreamingInputCallResponse(this);
- result.aggregatedPayloadSize_ = aggregatedPayloadSize_;
- 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.testing.integration.Messages.StreamingInputCallResponse) {
- return mergeFrom((io.grpc.testing.integration.Messages.StreamingInputCallResponse)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.StreamingInputCallResponse other) {
- if (other == io.grpc.testing.integration.Messages.StreamingInputCallResponse.getDefaultInstance()) return this;
- if (other.getAggregatedPayloadSize() != 0) {
- setAggregatedPayloadSize(other.getAggregatedPayloadSize());
- }
- 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.testing.integration.Messages.StreamingInputCallResponse parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.StreamingInputCallResponse) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int aggregatedPayloadSize_ ;
- /**
- * <pre>
- * Aggregated size of payloads received from the client.
- * </pre>
- *
- * <code>int32 aggregated_payload_size = 1;</code>
- */
- public int getAggregatedPayloadSize() {
- return aggregatedPayloadSize_;
- }
- /**
- * <pre>
- * Aggregated size of payloads received from the client.
- * </pre>
- *
- * <code>int32 aggregated_payload_size = 1;</code>
- */
- public Builder setAggregatedPayloadSize(int value) {
-
- aggregatedPayloadSize_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Aggregated size of payloads received from the client.
- * </pre>
- *
- * <code>int32 aggregated_payload_size = 1;</code>
- */
- public Builder clearAggregatedPayloadSize() {
-
- aggregatedPayloadSize_ = 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:grpc.testing.StreamingInputCallResponse)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.StreamingInputCallResponse)
- private static final io.grpc.testing.integration.Messages.StreamingInputCallResponse DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingInputCallResponse();
- }
-
- public static io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<StreamingInputCallResponse>
- PARSER = new com.google.protobuf.AbstractParser<StreamingInputCallResponse>() {
- public StreamingInputCallResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingInputCallResponse(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<StreamingInputCallResponse> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingInputCallResponse> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ResponseParametersOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.ResponseParameters)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Desired payload sizes in responses from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 size = 1;</code>
- */
- int getSize();
-
- /**
- * <pre>
- * Desired interval between consecutive responses in the response stream in
- * microseconds.
- * </pre>
- *
- * <code>int32 interval_us = 2;</code>
- */
- int getIntervalUs();
- }
- /**
- * <pre>
- * Configuration for a particular response.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.ResponseParameters}
- */
- public static final class ResponseParameters extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.ResponseParameters)
- ResponseParametersOrBuilder {
- // Use ResponseParameters.newBuilder() to construct.
- private ResponseParameters(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private ResponseParameters() {
- size_ = 0;
- intervalUs_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ResponseParameters(
- 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: {
-
- size_ = input.readInt32();
- break;
- }
- case 16: {
-
- intervalUs_ = 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 io.grpc.testing.integration.Messages.internal_static_grpc_testing_ResponseParameters_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ResponseParameters_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.ResponseParameters.class, io.grpc.testing.integration.Messages.ResponseParameters.Builder.class);
- }
-
- public static final int SIZE_FIELD_NUMBER = 1;
- private int size_;
- /**
- * <pre>
- * Desired payload sizes in responses from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 size = 1;</code>
- */
- public int getSize() {
- return size_;
- }
-
- public static final int INTERVAL_US_FIELD_NUMBER = 2;
- private int intervalUs_;
- /**
- * <pre>
- * Desired interval between consecutive responses in the response stream in
- * microseconds.
- * </pre>
- *
- * <code>int32 interval_us = 2;</code>
- */
- public int getIntervalUs() {
- return intervalUs_;
- }
-
- 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 (size_ != 0) {
- output.writeInt32(1, size_);
- }
- if (intervalUs_ != 0) {
- output.writeInt32(2, intervalUs_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (size_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, size_);
- }
- if (intervalUs_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(2, intervalUs_);
- }
- 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.testing.integration.Messages.ResponseParameters)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.ResponseParameters other = (io.grpc.testing.integration.Messages.ResponseParameters) obj;
-
- boolean result = true;
- result = result && (getSize()
- == other.getSize());
- result = result && (getIntervalUs()
- == other.getIntervalUs());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + SIZE_FIELD_NUMBER;
- hash = (53 * hash) + getSize();
- hash = (37 * hash) + INTERVAL_US_FIELD_NUMBER;
- hash = (53 * hash) + getIntervalUs();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters 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.testing.integration.Messages.ResponseParameters parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters 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.testing.integration.Messages.ResponseParameters parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters 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.testing.integration.Messages.ResponseParameters parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ResponseParameters 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.testing.integration.Messages.ResponseParameters prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Configuration for a particular response.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.ResponseParameters}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.ResponseParameters)
- io.grpc.testing.integration.Messages.ResponseParametersOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ResponseParameters_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ResponseParameters_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.ResponseParameters.class, io.grpc.testing.integration.Messages.ResponseParameters.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.ResponseParameters.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();
- size_ = 0;
-
- intervalUs_ = 0;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ResponseParameters_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.ResponseParameters.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.ResponseParameters build() {
- io.grpc.testing.integration.Messages.ResponseParameters result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.ResponseParameters buildPartial() {
- io.grpc.testing.integration.Messages.ResponseParameters result = new io.grpc.testing.integration.Messages.ResponseParameters(this);
- result.size_ = size_;
- result.intervalUs_ = intervalUs_;
- 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.testing.integration.Messages.ResponseParameters) {
- return mergeFrom((io.grpc.testing.integration.Messages.ResponseParameters)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.ResponseParameters other) {
- if (other == io.grpc.testing.integration.Messages.ResponseParameters.getDefaultInstance()) return this;
- if (other.getSize() != 0) {
- setSize(other.getSize());
- }
- if (other.getIntervalUs() != 0) {
- setIntervalUs(other.getIntervalUs());
- }
- 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.testing.integration.Messages.ResponseParameters parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.ResponseParameters) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int size_ ;
- /**
- * <pre>
- * Desired payload sizes in responses from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 size = 1;</code>
- */
- public int getSize() {
- return size_;
- }
- /**
- * <pre>
- * Desired payload sizes in responses from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 size = 1;</code>
- */
- public Builder setSize(int value) {
-
- size_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired payload sizes in responses from the server.
- * If response_type is COMPRESSABLE, this denotes the size before compression.
- * </pre>
- *
- * <code>int32 size = 1;</code>
- */
- public Builder clearSize() {
-
- size_ = 0;
- onChanged();
- return this;
- }
-
- private int intervalUs_ ;
- /**
- * <pre>
- * Desired interval between consecutive responses in the response stream in
- * microseconds.
- * </pre>
- *
- * <code>int32 interval_us = 2;</code>
- */
- public int getIntervalUs() {
- return intervalUs_;
- }
- /**
- * <pre>
- * Desired interval between consecutive responses in the response stream in
- * microseconds.
- * </pre>
- *
- * <code>int32 interval_us = 2;</code>
- */
- public Builder setIntervalUs(int value) {
-
- intervalUs_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired interval between consecutive responses in the response stream in
- * microseconds.
- * </pre>
- *
- * <code>int32 interval_us = 2;</code>
- */
- public Builder clearIntervalUs() {
-
- intervalUs_ = 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:grpc.testing.ResponseParameters)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.ResponseParameters)
- private static final io.grpc.testing.integration.Messages.ResponseParameters DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.ResponseParameters();
- }
-
- public static io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<ResponseParameters>
- PARSER = new com.google.protobuf.AbstractParser<ResponseParameters>() {
- public ResponseParameters parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ResponseParameters(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<ResponseParameters> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<ResponseParameters> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface StreamingOutputCallRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingOutputCallRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- int getResponseTypeValue();
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- io.grpc.testing.integration.Messages.PayloadType getResponseType();
-
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- java.util.List<io.grpc.testing.integration.Messages.ResponseParameters>
- getResponseParametersList();
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- io.grpc.testing.integration.Messages.ResponseParameters getResponseParameters(int index);
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- int getResponseParametersCount();
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- java.util.List<? extends io.grpc.testing.integration.Messages.ResponseParametersOrBuilder>
- getResponseParametersOrBuilderList();
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- io.grpc.testing.integration.Messages.ResponseParametersOrBuilder getResponseParametersOrBuilder(
- int index);
-
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- boolean hasPayload();
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- io.grpc.testing.integration.Messages.Payload getPayload();
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder();
-
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- int getResponseCompressionValue();
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- io.grpc.testing.integration.Messages.CompressionType getResponseCompression();
-
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- boolean hasResponseStatus();
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- io.grpc.testing.integration.Messages.EchoStatus getResponseStatus();
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- io.grpc.testing.integration.Messages.EchoStatusOrBuilder getResponseStatusOrBuilder();
- }
- /**
- * <pre>
- * Server-streaming request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingOutputCallRequest}
- */
- public static final class StreamingOutputCallRequest extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.StreamingOutputCallRequest)
- StreamingOutputCallRequestOrBuilder {
- // Use StreamingOutputCallRequest.newBuilder() to construct.
- private StreamingOutputCallRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private StreamingOutputCallRequest() {
- responseType_ = 0;
- responseParameters_ = java.util.Collections.emptyList();
- responseCompression_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private StreamingOutputCallRequest(
- 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: {
- int rawValue = input.readEnum();
-
- responseType_ = rawValue;
- break;
- }
- case 18: {
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- responseParameters_ = new java.util.ArrayList<io.grpc.testing.integration.Messages.ResponseParameters>();
- mutable_bitField0_ |= 0x00000002;
- }
- responseParameters_.add(
- input.readMessage(io.grpc.testing.integration.Messages.ResponseParameters.parser(), extensionRegistry));
- break;
- }
- case 26: {
- io.grpc.testing.integration.Messages.Payload.Builder subBuilder = null;
- if (payload_ != null) {
- subBuilder = payload_.toBuilder();
- }
- payload_ = input.readMessage(io.grpc.testing.integration.Messages.Payload.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(payload_);
- payload_ = subBuilder.buildPartial();
- }
-
- break;
- }
- case 48: {
- int rawValue = input.readEnum();
-
- responseCompression_ = rawValue;
- break;
- }
- case 58: {
- io.grpc.testing.integration.Messages.EchoStatus.Builder subBuilder = null;
- if (responseStatus_ != null) {
- subBuilder = responseStatus_.toBuilder();
- }
- responseStatus_ = input.readMessage(io.grpc.testing.integration.Messages.EchoStatus.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(responseStatus_);
- responseStatus_ = 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_ & 0x00000002) == 0x00000002)) {
- responseParameters_ = java.util.Collections.unmodifiableList(responseParameters_);
- }
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class, io.grpc.testing.integration.Messages.StreamingOutputCallRequest.Builder.class);
- }
-
- private int bitField0_;
- public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
- private int responseType_;
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public int getResponseTypeValue() {
- return responseType_;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadType getResponseType() {
- io.grpc.testing.integration.Messages.PayloadType result = io.grpc.testing.integration.Messages.PayloadType.valueOf(responseType_);
- return result == null ? io.grpc.testing.integration.Messages.PayloadType.UNRECOGNIZED : result;
- }
-
- public static final int RESPONSE_PARAMETERS_FIELD_NUMBER = 2;
- private java.util.List<io.grpc.testing.integration.Messages.ResponseParameters> responseParameters_;
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public java.util.List<io.grpc.testing.integration.Messages.ResponseParameters> getResponseParametersList() {
- return responseParameters_;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public java.util.List<? extends io.grpc.testing.integration.Messages.ResponseParametersOrBuilder>
- getResponseParametersOrBuilderList() {
- return responseParameters_;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public int getResponseParametersCount() {
- return responseParameters_.size();
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParameters getResponseParameters(int index) {
- return responseParameters_.get(index);
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParametersOrBuilder getResponseParametersOrBuilder(
- int index) {
- return responseParameters_.get(index);
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 3;
- private io.grpc.testing.integration.Messages.Payload payload_;
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public boolean hasPayload() {
- return payload_ != null;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- return getPayload();
- }
-
- public static final int RESPONSE_COMPRESSION_FIELD_NUMBER = 6;
- private int responseCompression_;
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public int getResponseCompressionValue() {
- return responseCompression_;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public io.grpc.testing.integration.Messages.CompressionType getResponseCompression() {
- io.grpc.testing.integration.Messages.CompressionType result = io.grpc.testing.integration.Messages.CompressionType.valueOf(responseCompression_);
- return result == null ? io.grpc.testing.integration.Messages.CompressionType.UNRECOGNIZED : result;
- }
-
- public static final int RESPONSE_STATUS_FIELD_NUMBER = 7;
- private io.grpc.testing.integration.Messages.EchoStatus responseStatus_;
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public boolean hasResponseStatus() {
- return responseStatus_ != null;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatus getResponseStatus() {
- return responseStatus_ == null ? io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance() : responseStatus_;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatusOrBuilder getResponseStatusOrBuilder() {
- return getResponseStatus();
- }
-
- 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 (responseType_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
- output.writeEnum(1, responseType_);
- }
- for (int i = 0; i < responseParameters_.size(); i++) {
- output.writeMessage(2, responseParameters_.get(i));
- }
- if (payload_ != null) {
- output.writeMessage(3, getPayload());
- }
- if (responseCompression_ != io.grpc.testing.integration.Messages.CompressionType.NONE.getNumber()) {
- output.writeEnum(6, responseCompression_);
- }
- if (responseStatus_ != null) {
- output.writeMessage(7, getResponseStatus());
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (responseType_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(1, responseType_);
- }
- for (int i = 0; i < responseParameters_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, responseParameters_.get(i));
- }
- if (payload_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, getPayload());
- }
- if (responseCompression_ != io.grpc.testing.integration.Messages.CompressionType.NONE.getNumber()) {
- size += com.google.protobuf.CodedOutputStream
- .computeEnumSize(6, responseCompression_);
- }
- if (responseStatus_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(7, getResponseStatus());
- }
- 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.testing.integration.Messages.StreamingOutputCallRequest)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest other = (io.grpc.testing.integration.Messages.StreamingOutputCallRequest) obj;
-
- boolean result = true;
- result = result && responseType_ == other.responseType_;
- result = result && getResponseParametersList()
- .equals(other.getResponseParametersList());
- result = result && (hasPayload() == other.hasPayload());
- if (hasPayload()) {
- result = result && getPayload()
- .equals(other.getPayload());
- }
- result = result && responseCompression_ == other.responseCompression_;
- result = result && (hasResponseStatus() == other.hasResponseStatus());
- if (hasResponseStatus()) {
- result = result && getResponseStatus()
- .equals(other.getResponseStatus());
- }
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + RESPONSE_TYPE_FIELD_NUMBER;
- hash = (53 * hash) + responseType_;
- if (getResponseParametersCount() > 0) {
- hash = (37 * hash) + RESPONSE_PARAMETERS_FIELD_NUMBER;
- hash = (53 * hash) + getResponseParametersList().hashCode();
- }
- if (hasPayload()) {
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- }
- hash = (37 * hash) + RESPONSE_COMPRESSION_FIELD_NUMBER;
- hash = (53 * hash) + responseCompression_;
- if (hasResponseStatus()) {
- hash = (37 * hash) + RESPONSE_STATUS_FIELD_NUMBER;
- hash = (53 * hash) + getResponseStatus().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest 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.testing.integration.Messages.StreamingOutputCallRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest 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.testing.integration.Messages.StreamingOutputCallRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest 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.testing.integration.Messages.StreamingOutputCallRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest 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.testing.integration.Messages.StreamingOutputCallRequest prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Server-streaming request.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingOutputCallRequest}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.StreamingOutputCallRequest)
- io.grpc.testing.integration.Messages.StreamingOutputCallRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class, io.grpc.testing.integration.Messages.StreamingOutputCallRequest.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.StreamingOutputCallRequest.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getResponseParametersFieldBuilder();
- }
- }
- public Builder clear() {
- super.clear();
- responseType_ = 0;
-
- if (responseParametersBuilder_ == null) {
- responseParameters_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- responseParametersBuilder_.clear();
- }
- if (payloadBuilder_ == null) {
- payload_ = null;
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
- responseCompression_ = 0;
-
- if (responseStatusBuilder_ == null) {
- responseStatus_ = null;
- } else {
- responseStatus_ = null;
- responseStatusBuilder_ = null;
- }
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallRequest_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallRequest build() {
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallRequest buildPartial() {
- io.grpc.testing.integration.Messages.StreamingOutputCallRequest result = new io.grpc.testing.integration.Messages.StreamingOutputCallRequest(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- result.responseType_ = responseType_;
- if (responseParametersBuilder_ == null) {
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- responseParameters_ = java.util.Collections.unmodifiableList(responseParameters_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.responseParameters_ = responseParameters_;
- } else {
- result.responseParameters_ = responseParametersBuilder_.build();
- }
- if (payloadBuilder_ == null) {
- result.payload_ = payload_;
- } else {
- result.payload_ = payloadBuilder_.build();
- }
- result.responseCompression_ = responseCompression_;
- if (responseStatusBuilder_ == null) {
- result.responseStatus_ = responseStatus_;
- } else {
- result.responseStatus_ = responseStatusBuilder_.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 io.grpc.testing.integration.Messages.StreamingOutputCallRequest) {
- return mergeFrom((io.grpc.testing.integration.Messages.StreamingOutputCallRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.StreamingOutputCallRequest other) {
- if (other == io.grpc.testing.integration.Messages.StreamingOutputCallRequest.getDefaultInstance()) return this;
- if (other.responseType_ != 0) {
- setResponseTypeValue(other.getResponseTypeValue());
- }
- if (responseParametersBuilder_ == null) {
- if (!other.responseParameters_.isEmpty()) {
- if (responseParameters_.isEmpty()) {
- responseParameters_ = other.responseParameters_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureResponseParametersIsMutable();
- responseParameters_.addAll(other.responseParameters_);
- }
- onChanged();
- }
- } else {
- if (!other.responseParameters_.isEmpty()) {
- if (responseParametersBuilder_.isEmpty()) {
- responseParametersBuilder_.dispose();
- responseParametersBuilder_ = null;
- responseParameters_ = other.responseParameters_;
- bitField0_ = (bitField0_ & ~0x00000002);
- responseParametersBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getResponseParametersFieldBuilder() : null;
- } else {
- responseParametersBuilder_.addAllMessages(other.responseParameters_);
- }
- }
- }
- if (other.hasPayload()) {
- mergePayload(other.getPayload());
- }
- if (other.responseCompression_ != 0) {
- setResponseCompressionValue(other.getResponseCompressionValue());
- }
- if (other.hasResponseStatus()) {
- mergeResponseStatus(other.getResponseStatus());
- }
- 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.testing.integration.Messages.StreamingOutputCallRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.StreamingOutputCallRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private int responseType_ = 0;
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public int getResponseTypeValue() {
- return responseType_;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public Builder setResponseTypeValue(int value) {
- responseType_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadType getResponseType() {
- io.grpc.testing.integration.Messages.PayloadType result = io.grpc.testing.integration.Messages.PayloadType.valueOf(responseType_);
- return result == null ? io.grpc.testing.integration.Messages.PayloadType.UNRECOGNIZED : result;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public Builder setResponseType(io.grpc.testing.integration.Messages.PayloadType value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- responseType_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Desired payload type in the response from the server.
- * If response_type is RANDOM, the payload from each response in the stream
- * might be of different types. This is to simulate a mixed type of payload
- * stream.
- * </pre>
- *
- * <code>.grpc.testing.PayloadType response_type = 1;</code>
- */
- public Builder clearResponseType() {
-
- responseType_ = 0;
- onChanged();
- return this;
- }
-
- private java.util.List<io.grpc.testing.integration.Messages.ResponseParameters> responseParameters_ =
- java.util.Collections.emptyList();
- private void ensureResponseParametersIsMutable() {
- if (!((bitField0_ & 0x00000002) == 0x00000002)) {
- responseParameters_ = new java.util.ArrayList<io.grpc.testing.integration.Messages.ResponseParameters>(responseParameters_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- io.grpc.testing.integration.Messages.ResponseParameters, io.grpc.testing.integration.Messages.ResponseParameters.Builder, io.grpc.testing.integration.Messages.ResponseParametersOrBuilder> responseParametersBuilder_;
-
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public java.util.List<io.grpc.testing.integration.Messages.ResponseParameters> getResponseParametersList() {
- if (responseParametersBuilder_ == null) {
- return java.util.Collections.unmodifiableList(responseParameters_);
- } else {
- return responseParametersBuilder_.getMessageList();
- }
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public int getResponseParametersCount() {
- if (responseParametersBuilder_ == null) {
- return responseParameters_.size();
- } else {
- return responseParametersBuilder_.getCount();
- }
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParameters getResponseParameters(int index) {
- if (responseParametersBuilder_ == null) {
- return responseParameters_.get(index);
- } else {
- return responseParametersBuilder_.getMessage(index);
- }
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder setResponseParameters(
- int index, io.grpc.testing.integration.Messages.ResponseParameters value) {
- if (responseParametersBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureResponseParametersIsMutable();
- responseParameters_.set(index, value);
- onChanged();
- } else {
- responseParametersBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder setResponseParameters(
- int index, io.grpc.testing.integration.Messages.ResponseParameters.Builder builderForValue) {
- if (responseParametersBuilder_ == null) {
- ensureResponseParametersIsMutable();
- responseParameters_.set(index, builderForValue.build());
- onChanged();
- } else {
- responseParametersBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder addResponseParameters(io.grpc.testing.integration.Messages.ResponseParameters value) {
- if (responseParametersBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureResponseParametersIsMutable();
- responseParameters_.add(value);
- onChanged();
- } else {
- responseParametersBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder addResponseParameters(
- int index, io.grpc.testing.integration.Messages.ResponseParameters value) {
- if (responseParametersBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureResponseParametersIsMutable();
- responseParameters_.add(index, value);
- onChanged();
- } else {
- responseParametersBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder addResponseParameters(
- io.grpc.testing.integration.Messages.ResponseParameters.Builder builderForValue) {
- if (responseParametersBuilder_ == null) {
- ensureResponseParametersIsMutable();
- responseParameters_.add(builderForValue.build());
- onChanged();
- } else {
- responseParametersBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder addResponseParameters(
- int index, io.grpc.testing.integration.Messages.ResponseParameters.Builder builderForValue) {
- if (responseParametersBuilder_ == null) {
- ensureResponseParametersIsMutable();
- responseParameters_.add(index, builderForValue.build());
- onChanged();
- } else {
- responseParametersBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder addAllResponseParameters(
- java.lang.Iterable<? extends io.grpc.testing.integration.Messages.ResponseParameters> values) {
- if (responseParametersBuilder_ == null) {
- ensureResponseParametersIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, responseParameters_);
- onChanged();
- } else {
- responseParametersBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder clearResponseParameters() {
- if (responseParametersBuilder_ == null) {
- responseParameters_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- responseParametersBuilder_.clear();
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public Builder removeResponseParameters(int index) {
- if (responseParametersBuilder_ == null) {
- ensureResponseParametersIsMutable();
- responseParameters_.remove(index);
- onChanged();
- } else {
- responseParametersBuilder_.remove(index);
- }
- return this;
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParameters.Builder getResponseParametersBuilder(
- int index) {
- return getResponseParametersFieldBuilder().getBuilder(index);
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParametersOrBuilder getResponseParametersOrBuilder(
- int index) {
- if (responseParametersBuilder_ == null) {
- return responseParameters_.get(index); } else {
- return responseParametersBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public java.util.List<? extends io.grpc.testing.integration.Messages.ResponseParametersOrBuilder>
- getResponseParametersOrBuilderList() {
- if (responseParametersBuilder_ != null) {
- return responseParametersBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(responseParameters_);
- }
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParameters.Builder addResponseParametersBuilder() {
- return getResponseParametersFieldBuilder().addBuilder(
- io.grpc.testing.integration.Messages.ResponseParameters.getDefaultInstance());
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public io.grpc.testing.integration.Messages.ResponseParameters.Builder addResponseParametersBuilder(
- int index) {
- return getResponseParametersFieldBuilder().addBuilder(
- index, io.grpc.testing.integration.Messages.ResponseParameters.getDefaultInstance());
- }
- /**
- * <pre>
- * Configuration for each expected response message.
- * </pre>
- *
- * <code>repeated .grpc.testing.ResponseParameters response_parameters = 2;</code>
- */
- public java.util.List<io.grpc.testing.integration.Messages.ResponseParameters.Builder>
- getResponseParametersBuilderList() {
- return getResponseParametersFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- io.grpc.testing.integration.Messages.ResponseParameters, io.grpc.testing.integration.Messages.ResponseParameters.Builder, io.grpc.testing.integration.Messages.ResponseParametersOrBuilder>
- getResponseParametersFieldBuilder() {
- if (responseParametersBuilder_ == null) {
- responseParametersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- io.grpc.testing.integration.Messages.ResponseParameters, io.grpc.testing.integration.Messages.ResponseParameters.Builder, io.grpc.testing.integration.Messages.ResponseParametersOrBuilder>(
- responseParameters_,
- ((bitField0_ & 0x00000002) == 0x00000002),
- getParentForChildren(),
- isClean());
- responseParameters_ = null;
- }
- return responseParametersBuilder_;
- }
-
- private io.grpc.testing.integration.Messages.Payload payload_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_;
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public boolean hasPayload() {
- return payloadBuilder_ != null || payload_ != null;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- if (payloadBuilder_ == null) {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- } else {
- return payloadBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder setPayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- payload_ = value;
- onChanged();
- } else {
- payloadBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder setPayload(
- io.grpc.testing.integration.Messages.Payload.Builder builderForValue) {
- if (payloadBuilder_ == null) {
- payload_ = builderForValue.build();
- onChanged();
- } else {
- payloadBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder mergePayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (payload_ != null) {
- payload_ =
- io.grpc.testing.integration.Messages.Payload.newBuilder(payload_).mergeFrom(value).buildPartial();
- } else {
- payload_ = value;
- }
- onChanged();
- } else {
- payloadBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public Builder clearPayload() {
- if (payloadBuilder_ == null) {
- payload_ = null;
- onChanged();
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() {
-
- onChanged();
- return getPayloadFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- if (payloadBuilder_ != null) {
- return payloadBuilder_.getMessageOrBuilder();
- } else {
- return payload_ == null ?
- io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- }
- /**
- * <pre>
- * Optional input payload sent along with the request.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 3;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>
- getPayloadFieldBuilder() {
- if (payloadBuilder_ == null) {
- payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>(
- getPayload(),
- getParentForChildren(),
- isClean());
- payload_ = null;
- }
- return payloadBuilder_;
- }
-
- private int responseCompression_ = 0;
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public int getResponseCompressionValue() {
- return responseCompression_;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public Builder setResponseCompressionValue(int value) {
- responseCompression_ = value;
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public io.grpc.testing.integration.Messages.CompressionType getResponseCompression() {
- io.grpc.testing.integration.Messages.CompressionType result = io.grpc.testing.integration.Messages.CompressionType.valueOf(responseCompression_);
- return result == null ? io.grpc.testing.integration.Messages.CompressionType.UNRECOGNIZED : result;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public Builder setResponseCompression(io.grpc.testing.integration.Messages.CompressionType value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- responseCompression_ = value.getNumber();
- onChanged();
- return this;
- }
- /**
- * <pre>
- * Compression algorithm to be used by the server for the response (stream)
- * </pre>
- *
- * <code>.grpc.testing.CompressionType response_compression = 6;</code>
- */
- public Builder clearResponseCompression() {
-
- responseCompression_ = 0;
- onChanged();
- return this;
- }
-
- private io.grpc.testing.integration.Messages.EchoStatus responseStatus_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.EchoStatus, io.grpc.testing.integration.Messages.EchoStatus.Builder, io.grpc.testing.integration.Messages.EchoStatusOrBuilder> responseStatusBuilder_;
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public boolean hasResponseStatus() {
- return responseStatusBuilder_ != null || responseStatus_ != null;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatus getResponseStatus() {
- if (responseStatusBuilder_ == null) {
- return responseStatus_ == null ? io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance() : responseStatus_;
- } else {
- return responseStatusBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder setResponseStatus(io.grpc.testing.integration.Messages.EchoStatus value) {
- if (responseStatusBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- responseStatus_ = value;
- onChanged();
- } else {
- responseStatusBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder setResponseStatus(
- io.grpc.testing.integration.Messages.EchoStatus.Builder builderForValue) {
- if (responseStatusBuilder_ == null) {
- responseStatus_ = builderForValue.build();
- onChanged();
- } else {
- responseStatusBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder mergeResponseStatus(io.grpc.testing.integration.Messages.EchoStatus value) {
- if (responseStatusBuilder_ == null) {
- if (responseStatus_ != null) {
- responseStatus_ =
- io.grpc.testing.integration.Messages.EchoStatus.newBuilder(responseStatus_).mergeFrom(value).buildPartial();
- } else {
- responseStatus_ = value;
- }
- onChanged();
- } else {
- responseStatusBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public Builder clearResponseStatus() {
- if (responseStatusBuilder_ == null) {
- responseStatus_ = null;
- onChanged();
- } else {
- responseStatus_ = null;
- responseStatusBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatus.Builder getResponseStatusBuilder() {
-
- onChanged();
- return getResponseStatusFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- public io.grpc.testing.integration.Messages.EchoStatusOrBuilder getResponseStatusOrBuilder() {
- if (responseStatusBuilder_ != null) {
- return responseStatusBuilder_.getMessageOrBuilder();
- } else {
- return responseStatus_ == null ?
- io.grpc.testing.integration.Messages.EchoStatus.getDefaultInstance() : responseStatus_;
- }
- }
- /**
- * <pre>
- * Whether server should return a given status
- * </pre>
- *
- * <code>.grpc.testing.EchoStatus response_status = 7;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.EchoStatus, io.grpc.testing.integration.Messages.EchoStatus.Builder, io.grpc.testing.integration.Messages.EchoStatusOrBuilder>
- getResponseStatusFieldBuilder() {
- if (responseStatusBuilder_ == null) {
- responseStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.EchoStatus, io.grpc.testing.integration.Messages.EchoStatus.Builder, io.grpc.testing.integration.Messages.EchoStatusOrBuilder>(
- getResponseStatus(),
- getParentForChildren(),
- isClean());
- responseStatus_ = null;
- }
- return responseStatusBuilder_;
- }
- 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.testing.StreamingOutputCallRequest)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallRequest)
- private static final io.grpc.testing.integration.Messages.StreamingOutputCallRequest DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingOutputCallRequest();
- }
-
- public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<StreamingOutputCallRequest>
- PARSER = new com.google.protobuf.AbstractParser<StreamingOutputCallRequest>() {
- public StreamingOutputCallRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingOutputCallRequest(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<StreamingOutputCallRequest> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingOutputCallRequest> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface StreamingOutputCallResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingOutputCallResponse)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- boolean hasPayload();
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- io.grpc.testing.integration.Messages.Payload getPayload();
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder();
- }
- /**
- * <pre>
- * Server-streaming response, as configured by the request and parameters.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingOutputCallResponse}
- */
- public static final class StreamingOutputCallResponse extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.StreamingOutputCallResponse)
- StreamingOutputCallResponseOrBuilder {
- // Use StreamingOutputCallResponse.newBuilder() to construct.
- private StreamingOutputCallResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private StreamingOutputCallResponse() {
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private StreamingOutputCallResponse(
- 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.testing.integration.Messages.Payload.Builder subBuilder = null;
- if (payload_ != null) {
- subBuilder = payload_.toBuilder();
- }
- payload_ = input.readMessage(io.grpc.testing.integration.Messages.Payload.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(payload_);
- payload_ = 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.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class, io.grpc.testing.integration.Messages.StreamingOutputCallResponse.Builder.class);
- }
-
- public static final int PAYLOAD_FIELD_NUMBER = 1;
- private io.grpc.testing.integration.Messages.Payload payload_;
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public boolean hasPayload() {
- return payload_ != null;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- return getPayload();
- }
-
- 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 (payload_ != null) {
- output.writeMessage(1, getPayload());
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (payload_ != null) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getPayload());
- }
- 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.testing.integration.Messages.StreamingOutputCallResponse)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse other = (io.grpc.testing.integration.Messages.StreamingOutputCallResponse) obj;
-
- boolean result = true;
- result = result && (hasPayload() == other.hasPayload());
- if (hasPayload()) {
- result = result && getPayload()
- .equals(other.getPayload());
- }
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasPayload()) {
- hash = (37 * hash) + PAYLOAD_FIELD_NUMBER;
- hash = (53 * hash) + getPayload().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse 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.testing.integration.Messages.StreamingOutputCallResponse parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse 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.testing.integration.Messages.StreamingOutputCallResponse parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse 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.testing.integration.Messages.StreamingOutputCallResponse parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse 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.testing.integration.Messages.StreamingOutputCallResponse prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Server-streaming response, as configured by the request and parameters.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.StreamingOutputCallResponse}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.StreamingOutputCallResponse)
- io.grpc.testing.integration.Messages.StreamingOutputCallResponseOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class, io.grpc.testing.integration.Messages.StreamingOutputCallResponse.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.StreamingOutputCallResponse.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 (payloadBuilder_ == null) {
- payload_ = null;
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_StreamingOutputCallResponse_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallResponse build() {
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallResponse buildPartial() {
- io.grpc.testing.integration.Messages.StreamingOutputCallResponse result = new io.grpc.testing.integration.Messages.StreamingOutputCallResponse(this);
- if (payloadBuilder_ == null) {
- result.payload_ = payload_;
- } else {
- result.payload_ = payloadBuilder_.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.testing.integration.Messages.StreamingOutputCallResponse) {
- return mergeFrom((io.grpc.testing.integration.Messages.StreamingOutputCallResponse)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.StreamingOutputCallResponse other) {
- if (other == io.grpc.testing.integration.Messages.StreamingOutputCallResponse.getDefaultInstance()) return this;
- if (other.hasPayload()) {
- mergePayload(other.getPayload());
- }
- 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.testing.integration.Messages.StreamingOutputCallResponse parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.StreamingOutputCallResponse) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private io.grpc.testing.integration.Messages.Payload payload_ = null;
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_;
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public boolean hasPayload() {
- return payloadBuilder_ != null || payload_ != null;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload getPayload() {
- if (payloadBuilder_ == null) {
- return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- } else {
- return payloadBuilder_.getMessage();
- }
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder setPayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- payload_ = value;
- onChanged();
- } else {
- payloadBuilder_.setMessage(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder setPayload(
- io.grpc.testing.integration.Messages.Payload.Builder builderForValue) {
- if (payloadBuilder_ == null) {
- payload_ = builderForValue.build();
- onChanged();
- } else {
- payloadBuilder_.setMessage(builderForValue.build());
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder mergePayload(io.grpc.testing.integration.Messages.Payload value) {
- if (payloadBuilder_ == null) {
- if (payload_ != null) {
- payload_ =
- io.grpc.testing.integration.Messages.Payload.newBuilder(payload_).mergeFrom(value).buildPartial();
- } else {
- payload_ = value;
- }
- onChanged();
- } else {
- payloadBuilder_.mergeFrom(value);
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public Builder clearPayload() {
- if (payloadBuilder_ == null) {
- payload_ = null;
- onChanged();
- } else {
- payload_ = null;
- payloadBuilder_ = null;
- }
-
- return this;
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() {
-
- onChanged();
- return getPayloadFieldBuilder().getBuilder();
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() {
- if (payloadBuilder_ != null) {
- return payloadBuilder_.getMessageOrBuilder();
- } else {
- return payload_ == null ?
- io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_;
- }
- }
- /**
- * <pre>
- * Payload to increase response size.
- * </pre>
- *
- * <code>.grpc.testing.Payload payload = 1;</code>
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>
- getPayloadFieldBuilder() {
- if (payloadBuilder_ == null) {
- payloadBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder>(
- getPayload(),
- getParentForChildren(),
- isClean());
- payload_ = null;
- }
- return payloadBuilder_;
- }
- 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.testing.StreamingOutputCallResponse)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallResponse)
- private static final io.grpc.testing.integration.Messages.StreamingOutputCallResponse DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingOutputCallResponse();
- }
-
- public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<StreamingOutputCallResponse>
- PARSER = new com.google.protobuf.AbstractParser<StreamingOutputCallResponse>() {
- public StreamingOutputCallResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingOutputCallResponse(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<StreamingOutputCallResponse> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingOutputCallResponse> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ReconnectParamsOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.ReconnectParams)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>int32 max_reconnect_backoff_ms = 1;</code>
- */
- int getMaxReconnectBackoffMs();
- }
- /**
- * <pre>
- * For reconnect interop test only.
- * Client tells server what reconnection parameters it used.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.ReconnectParams}
- */
- public static final class ReconnectParams extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.ReconnectParams)
- ReconnectParamsOrBuilder {
- // Use ReconnectParams.newBuilder() to construct.
- private ReconnectParams(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private ReconnectParams() {
- maxReconnectBackoffMs_ = 0;
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ReconnectParams(
- 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: {
-
- maxReconnectBackoffMs_ = 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 io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectParams_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectParams_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.ReconnectParams.class, io.grpc.testing.integration.Messages.ReconnectParams.Builder.class);
- }
-
- public static final int MAX_RECONNECT_BACKOFF_MS_FIELD_NUMBER = 1;
- private int maxReconnectBackoffMs_;
- /**
- * <code>int32 max_reconnect_backoff_ms = 1;</code>
- */
- public int getMaxReconnectBackoffMs() {
- return maxReconnectBackoffMs_;
- }
-
- 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 (maxReconnectBackoffMs_ != 0) {
- output.writeInt32(1, maxReconnectBackoffMs_);
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (maxReconnectBackoffMs_ != 0) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, maxReconnectBackoffMs_);
- }
- 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.testing.integration.Messages.ReconnectParams)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.ReconnectParams other = (io.grpc.testing.integration.Messages.ReconnectParams) obj;
-
- boolean result = true;
- result = result && (getMaxReconnectBackoffMs()
- == other.getMaxReconnectBackoffMs());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + MAX_RECONNECT_BACKOFF_MS_FIELD_NUMBER;
- hash = (53 * hash) + getMaxReconnectBackoffMs();
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.ReconnectParams parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams 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.testing.integration.Messages.ReconnectParams parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams 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.testing.integration.Messages.ReconnectParams parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams 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.testing.integration.Messages.ReconnectParams parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ReconnectParams 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.testing.integration.Messages.ReconnectParams prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * For reconnect interop test only.
- * Client tells server what reconnection parameters it used.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.ReconnectParams}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.ReconnectParams)
- io.grpc.testing.integration.Messages.ReconnectParamsOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectParams_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectParams_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.ReconnectParams.class, io.grpc.testing.integration.Messages.ReconnectParams.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.ReconnectParams.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();
- maxReconnectBackoffMs_ = 0;
-
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectParams_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.ReconnectParams getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.ReconnectParams.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.ReconnectParams build() {
- io.grpc.testing.integration.Messages.ReconnectParams result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.ReconnectParams buildPartial() {
- io.grpc.testing.integration.Messages.ReconnectParams result = new io.grpc.testing.integration.Messages.ReconnectParams(this);
- result.maxReconnectBackoffMs_ = maxReconnectBackoffMs_;
- 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.testing.integration.Messages.ReconnectParams) {
- return mergeFrom((io.grpc.testing.integration.Messages.ReconnectParams)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.ReconnectParams other) {
- if (other == io.grpc.testing.integration.Messages.ReconnectParams.getDefaultInstance()) return this;
- if (other.getMaxReconnectBackoffMs() != 0) {
- setMaxReconnectBackoffMs(other.getMaxReconnectBackoffMs());
- }
- 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.testing.integration.Messages.ReconnectParams parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.ReconnectParams) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private int maxReconnectBackoffMs_ ;
- /**
- * <code>int32 max_reconnect_backoff_ms = 1;</code>
- */
- public int getMaxReconnectBackoffMs() {
- return maxReconnectBackoffMs_;
- }
- /**
- * <code>int32 max_reconnect_backoff_ms = 1;</code>
- */
- public Builder setMaxReconnectBackoffMs(int value) {
-
- maxReconnectBackoffMs_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>int32 max_reconnect_backoff_ms = 1;</code>
- */
- public Builder clearMaxReconnectBackoffMs() {
-
- maxReconnectBackoffMs_ = 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:grpc.testing.ReconnectParams)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.ReconnectParams)
- private static final io.grpc.testing.integration.Messages.ReconnectParams DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.ReconnectParams();
- }
-
- public static io.grpc.testing.integration.Messages.ReconnectParams getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<ReconnectParams>
- PARSER = new com.google.protobuf.AbstractParser<ReconnectParams>() {
- public ReconnectParams parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ReconnectParams(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<ReconnectParams> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<ReconnectParams> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.ReconnectParams getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ReconnectInfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.ReconnectInfo)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>bool passed = 1;</code>
- */
- boolean getPassed();
-
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- java.util.List<java.lang.Integer> getBackoffMsList();
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- int getBackoffMsCount();
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- int getBackoffMs(int index);
- }
- /**
- * <pre>
- * For reconnect interop test only.
- * Server tells client whether its reconnects are following the spec and the
- * reconnect backoffs it saw.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.ReconnectInfo}
- */
- public static final class ReconnectInfo extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.ReconnectInfo)
- ReconnectInfoOrBuilder {
- // Use ReconnectInfo.newBuilder() to construct.
- private ReconnectInfo(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private ReconnectInfo() {
- passed_ = false;
- backoffMs_ = java.util.Collections.emptyList();
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private ReconnectInfo(
- 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: {
-
- passed_ = input.readBool();
- break;
- }
- case 16: {
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
- backoffMs_ = new java.util.ArrayList<java.lang.Integer>();
- mutable_bitField0_ |= 0x00000002;
- }
- backoffMs_.add(input.readInt32());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) == 0x00000002) && input.getBytesUntilLimit() > 0) {
- backoffMs_ = new java.util.ArrayList<java.lang.Integer>();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- backoffMs_.add(input.readInt32());
- }
- 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_ & 0x00000002) == 0x00000002)) {
- backoffMs_ = java.util.Collections.unmodifiableList(backoffMs_);
- }
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectInfo_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.ReconnectInfo.class, io.grpc.testing.integration.Messages.ReconnectInfo.Builder.class);
- }
-
- private int bitField0_;
- public static final int PASSED_FIELD_NUMBER = 1;
- private boolean passed_;
- /**
- * <code>bool passed = 1;</code>
- */
- public boolean getPassed() {
- return passed_;
- }
-
- public static final int BACKOFF_MS_FIELD_NUMBER = 2;
- private java.util.List<java.lang.Integer> backoffMs_;
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public java.util.List<java.lang.Integer>
- getBackoffMsList() {
- return backoffMs_;
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public int getBackoffMsCount() {
- return backoffMs_.size();
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public int getBackoffMs(int index) {
- return backoffMs_.get(index);
- }
- private int backoffMsMemoizedSerializedSize = -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 (passed_ != false) {
- output.writeBool(1, passed_);
- }
- if (getBackoffMsList().size() > 0) {
- output.writeUInt32NoTag(18);
- output.writeUInt32NoTag(backoffMsMemoizedSerializedSize);
- }
- for (int i = 0; i < backoffMs_.size(); i++) {
- output.writeInt32NoTag(backoffMs_.get(i));
- }
- }
-
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (passed_ != false) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(1, passed_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < backoffMs_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(backoffMs_.get(i));
- }
- size += dataSize;
- if (!getBackoffMsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- backoffMsMemoizedSerializedSize = 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 io.grpc.testing.integration.Messages.ReconnectInfo)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Messages.ReconnectInfo other = (io.grpc.testing.integration.Messages.ReconnectInfo) obj;
-
- boolean result = true;
- result = result && (getPassed()
- == other.getPassed());
- result = result && getBackoffMsList()
- .equals(other.getBackoffMsList());
- return result;
- }
-
- @java.lang.Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- hash = (37 * hash) + PASSED_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getPassed());
- if (getBackoffMsCount() > 0) {
- hash = (37 * hash) + BACKOFF_MS_FIELD_NUMBER;
- hash = (53 * hash) + getBackoffMsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Messages.ReconnectInfo parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo 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.testing.integration.Messages.ReconnectInfo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo 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.testing.integration.Messages.ReconnectInfo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo 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.testing.integration.Messages.ReconnectInfo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Messages.ReconnectInfo 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.testing.integration.Messages.ReconnectInfo prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * For reconnect interop test only.
- * Server tells client whether its reconnects are following the spec and the
- * reconnect backoffs it saw.
- * </pre>
- *
- * Protobuf type {@code grpc.testing.ReconnectInfo}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.ReconnectInfo)
- io.grpc.testing.integration.Messages.ReconnectInfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectInfo_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Messages.ReconnectInfo.class, io.grpc.testing.integration.Messages.ReconnectInfo.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Messages.ReconnectInfo.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();
- passed_ = false;
-
- backoffMs_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Messages.internal_static_grpc_testing_ReconnectInfo_descriptor;
- }
-
- public io.grpc.testing.integration.Messages.ReconnectInfo getDefaultInstanceForType() {
- return io.grpc.testing.integration.Messages.ReconnectInfo.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Messages.ReconnectInfo build() {
- io.grpc.testing.integration.Messages.ReconnectInfo result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Messages.ReconnectInfo buildPartial() {
- io.grpc.testing.integration.Messages.ReconnectInfo result = new io.grpc.testing.integration.Messages.ReconnectInfo(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- result.passed_ = passed_;
- if (((bitField0_ & 0x00000002) == 0x00000002)) {
- backoffMs_ = java.util.Collections.unmodifiableList(backoffMs_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.backoffMs_ = backoffMs_;
- 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 io.grpc.testing.integration.Messages.ReconnectInfo) {
- return mergeFrom((io.grpc.testing.integration.Messages.ReconnectInfo)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Messages.ReconnectInfo other) {
- if (other == io.grpc.testing.integration.Messages.ReconnectInfo.getDefaultInstance()) return this;
- if (other.getPassed() != false) {
- setPassed(other.getPassed());
- }
- if (!other.backoffMs_.isEmpty()) {
- if (backoffMs_.isEmpty()) {
- backoffMs_ = other.backoffMs_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureBackoffMsIsMutable();
- backoffMs_.addAll(other.backoffMs_);
- }
- 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.testing.integration.Messages.ReconnectInfo parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Messages.ReconnectInfo) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private boolean passed_ ;
- /**
- * <code>bool passed = 1;</code>
- */
- public boolean getPassed() {
- return passed_;
- }
- /**
- * <code>bool passed = 1;</code>
- */
- public Builder setPassed(boolean value) {
-
- passed_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>bool passed = 1;</code>
- */
- public Builder clearPassed() {
-
- passed_ = false;
- onChanged();
- return this;
- }
-
- private java.util.List<java.lang.Integer> backoffMs_ = java.util.Collections.emptyList();
- private void ensureBackoffMsIsMutable() {
- if (!((bitField0_ & 0x00000002) == 0x00000002)) {
- backoffMs_ = new java.util.ArrayList<java.lang.Integer>(backoffMs_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public java.util.List<java.lang.Integer>
- getBackoffMsList() {
- return java.util.Collections.unmodifiableList(backoffMs_);
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public int getBackoffMsCount() {
- return backoffMs_.size();
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public int getBackoffMs(int index) {
- return backoffMs_.get(index);
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public Builder setBackoffMs(
- int index, int value) {
- ensureBackoffMsIsMutable();
- backoffMs_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public Builder addBackoffMs(int value) {
- ensureBackoffMsIsMutable();
- backoffMs_.add(value);
- onChanged();
- return this;
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public Builder addAllBackoffMs(
- java.lang.Iterable<? extends java.lang.Integer> values) {
- ensureBackoffMsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, backoffMs_);
- onChanged();
- return this;
- }
- /**
- * <code>repeated int32 backoff_ms = 2;</code>
- */
- public Builder clearBackoffMs() {
- backoffMs_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- 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.testing.ReconnectInfo)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.ReconnectInfo)
- private static final io.grpc.testing.integration.Messages.ReconnectInfo DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.ReconnectInfo();
- }
-
- public static io.grpc.testing.integration.Messages.ReconnectInfo getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<ReconnectInfo>
- PARSER = new com.google.protobuf.AbstractParser<ReconnectInfo>() {
- public ReconnectInfo parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ReconnectInfo(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<ReconnectInfo> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<ReconnectInfo> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Messages.ReconnectInfo getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_Payload_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_Payload_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_EchoStatus_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_EchoStatus_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_SimpleRequest_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_SimpleRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_SimpleResponse_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_SimpleResponse_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_SimpleContext_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_SimpleContext_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_StreamingInputCallRequest_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_StreamingInputCallResponse_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_ResponseParameters_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_ResponseParameters_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_StreamingOutputCallRequest_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_StreamingOutputCallResponse_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_StreamingOutputCallResponse_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_ReconnectParams_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_ReconnectParams_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_ReconnectInfo_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_ReconnectInfo_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*io/grpc/testing/integration/messages.p" +
- "roto\022\014grpc.testing\"@\n\007Payload\022\'\n\004type\030\001 " +
- "\001(\0162\031.grpc.testing.PayloadType\022\014\n\004body\030\002" +
- " \001(\014\"+\n\nEchoStatus\022\014\n\004code\030\001 \001(\005\022\017\n\007mess" +
- "age\030\002 \001(\t\"\241\002\n\rSimpleRequest\0220\n\rresponse_" +
- "type\030\001 \001(\0162\031.grpc.testing.PayloadType\022\025\n" +
- "\rresponse_size\030\002 \001(\005\022&\n\007payload\030\003 \001(\0132\025." +
- "grpc.testing.Payload\022\025\n\rfill_username\030\004 " +
- "\001(\010\022\030\n\020fill_oauth_scope\030\005 \001(\010\022;\n\024respons" +
- "e_compression\030\006 \001(\0162\035.grpc.testing.Compr",
- "essionType\0221\n\017response_status\030\007 \001(\0132\030.gr" +
- "pc.testing.EchoStatus\"_\n\016SimpleResponse\022" +
- "&\n\007payload\030\001 \001(\0132\025.grpc.testing.Payload\022" +
- "\020\n\010username\030\002 \001(\t\022\023\n\013oauth_scope\030\003 \001(\t\"\036" +
- "\n\rSimpleContext\022\r\n\005value\030\001 \001(\t\"C\n\031Stream" +
- "ingInputCallRequest\022&\n\007payload\030\001 \001(\0132\025.g" +
- "rpc.testing.Payload\"=\n\032StreamingInputCal" +
- "lResponse\022\037\n\027aggregated_payload_size\030\001 \001" +
- "(\005\"7\n\022ResponseParameters\022\014\n\004size\030\001 \001(\005\022\023" +
- "\n\013interval_us\030\002 \001(\005\"\245\002\n\032StreamingOutputC",
- "allRequest\0220\n\rresponse_type\030\001 \001(\0162\031.grpc" +
- ".testing.PayloadType\022=\n\023response_paramet" +
- "ers\030\002 \003(\0132 .grpc.testing.ResponseParamet" +
- "ers\022&\n\007payload\030\003 \001(\0132\025.grpc.testing.Payl" +
- "oad\022;\n\024response_compression\030\006 \001(\0162\035.grpc" +
- ".testing.CompressionType\0221\n\017response_sta" +
- "tus\030\007 \001(\0132\030.grpc.testing.EchoStatus\"E\n\033S" +
- "treamingOutputCallResponse\022&\n\007payload\030\001 " +
- "\001(\0132\025.grpc.testing.Payload\"3\n\017ReconnectP" +
- "arams\022 \n\030max_reconnect_backoff_ms\030\001 \001(\005\"",
- "3\n\rReconnectInfo\022\016\n\006passed\030\001 \001(\010\022\022\n\nback" +
- "off_ms\030\002 \003(\005*?\n\013PayloadType\022\020\n\014COMPRESSA" +
- "BLE\020\000\022\022\n\016UNCOMPRESSABLE\020\001\022\n\n\006RANDOM\020\002*2\n" +
- "\017CompressionType\022\010\n\004NONE\020\000\022\010\n\004GZIP\020\001\022\013\n\007" +
- "DEFLATE\020\002B\035\n\033io.grpc.testing.integration" +
- "b\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_grpc_testing_Payload_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_grpc_testing_Payload_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_Payload_descriptor,
- new java.lang.String[] { "Type", "Body", });
- internal_static_grpc_testing_EchoStatus_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_grpc_testing_EchoStatus_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_EchoStatus_descriptor,
- new java.lang.String[] { "Code", "Message", });
- internal_static_grpc_testing_SimpleRequest_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_grpc_testing_SimpleRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_SimpleRequest_descriptor,
- new java.lang.String[] { "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompression", "ResponseStatus", });
- internal_static_grpc_testing_SimpleResponse_descriptor =
- getDescriptor().getMessageTypes().get(3);
- internal_static_grpc_testing_SimpleResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_SimpleResponse_descriptor,
- new java.lang.String[] { "Payload", "Username", "OauthScope", });
- internal_static_grpc_testing_SimpleContext_descriptor =
- getDescriptor().getMessageTypes().get(4);
- internal_static_grpc_testing_SimpleContext_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_SimpleContext_descriptor,
- new java.lang.String[] { "Value", });
- internal_static_grpc_testing_StreamingInputCallRequest_descriptor =
- getDescriptor().getMessageTypes().get(5);
- internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_StreamingInputCallRequest_descriptor,
- new java.lang.String[] { "Payload", });
- internal_static_grpc_testing_StreamingInputCallResponse_descriptor =
- getDescriptor().getMessageTypes().get(6);
- internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_StreamingInputCallResponse_descriptor,
- new java.lang.String[] { "AggregatedPayloadSize", });
- internal_static_grpc_testing_ResponseParameters_descriptor =
- getDescriptor().getMessageTypes().get(7);
- internal_static_grpc_testing_ResponseParameters_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_ResponseParameters_descriptor,
- new java.lang.String[] { "Size", "IntervalUs", });
- internal_static_grpc_testing_StreamingOutputCallRequest_descriptor =
- getDescriptor().getMessageTypes().get(8);
- internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_StreamingOutputCallRequest_descriptor,
- new java.lang.String[] { "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus", });
- internal_static_grpc_testing_StreamingOutputCallResponse_descriptor =
- getDescriptor().getMessageTypes().get(9);
- internal_static_grpc_testing_StreamingOutputCallResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_StreamingOutputCallResponse_descriptor,
- new java.lang.String[] { "Payload", });
- internal_static_grpc_testing_ReconnectParams_descriptor =
- getDescriptor().getMessageTypes().get(10);
- internal_static_grpc_testing_ReconnectParams_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_ReconnectParams_descriptor,
- new java.lang.String[] { "MaxReconnectBackoffMs", });
- internal_static_grpc_testing_ReconnectInfo_descriptor =
- getDescriptor().getMessageTypes().get(11);
- internal_static_grpc_testing_ReconnectInfo_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_ReconnectInfo_descriptor,
- new java.lang.String[] { "Passed", "BackoffMs", });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/integration/Metrics.java b/testing-proto/src/generated/main/java/io/grpc/testing/integration/Metrics.java
deleted file mode 100644
index f40fee246..000000000
--- a/testing-proto/src/generated/main/java/io/grpc/testing/integration/Metrics.java
+++ /dev/null
@@ -1,1898 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: io/grpc/testing/integration/metrics.proto
-
-package io.grpc.testing.integration;
-
-public final class Metrics {
- private Metrics() {}
- 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 GaugeResponseOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.GaugeResponse)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string name = 1;</code>
- */
- java.lang.String getName();
- /**
- * <code>string name = 1;</code>
- */
- com.google.protobuf.ByteString
- getNameBytes();
-
- /**
- * <code>int64 long_value = 2;</code>
- */
- long getLongValue();
-
- /**
- * <code>double double_value = 3;</code>
- */
- double getDoubleValue();
-
- /**
- * <code>string string_value = 4;</code>
- */
- java.lang.String getStringValue();
- /**
- * <code>string string_value = 4;</code>
- */
- com.google.protobuf.ByteString
- getStringValueBytes();
-
- public io.grpc.testing.integration.Metrics.GaugeResponse.ValueCase getValueCase();
- }
- /**
- * <pre>
- * Reponse message containing the gauge name and value
- * </pre>
- *
- * Protobuf type {@code grpc.testing.GaugeResponse}
- */
- public static final class GaugeResponse extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.GaugeResponse)
- GaugeResponseOrBuilder {
- // Use GaugeResponse.newBuilder() to construct.
- private GaugeResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private GaugeResponse() {
- name_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private GaugeResponse(
- 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 16: {
- valueCase_ = 2;
- value_ = input.readInt64();
- break;
- }
- case 25: {
- valueCase_ = 3;
- value_ = input.readDouble();
- break;
- }
- case 34: {
- java.lang.String s = input.readStringRequireUtf8();
- valueCase_ = 4;
- 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 io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Metrics.GaugeResponse.class, io.grpc.testing.integration.Metrics.GaugeResponse.Builder.class);
- }
-
- private int valueCase_ = 0;
- private java.lang.Object value_;
- public enum ValueCase
- implements com.google.protobuf.Internal.EnumLite {
- LONG_VALUE(2),
- DOUBLE_VALUE(3),
- STRING_VALUE(4),
- VALUE_NOT_SET(0);
- private final int value;
- private ValueCase(int value) {
- this.value = value;
- }
- /**
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @java.lang.Deprecated
- public static ValueCase valueOf(int value) {
- return forNumber(value);
- }
-
- public static ValueCase forNumber(int value) {
- switch (value) {
- case 2: return LONG_VALUE;
- case 3: return DOUBLE_VALUE;
- case 4: return STRING_VALUE;
- case 0: return VALUE_NOT_SET;
- default: return null;
- }
- }
- public int getNumber() {
- return this.value;
- }
- };
-
- public ValueCase
- getValueCase() {
- return ValueCase.forNumber(
- valueCase_);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * <code>string name = 1;</code>
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * <code>string name = 1;</code>
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int LONG_VALUE_FIELD_NUMBER = 2;
- /**
- * <code>int64 long_value = 2;</code>
- */
- public long getLongValue() {
- if (valueCase_ == 2) {
- return (java.lang.Long) value_;
- }
- return 0L;
- }
-
- public static final int DOUBLE_VALUE_FIELD_NUMBER = 3;
- /**
- * <code>double double_value = 3;</code>
- */
- public double getDoubleValue() {
- if (valueCase_ == 3) {
- return (java.lang.Double) value_;
- }
- return 0D;
- }
-
- public static final int STRING_VALUE_FIELD_NUMBER = 4;
- /**
- * <code>string string_value = 4;</code>
- */
- public java.lang.String getStringValue() {
- java.lang.Object ref = "";
- if (valueCase_ == 4) {
- 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();
- if (valueCase_ == 4) {
- value_ = s;
- }
- return s;
- }
- }
- /**
- * <code>string string_value = 4;</code>
- */
- public com.google.protobuf.ByteString
- getStringValueBytes() {
- java.lang.Object ref = "";
- if (valueCase_ == 4) {
- ref = value_;
- }
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- if (valueCase_ == 4) {
- 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 (!getNameBytes().isEmpty()) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
- }
- if (valueCase_ == 2) {
- output.writeInt64(
- 2, (long)((java.lang.Long) value_));
- }
- if (valueCase_ == 3) {
- output.writeDouble(
- 3, (double)((java.lang.Double) value_));
- }
- if (valueCase_ == 4) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, value_);
- }
- }
-
- 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 (valueCase_ == 2) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(
- 2, (long)((java.lang.Long) value_));
- }
- if (valueCase_ == 3) {
- size += com.google.protobuf.CodedOutputStream
- .computeDoubleSize(
- 3, (double)((java.lang.Double) value_));
- }
- if (valueCase_ == 4) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, 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 io.grpc.testing.integration.Metrics.GaugeResponse)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Metrics.GaugeResponse other = (io.grpc.testing.integration.Metrics.GaugeResponse) obj;
-
- boolean result = true;
- result = result && getName()
- .equals(other.getName());
- result = result && getValueCase().equals(
- other.getValueCase());
- if (!result) return false;
- switch (valueCase_) {
- case 2:
- result = result && (getLongValue()
- == other.getLongValue());
- break;
- case 3:
- result = result && (
- java.lang.Double.doubleToLongBits(getDoubleValue())
- == java.lang.Double.doubleToLongBits(
- other.getDoubleValue()));
- break;
- case 4:
- result = result && getStringValue()
- .equals(other.getStringValue());
- 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();
- switch (valueCase_) {
- case 2:
- hash = (37 * hash) + LONG_VALUE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getLongValue());
- break;
- case 3:
- hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- java.lang.Double.doubleToLongBits(getDoubleValue()));
- break;
- case 4:
- hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER;
- hash = (53 * hash) + getStringValue().hashCode();
- break;
- case 0:
- default:
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse 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.testing.integration.Metrics.GaugeResponse parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse 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.testing.integration.Metrics.GaugeResponse parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse 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.testing.integration.Metrics.GaugeResponse parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.GaugeResponse 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.testing.integration.Metrics.GaugeResponse prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Reponse message containing the gauge name and value
- * </pre>
- *
- * Protobuf type {@code grpc.testing.GaugeResponse}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.GaugeResponse)
- io.grpc.testing.integration.Metrics.GaugeResponseOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeResponse_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeResponse_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Metrics.GaugeResponse.class, io.grpc.testing.integration.Metrics.GaugeResponse.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Metrics.GaugeResponse.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_ = "";
-
- valueCase_ = 0;
- value_ = null;
- return this;
- }
-
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeResponse_descriptor;
- }
-
- public io.grpc.testing.integration.Metrics.GaugeResponse getDefaultInstanceForType() {
- return io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Metrics.GaugeResponse build() {
- io.grpc.testing.integration.Metrics.GaugeResponse result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Metrics.GaugeResponse buildPartial() {
- io.grpc.testing.integration.Metrics.GaugeResponse result = new io.grpc.testing.integration.Metrics.GaugeResponse(this);
- result.name_ = name_;
- if (valueCase_ == 2) {
- result.value_ = value_;
- }
- if (valueCase_ == 3) {
- result.value_ = value_;
- }
- if (valueCase_ == 4) {
- result.value_ = value_;
- }
- result.valueCase_ = valueCase_;
- 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.testing.integration.Metrics.GaugeResponse) {
- return mergeFrom((io.grpc.testing.integration.Metrics.GaugeResponse)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Metrics.GaugeResponse other) {
- if (other == io.grpc.testing.integration.Metrics.GaugeResponse.getDefaultInstance()) return this;
- if (!other.getName().isEmpty()) {
- name_ = other.name_;
- onChanged();
- }
- switch (other.getValueCase()) {
- case LONG_VALUE: {
- setLongValue(other.getLongValue());
- break;
- }
- case DOUBLE_VALUE: {
- setDoubleValue(other.getDoubleValue());
- break;
- }
- case STRING_VALUE: {
- valueCase_ = 4;
- value_ = other.value_;
- onChanged();
- break;
- }
- case VALUE_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 {
- io.grpc.testing.integration.Metrics.GaugeResponse parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Metrics.GaugeResponse) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int valueCase_ = 0;
- private java.lang.Object value_;
- public ValueCase
- getValueCase() {
- return ValueCase.forNumber(
- valueCase_);
- }
-
- public Builder clearValue() {
- valueCase_ = 0;
- value_ = null;
- onChanged();
- return this;
- }
-
-
- private java.lang.Object name_ = "";
- /**
- * <code>string name = 1;</code>
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
-
- /**
- * <code>int64 long_value = 2;</code>
- */
- public long getLongValue() {
- if (valueCase_ == 2) {
- return (java.lang.Long) value_;
- }
- return 0L;
- }
- /**
- * <code>int64 long_value = 2;</code>
- */
- public Builder setLongValue(long value) {
- valueCase_ = 2;
- value_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>int64 long_value = 2;</code>
- */
- public Builder clearLongValue() {
- if (valueCase_ == 2) {
- valueCase_ = 0;
- value_ = null;
- onChanged();
- }
- return this;
- }
-
- /**
- * <code>double double_value = 3;</code>
- */
- public double getDoubleValue() {
- if (valueCase_ == 3) {
- return (java.lang.Double) value_;
- }
- return 0D;
- }
- /**
- * <code>double double_value = 3;</code>
- */
- public Builder setDoubleValue(double value) {
- valueCase_ = 3;
- value_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>double double_value = 3;</code>
- */
- public Builder clearDoubleValue() {
- if (valueCase_ == 3) {
- valueCase_ = 0;
- value_ = null;
- onChanged();
- }
- return this;
- }
-
- /**
- * <code>string string_value = 4;</code>
- */
- public java.lang.String getStringValue() {
- java.lang.Object ref = "";
- if (valueCase_ == 4) {
- ref = value_;
- }
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- if (valueCase_ == 4) {
- value_ = s;
- }
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string string_value = 4;</code>
- */
- public com.google.protobuf.ByteString
- getStringValueBytes() {
- java.lang.Object ref = "";
- if (valueCase_ == 4) {
- ref = value_;
- }
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- if (valueCase_ == 4) {
- value_ = b;
- }
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string string_value = 4;</code>
- */
- public Builder setStringValue(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- valueCase_ = 4;
- value_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string string_value = 4;</code>
- */
- public Builder clearStringValue() {
- if (valueCase_ == 4) {
- valueCase_ = 0;
- value_ = null;
- onChanged();
- }
- return this;
- }
- /**
- * <code>string string_value = 4;</code>
- */
- public Builder setStringValueBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
- valueCase_ = 4;
- 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:grpc.testing.GaugeResponse)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.GaugeResponse)
- private static final io.grpc.testing.integration.Metrics.GaugeResponse DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Metrics.GaugeResponse();
- }
-
- public static io.grpc.testing.integration.Metrics.GaugeResponse getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<GaugeResponse>
- PARSER = new com.google.protobuf.AbstractParser<GaugeResponse>() {
- public GaugeResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new GaugeResponse(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<GaugeResponse> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<GaugeResponse> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Metrics.GaugeResponse getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface GaugeRequestOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.GaugeRequest)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * <code>string name = 1;</code>
- */
- java.lang.String getName();
- /**
- * <code>string name = 1;</code>
- */
- com.google.protobuf.ByteString
- getNameBytes();
- }
- /**
- * <pre>
- * Request message containing the gauge name
- * </pre>
- *
- * Protobuf type {@code grpc.testing.GaugeRequest}
- */
- public static final class GaugeRequest extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.GaugeRequest)
- GaugeRequestOrBuilder {
- // Use GaugeRequest.newBuilder() to construct.
- private GaugeRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private GaugeRequest() {
- name_ = "";
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private GaugeRequest(
- 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.testing.integration.Metrics.internal_static_grpc_testing_GaugeRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Metrics.GaugeRequest.class, io.grpc.testing.integration.Metrics.GaugeRequest.Builder.class);
- }
-
- public static final int NAME_FIELD_NUMBER = 1;
- private volatile java.lang.Object name_;
- /**
- * <code>string name = 1;</code>
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- return (java.lang.String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- }
- }
- /**
- * <code>string name = 1;</code>
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof java.lang.String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- 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.testing.integration.Metrics.GaugeRequest)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Metrics.GaugeRequest other = (io.grpc.testing.integration.Metrics.GaugeRequest) 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.testing.integration.Metrics.GaugeRequest parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest 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.testing.integration.Metrics.GaugeRequest parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest 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.testing.integration.Metrics.GaugeRequest parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest 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.testing.integration.Metrics.GaugeRequest parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.GaugeRequest 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.testing.integration.Metrics.GaugeRequest prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @java.lang.Override
- protected Builder newBuilderForType(
- com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * <pre>
- * Request message containing the gauge name
- * </pre>
- *
- * Protobuf type {@code grpc.testing.GaugeRequest}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.GaugeRequest)
- io.grpc.testing.integration.Metrics.GaugeRequestOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeRequest_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_GaugeRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Metrics.GaugeRequest.class, io.grpc.testing.integration.Metrics.GaugeRequest.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Metrics.GaugeRequest.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.testing.integration.Metrics.internal_static_grpc_testing_GaugeRequest_descriptor;
- }
-
- public io.grpc.testing.integration.Metrics.GaugeRequest getDefaultInstanceForType() {
- return io.grpc.testing.integration.Metrics.GaugeRequest.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Metrics.GaugeRequest build() {
- io.grpc.testing.integration.Metrics.GaugeRequest result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Metrics.GaugeRequest buildPartial() {
- io.grpc.testing.integration.Metrics.GaugeRequest result = new io.grpc.testing.integration.Metrics.GaugeRequest(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.testing.integration.Metrics.GaugeRequest) {
- return mergeFrom((io.grpc.testing.integration.Metrics.GaugeRequest)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Metrics.GaugeRequest other) {
- if (other == io.grpc.testing.integration.Metrics.GaugeRequest.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.testing.integration.Metrics.GaugeRequest parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Metrics.GaugeRequest) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
-
- private java.lang.Object name_ = "";
- /**
- * <code>string name = 1;</code>
- */
- public java.lang.String getName() {
- java.lang.Object ref = name_;
- if (!(ref instanceof java.lang.String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- java.lang.String s = bs.toStringUtf8();
- name_ = s;
- return s;
- } else {
- return (java.lang.String) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- */
- public com.google.protobuf.ByteString
- getNameBytes() {
- java.lang.Object ref = name_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (java.lang.String) ref);
- name_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * <code>string name = 1;</code>
- */
- public Builder setName(
- java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
-
- name_ = value;
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- */
- public Builder clearName() {
-
- name_ = getDefaultInstance().getName();
- onChanged();
- return this;
- }
- /**
- * <code>string name = 1;</code>
- */
- public Builder setNameBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- checkByteStringIsUtf8(value);
-
- name_ = value;
- onChanged();
- return this;
- }
- 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.testing.GaugeRequest)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.GaugeRequest)
- private static final io.grpc.testing.integration.Metrics.GaugeRequest DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Metrics.GaugeRequest();
- }
-
- public static io.grpc.testing.integration.Metrics.GaugeRequest getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<GaugeRequest>
- PARSER = new com.google.protobuf.AbstractParser<GaugeRequest>() {
- public GaugeRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new GaugeRequest(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<GaugeRequest> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<GaugeRequest> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Metrics.GaugeRequest getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface EmptyMessageOrBuilder extends
- // @@protoc_insertion_point(interface_extends:grpc.testing.EmptyMessage)
- com.google.protobuf.MessageOrBuilder {
- }
- /**
- * Protobuf type {@code grpc.testing.EmptyMessage}
- */
- public static final class EmptyMessage extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:grpc.testing.EmptyMessage)
- EmptyMessageOrBuilder {
- // Use EmptyMessage.newBuilder() to construct.
- private EmptyMessage(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
- super(builder);
- }
- private EmptyMessage() {
- }
-
- @java.lang.Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
- }
- private EmptyMessage(
- 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.testing.integration.Metrics.internal_static_grpc_testing_EmptyMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_EmptyMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Metrics.EmptyMessage.class, io.grpc.testing.integration.Metrics.EmptyMessage.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.testing.integration.Metrics.EmptyMessage)) {
- return super.equals(obj);
- }
- io.grpc.testing.integration.Metrics.EmptyMessage other = (io.grpc.testing.integration.Metrics.EmptyMessage) 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.testing.integration.Metrics.EmptyMessage parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage 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.testing.integration.Metrics.EmptyMessage parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage 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.testing.integration.Metrics.EmptyMessage parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage 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.testing.integration.Metrics.EmptyMessage parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static io.grpc.testing.integration.Metrics.EmptyMessage 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.testing.integration.Metrics.EmptyMessage 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.testing.EmptyMessage}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
- // @@protoc_insertion_point(builder_implements:grpc.testing.EmptyMessage)
- io.grpc.testing.integration.Metrics.EmptyMessageOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_EmptyMessage_descriptor;
- }
-
- protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return io.grpc.testing.integration.Metrics.internal_static_grpc_testing_EmptyMessage_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- io.grpc.testing.integration.Metrics.EmptyMessage.class, io.grpc.testing.integration.Metrics.EmptyMessage.Builder.class);
- }
-
- // Construct using io.grpc.testing.integration.Metrics.EmptyMessage.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.testing.integration.Metrics.internal_static_grpc_testing_EmptyMessage_descriptor;
- }
-
- public io.grpc.testing.integration.Metrics.EmptyMessage getDefaultInstanceForType() {
- return io.grpc.testing.integration.Metrics.EmptyMessage.getDefaultInstance();
- }
-
- public io.grpc.testing.integration.Metrics.EmptyMessage build() {
- io.grpc.testing.integration.Metrics.EmptyMessage result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- public io.grpc.testing.integration.Metrics.EmptyMessage buildPartial() {
- io.grpc.testing.integration.Metrics.EmptyMessage result = new io.grpc.testing.integration.Metrics.EmptyMessage(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.testing.integration.Metrics.EmptyMessage) {
- return mergeFrom((io.grpc.testing.integration.Metrics.EmptyMessage)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(io.grpc.testing.integration.Metrics.EmptyMessage other) {
- if (other == io.grpc.testing.integration.Metrics.EmptyMessage.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.testing.integration.Metrics.EmptyMessage parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (io.grpc.testing.integration.Metrics.EmptyMessage) 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.testing.EmptyMessage)
- }
-
- // @@protoc_insertion_point(class_scope:grpc.testing.EmptyMessage)
- private static final io.grpc.testing.integration.Metrics.EmptyMessage DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new io.grpc.testing.integration.Metrics.EmptyMessage();
- }
-
- public static io.grpc.testing.integration.Metrics.EmptyMessage getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- private static final com.google.protobuf.Parser<EmptyMessage>
- PARSER = new com.google.protobuf.AbstractParser<EmptyMessage>() {
- public EmptyMessage parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new EmptyMessage(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser<EmptyMessage> parser() {
- return PARSER;
- }
-
- @java.lang.Override
- public com.google.protobuf.Parser<EmptyMessage> getParserForType() {
- return PARSER;
- }
-
- public io.grpc.testing.integration.Metrics.EmptyMessage getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_GaugeResponse_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_GaugeResponse_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_GaugeRequest_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_GaugeRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
- internal_static_grpc_testing_EmptyMessage_descriptor;
- private static final
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
- internal_static_grpc_testing_EmptyMessage_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)io/grpc/testing/integration/metrics.pr" +
- "oto\022\014grpc.testing\"l\n\rGaugeResponse\022\014\n\004na" +
- "me\030\001 \001(\t\022\024\n\nlong_value\030\002 \001(\003H\000\022\026\n\014double" +
- "_value\030\003 \001(\001H\000\022\026\n\014string_value\030\004 \001(\tH\000B\007" +
- "\n\005value\"\034\n\014GaugeRequest\022\014\n\004name\030\001 \001(\t\"\016\n" +
- "\014EmptyMessage2\240\001\n\016MetricsService\022I\n\014GetA" +
- "llGauges\022\032.grpc.testing.EmptyMessage\032\033.g" +
- "rpc.testing.GaugeResponse0\001\022C\n\010GetGauge\022" +
- "\032.grpc.testing.GaugeRequest\032\033.grpc.testi" +
- "ng.GaugeResponseB\035\n\033io.grpc.testing.inte",
- "grationb\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_grpc_testing_GaugeResponse_descriptor =
- getDescriptor().getMessageTypes().get(0);
- internal_static_grpc_testing_GaugeResponse_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_GaugeResponse_descriptor,
- new java.lang.String[] { "Name", "LongValue", "DoubleValue", "StringValue", "Value", });
- internal_static_grpc_testing_GaugeRequest_descriptor =
- getDescriptor().getMessageTypes().get(1);
- internal_static_grpc_testing_GaugeRequest_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_GaugeRequest_descriptor,
- new java.lang.String[] { "Name", });
- internal_static_grpc_testing_EmptyMessage_descriptor =
- getDescriptor().getMessageTypes().get(2);
- internal_static_grpc_testing_EmptyMessage_fieldAccessorTable = new
- com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
- internal_static_grpc_testing_EmptyMessage_descriptor,
- new java.lang.String[] { });
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/integration/Test.java b/testing-proto/src/generated/main/java/io/grpc/testing/integration/Test.java
deleted file mode 100644
index 44903d277..000000000
--- a/testing-proto/src/generated/main/java/io/grpc/testing/integration/Test.java
+++ /dev/null
@@ -1,74 +0,0 @@
-// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: io/grpc/testing/integration/test.proto
-
-package io.grpc.testing.integration;
-
-public final class Test {
- private Test() {}
- 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 static com.google.protobuf.Descriptors.FileDescriptor
- getDescriptor() {
- return descriptor;
- }
- private static com.google.protobuf.Descriptors.FileDescriptor
- descriptor;
- static {
- java.lang.String[] descriptorData = {
- "\n&io/grpc/testing/integration/test.proto" +
- "\022\014grpc.testing\032\'io/grpc/testing/integrat" +
- "ion/empty.proto\032*io/grpc/testing/integra" +
- "tion/messages.proto2\313\005\n\013TestService\0225\n\tE" +
- "mptyCall\022\023.grpc.testing.Empty\032\023.grpc.tes" +
- "ting.Empty\022F\n\tUnaryCall\022\033.grpc.testing.S" +
- "impleRequest\032\034.grpc.testing.SimpleRespon" +
- "se\022O\n\022CacheableUnaryCall\022\033.grpc.testing." +
- "SimpleRequest\032\034.grpc.testing.SimpleRespo" +
- "nse\022l\n\023StreamingOutputCall\022(.grpc.testin",
- "g.StreamingOutputCallRequest\032).grpc.test" +
- "ing.StreamingOutputCallResponse0\001\022i\n\022Str" +
- "eamingInputCall\022\'.grpc.testing.Streaming" +
- "InputCallRequest\032(.grpc.testing.Streamin" +
- "gInputCallResponse(\001\022i\n\016FullDuplexCall\022(" +
- ".grpc.testing.StreamingOutputCallRequest" +
- "\032).grpc.testing.StreamingOutputCallRespo" +
- "nse(\0010\001\022i\n\016HalfDuplexCall\022(.grpc.testing" +
- ".StreamingOutputCallRequest\032).grpc.testi" +
- "ng.StreamingOutputCallResponse(\0010\001\022=\n\021Un",
- "implementedCall\022\023.grpc.testing.Empty\032\023.g" +
- "rpc.testing.Empty2U\n\024UnimplementedServic" +
- "e\022=\n\021UnimplementedCall\022\023.grpc.testing.Em" +
- "pty\032\023.grpc.testing.Empty2\177\n\020ReconnectSer" +
- "vice\0221\n\005Start\022\023.grpc.testing.Empty\032\023.grp" +
- "c.testing.Empty\0228\n\004Stop\022\023.grpc.testing.E" +
- "mpty\032\033.grpc.testing.ReconnectInfoB\035\n\033io." +
- "grpc.testing.integrationb\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[] {
- com.google.protobuf.EmptyProtos.getDescriptor(),
- io.grpc.testing.integration.Messages.getDescriptor(),
- }, assigner);
- com.google.protobuf.EmptyProtos.getDescriptor();
- io.grpc.testing.integration.Messages.getDescriptor();
- }
-
- // @@protoc_insertion_point(outer_class_scope)
-}
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequest.java b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequest.java
new file mode 100644
index 000000000..a40539290
--- /dev/null
+++ b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequest.java
@@ -0,0 +1,385 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: io/grpc/testing/protobuf/simpleservice.proto
+
+package io.grpc.testing.protobuf;
+
+/**
+ * <pre>
+ * A simple request message type for test.
+ * </pre>
+ *
+ * Protobuf type {@code grpc.testing.SimpleRequest}
+ */
+public final class SimpleRequest extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:grpc.testing.SimpleRequest)
+ SimpleRequestOrBuilder {
+ // Use SimpleRequest.newBuilder() to construct.
+ private SimpleRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private SimpleRequest() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private SimpleRequest(
+ 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.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.grpc.testing.protobuf.SimpleRequest.class, io.grpc.testing.protobuf.SimpleRequest.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.testing.protobuf.SimpleRequest)) {
+ return super.equals(obj);
+ }
+ io.grpc.testing.protobuf.SimpleRequest other = (io.grpc.testing.protobuf.SimpleRequest) 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.testing.protobuf.SimpleRequest parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest 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.testing.protobuf.SimpleRequest parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest 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.testing.protobuf.SimpleRequest parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest 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.testing.protobuf.SimpleRequest parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.grpc.testing.protobuf.SimpleRequest 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.testing.protobuf.SimpleRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * <pre>
+ * A simple request message type for test.
+ * </pre>
+ *
+ * Protobuf type {@code grpc.testing.SimpleRequest}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleRequest)
+ io.grpc.testing.protobuf.SimpleRequestOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleRequest_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleRequest_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.grpc.testing.protobuf.SimpleRequest.class, io.grpc.testing.protobuf.SimpleRequest.Builder.class);
+ }
+
+ // Construct using io.grpc.testing.protobuf.SimpleRequest.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.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleRequest_descriptor;
+ }
+
+ public io.grpc.testing.protobuf.SimpleRequest getDefaultInstanceForType() {
+ return io.grpc.testing.protobuf.SimpleRequest.getDefaultInstance();
+ }
+
+ public io.grpc.testing.protobuf.SimpleRequest build() {
+ io.grpc.testing.protobuf.SimpleRequest result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public io.grpc.testing.protobuf.SimpleRequest buildPartial() {
+ io.grpc.testing.protobuf.SimpleRequest result = new io.grpc.testing.protobuf.SimpleRequest(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.testing.protobuf.SimpleRequest) {
+ return mergeFrom((io.grpc.testing.protobuf.SimpleRequest)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(io.grpc.testing.protobuf.SimpleRequest other) {
+ if (other == io.grpc.testing.protobuf.SimpleRequest.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.testing.protobuf.SimpleRequest parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (io.grpc.testing.protobuf.SimpleRequest) 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.testing.SimpleRequest)
+ }
+
+ // @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest)
+ private static final io.grpc.testing.protobuf.SimpleRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.protobuf.SimpleRequest();
+ }
+
+ public static io.grpc.testing.protobuf.SimpleRequest getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<SimpleRequest>
+ PARSER = new com.google.protobuf.AbstractParser<SimpleRequest>() {
+ public SimpleRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new SimpleRequest(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<SimpleRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleRequest> getParserForType() {
+ return PARSER;
+ }
+
+ public io.grpc.testing.protobuf.SimpleRequest getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequestOrBuilder.java b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequestOrBuilder.java
new file mode 100644
index 000000000..c75caa049
--- /dev/null
+++ b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleRequestOrBuilder.java
@@ -0,0 +1,9 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: io/grpc/testing/protobuf/simpleservice.proto
+
+package io.grpc.testing.protobuf;
+
+public interface SimpleRequestOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleRequest)
+ com.google.protobuf.MessageOrBuilder {
+}
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponse.java b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponse.java
new file mode 100644
index 000000000..7113f60fd
--- /dev/null
+++ b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponse.java
@@ -0,0 +1,385 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: io/grpc/testing/protobuf/simpleservice.proto
+
+package io.grpc.testing.protobuf;
+
+/**
+ * <pre>
+ * A simple response message type for test.
+ * </pre>
+ *
+ * Protobuf type {@code grpc.testing.SimpleResponse}
+ */
+public final class SimpleResponse extends
+ com.google.protobuf.GeneratedMessageV3 implements
+ // @@protoc_insertion_point(message_implements:grpc.testing.SimpleResponse)
+ SimpleResponseOrBuilder {
+ // Use SimpleResponse.newBuilder() to construct.
+ private SimpleResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
+ super(builder);
+ }
+ private SimpleResponse() {
+ }
+
+ @java.lang.Override
+ public final com.google.protobuf.UnknownFieldSet
+ getUnknownFields() {
+ return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+ }
+ private SimpleResponse(
+ 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.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleResponse_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.grpc.testing.protobuf.SimpleResponse.class, io.grpc.testing.protobuf.SimpleResponse.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.testing.protobuf.SimpleResponse)) {
+ return super.equals(obj);
+ }
+ io.grpc.testing.protobuf.SimpleResponse other = (io.grpc.testing.protobuf.SimpleResponse) 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.testing.protobuf.SimpleResponse parseFrom(
+ java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse parseFrom(
+ java.nio.ByteBuffer data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse 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.testing.protobuf.SimpleResponse parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse parseFrom(
+ byte[] data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse 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.testing.protobuf.SimpleResponse parseDelimitedFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseDelimitedWithIOException(PARSER, input);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse 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.testing.protobuf.SimpleResponse parseFrom(
+ com.google.protobuf.CodedInputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3
+ .parseWithIOException(PARSER, input);
+ }
+ public static io.grpc.testing.protobuf.SimpleResponse 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.testing.protobuf.SimpleResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+ /**
+ * <pre>
+ * A simple response message type for test.
+ * </pre>
+ *
+ * Protobuf type {@code grpc.testing.SimpleResponse}
+ */
+ public static final class Builder extends
+ com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
+ // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleResponse)
+ io.grpc.testing.protobuf.SimpleResponseOrBuilder {
+ public static final com.google.protobuf.Descriptors.Descriptor
+ getDescriptor() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleResponse_descriptor;
+ }
+
+ protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internalGetFieldAccessorTable() {
+ return io.grpc.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleResponse_fieldAccessorTable
+ .ensureFieldAccessorsInitialized(
+ io.grpc.testing.protobuf.SimpleResponse.class, io.grpc.testing.protobuf.SimpleResponse.Builder.class);
+ }
+
+ // Construct using io.grpc.testing.protobuf.SimpleResponse.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.testing.protobuf.SimpleServiceProto.internal_static_grpc_testing_SimpleResponse_descriptor;
+ }
+
+ public io.grpc.testing.protobuf.SimpleResponse getDefaultInstanceForType() {
+ return io.grpc.testing.protobuf.SimpleResponse.getDefaultInstance();
+ }
+
+ public io.grpc.testing.protobuf.SimpleResponse build() {
+ io.grpc.testing.protobuf.SimpleResponse result = buildPartial();
+ if (!result.isInitialized()) {
+ throw newUninitializedMessageException(result);
+ }
+ return result;
+ }
+
+ public io.grpc.testing.protobuf.SimpleResponse buildPartial() {
+ io.grpc.testing.protobuf.SimpleResponse result = new io.grpc.testing.protobuf.SimpleResponse(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.testing.protobuf.SimpleResponse) {
+ return mergeFrom((io.grpc.testing.protobuf.SimpleResponse)other);
+ } else {
+ super.mergeFrom(other);
+ return this;
+ }
+ }
+
+ public Builder mergeFrom(io.grpc.testing.protobuf.SimpleResponse other) {
+ if (other == io.grpc.testing.protobuf.SimpleResponse.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.testing.protobuf.SimpleResponse parsedMessage = null;
+ try {
+ parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ parsedMessage = (io.grpc.testing.protobuf.SimpleResponse) 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.testing.SimpleResponse)
+ }
+
+ // @@protoc_insertion_point(class_scope:grpc.testing.SimpleResponse)
+ private static final io.grpc.testing.protobuf.SimpleResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.protobuf.SimpleResponse();
+ }
+
+ public static io.grpc.testing.protobuf.SimpleResponse getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<SimpleResponse>
+ PARSER = new com.google.protobuf.AbstractParser<SimpleResponse>() {
+ public SimpleResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return new SimpleResponse(input, extensionRegistry);
+ }
+ };
+
+ public static com.google.protobuf.Parser<SimpleResponse> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleResponse> getParserForType() {
+ return PARSER;
+ }
+
+ public io.grpc.testing.protobuf.SimpleResponse getDefaultInstanceForType() {
+ return DEFAULT_INSTANCE;
+ }
+
+}
+
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponseOrBuilder.java b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponseOrBuilder.java
new file mode 100644
index 000000000..d11f0daf6
--- /dev/null
+++ b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleResponseOrBuilder.java
@@ -0,0 +1,9 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: io/grpc/testing/protobuf/simpleservice.proto
+
+package io.grpc.testing.protobuf;
+
+public interface SimpleResponseOrBuilder extends
+ // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleResponse)
+ com.google.protobuf.MessageOrBuilder {
+}
diff --git a/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleServiceProto.java b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleServiceProto.java
new file mode 100644
index 000000000..0a78e7a02
--- /dev/null
+++ b/testing-proto/src/generated/main/java/io/grpc/testing/protobuf/SimpleServiceProto.java
@@ -0,0 +1,77 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: io/grpc/testing/protobuf/simpleservice.proto
+
+package io.grpc.testing.protobuf;
+
+public final class SimpleServiceProto {
+ private SimpleServiceProto() {}
+ 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_testing_SimpleRequest_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_grpc_testing_SimpleRequest_fieldAccessorTable;
+ static final com.google.protobuf.Descriptors.Descriptor
+ internal_static_grpc_testing_SimpleResponse_descriptor;
+ static final
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
+ internal_static_grpc_testing_SimpleResponse_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,io/grpc/testing/protobuf/simpleservice" +
+ ".proto\022\014grpc.testing\"\017\n\rSimpleRequest\"\020\n" +
+ "\016SimpleResponse2\327\002\n\rSimpleService\022G\n\010Una" +
+ "ryRpc\022\033.grpc.testing.SimpleRequest\032\034.grp" +
+ "c.testing.SimpleResponse\"\000\022S\n\022ClientStre" +
+ "amingRpc\022\033.grpc.testing.SimpleRequest\032\034." +
+ "grpc.testing.SimpleResponse\"\000(\001\022S\n\022Serve" +
+ "rStreamingRpc\022\033.grpc.testing.SimpleReque" +
+ "st\032\034.grpc.testing.SimpleResponse\"\0000\001\022S\n\020" +
+ "BidiStreamingRpc\022\033.grpc.testing.SimpleRe",
+ "quest\032\034.grpc.testing.SimpleResponse\"\000(\0010" +
+ "\001B0\n\030io.grpc.testing.protobufB\022SimpleSer" +
+ "viceProtoP\001b\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_grpc_testing_SimpleRequest_descriptor =
+ getDescriptor().getMessageTypes().get(0);
+ internal_static_grpc_testing_SimpleRequest_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_grpc_testing_SimpleRequest_descriptor,
+ new java.lang.String[] { });
+ internal_static_grpc_testing_SimpleResponse_descriptor =
+ getDescriptor().getMessageTypes().get(1);
+ internal_static_grpc_testing_SimpleResponse_fieldAccessorTable = new
+ com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
+ internal_static_grpc_testing_SimpleResponse_descriptor,
+ new java.lang.String[] { });
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/testing-proto/src/main/proto/io/grpc/testing/integration/empty.proto b/testing-proto/src/main/proto/io/grpc/testing/integration/empty.proto
deleted file mode 100644
index 5c571ed54..000000000
--- a/testing-proto/src/main/proto/io/grpc/testing/integration/empty.proto
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright 2015, gRPC Authors
-// All rights reserved.
-//
-// 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.
-syntax = "proto2";
-
-package grpc.testing;
-
-option java_package = "com.google.protobuf";
-option java_outer_classname = "EmptyProtos";
-
-// An empty message that you can re-use to avoid defining duplicated empty
-// messages in your project. A typical example is to use it as argument or the
-// return value of a service API. For instance:
-//
-// service Foo {
-// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
-// };
-//
-message Empty {}
diff --git a/testing-proto/src/main/proto/io/grpc/testing/integration/messages.proto b/testing-proto/src/main/proto/io/grpc/testing/integration/messages.proto
deleted file mode 100644
index 4e3e8b357..000000000
--- a/testing-proto/src/main/proto/io/grpc/testing/integration/messages.proto
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2015, gRPC Authors
-// All rights reserved.
-//
-// 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.
-// Message definitions to be used by integration test service definitions.
-
-syntax = "proto3";
-
-package grpc.testing;
-
-option java_package = "io.grpc.testing.integration";
-
-// The type of payload that should be returned.
-enum PayloadType {
- // Compressable text format.
- COMPRESSABLE = 0;
-
- // Uncompressable binary format.
- UNCOMPRESSABLE = 1;
-
- // Randomly chosen from all other formats defined in this enum.
- RANDOM = 2;
-}
-
-// Compression algorithms
-enum CompressionType {
- // No compression
- NONE = 0;
- GZIP = 1;
- DEFLATE = 2;
-}
-
-// A block of data, to simply increase gRPC message size.
-message Payload {
- // The type of data in body.
- PayloadType type = 1;
- // Primary contents of payload.
- bytes body = 2;
-}
-
-// A protobuf representation for grpc status. This is used by test
-// clients to specify a status that the server should attempt to return.
-message EchoStatus {
- int32 code = 1;
- string message = 2;
-}
-
-// Unary request.
-message SimpleRequest {
- // Desired payload type in the response from the server.
- // If response_type is RANDOM, server randomly chooses one from other formats.
- PayloadType response_type = 1;
-
- // Desired payload size in the response from the server.
- // If response_type is COMPRESSABLE, this denotes the size before compression.
- int32 response_size = 2;
-
- // Optional input payload sent along with the request.
- Payload payload = 3;
-
- // Whether SimpleResponse should include username.
- bool fill_username = 4;
-
- // Whether SimpleResponse should include OAuth scope.
- bool fill_oauth_scope = 5;
-
- // Compression algorithm to be used by the server for the response (stream)
- CompressionType response_compression = 6;
-
- // Whether server should return a given status
- EchoStatus response_status = 7;
-}
-
-// Unary response, as configured by the request.
-message SimpleResponse {
- // Payload to increase message size.
- Payload payload = 1;
- // The user the request came from, for verifying authentication was
- // successful when the client expected it.
- string username = 2;
- // OAuth scope.
- string oauth_scope = 3;
-}
-
-message SimpleContext {
- string value = 1;
-}
-
-// Client-streaming request.
-message StreamingInputCallRequest {
- // Optional input payload sent along with the request.
- Payload payload = 1;
-
- // Not expecting any payload from the response.
-}
-
-// Client-streaming response.
-message StreamingInputCallResponse {
- // Aggregated size of payloads received from the client.
- int32 aggregated_payload_size = 1;
-}
-
-// Configuration for a particular response.
-message ResponseParameters {
- // Desired payload sizes in responses from the server.
- // If response_type is COMPRESSABLE, this denotes the size before compression.
- int32 size = 1;
-
- // Desired interval between consecutive responses in the response stream in
- // microseconds.
- int32 interval_us = 2;
-}
-
-// Server-streaming request.
-message StreamingOutputCallRequest {
- // Desired payload type in the response from the server.
- // If response_type is RANDOM, the payload from each response in the stream
- // might be of different types. This is to simulate a mixed type of payload
- // stream.
- PayloadType response_type = 1;
-
- // Configuration for each expected response message.
- repeated ResponseParameters response_parameters = 2;
-
- // Optional input payload sent along with the request.
- Payload payload = 3;
-
- // Compression algorithm to be used by the server for the response (stream)
- CompressionType response_compression = 6;
-
- // Whether server should return a given status
- EchoStatus response_status = 7;
-}
-
-// Server-streaming response, as configured by the request and parameters.
-message StreamingOutputCallResponse {
- // Payload to increase response size.
- Payload payload = 1;
-}
-
-// For reconnect interop test only.
-// Client tells server what reconnection parameters it used.
-message ReconnectParams {
- int32 max_reconnect_backoff_ms = 1;
-}
-
-// For reconnect interop test only.
-// Server tells client whether its reconnects are following the spec and the
-// reconnect backoffs it saw.
-message ReconnectInfo {
- bool passed = 1;
- repeated int32 backoff_ms = 2;
-}
diff --git a/testing-proto/src/main/proto/io/grpc/testing/integration/metrics.proto b/testing-proto/src/main/proto/io/grpc/testing/integration/metrics.proto
deleted file mode 100644
index febf7aeac..000000000
--- a/testing-proto/src/main/proto/io/grpc/testing/integration/metrics.proto
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright 2015-2016, gRPC Authors
-// All rights reserved.
-//
-// 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.
-// Contains the definitions for a metrics service and the type of metrics
-// exposed by the service.
-//
-// Currently, 'Gauge' (i.e a metric that represents the measured value of
-// something at an instant of time) is the only metric type supported by the
-// service.
-syntax = "proto3";
-
-package grpc.testing;
-
-option java_package = "io.grpc.testing.integration";
-
-// Reponse message containing the gauge name and value
-message GaugeResponse {
- string name = 1;
- oneof value {
- int64 long_value = 2;
- double double_value = 3;
- string string_value = 4;
- }
-}
-
-// Request message containing the gauge name
-message GaugeRequest {
- string name = 1;
-}
-
-message EmptyMessage {}
-
-service MetricsService {
- // Returns the values of all the gauges that are currently being maintained by
- // the service
- rpc GetAllGauges(EmptyMessage) returns (stream GaugeResponse);
-
- // Returns the value of one gauge
- rpc GetGauge(GaugeRequest) returns (GaugeResponse);
-}
diff --git a/testing-proto/src/main/proto/io/grpc/testing/integration/test.proto b/testing-proto/src/main/proto/io/grpc/testing/integration/test.proto
deleted file mode 100644
index aeb30f354..000000000
--- a/testing-proto/src/main/proto/io/grpc/testing/integration/test.proto
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2015, gRPC Authors
-// All rights reserved.
-//
-// 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.
-// An integration test service that covers all the method signature permutations
-// of unary/streaming requests/responses.
-syntax = "proto3";
-
-import "io/grpc/testing/integration/empty.proto";
-import "io/grpc/testing/integration/messages.proto";
-
-package grpc.testing;
-
-option java_package = "io.grpc.testing.integration";
-
-// A simple service to test the various types of RPCs and experiment with
-// performance with various types of payload.
-service TestService {
- // One empty request followed by one empty response.
- rpc EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty);
-
- // One request followed by one response.
- rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
-
- // One request followed by one response. Response has cache control
- // headers set such that a caching HTTP proxy (such as GFE) can
- // satisfy subsequent requests.
- rpc CacheableUnaryCall(SimpleRequest) returns (SimpleResponse);
-
- // One request followed by a sequence of responses (streamed download).
- // The server returns the payload with client desired type and sizes.
- rpc StreamingOutputCall(StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // A sequence of requests followed by one response (streamed upload).
- // The server returns the aggregated size of client payload as the result.
- rpc StreamingInputCall(stream StreamingInputCallRequest)
- returns (StreamingInputCallResponse);
-
- // A sequence of requests with each request served by the server immediately.
- // As one request could lead to multiple responses, this interface
- // demonstrates the idea of full duplexing.
- rpc FullDuplexCall(stream StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // A sequence of requests followed by a sequence of responses.
- // The server buffers all the client requests and then serves them in order. A
- // stream of responses are returned to the client when the server starts with
- // first request.
- rpc HalfDuplexCall(stream StreamingOutputCallRequest)
- returns (stream StreamingOutputCallResponse);
-
- // The test server will not implement this method. It will be used
- // to test the behavior when clients call unimplemented methods.
- rpc UnimplementedCall(grpc.testing.Empty) returns (grpc.testing.Empty);
-}
-
-// A simple service NOT implemented at servers so clients can test for
-// that case.
-service UnimplementedService {
- // A call that no server should implement
- rpc UnimplementedCall(grpc.testing.Empty) returns(grpc.testing.Empty);
-}
-
-// A service used to control reconnect server.
-service ReconnectService {
- rpc Start(grpc.testing.Empty) returns (grpc.testing.Empty);
- rpc Stop(grpc.testing.Empty) returns (grpc.testing.ReconnectInfo);
-}
diff --git a/testing-proto/src/main/proto/io/grpc/testing/protobuf/simpleservice.proto b/testing-proto/src/main/proto/io/grpc/testing/protobuf/simpleservice.proto
new file mode 100644
index 000000000..bc1731dee
--- /dev/null
+++ b/testing-proto/src/main/proto/io/grpc/testing/protobuf/simpleservice.proto
@@ -0,0 +1,47 @@
+// Copyright 2017, gRPC Authors
+// All rights reserved.
+//
+// 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.
+// An integration test service that covers all the method signature permutations
+// of unary/streaming requests/responses.
+
+syntax = "proto3";
+
+package grpc.testing;
+
+option java_package = "io.grpc.testing.protobuf";
+option java_outer_classname = "SimpleServiceProto";
+option java_multiple_files = true;
+
+// A simple service for test.
+service SimpleService {
+ // Simple unary RPC.
+ rpc UnaryRpc (SimpleRequest) returns (SimpleResponse) {}
+
+ // Simple client-to-server streaming RPC.
+ rpc ClientStreamingRpc (stream SimpleRequest) returns (SimpleResponse) {}
+
+ // Simple server-to-client streaming RPC.
+ rpc ServerStreamingRpc (SimpleRequest) returns (stream SimpleResponse) {}
+
+ // Simple bidirectional streaming RPC.
+ rpc BidiStreamingRpc (stream SimpleRequest) returns (stream SimpleResponse) {}
+}
+
+// A simple request message type for test.
+message SimpleRequest {
+}
+
+// A simple response message type for test.
+message SimpleResponse {
+}
diff --git a/testing-proto/src/test/java/io/grpc/testing/protobuf/SimpleServiceTest.java b/testing-proto/src/test/java/io/grpc/testing/protobuf/SimpleServiceTest.java
new file mode 100644
index 000000000..771b20f26
--- /dev/null
+++ b/testing-proto/src/test/java/io/grpc/testing/protobuf/SimpleServiceTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2017, gRPC Authors All rights reserved.
+ *
+ * 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.
+ */
+
+package io.grpc.testing.protobuf;
+
+import static io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING;
+import static io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING;
+import static io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING;
+import static io.grpc.MethodDescriptor.MethodType.UNARY;
+import static org.junit.Assert.assertEquals;
+
+import io.grpc.MethodDescriptor;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.junit.runners.JUnit4;
+
+/** Test to verify that the proto file simpleservice.proto generates the expected service. */
+@RunWith(JUnit4.class)
+public class SimpleServiceTest {
+ @Test
+ public void serviceDescriptor() {
+ assertEquals("grpc.testing.SimpleService", SimpleServiceGrpc.getServiceDescriptor().getName());
+ }
+
+ @Test
+ public void serviceMethodDescriotrs() {
+ MethodDescriptor<SimpleRequest, SimpleResponse> genericTypeShouldMatchWhenAssigned;
+
+ genericTypeShouldMatchWhenAssigned = SimpleServiceGrpc.METHOD_UNARY_RPC;
+ assertEquals(UNARY, genericTypeShouldMatchWhenAssigned.getType());
+
+ genericTypeShouldMatchWhenAssigned = SimpleServiceGrpc.METHOD_CLIENT_STREAMING_RPC;
+ assertEquals(CLIENT_STREAMING, genericTypeShouldMatchWhenAssigned.getType());
+
+ genericTypeShouldMatchWhenAssigned = SimpleServiceGrpc.METHOD_SERVER_STREAMING_RPC;
+ assertEquals(SERVER_STREAMING, genericTypeShouldMatchWhenAssigned.getType());
+
+ genericTypeShouldMatchWhenAssigned = SimpleServiceGrpc.METHOD_BIDI_STREAMING_RPC;
+ assertEquals(BIDI_STREAMING, genericTypeShouldMatchWhenAssigned.getType());
+ }
+}