From 111f6dd81e5af9961d2c274b6012f1c7b377e350 Mon Sep 17 00:00:00 2001 From: Kun Zhang Date: Tue, 5 May 2015 16:11:27 -0700 Subject: [PATCH] Allow people to skip codegen compilation. Resolves #357 - Add project property ``grpc.skip.codegen``, which is false by default. People who don't change the codegen nor the proto files can set it to true so that they don't need to set up C++ compilation. - Check in all generated files under ``src/generated``. --- README.md | 12 +- benchmarks/build.gradle | 10 +- .../generated/main/grpc/testing/Qpstest.java | 9996 +++++++++++++++++ .../main/grpc/testing/TestServiceGrpc.java | 209 + .../main/grpc/testing/WorkerGrpc.java | 190 + build.gradle | 22 + examples/build.gradle | 7 +- .../grpc/examples/helloworld/GreeterGrpc.java | 173 + .../examples/helloworld/HelloRequest.java | 451 + .../helloworld/HelloRequestOrBuilder.java | 19 + .../examples/helloworld/HelloResponse.java | 451 + .../helloworld/HelloResponseOrBuilder.java | 19 + .../examples/helloworld/HelloWorldProto.java | 64 + .../io/grpc/examples/routeguide/Feature.java | 701 ++ .../examples/routeguide/FeatureOrBuilder.java | 52 + .../io/grpc/examples/routeguide/Point.java | 438 + .../examples/routeguide/PointOrBuilder.java | 19 + .../grpc/examples/routeguide/Rectangle.java | 766 ++ .../routeguide/RectangleOrBuilder.java | 59 + .../examples/routeguide/RouteGuideGrpc.java | 292 + .../examples/routeguide/RouteGuideProto.java | 109 + .../grpc/examples/routeguide/RouteNote.java | 699 ++ .../routeguide/RouteNoteOrBuilder.java | 52 + .../examples/routeguide/RouteSummary.java | 610 + .../routeguide/RouteSummaryOrBuilder.java | 45 + integration-testing/build.gradle | 7 +- .../main/com/google/protobuf/EmptyProtos.java | 379 + .../io/grpc/testing/integration/Messages.java | 6364 +++++++++++ .../io/grpc/testing/integration/Test.java | 59 + .../testing/integration/TestServiceGrpc.java | 383 + settings.gradle | 10 +- 31 files changed, 22641 insertions(+), 26 deletions(-) create mode 100644 benchmarks/src/generated/main/grpc/testing/Qpstest.java create mode 100644 benchmarks/src/generated/main/grpc/testing/TestServiceGrpc.java create mode 100644 benchmarks/src/generated/main/grpc/testing/WorkerGrpc.java create mode 100644 examples/src/generated/main/io/grpc/examples/helloworld/GreeterGrpc.java create mode 100644 examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java create mode 100644 examples/src/generated/main/io/grpc/examples/helloworld/HelloRequestOrBuilder.java create mode 100644 examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java create mode 100644 examples/src/generated/main/io/grpc/examples/helloworld/HelloResponseOrBuilder.java create mode 100644 examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/Feature.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/FeatureOrBuilder.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/Point.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/PointOrBuilder.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RectangleOrBuilder.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideGrpc.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RouteNoteOrBuilder.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java create mode 100644 examples/src/generated/main/io/grpc/examples/routeguide/RouteSummaryOrBuilder.java create mode 100644 integration-testing/src/generated/main/com/google/protobuf/EmptyProtos.java create mode 100644 integration-testing/src/generated/main/io/grpc/testing/integration/Messages.java create mode 100644 integration-testing/src/generated/main/io/grpc/testing/integration/Test.java create mode 100644 integration-testing/src/generated/main/io/grpc/testing/integration/TestServiceGrpc.java diff --git a/README.md b/README.md index 608ce417155..a1df2565177 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,13 @@ $ mvn install -pl codec-http2 -am -DskipTests=true ``` ### Build Protobuf -The codegen plugin requires protobuf 3.0.0-alpha-2. +The codegen plugin is C++ code and requires protobuf 3.0.0-alpha-2. + +If you are not changing the codegen plugin, nor any of the ``.proto`` files in +the source tree, you can skip this chapter and add ``grpc.skip.codegen=true`` +to ``$HOME/.gradle/gradle.properties``. It will make the build script skip the +build and invocation of the codegen, and use generated code that has been +checked in. For Linux, Mac and MinGW: ``` @@ -47,8 +53,8 @@ $ sudo ldconfig #### Mac Some versions of Mac OS X (e.g., 10.10) doesn't have ``/usr/local`` in the -default search paths for header files and libraries. You will need to set -environment variables: +default search paths for header files and libraries. It will fail the build of +the codegen. To work around this, you will need to set environment variables: ``` $ export CXXFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" ``` diff --git a/benchmarks/build.gradle b/benchmarks/build.gradle index a48e25e8c38..477877a76be 100644 --- a/benchmarks/build.gradle +++ b/benchmarks/build.gradle @@ -1,6 +1,4 @@ apply plugin: 'application' -apply plugin: 'com.google.protobuf' - description = "grpc Benchmarks" @@ -46,7 +44,7 @@ dependencies { alpnboot alpnboot_package_name } - +configureProtoCompilation() task qps_client(type: CreateStartScripts) { mainClassName = "io.grpc.benchmarks.qps.AsyncClient" @@ -79,12 +77,6 @@ applicationDistribution.into("bin") { fileMode = 0755 } -protobufCodeGenPlugins = ["java_plugin:$javaPluginPath"] - -project.afterEvaluate { - generateProto.dependsOn ':grpc-compiler:java_pluginExecutable' -} - // Allow intellij projects to refer to generated-sources idea { module { diff --git a/benchmarks/src/generated/main/grpc/testing/Qpstest.java b/benchmarks/src/generated/main/grpc/testing/Qpstest.java new file mode 100644 index 00000000000..d61b071efa5 --- /dev/null +++ b/benchmarks/src/generated/main/grpc/testing/Qpstest.java @@ -0,0 +1,9996 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: qpstest.proto + +package grpc.testing; + +public final class Qpstest { + private Qpstest() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + /** + * Protobuf enum {@code grpc.testing.PayloadType} + */ + public enum PayloadType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * COMPRESSABLE = 1; + * + *
+     * Compressable text format.
+     * 
+ */ + COMPRESSABLE(0, 1), + /** + * UNCOMPRESSABLE = 2; + * + *
+     * Uncompressable binary format.
+     * 
+ */ + UNCOMPRESSABLE(1, 2), + /** + * RANDOM = 3; + * + *
+     * Randomly chosen from all other formats defined in this enum.
+     * 
+ */ + RANDOM(2, 3), + ; + + /** + * COMPRESSABLE = 1; + * + *
+     * Compressable text format.
+     * 
+ */ + public static final int COMPRESSABLE_VALUE = 1; + /** + * UNCOMPRESSABLE = 2; + * + *
+     * Uncompressable binary format.
+     * 
+ */ + public static final int UNCOMPRESSABLE_VALUE = 2; + /** + * RANDOM = 3; + * + *
+     * Randomly chosen from all other formats defined in this enum.
+     * 
+ */ + public static final int RANDOM_VALUE = 3; + + + public final int getNumber() { + return value; + } + + public static PayloadType valueOf(int value) { + switch (value) { + case 1: return COMPRESSABLE; + case 2: return UNCOMPRESSABLE; + case 3: return RANDOM; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadType findValueByNumber(int number) { + return PayloadType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.testing.Qpstest.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."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private PayloadType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.testing.PayloadType) + } + + /** + * Protobuf enum {@code grpc.testing.ClientType} + */ + public enum ClientType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SYNCHRONOUS_CLIENT = 1; + */ + SYNCHRONOUS_CLIENT(0, 1), + /** + * ASYNC_CLIENT = 2; + */ + ASYNC_CLIENT(1, 2), + ; + + /** + * SYNCHRONOUS_CLIENT = 1; + */ + public static final int SYNCHRONOUS_CLIENT_VALUE = 1; + /** + * ASYNC_CLIENT = 2; + */ + public static final int ASYNC_CLIENT_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static ClientType valueOf(int value) { + switch (value) { + case 1: return SYNCHRONOUS_CLIENT; + case 2: return ASYNC_CLIENT; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ClientType findValueByNumber(int number) { + return ClientType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.testing.Qpstest.getDescriptor().getEnumTypes().get(1); + } + + private static final ClientType[] VALUES = values(); + + public static ClientType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private ClientType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.testing.ClientType) + } + + /** + * Protobuf enum {@code grpc.testing.ServerType} + */ + public enum ServerType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * SYNCHRONOUS_SERVER = 1; + */ + SYNCHRONOUS_SERVER(0, 1), + /** + * ASYNC_SERVER = 2; + */ + ASYNC_SERVER(1, 2), + ; + + /** + * SYNCHRONOUS_SERVER = 1; + */ + public static final int SYNCHRONOUS_SERVER_VALUE = 1; + /** + * ASYNC_SERVER = 2; + */ + public static final int ASYNC_SERVER_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static ServerType valueOf(int value) { + switch (value) { + case 1: return SYNCHRONOUS_SERVER; + case 2: return ASYNC_SERVER; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ServerType findValueByNumber(int number) { + return ServerType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.testing.Qpstest.getDescriptor().getEnumTypes().get(2); + } + + private static final ServerType[] VALUES = values(); + + public static ServerType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private ServerType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.testing.ServerType) + } + + /** + * Protobuf enum {@code grpc.testing.RpcType} + */ + public enum RpcType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * UNARY = 1; + */ + UNARY(0, 1), + /** + * STREAMING = 2; + */ + STREAMING(1, 2), + ; + + /** + * UNARY = 1; + */ + public static final int UNARY_VALUE = 1; + /** + * STREAMING = 2; + */ + public static final int STREAMING_VALUE = 2; + + + public final int getNumber() { + return value; + } + + public static RpcType valueOf(int value) { + switch (value) { + case 1: return UNARY; + case 2: return STREAMING; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public RpcType findValueByNumber(int number) { + return RpcType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return grpc.testing.Qpstest.getDescriptor().getEnumTypes().get(3); + } + + private static final RpcType[] VALUES = values(); + + public static RpcType valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int index; + private final int value; + + private RpcType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.testing.RpcType) + } + + public interface StatsRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.StatsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 test_num = 1; + * + *
+     * run number
+     * 
+ */ + boolean hasTestNum(); + /** + * optional int32 test_num = 1; + * + *
+     * run number
+     * 
+ */ + int getTestNum(); + } + /** + * Protobuf type {@code grpc.testing.StatsRequest} + */ + public static final class StatsRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.StatsRequest) + StatsRequestOrBuilder { + // Use StatsRequest.newBuilder() to construct. + private StatsRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StatsRequest() { + testNum_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private StatsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + bitField0_ |= 0x00000001; + testNum_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_StatsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_StatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.StatsRequest.class, grpc.testing.Qpstest.StatsRequest.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StatsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new StatsRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TEST_NUM_FIELD_NUMBER = 1; + private int testNum_; + /** + * optional int32 test_num = 1; + * + *
+     * run number
+     * 
+ */ + public boolean hasTestNum() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 test_num = 1; + * + *
+     * run number
+     * 
+ */ + public int getTestNum() { + return testNum_; + } + + 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 (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeInt32(1, testNum_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, testNum_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.StatsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.StatsRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.StatsRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.StatsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.StatsRequest prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.StatsRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.StatsRequest) + grpc.testing.Qpstest.StatsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_StatsRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_StatsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.StatsRequest.class, grpc.testing.Qpstest.StatsRequest.Builder.class); + } + + // Construct using grpc.testing.Qpstest.StatsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + testNum_ = 0; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_StatsRequest_descriptor; + } + + public grpc.testing.Qpstest.StatsRequest getDefaultInstanceForType() { + return grpc.testing.Qpstest.StatsRequest.getDefaultInstance(); + } + + public grpc.testing.Qpstest.StatsRequest build() { + grpc.testing.Qpstest.StatsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.StatsRequest buildPartial() { + grpc.testing.Qpstest.StatsRequest result = new grpc.testing.Qpstest.StatsRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.testNum_ = testNum_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.StatsRequest) { + return mergeFrom((grpc.testing.Qpstest.StatsRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.StatsRequest other) { + if (other == grpc.testing.Qpstest.StatsRequest.getDefaultInstance()) return this; + if (other.hasTestNum()) { + setTestNum(other.getTestNum()); + } + 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 { + grpc.testing.Qpstest.StatsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.StatsRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int testNum_ ; + /** + * optional int32 test_num = 1; + * + *
+       * run number
+       * 
+ */ + public boolean hasTestNum() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional int32 test_num = 1; + * + *
+       * run number
+       * 
+ */ + public int getTestNum() { + return testNum_; + } + /** + * optional int32 test_num = 1; + * + *
+       * run number
+       * 
+ */ + public Builder setTestNum(int value) { + bitField0_ |= 0x00000001; + testNum_ = value; + onChanged(); + return this; + } + /** + * optional int32 test_num = 1; + * + *
+       * run number
+       * 
+ */ + public Builder clearTestNum() { + bitField0_ = (bitField0_ & ~0x00000001); + testNum_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.StatsRequest) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.StatsRequest) + private static final grpc.testing.Qpstest.StatsRequest defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.StatsRequest(); + } + + public static grpc.testing.Qpstest.StatsRequest getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.StatsRequest getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ServerStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ServerStats) + com.google.protobuf.MessageOrBuilder { + + /** + * required double time_elapsed = 1; + * + *
+     * wall clock time
+     * 
+ */ + boolean hasTimeElapsed(); + /** + * required double time_elapsed = 1; + * + *
+     * wall clock time
+     * 
+ */ + double getTimeElapsed(); + + /** + * required double time_user = 2; + * + *
+     * user time used by the server process and threads
+     * 
+ */ + boolean hasTimeUser(); + /** + * required double time_user = 2; + * + *
+     * user time used by the server process and threads
+     * 
+ */ + double getTimeUser(); + + /** + * required double time_system = 3; + * + *
+     * server time used by the server process and all threads
+     * 
+ */ + boolean hasTimeSystem(); + /** + * required double time_system = 3; + * + *
+     * server time used by the server process and all threads
+     * 
+ */ + double getTimeSystem(); + } + /** + * Protobuf type {@code grpc.testing.ServerStats} + */ + public static final class ServerStats extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ServerStats) + ServerStatsOrBuilder { + // Use ServerStats.newBuilder() to construct. + private ServerStats(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ServerStats() { + timeElapsed_ = 0D; + timeUser_ = 0D; + timeSystem_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ServerStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 9: { + bitField0_ |= 0x00000001; + timeElapsed_ = input.readDouble(); + break; + } + case 17: { + bitField0_ |= 0x00000002; + timeUser_ = input.readDouble(); + break; + } + case 25: { + bitField0_ |= 0x00000004; + timeSystem_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStats_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerStats.class, grpc.testing.Qpstest.ServerStats.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ServerStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ServerStats(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TIME_ELAPSED_FIELD_NUMBER = 1; + private double timeElapsed_; + /** + * required double time_elapsed = 1; + * + *
+     * wall clock time
+     * 
+ */ + public boolean hasTimeElapsed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required double time_elapsed = 1; + * + *
+     * wall clock time
+     * 
+ */ + public double getTimeElapsed() { + return timeElapsed_; + } + + public static final int TIME_USER_FIELD_NUMBER = 2; + private double timeUser_; + /** + * required double time_user = 2; + * + *
+     * user time used by the server process and threads
+     * 
+ */ + public boolean hasTimeUser() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required double time_user = 2; + * + *
+     * user time used by the server process and threads
+     * 
+ */ + public double getTimeUser() { + return timeUser_; + } + + public static final int TIME_SYSTEM_FIELD_NUMBER = 3; + private double timeSystem_; + /** + * required double time_system = 3; + * + *
+     * server time used by the server process and all threads
+     * 
+ */ + public boolean hasTimeSystem() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required double time_system = 3; + * + *
+     * server time used by the server process and all threads
+     * 
+ */ + public double getTimeSystem() { + return timeSystem_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasTimeElapsed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeUser()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeSystem()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(1, timeElapsed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(2, timeUser_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(3, timeSystem_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(1, timeElapsed_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, timeUser_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, timeSystem_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ServerStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ServerStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ServerStats prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ServerStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ServerStats) + grpc.testing.Qpstest.ServerStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStats_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerStats.class, grpc.testing.Qpstest.ServerStats.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ServerStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + timeElapsed_ = 0D; + bitField0_ = (bitField0_ & ~0x00000001); + timeUser_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + timeSystem_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStats_descriptor; + } + + public grpc.testing.Qpstest.ServerStats getDefaultInstanceForType() { + return grpc.testing.Qpstest.ServerStats.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ServerStats build() { + grpc.testing.Qpstest.ServerStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ServerStats buildPartial() { + grpc.testing.Qpstest.ServerStats result = new grpc.testing.Qpstest.ServerStats(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.timeElapsed_ = timeElapsed_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.timeUser_ = timeUser_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.timeSystem_ = timeSystem_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ServerStats) { + return mergeFrom((grpc.testing.Qpstest.ServerStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ServerStats other) { + if (other == grpc.testing.Qpstest.ServerStats.getDefaultInstance()) return this; + if (other.hasTimeElapsed()) { + setTimeElapsed(other.getTimeElapsed()); + } + if (other.hasTimeUser()) { + setTimeUser(other.getTimeUser()); + } + if (other.hasTimeSystem()) { + setTimeSystem(other.getTimeSystem()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasTimeElapsed()) { + + return false; + } + if (!hasTimeUser()) { + + return false; + } + if (!hasTimeSystem()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ServerStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ServerStats) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private double timeElapsed_ ; + /** + * required double time_elapsed = 1; + * + *
+       * wall clock time
+       * 
+ */ + public boolean hasTimeElapsed() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required double time_elapsed = 1; + * + *
+       * wall clock time
+       * 
+ */ + public double getTimeElapsed() { + return timeElapsed_; + } + /** + * required double time_elapsed = 1; + * + *
+       * wall clock time
+       * 
+ */ + public Builder setTimeElapsed(double value) { + bitField0_ |= 0x00000001; + timeElapsed_ = value; + onChanged(); + return this; + } + /** + * required double time_elapsed = 1; + * + *
+       * wall clock time
+       * 
+ */ + public Builder clearTimeElapsed() { + bitField0_ = (bitField0_ & ~0x00000001); + timeElapsed_ = 0D; + onChanged(); + return this; + } + + private double timeUser_ ; + /** + * required double time_user = 2; + * + *
+       * user time used by the server process and threads
+       * 
+ */ + public boolean hasTimeUser() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required double time_user = 2; + * + *
+       * user time used by the server process and threads
+       * 
+ */ + public double getTimeUser() { + return timeUser_; + } + /** + * required double time_user = 2; + * + *
+       * user time used by the server process and threads
+       * 
+ */ + public Builder setTimeUser(double value) { + bitField0_ |= 0x00000002; + timeUser_ = value; + onChanged(); + return this; + } + /** + * required double time_user = 2; + * + *
+       * user time used by the server process and threads
+       * 
+ */ + public Builder clearTimeUser() { + bitField0_ = (bitField0_ & ~0x00000002); + timeUser_ = 0D; + onChanged(); + return this; + } + + private double timeSystem_ ; + /** + * required double time_system = 3; + * + *
+       * server time used by the server process and all threads
+       * 
+ */ + public boolean hasTimeSystem() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required double time_system = 3; + * + *
+       * server time used by the server process and all threads
+       * 
+ */ + public double getTimeSystem() { + return timeSystem_; + } + /** + * required double time_system = 3; + * + *
+       * server time used by the server process and all threads
+       * 
+ */ + public Builder setTimeSystem(double value) { + bitField0_ |= 0x00000004; + timeSystem_ = value; + onChanged(); + return this; + } + /** + * required double time_system = 3; + * + *
+       * server time used by the server process and all threads
+       * 
+ */ + public Builder clearTimeSystem() { + bitField0_ = (bitField0_ & ~0x00000004); + timeSystem_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ServerStats) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ServerStats) + private static final grpc.testing.Qpstest.ServerStats defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ServerStats(); + } + + public static grpc.testing.Qpstest.ServerStats getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ServerStats getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface PayloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.Payload) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + boolean hasType(); + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + grpc.testing.Qpstest.PayloadType getType(); + + /** + * optional bytes body = 2; + * + *
+     * Primary contents of payload.
+     * 
+ */ + boolean hasBody(); + /** + * optional bytes body = 2; + * + *
+     * Primary contents of payload.
+     * 
+ */ + com.google.protobuf.ByteString getBody(); + } + /** + * Protobuf type {@code grpc.testing.Payload} + */ + public static final class Payload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.Payload) + PayloadOrBuilder { + // Use Payload.newBuilder() to construct. + private Payload(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Payload() { + type_ = 1; + body_ = com.google.protobuf.ByteString.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Payload( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + grpc.testing.Qpstest.PayloadType value = grpc.testing.Qpstest.PayloadType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + type_ = rawValue; + } + break; + } + case 18: { + bitField0_ |= 0x00000002; + body_ = input.readBytes(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Payload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Payload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.Payload.class, grpc.testing.Qpstest.Payload.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Payload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Payload(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + public grpc.testing.Qpstest.PayloadType getType() { + grpc.testing.Qpstest.PayloadType result = grpc.testing.Qpstest.PayloadType.valueOf(type_); + return result == null ? grpc.testing.Qpstest.PayloadType.COMPRESSABLE : result; + } + + public static final int BODY_FIELD_NUMBER = 2; + private com.google.protobuf.ByteString body_; + /** + * optional bytes body = 2; + * + *
+     * Primary contents of payload.
+     * 
+ */ + public boolean hasBody() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bytes body = 2; + * + *
+     * Primary contents of payload.
+     * 
+ */ + 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 (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, type_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(2, body_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, type_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, body_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.Payload parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.Payload parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.Payload parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.Payload parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.Payload parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.Payload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.Payload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.Payload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.Payload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.Payload parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.Payload prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.Payload} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.Payload) + grpc.testing.Qpstest.PayloadOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Payload_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Payload_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.Payload.class, grpc.testing.Qpstest.Payload.Builder.class); + } + + // Construct using grpc.testing.Qpstest.Payload.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + type_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + body_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Payload_descriptor; + } + + public grpc.testing.Qpstest.Payload getDefaultInstanceForType() { + return grpc.testing.Qpstest.Payload.getDefaultInstance(); + } + + public grpc.testing.Qpstest.Payload build() { + grpc.testing.Qpstest.Payload result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.Payload buildPartial() { + grpc.testing.Qpstest.Payload result = new grpc.testing.Qpstest.Payload(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.type_ = type_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.body_ = body_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.Payload) { + return mergeFrom((grpc.testing.Qpstest.Payload)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.Payload other) { + if (other == grpc.testing.Qpstest.Payload.getDefaultInstance()) return this; + if (other.hasType()) { + setType(other.getType()); + } + if (other.hasBody()) { + setBody(other.getBody()); + } + 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 { + grpc.testing.Qpstest.Payload parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.Payload) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int type_ = 1; + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public boolean hasType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public grpc.testing.Qpstest.PayloadType getType() { + grpc.testing.Qpstest.PayloadType result = grpc.testing.Qpstest.PayloadType.valueOf(type_); + return result == null ? grpc.testing.Qpstest.PayloadType.COMPRESSABLE : result; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public Builder setType(grpc.testing.Qpstest.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public Builder clearType() { + bitField0_ = (bitField0_ & ~0x00000001); + type_ = 1; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + public boolean hasBody() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + public com.google.protobuf.ByteString getBody() { + return body_; + } + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + body_ = value; + onChanged(); + return this; + } + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + public Builder clearBody() { + bitField0_ = (bitField0_ & ~0x00000002); + body_ = getDefaultInstance().getBody(); + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.Payload) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.Payload) + private static final grpc.testing.Qpstest.Payload defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.Payload(); + } + + public static grpc.testing.Qpstest.Payload getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.Payload getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface HistogramDataOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.HistogramData) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated uint32 bucket = 1; + */ + java.util.List getBucketList(); + /** + * repeated uint32 bucket = 1; + */ + int getBucketCount(); + /** + * repeated uint32 bucket = 1; + */ + int getBucket(int index); + + /** + * required double min_seen = 2; + */ + boolean hasMinSeen(); + /** + * required double min_seen = 2; + */ + double getMinSeen(); + + /** + * required double max_seen = 3; + */ + boolean hasMaxSeen(); + /** + * required double max_seen = 3; + */ + double getMaxSeen(); + + /** + * required double sum = 4; + */ + boolean hasSum(); + /** + * required double sum = 4; + */ + double getSum(); + + /** + * required double sum_of_squares = 5; + */ + boolean hasSumOfSquares(); + /** + * required double sum_of_squares = 5; + */ + double getSumOfSquares(); + + /** + * required double count = 6; + */ + boolean hasCount(); + /** + * required double count = 6; + */ + double getCount(); + } + /** + * Protobuf type {@code grpc.testing.HistogramData} + */ + public static final class HistogramData extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.HistogramData) + HistogramDataOrBuilder { + // Use HistogramData.newBuilder() to construct. + private HistogramData(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HistogramData() { + bucket_ = java.util.Collections.emptyList(); + minSeen_ = 0D; + maxSeen_ = 0D; + sum_ = 0D; + sumOfSquares_ = 0D; + count_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private HistogramData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + bucket_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + bucket_.add(input.readUInt32()); + break; + } + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) && input.getBytesUntilLimit() > 0) { + bucket_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + while (input.getBytesUntilLimit() > 0) { + bucket_.add(input.readUInt32()); + } + input.popLimit(limit); + break; + } + case 17: { + bitField0_ |= 0x00000001; + minSeen_ = input.readDouble(); + break; + } + case 25: { + bitField0_ |= 0x00000002; + maxSeen_ = input.readDouble(); + break; + } + case 33: { + bitField0_ |= 0x00000004; + sum_ = input.readDouble(); + break; + } + case 41: { + bitField0_ |= 0x00000008; + sumOfSquares_ = input.readDouble(); + break; + } + case 49: { + bitField0_ |= 0x00000010; + count_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + bucket_ = java.util.Collections.unmodifiableList(bucket_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_HistogramData_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_HistogramData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.HistogramData.class, grpc.testing.Qpstest.HistogramData.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public HistogramData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HistogramData(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int BUCKET_FIELD_NUMBER = 1; + private java.util.List bucket_; + /** + * repeated uint32 bucket = 1; + */ + public java.util.List + getBucketList() { + return bucket_; + } + /** + * repeated uint32 bucket = 1; + */ + public int getBucketCount() { + return bucket_.size(); + } + /** + * repeated uint32 bucket = 1; + */ + public int getBucket(int index) { + return bucket_.get(index); + } + + public static final int MIN_SEEN_FIELD_NUMBER = 2; + private double minSeen_; + /** + * required double min_seen = 2; + */ + public boolean hasMinSeen() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required double min_seen = 2; + */ + public double getMinSeen() { + return minSeen_; + } + + public static final int MAX_SEEN_FIELD_NUMBER = 3; + private double maxSeen_; + /** + * required double max_seen = 3; + */ + public boolean hasMaxSeen() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required double max_seen = 3; + */ + public double getMaxSeen() { + return maxSeen_; + } + + public static final int SUM_FIELD_NUMBER = 4; + private double sum_; + /** + * required double sum = 4; + */ + public boolean hasSum() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required double sum = 4; + */ + public double getSum() { + return sum_; + } + + public static final int SUM_OF_SQUARES_FIELD_NUMBER = 5; + private double sumOfSquares_; + /** + * required double sum_of_squares = 5; + */ + public boolean hasSumOfSquares() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required double sum_of_squares = 5; + */ + public double getSumOfSquares() { + return sumOfSquares_; + } + + public static final int COUNT_FIELD_NUMBER = 6; + private double count_; + /** + * required double count = 6; + */ + public boolean hasCount() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required double count = 6; + */ + public double getCount() { + return count_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasMinSeen()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasMaxSeen()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSum()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasSumOfSquares()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasCount()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < bucket_.size(); i++) { + output.writeUInt32(1, bucket_.get(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeDouble(2, minSeen_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(3, maxSeen_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(4, sum_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeDouble(5, sumOfSquares_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeDouble(6, count_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < bucket_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeUInt32SizeNoTag(bucket_.get(i)); + } + size += dataSize; + size += 1 * getBucketList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(2, minSeen_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, maxSeen_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, sum_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, sumOfSquares_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(6, count_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.HistogramData parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.HistogramData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.HistogramData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.HistogramData parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.HistogramData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.HistogramData parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.HistogramData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.HistogramData parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.HistogramData parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.HistogramData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.HistogramData prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.HistogramData} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.HistogramData) + grpc.testing.Qpstest.HistogramDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_HistogramData_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_HistogramData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.HistogramData.class, grpc.testing.Qpstest.HistogramData.Builder.class); + } + + // Construct using grpc.testing.Qpstest.HistogramData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + bucket_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + minSeen_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + maxSeen_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + sum_ = 0D; + bitField0_ = (bitField0_ & ~0x00000008); + sumOfSquares_ = 0D; + bitField0_ = (bitField0_ & ~0x00000010); + count_ = 0D; + bitField0_ = (bitField0_ & ~0x00000020); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_HistogramData_descriptor; + } + + public grpc.testing.Qpstest.HistogramData getDefaultInstanceForType() { + return grpc.testing.Qpstest.HistogramData.getDefaultInstance(); + } + + public grpc.testing.Qpstest.HistogramData build() { + grpc.testing.Qpstest.HistogramData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.HistogramData buildPartial() { + grpc.testing.Qpstest.HistogramData result = new grpc.testing.Qpstest.HistogramData(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + bucket_ = java.util.Collections.unmodifiableList(bucket_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.bucket_ = bucket_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.minSeen_ = minSeen_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.maxSeen_ = maxSeen_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.sum_ = sum_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.sumOfSquares_ = sumOfSquares_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.count_ = count_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.HistogramData) { + return mergeFrom((grpc.testing.Qpstest.HistogramData)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.HistogramData other) { + if (other == grpc.testing.Qpstest.HistogramData.getDefaultInstance()) return this; + if (!other.bucket_.isEmpty()) { + if (bucket_.isEmpty()) { + bucket_ = other.bucket_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureBucketIsMutable(); + bucket_.addAll(other.bucket_); + } + onChanged(); + } + if (other.hasMinSeen()) { + setMinSeen(other.getMinSeen()); + } + if (other.hasMaxSeen()) { + setMaxSeen(other.getMaxSeen()); + } + if (other.hasSum()) { + setSum(other.getSum()); + } + if (other.hasSumOfSquares()) { + setSumOfSquares(other.getSumOfSquares()); + } + if (other.hasCount()) { + setCount(other.getCount()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasMinSeen()) { + + return false; + } + if (!hasMaxSeen()) { + + return false; + } + if (!hasSum()) { + + return false; + } + if (!hasSumOfSquares()) { + + return false; + } + if (!hasCount()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.HistogramData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.HistogramData) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private java.util.List bucket_ = java.util.Collections.emptyList(); + private void ensureBucketIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + bucket_ = new java.util.ArrayList(bucket_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated uint32 bucket = 1; + */ + public java.util.List + getBucketList() { + return java.util.Collections.unmodifiableList(bucket_); + } + /** + * repeated uint32 bucket = 1; + */ + public int getBucketCount() { + return bucket_.size(); + } + /** + * repeated uint32 bucket = 1; + */ + public int getBucket(int index) { + return bucket_.get(index); + } + /** + * repeated uint32 bucket = 1; + */ + public Builder setBucket( + int index, int value) { + ensureBucketIsMutable(); + bucket_.set(index, value); + onChanged(); + return this; + } + /** + * repeated uint32 bucket = 1; + */ + public Builder addBucket(int value) { + ensureBucketIsMutable(); + bucket_.add(value); + onChanged(); + return this; + } + /** + * repeated uint32 bucket = 1; + */ + public Builder addAllBucket( + java.lang.Iterable values) { + ensureBucketIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, bucket_); + onChanged(); + return this; + } + /** + * repeated uint32 bucket = 1; + */ + public Builder clearBucket() { + bucket_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + + private double minSeen_ ; + /** + * required double min_seen = 2; + */ + public boolean hasMinSeen() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required double min_seen = 2; + */ + public double getMinSeen() { + return minSeen_; + } + /** + * required double min_seen = 2; + */ + public Builder setMinSeen(double value) { + bitField0_ |= 0x00000002; + minSeen_ = value; + onChanged(); + return this; + } + /** + * required double min_seen = 2; + */ + public Builder clearMinSeen() { + bitField0_ = (bitField0_ & ~0x00000002); + minSeen_ = 0D; + onChanged(); + return this; + } + + private double maxSeen_ ; + /** + * required double max_seen = 3; + */ + public boolean hasMaxSeen() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required double max_seen = 3; + */ + public double getMaxSeen() { + return maxSeen_; + } + /** + * required double max_seen = 3; + */ + public Builder setMaxSeen(double value) { + bitField0_ |= 0x00000004; + maxSeen_ = value; + onChanged(); + return this; + } + /** + * required double max_seen = 3; + */ + public Builder clearMaxSeen() { + bitField0_ = (bitField0_ & ~0x00000004); + maxSeen_ = 0D; + onChanged(); + return this; + } + + private double sum_ ; + /** + * required double sum = 4; + */ + public boolean hasSum() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required double sum = 4; + */ + public double getSum() { + return sum_; + } + /** + * required double sum = 4; + */ + public Builder setSum(double value) { + bitField0_ |= 0x00000008; + sum_ = value; + onChanged(); + return this; + } + /** + * required double sum = 4; + */ + public Builder clearSum() { + bitField0_ = (bitField0_ & ~0x00000008); + sum_ = 0D; + onChanged(); + return this; + } + + private double sumOfSquares_ ; + /** + * required double sum_of_squares = 5; + */ + public boolean hasSumOfSquares() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required double sum_of_squares = 5; + */ + public double getSumOfSquares() { + return sumOfSquares_; + } + /** + * required double sum_of_squares = 5; + */ + public Builder setSumOfSquares(double value) { + bitField0_ |= 0x00000010; + sumOfSquares_ = value; + onChanged(); + return this; + } + /** + * required double sum_of_squares = 5; + */ + public Builder clearSumOfSquares() { + bitField0_ = (bitField0_ & ~0x00000010); + sumOfSquares_ = 0D; + onChanged(); + return this; + } + + private double count_ ; + /** + * required double count = 6; + */ + public boolean hasCount() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * required double count = 6; + */ + public double getCount() { + return count_; + } + /** + * required double count = 6; + */ + public Builder setCount(double value) { + bitField0_ |= 0x00000020; + count_ = value; + onChanged(); + return this; + } + /** + * required double count = 6; + */ + public Builder clearCount() { + bitField0_ = (bitField0_ & ~0x00000020); + count_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.HistogramData) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.HistogramData) + private static final grpc.testing.Qpstest.HistogramData defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.HistogramData(); + } + + public static grpc.testing.Qpstest.HistogramData getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.HistogramData getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ClientConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ClientConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated string server_targets = 1; + */ + com.google.protobuf.ProtocolStringList + getServerTargetsList(); + /** + * repeated string server_targets = 1; + */ + int getServerTargetsCount(); + /** + * repeated string server_targets = 1; + */ + java.lang.String getServerTargets(int index); + /** + * repeated string server_targets = 1; + */ + com.google.protobuf.ByteString + getServerTargetsBytes(int index); + + /** + * required .grpc.testing.ClientType client_type = 2; + */ + boolean hasClientType(); + /** + * required .grpc.testing.ClientType client_type = 2; + */ + grpc.testing.Qpstest.ClientType getClientType(); + + /** + * optional bool enable_ssl = 3 [default = false]; + */ + boolean hasEnableSsl(); + /** + * optional bool enable_ssl = 3 [default = false]; + */ + boolean getEnableSsl(); + + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + boolean hasOutstandingRpcsPerChannel(); + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + int getOutstandingRpcsPerChannel(); + + /** + * required int32 client_channels = 5; + */ + boolean hasClientChannels(); + /** + * required int32 client_channels = 5; + */ + int getClientChannels(); + + /** + * required int32 payload_size = 6; + */ + boolean hasPayloadSize(); + /** + * required int32 payload_size = 6; + */ + int getPayloadSize(); + + /** + * optional int32 async_client_threads = 7; + * + *
+     * only for async client:
+     * 
+ */ + boolean hasAsyncClientThreads(); + /** + * optional int32 async_client_threads = 7; + * + *
+     * only for async client:
+     * 
+ */ + int getAsyncClientThreads(); + + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + boolean hasRpcType(); + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + grpc.testing.Qpstest.RpcType getRpcType(); + } + /** + * Protobuf type {@code grpc.testing.ClientConfig} + */ + public static final class ClientConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ClientConfig) + ClientConfigOrBuilder { + // Use ClientConfig.newBuilder() to construct. + private ClientConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ClientConfig() { + serverTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + clientType_ = 1; + enableSsl_ = false; + outstandingRpcsPerChannel_ = 0; + clientChannels_ = 0; + payloadSize_ = 0; + asyncClientThreads_ = 0; + rpcType_ = 1; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ClientConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + serverTargets_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + serverTargets_.add(bs); + break; + } + case 16: { + int rawValue = input.readEnum(); + grpc.testing.Qpstest.ClientType value = grpc.testing.Qpstest.ClientType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(2, rawValue); + } else { + bitField0_ |= 0x00000001; + clientType_ = rawValue; + } + break; + } + case 24: { + bitField0_ |= 0x00000002; + enableSsl_ = input.readBool(); + break; + } + case 32: { + bitField0_ |= 0x00000004; + outstandingRpcsPerChannel_ = input.readInt32(); + break; + } + case 40: { + bitField0_ |= 0x00000008; + clientChannels_ = input.readInt32(); + break; + } + case 48: { + bitField0_ |= 0x00000010; + payloadSize_ = input.readInt32(); + break; + } + case 56: { + bitField0_ |= 0x00000020; + asyncClientThreads_ = input.readInt32(); + break; + } + case 64: { + int rawValue = input.readEnum(); + grpc.testing.Qpstest.RpcType value = grpc.testing.Qpstest.RpcType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(8, rawValue); + } else { + bitField0_ |= 0x00000040; + rpcType_ = rawValue; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + serverTargets_ = serverTargets_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientConfig.class, grpc.testing.Qpstest.ClientConfig.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ClientConfig(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int SERVER_TARGETS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList serverTargets_; + /** + * repeated string server_targets = 1; + */ + public com.google.protobuf.ProtocolStringList + getServerTargetsList() { + return serverTargets_; + } + /** + * repeated string server_targets = 1; + */ + public int getServerTargetsCount() { + return serverTargets_.size(); + } + /** + * repeated string server_targets = 1; + */ + public java.lang.String getServerTargets(int index) { + return serverTargets_.get(index); + } + /** + * repeated string server_targets = 1; + */ + public com.google.protobuf.ByteString + getServerTargetsBytes(int index) { + return serverTargets_.getByteString(index); + } + + public static final int CLIENT_TYPE_FIELD_NUMBER = 2; + private int clientType_; + /** + * required .grpc.testing.ClientType client_type = 2; + */ + public boolean hasClientType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .grpc.testing.ClientType client_type = 2; + */ + public grpc.testing.Qpstest.ClientType getClientType() { + grpc.testing.Qpstest.ClientType result = grpc.testing.Qpstest.ClientType.valueOf(clientType_); + return result == null ? grpc.testing.Qpstest.ClientType.SYNCHRONOUS_CLIENT : result; + } + + public static final int ENABLE_SSL_FIELD_NUMBER = 3; + private boolean enableSsl_; + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean hasEnableSsl() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean getEnableSsl() { + return enableSsl_; + } + + public static final int OUTSTANDING_RPCS_PER_CHANNEL_FIELD_NUMBER = 4; + private int outstandingRpcsPerChannel_; + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + public boolean hasOutstandingRpcsPerChannel() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + public int getOutstandingRpcsPerChannel() { + return outstandingRpcsPerChannel_; + } + + public static final int CLIENT_CHANNELS_FIELD_NUMBER = 5; + private int clientChannels_; + /** + * required int32 client_channels = 5; + */ + public boolean hasClientChannels() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required int32 client_channels = 5; + */ + public int getClientChannels() { + return clientChannels_; + } + + public static final int PAYLOAD_SIZE_FIELD_NUMBER = 6; + private int payloadSize_; + /** + * required int32 payload_size = 6; + */ + public boolean hasPayloadSize() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required int32 payload_size = 6; + */ + public int getPayloadSize() { + return payloadSize_; + } + + public static final int ASYNC_CLIENT_THREADS_FIELD_NUMBER = 7; + private int asyncClientThreads_; + /** + * optional int32 async_client_threads = 7; + * + *
+     * only for async client:
+     * 
+ */ + public boolean hasAsyncClientThreads() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * optional int32 async_client_threads = 7; + * + *
+     * only for async client:
+     * 
+ */ + public int getAsyncClientThreads() { + return asyncClientThreads_; + } + + public static final int RPC_TYPE_FIELD_NUMBER = 8; + private int rpcType_; + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + public boolean hasRpcType() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + public grpc.testing.Qpstest.RpcType getRpcType() { + grpc.testing.Qpstest.RpcType result = grpc.testing.Qpstest.RpcType.valueOf(rpcType_); + return result == null ? grpc.testing.Qpstest.RpcType.UNARY : result; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasClientType()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasOutstandingRpcsPerChannel()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasClientChannels()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasPayloadSize()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < serverTargets_.size(); i++) { + output.writeBytes(1, serverTargets_.getByteString(i)); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(2, clientType_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBool(3, enableSsl_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeInt32(4, outstandingRpcsPerChannel_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeInt32(5, clientChannels_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + output.writeInt32(6, payloadSize_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + output.writeInt32(7, asyncClientThreads_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + output.writeEnum(8, rpcType_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < serverTargets_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeBytesSizeNoTag(serverTargets_.getByteString(i)); + } + size += dataSize; + size += 1 * getServerTargetsList().size(); + } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(2, clientType_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enableSsl_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, outstandingRpcsPerChannel_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(5, clientChannels_); + } + if (((bitField0_ & 0x00000010) == 0x00000010)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(6, payloadSize_); + } + if (((bitField0_ & 0x00000020) == 0x00000020)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(7, asyncClientThreads_); + } + if (((bitField0_ & 0x00000040) == 0x00000040)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(8, rpcType_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ClientConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ClientConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ClientConfig prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ClientConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ClientConfig) + grpc.testing.Qpstest.ClientConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientConfig.class, grpc.testing.Qpstest.ClientConfig.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ClientConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + serverTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + clientType_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + enableSsl_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + outstandingRpcsPerChannel_ = 0; + bitField0_ = (bitField0_ & ~0x00000008); + clientChannels_ = 0; + bitField0_ = (bitField0_ & ~0x00000010); + payloadSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000020); + asyncClientThreads_ = 0; + bitField0_ = (bitField0_ & ~0x00000040); + rpcType_ = 1; + bitField0_ = (bitField0_ & ~0x00000080); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientConfig_descriptor; + } + + public grpc.testing.Qpstest.ClientConfig getDefaultInstanceForType() { + return grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ClientConfig build() { + grpc.testing.Qpstest.ClientConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ClientConfig buildPartial() { + grpc.testing.Qpstest.ClientConfig result = new grpc.testing.Qpstest.ClientConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + serverTargets_ = serverTargets_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serverTargets_ = serverTargets_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000001; + } + result.clientType_ = clientType_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000002; + } + result.enableSsl_ = enableSsl_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000004; + } + result.outstandingRpcsPerChannel_ = outstandingRpcsPerChannel_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000008; + } + result.clientChannels_ = clientChannels_; + if (((from_bitField0_ & 0x00000020) == 0x00000020)) { + to_bitField0_ |= 0x00000010; + } + result.payloadSize_ = payloadSize_; + if (((from_bitField0_ & 0x00000040) == 0x00000040)) { + to_bitField0_ |= 0x00000020; + } + result.asyncClientThreads_ = asyncClientThreads_; + if (((from_bitField0_ & 0x00000080) == 0x00000080)) { + to_bitField0_ |= 0x00000040; + } + result.rpcType_ = rpcType_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ClientConfig) { + return mergeFrom((grpc.testing.Qpstest.ClientConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ClientConfig other) { + if (other == grpc.testing.Qpstest.ClientConfig.getDefaultInstance()) return this; + if (!other.serverTargets_.isEmpty()) { + if (serverTargets_.isEmpty()) { + serverTargets_ = other.serverTargets_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServerTargetsIsMutable(); + serverTargets_.addAll(other.serverTargets_); + } + onChanged(); + } + if (other.hasClientType()) { + setClientType(other.getClientType()); + } + if (other.hasEnableSsl()) { + setEnableSsl(other.getEnableSsl()); + } + if (other.hasOutstandingRpcsPerChannel()) { + setOutstandingRpcsPerChannel(other.getOutstandingRpcsPerChannel()); + } + if (other.hasClientChannels()) { + setClientChannels(other.getClientChannels()); + } + if (other.hasPayloadSize()) { + setPayloadSize(other.getPayloadSize()); + } + if (other.hasAsyncClientThreads()) { + setAsyncClientThreads(other.getAsyncClientThreads()); + } + if (other.hasRpcType()) { + setRpcType(other.getRpcType()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasClientType()) { + + return false; + } + if (!hasOutstandingRpcsPerChannel()) { + + return false; + } + if (!hasClientChannels()) { + + return false; + } + if (!hasPayloadSize()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ClientConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ClientConfig) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private com.google.protobuf.LazyStringList serverTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private void ensureServerTargetsIsMutable() { + if (!((bitField0_ & 0x00000001) == 0x00000001)) { + serverTargets_ = new com.google.protobuf.LazyStringArrayList(serverTargets_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated string server_targets = 1; + */ + public com.google.protobuf.ProtocolStringList + getServerTargetsList() { + return serverTargets_.getUnmodifiableView(); + } + /** + * repeated string server_targets = 1; + */ + public int getServerTargetsCount() { + return serverTargets_.size(); + } + /** + * repeated string server_targets = 1; + */ + public java.lang.String getServerTargets(int index) { + return serverTargets_.get(index); + } + /** + * repeated string server_targets = 1; + */ + public com.google.protobuf.ByteString + getServerTargetsBytes(int index) { + return serverTargets_.getByteString(index); + } + /** + * repeated string server_targets = 1; + */ + public Builder setServerTargets( + int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServerTargetsIsMutable(); + serverTargets_.set(index, value); + onChanged(); + return this; + } + /** + * repeated string server_targets = 1; + */ + public Builder addServerTargets( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServerTargetsIsMutable(); + serverTargets_.add(value); + onChanged(); + return this; + } + /** + * repeated string server_targets = 1; + */ + public Builder addAllServerTargets( + java.lang.Iterable values) { + ensureServerTargetsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serverTargets_); + onChanged(); + return this; + } + /** + * repeated string server_targets = 1; + */ + public Builder clearServerTargets() { + serverTargets_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * repeated string server_targets = 1; + */ + public Builder addServerTargetsBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServerTargetsIsMutable(); + serverTargets_.add(value); + onChanged(); + return this; + } + + private int clientType_ = 1; + /** + * required .grpc.testing.ClientType client_type = 2; + */ + public boolean hasClientType() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required .grpc.testing.ClientType client_type = 2; + */ + public grpc.testing.Qpstest.ClientType getClientType() { + grpc.testing.Qpstest.ClientType result = grpc.testing.Qpstest.ClientType.valueOf(clientType_); + return result == null ? grpc.testing.Qpstest.ClientType.SYNCHRONOUS_CLIENT : result; + } + /** + * required .grpc.testing.ClientType client_type = 2; + */ + public Builder setClientType(grpc.testing.Qpstest.ClientType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000002; + clientType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * required .grpc.testing.ClientType client_type = 2; + */ + public Builder clearClientType() { + bitField0_ = (bitField0_ & ~0x00000002); + clientType_ = 1; + onChanged(); + return this; + } + + private boolean enableSsl_ ; + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean hasEnableSsl() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean getEnableSsl() { + return enableSsl_; + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public Builder setEnableSsl(boolean value) { + bitField0_ |= 0x00000004; + enableSsl_ = value; + onChanged(); + return this; + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public Builder clearEnableSsl() { + bitField0_ = (bitField0_ & ~0x00000004); + enableSsl_ = false; + onChanged(); + return this; + } + + private int outstandingRpcsPerChannel_ ; + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + public boolean hasOutstandingRpcsPerChannel() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + public int getOutstandingRpcsPerChannel() { + return outstandingRpcsPerChannel_; + } + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + public Builder setOutstandingRpcsPerChannel(int value) { + bitField0_ |= 0x00000008; + outstandingRpcsPerChannel_ = value; + onChanged(); + return this; + } + /** + * required int32 outstanding_rpcs_per_channel = 4; + */ + public Builder clearOutstandingRpcsPerChannel() { + bitField0_ = (bitField0_ & ~0x00000008); + outstandingRpcsPerChannel_ = 0; + onChanged(); + return this; + } + + private int clientChannels_ ; + /** + * required int32 client_channels = 5; + */ + public boolean hasClientChannels() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * required int32 client_channels = 5; + */ + public int getClientChannels() { + return clientChannels_; + } + /** + * required int32 client_channels = 5; + */ + public Builder setClientChannels(int value) { + bitField0_ |= 0x00000010; + clientChannels_ = value; + onChanged(); + return this; + } + /** + * required int32 client_channels = 5; + */ + public Builder clearClientChannels() { + bitField0_ = (bitField0_ & ~0x00000010); + clientChannels_ = 0; + onChanged(); + return this; + } + + private int payloadSize_ ; + /** + * required int32 payload_size = 6; + */ + public boolean hasPayloadSize() { + return ((bitField0_ & 0x00000020) == 0x00000020); + } + /** + * required int32 payload_size = 6; + */ + public int getPayloadSize() { + return payloadSize_; + } + /** + * required int32 payload_size = 6; + */ + public Builder setPayloadSize(int value) { + bitField0_ |= 0x00000020; + payloadSize_ = value; + onChanged(); + return this; + } + /** + * required int32 payload_size = 6; + */ + public Builder clearPayloadSize() { + bitField0_ = (bitField0_ & ~0x00000020); + payloadSize_ = 0; + onChanged(); + return this; + } + + private int asyncClientThreads_ ; + /** + * optional int32 async_client_threads = 7; + * + *
+       * only for async client:
+       * 
+ */ + public boolean hasAsyncClientThreads() { + return ((bitField0_ & 0x00000040) == 0x00000040); + } + /** + * optional int32 async_client_threads = 7; + * + *
+       * only for async client:
+       * 
+ */ + public int getAsyncClientThreads() { + return asyncClientThreads_; + } + /** + * optional int32 async_client_threads = 7; + * + *
+       * only for async client:
+       * 
+ */ + public Builder setAsyncClientThreads(int value) { + bitField0_ |= 0x00000040; + asyncClientThreads_ = value; + onChanged(); + return this; + } + /** + * optional int32 async_client_threads = 7; + * + *
+       * only for async client:
+       * 
+ */ + public Builder clearAsyncClientThreads() { + bitField0_ = (bitField0_ & ~0x00000040); + asyncClientThreads_ = 0; + onChanged(); + return this; + } + + private int rpcType_ = 1; + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + public boolean hasRpcType() { + return ((bitField0_ & 0x00000080) == 0x00000080); + } + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + public grpc.testing.Qpstest.RpcType getRpcType() { + grpc.testing.Qpstest.RpcType result = grpc.testing.Qpstest.RpcType.valueOf(rpcType_); + return result == null ? grpc.testing.Qpstest.RpcType.UNARY : result; + } + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + public Builder setRpcType(grpc.testing.Qpstest.RpcType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000080; + rpcType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .grpc.testing.RpcType rpc_type = 8 [default = UNARY]; + */ + public Builder clearRpcType() { + bitField0_ = (bitField0_ & ~0x00000080); + rpcType_ = 1; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ClientConfig) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ClientConfig) + private static final grpc.testing.Qpstest.ClientConfig defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ClientConfig(); + } + + public static grpc.testing.Qpstest.ClientConfig getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ClientConfig getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface MarkOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.Mark) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code grpc.testing.Mark} + * + *
+   * Request current stats
+   * 
+ */ + public static final class Mark extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.Mark) + MarkOrBuilder { + // Use Mark.newBuilder() to construct. + private Mark(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Mark() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private Mark( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Mark_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Mark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.Mark.class, grpc.testing.Qpstest.Mark.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Mark parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Mark(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + 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); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.Mark parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.Mark parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.Mark parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.Mark parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.Mark parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.Mark parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.Mark parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.Mark parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.Mark parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.Mark parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.Mark prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.Mark} + * + *
+     * Request current stats
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.Mark) + grpc.testing.Qpstest.MarkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Mark_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Mark_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.Mark.class, grpc.testing.Qpstest.Mark.Builder.class); + } + + // Construct using grpc.testing.Qpstest.Mark.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_Mark_descriptor; + } + + public grpc.testing.Qpstest.Mark getDefaultInstanceForType() { + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + + public grpc.testing.Qpstest.Mark build() { + grpc.testing.Qpstest.Mark result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.Mark buildPartial() { + grpc.testing.Qpstest.Mark result = new grpc.testing.Qpstest.Mark(this); + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.Mark) { + return mergeFrom((grpc.testing.Qpstest.Mark)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.Mark other) { + if (other == grpc.testing.Qpstest.Mark.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 { + grpc.testing.Qpstest.Mark parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.Mark) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.Mark) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.Mark) + private static final grpc.testing.Qpstest.Mark defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.Mark(); + } + + public static grpc.testing.Qpstest.Mark getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.Mark getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ClientArgsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ClientArgs) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + boolean hasSetup(); + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + grpc.testing.Qpstest.ClientConfig getSetup(); + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + grpc.testing.Qpstest.ClientConfigOrBuilder getSetupOrBuilder(); + + /** + * optional .grpc.testing.Mark mark = 2; + */ + boolean hasMark(); + /** + * optional .grpc.testing.Mark mark = 2; + */ + grpc.testing.Qpstest.Mark getMark(); + /** + * optional .grpc.testing.Mark mark = 2; + */ + grpc.testing.Qpstest.MarkOrBuilder getMarkOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.ClientArgs} + */ + public static final class ClientArgs extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ClientArgs) + ClientArgsOrBuilder { + // Use ClientArgs.newBuilder() to construct. + private ClientArgs(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ClientArgs() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ClientArgs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + grpc.testing.Qpstest.ClientConfig.Builder subBuilder = null; + if (argtypeCase_ == 1) { + subBuilder = ((grpc.testing.Qpstest.ClientConfig) argtype_).toBuilder(); + } + argtype_ = input.readMessage(grpc.testing.Qpstest.ClientConfig.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((grpc.testing.Qpstest.ClientConfig) argtype_); + argtype_ = subBuilder.buildPartial(); + } + argtypeCase_ = 1; + break; + } + case 18: { + grpc.testing.Qpstest.Mark.Builder subBuilder = null; + if (argtypeCase_ == 2) { + subBuilder = ((grpc.testing.Qpstest.Mark) argtype_).toBuilder(); + } + argtype_ = input.readMessage(grpc.testing.Qpstest.Mark.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((grpc.testing.Qpstest.Mark) argtype_); + argtype_ = subBuilder.buildPartial(); + } + argtypeCase_ = 2; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientArgs_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientArgs.class, grpc.testing.Qpstest.ClientArgs.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientArgs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ClientArgs(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + private int argtypeCase_ = 0; + private java.lang.Object argtype_; + public enum ArgtypeCase + implements com.google.protobuf.Internal.EnumLite { + SETUP(1), + MARK(2), + ARGTYPE_NOT_SET(0); + private int value = 0; + private ArgtypeCase(int value) { + this.value = value; + } + public static ArgtypeCase valueOf(int value) { + switch (value) { + case 1: return SETUP; + case 2: return MARK; + case 0: return ARGTYPE_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public ArgtypeCase + getArgtypeCase() { + return ArgtypeCase.valueOf( + argtypeCase_); + } + + public static final int SETUP_FIELD_NUMBER = 1; + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public boolean hasSetup() { + return argtypeCase_ == 1; + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public grpc.testing.Qpstest.ClientConfig getSetup() { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ClientConfig) argtype_; + } + return grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public grpc.testing.Qpstest.ClientConfigOrBuilder getSetupOrBuilder() { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ClientConfig) argtype_; + } + return grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } + + public static final int MARK_FIELD_NUMBER = 2; + /** + * optional .grpc.testing.Mark mark = 2; + */ + public boolean hasMark() { + return argtypeCase_ == 2; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.Mark getMark() { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.MarkOrBuilder getMarkOrBuilder() { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (hasSetup()) { + if (!getSetup().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (argtypeCase_ == 1) { + output.writeMessage(1, (grpc.testing.Qpstest.ClientConfig) argtype_); + } + if (argtypeCase_ == 2) { + output.writeMessage(2, (grpc.testing.Qpstest.Mark) argtype_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (argtypeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (grpc.testing.Qpstest.ClientConfig) argtype_); + } + if (argtypeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (grpc.testing.Qpstest.Mark) argtype_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ClientArgs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientArgs parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ClientArgs parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientArgs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ClientArgs prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ClientArgs} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ClientArgs) + grpc.testing.Qpstest.ClientArgsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientArgs_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientArgs.class, grpc.testing.Qpstest.ClientArgs.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ClientArgs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + argtypeCase_ = 0; + argtype_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientArgs_descriptor; + } + + public grpc.testing.Qpstest.ClientArgs getDefaultInstanceForType() { + return grpc.testing.Qpstest.ClientArgs.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ClientArgs build() { + grpc.testing.Qpstest.ClientArgs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ClientArgs buildPartial() { + grpc.testing.Qpstest.ClientArgs result = new grpc.testing.Qpstest.ClientArgs(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (argtypeCase_ == 1) { + if (setupBuilder_ == null) { + result.argtype_ = argtype_; + } else { + result.argtype_ = setupBuilder_.build(); + } + } + if (argtypeCase_ == 2) { + if (markBuilder_ == null) { + result.argtype_ = argtype_; + } else { + result.argtype_ = markBuilder_.build(); + } + } + result.bitField0_ = to_bitField0_; + result.argtypeCase_ = argtypeCase_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ClientArgs) { + return mergeFrom((grpc.testing.Qpstest.ClientArgs)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ClientArgs other) { + if (other == grpc.testing.Qpstest.ClientArgs.getDefaultInstance()) return this; + switch (other.getArgtypeCase()) { + case SETUP: { + mergeSetup(other.getSetup()); + break; + } + case MARK: { + mergeMark(other.getMark()); + break; + } + case ARGTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (hasSetup()) { + if (!getSetup().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ClientArgs parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ClientArgs) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int argtypeCase_ = 0; + private java.lang.Object argtype_; + public ArgtypeCase + getArgtypeCase() { + return ArgtypeCase.valueOf( + argtypeCase_); + } + + public Builder clearArgtype() { + argtypeCase_ = 0; + argtype_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ClientConfig, grpc.testing.Qpstest.ClientConfig.Builder, grpc.testing.Qpstest.ClientConfigOrBuilder> setupBuilder_; + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public boolean hasSetup() { + return argtypeCase_ == 1; + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public grpc.testing.Qpstest.ClientConfig getSetup() { + if (setupBuilder_ == null) { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ClientConfig) argtype_; + } + return grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } else { + if (argtypeCase_ == 1) { + return setupBuilder_.getMessage(); + } + return grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public Builder setSetup(grpc.testing.Qpstest.ClientConfig value) { + if (setupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + argtype_ = value; + onChanged(); + } else { + setupBuilder_.setMessage(value); + } + argtypeCase_ = 1; + return this; + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public Builder setSetup( + grpc.testing.Qpstest.ClientConfig.Builder builderForValue) { + if (setupBuilder_ == null) { + argtype_ = builderForValue.build(); + onChanged(); + } else { + setupBuilder_.setMessage(builderForValue.build()); + } + argtypeCase_ = 1; + return this; + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public Builder mergeSetup(grpc.testing.Qpstest.ClientConfig value) { + if (setupBuilder_ == null) { + if (argtypeCase_ == 1 && + argtype_ != grpc.testing.Qpstest.ClientConfig.getDefaultInstance()) { + argtype_ = grpc.testing.Qpstest.ClientConfig.newBuilder((grpc.testing.Qpstest.ClientConfig) argtype_) + .mergeFrom(value).buildPartial(); + } else { + argtype_ = value; + } + onChanged(); + } else { + if (argtypeCase_ == 1) { + setupBuilder_.mergeFrom(value); + } + setupBuilder_.setMessage(value); + } + argtypeCase_ = 1; + return this; + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public Builder clearSetup() { + if (setupBuilder_ == null) { + if (argtypeCase_ == 1) { + argtypeCase_ = 0; + argtype_ = null; + onChanged(); + } + } else { + if (argtypeCase_ == 1) { + argtypeCase_ = 0; + argtype_ = null; + } + setupBuilder_.clear(); + } + return this; + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public grpc.testing.Qpstest.ClientConfig.Builder getSetupBuilder() { + return getSetupFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + public grpc.testing.Qpstest.ClientConfigOrBuilder getSetupOrBuilder() { + if ((argtypeCase_ == 1) && (setupBuilder_ != null)) { + return setupBuilder_.getMessageOrBuilder(); + } else { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ClientConfig) argtype_; + } + return grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.ClientConfig setup = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ClientConfig, grpc.testing.Qpstest.ClientConfig.Builder, grpc.testing.Qpstest.ClientConfigOrBuilder> + getSetupFieldBuilder() { + if (setupBuilder_ == null) { + if (!(argtypeCase_ == 1)) { + argtype_ = grpc.testing.Qpstest.ClientConfig.getDefaultInstance(); + } + setupBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ClientConfig, grpc.testing.Qpstest.ClientConfig.Builder, grpc.testing.Qpstest.ClientConfigOrBuilder>( + (grpc.testing.Qpstest.ClientConfig) argtype_, + getParentForChildren(), + isClean()); + argtype_ = null; + } + argtypeCase_ = 1; + onChanged();; + return setupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Mark, grpc.testing.Qpstest.Mark.Builder, grpc.testing.Qpstest.MarkOrBuilder> markBuilder_; + /** + * optional .grpc.testing.Mark mark = 2; + */ + public boolean hasMark() { + return argtypeCase_ == 2; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.Mark getMark() { + if (markBuilder_ == null) { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } else { + if (argtypeCase_ == 2) { + return markBuilder_.getMessage(); + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder setMark(grpc.testing.Qpstest.Mark value) { + if (markBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + argtype_ = value; + onChanged(); + } else { + markBuilder_.setMessage(value); + } + argtypeCase_ = 2; + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder setMark( + grpc.testing.Qpstest.Mark.Builder builderForValue) { + if (markBuilder_ == null) { + argtype_ = builderForValue.build(); + onChanged(); + } else { + markBuilder_.setMessage(builderForValue.build()); + } + argtypeCase_ = 2; + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder mergeMark(grpc.testing.Qpstest.Mark value) { + if (markBuilder_ == null) { + if (argtypeCase_ == 2 && + argtype_ != grpc.testing.Qpstest.Mark.getDefaultInstance()) { + argtype_ = grpc.testing.Qpstest.Mark.newBuilder((grpc.testing.Qpstest.Mark) argtype_) + .mergeFrom(value).buildPartial(); + } else { + argtype_ = value; + } + onChanged(); + } else { + if (argtypeCase_ == 2) { + markBuilder_.mergeFrom(value); + } + markBuilder_.setMessage(value); + } + argtypeCase_ = 2; + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder clearMark() { + if (markBuilder_ == null) { + if (argtypeCase_ == 2) { + argtypeCase_ = 0; + argtype_ = null; + onChanged(); + } + } else { + if (argtypeCase_ == 2) { + argtypeCase_ = 0; + argtype_ = null; + } + markBuilder_.clear(); + } + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.Mark.Builder getMarkBuilder() { + return getMarkFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.MarkOrBuilder getMarkOrBuilder() { + if ((argtypeCase_ == 2) && (markBuilder_ != null)) { + return markBuilder_.getMessageOrBuilder(); + } else { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Mark, grpc.testing.Qpstest.Mark.Builder, grpc.testing.Qpstest.MarkOrBuilder> + getMarkFieldBuilder() { + if (markBuilder_ == null) { + if (!(argtypeCase_ == 2)) { + argtype_ = grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + markBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Mark, grpc.testing.Qpstest.Mark.Builder, grpc.testing.Qpstest.MarkOrBuilder>( + (grpc.testing.Qpstest.Mark) argtype_, + getParentForChildren(), + isClean()); + argtype_ = null; + } + argtypeCase_ = 2; + onChanged();; + return markBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ClientArgs) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ClientArgs) + private static final grpc.testing.Qpstest.ClientArgs defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ClientArgs(); + } + + public static grpc.testing.Qpstest.ClientArgs getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ClientArgs getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ClientStatsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ClientStats) + com.google.protobuf.MessageOrBuilder { + + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + boolean hasLatencies(); + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + grpc.testing.Qpstest.HistogramData getLatencies(); + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + grpc.testing.Qpstest.HistogramDataOrBuilder getLatenciesOrBuilder(); + + /** + * required double time_elapsed = 3; + */ + boolean hasTimeElapsed(); + /** + * required double time_elapsed = 3; + */ + double getTimeElapsed(); + + /** + * required double time_user = 4; + */ + boolean hasTimeUser(); + /** + * required double time_user = 4; + */ + double getTimeUser(); + + /** + * required double time_system = 5; + */ + boolean hasTimeSystem(); + /** + * required double time_system = 5; + */ + double getTimeSystem(); + } + /** + * Protobuf type {@code grpc.testing.ClientStats} + */ + public static final class ClientStats extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ClientStats) + ClientStatsOrBuilder { + // Use ClientStats.newBuilder() to construct. + private ClientStats(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ClientStats() { + timeElapsed_ = 0D; + timeUser_ = 0D; + timeSystem_ = 0D; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ClientStats( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + grpc.testing.Qpstest.HistogramData.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = latencies_.toBuilder(); + } + latencies_ = input.readMessage(grpc.testing.Qpstest.HistogramData.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(latencies_); + latencies_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 25: { + bitField0_ |= 0x00000002; + timeElapsed_ = input.readDouble(); + break; + } + case 33: { + bitField0_ |= 0x00000004; + timeUser_ = input.readDouble(); + break; + } + case 41: { + bitField0_ |= 0x00000008; + timeSystem_ = input.readDouble(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStats_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientStats.class, grpc.testing.Qpstest.ClientStats.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientStats parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ClientStats(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int LATENCIES_FIELD_NUMBER = 1; + private grpc.testing.Qpstest.HistogramData latencies_; + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public boolean hasLatencies() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public grpc.testing.Qpstest.HistogramData getLatencies() { + return latencies_ == null ? grpc.testing.Qpstest.HistogramData.getDefaultInstance() : latencies_; + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public grpc.testing.Qpstest.HistogramDataOrBuilder getLatenciesOrBuilder() { + return latencies_ == null ? grpc.testing.Qpstest.HistogramData.getDefaultInstance() : latencies_; + } + + public static final int TIME_ELAPSED_FIELD_NUMBER = 3; + private double timeElapsed_; + /** + * required double time_elapsed = 3; + */ + public boolean hasTimeElapsed() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required double time_elapsed = 3; + */ + public double getTimeElapsed() { + return timeElapsed_; + } + + public static final int TIME_USER_FIELD_NUMBER = 4; + private double timeUser_; + /** + * required double time_user = 4; + */ + public boolean hasTimeUser() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required double time_user = 4; + */ + public double getTimeUser() { + return timeUser_; + } + + public static final int TIME_SYSTEM_FIELD_NUMBER = 5; + private double timeSystem_; + /** + * required double time_system = 5; + */ + public boolean hasTimeSystem() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required double time_system = 5; + */ + public double getTimeSystem() { + return timeSystem_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasLatencies()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeElapsed()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeUser()) { + memoizedIsInitialized = 0; + return false; + } + if (!hasTimeSystem()) { + memoizedIsInitialized = 0; + return false; + } + if (!getLatencies().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getLatencies()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeDouble(3, timeElapsed_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeDouble(4, timeUser_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + output.writeDouble(5, timeSystem_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLatencies()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(3, timeElapsed_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(4, timeUser_); + } + if (((bitField0_ & 0x00000008) == 0x00000008)) { + size += com.google.protobuf.CodedOutputStream + .computeDoubleSize(5, timeSystem_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ClientStats parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientStats parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStats parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientStats parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStats parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientStats parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStats parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ClientStats parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStats parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientStats parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ClientStats prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ClientStats} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ClientStats) + grpc.testing.Qpstest.ClientStatsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStats_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStats_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientStats.class, grpc.testing.Qpstest.ClientStats.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ClientStats.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getLatenciesFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (latenciesBuilder_ == null) { + latencies_ = null; + } else { + latenciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + timeElapsed_ = 0D; + bitField0_ = (bitField0_ & ~0x00000002); + timeUser_ = 0D; + bitField0_ = (bitField0_ & ~0x00000004); + timeSystem_ = 0D; + bitField0_ = (bitField0_ & ~0x00000008); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStats_descriptor; + } + + public grpc.testing.Qpstest.ClientStats getDefaultInstanceForType() { + return grpc.testing.Qpstest.ClientStats.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ClientStats build() { + grpc.testing.Qpstest.ClientStats result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ClientStats buildPartial() { + grpc.testing.Qpstest.ClientStats result = new grpc.testing.Qpstest.ClientStats(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (latenciesBuilder_ == null) { + result.latencies_ = latencies_; + } else { + result.latencies_ = latenciesBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.timeElapsed_ = timeElapsed_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.timeUser_ = timeUser_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000008; + } + result.timeSystem_ = timeSystem_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ClientStats) { + return mergeFrom((grpc.testing.Qpstest.ClientStats)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ClientStats other) { + if (other == grpc.testing.Qpstest.ClientStats.getDefaultInstance()) return this; + if (other.hasLatencies()) { + mergeLatencies(other.getLatencies()); + } + if (other.hasTimeElapsed()) { + setTimeElapsed(other.getTimeElapsed()); + } + if (other.hasTimeUser()) { + setTimeUser(other.getTimeUser()); + } + if (other.hasTimeSystem()) { + setTimeSystem(other.getTimeSystem()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasLatencies()) { + + return false; + } + if (!hasTimeElapsed()) { + + return false; + } + if (!hasTimeUser()) { + + return false; + } + if (!hasTimeSystem()) { + + return false; + } + if (!getLatencies().isInitialized()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ClientStats parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ClientStats) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private grpc.testing.Qpstest.HistogramData latencies_ = null; + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.HistogramData, grpc.testing.Qpstest.HistogramData.Builder, grpc.testing.Qpstest.HistogramDataOrBuilder> latenciesBuilder_; + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public boolean hasLatencies() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public grpc.testing.Qpstest.HistogramData getLatencies() { + if (latenciesBuilder_ == null) { + return latencies_ == null ? grpc.testing.Qpstest.HistogramData.getDefaultInstance() : latencies_; + } else { + return latenciesBuilder_.getMessage(); + } + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public Builder setLatencies(grpc.testing.Qpstest.HistogramData value) { + if (latenciesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + latencies_ = value; + onChanged(); + } else { + latenciesBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public Builder setLatencies( + grpc.testing.Qpstest.HistogramData.Builder builderForValue) { + if (latenciesBuilder_ == null) { + latencies_ = builderForValue.build(); + onChanged(); + } else { + latenciesBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public Builder mergeLatencies(grpc.testing.Qpstest.HistogramData value) { + if (latenciesBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + latencies_ != null && + latencies_ != grpc.testing.Qpstest.HistogramData.getDefaultInstance()) { + latencies_ = + grpc.testing.Qpstest.HistogramData.newBuilder(latencies_).mergeFrom(value).buildPartial(); + } else { + latencies_ = value; + } + onChanged(); + } else { + latenciesBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public Builder clearLatencies() { + if (latenciesBuilder_ == null) { + latencies_ = null; + onChanged(); + } else { + latenciesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public grpc.testing.Qpstest.HistogramData.Builder getLatenciesBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getLatenciesFieldBuilder().getBuilder(); + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + public grpc.testing.Qpstest.HistogramDataOrBuilder getLatenciesOrBuilder() { + if (latenciesBuilder_ != null) { + return latenciesBuilder_.getMessageOrBuilder(); + } else { + return latencies_ == null ? + grpc.testing.Qpstest.HistogramData.getDefaultInstance() : latencies_; + } + } + /** + * required .grpc.testing.HistogramData latencies = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.HistogramData, grpc.testing.Qpstest.HistogramData.Builder, grpc.testing.Qpstest.HistogramDataOrBuilder> + getLatenciesFieldBuilder() { + if (latenciesBuilder_ == null) { + latenciesBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.HistogramData, grpc.testing.Qpstest.HistogramData.Builder, grpc.testing.Qpstest.HistogramDataOrBuilder>( + getLatencies(), + getParentForChildren(), + isClean()); + latencies_ = null; + } + return latenciesBuilder_; + } + + private double timeElapsed_ ; + /** + * required double time_elapsed = 3; + */ + public boolean hasTimeElapsed() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required double time_elapsed = 3; + */ + public double getTimeElapsed() { + return timeElapsed_; + } + /** + * required double time_elapsed = 3; + */ + public Builder setTimeElapsed(double value) { + bitField0_ |= 0x00000002; + timeElapsed_ = value; + onChanged(); + return this; + } + /** + * required double time_elapsed = 3; + */ + public Builder clearTimeElapsed() { + bitField0_ = (bitField0_ & ~0x00000002); + timeElapsed_ = 0D; + onChanged(); + return this; + } + + private double timeUser_ ; + /** + * required double time_user = 4; + */ + public boolean hasTimeUser() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * required double time_user = 4; + */ + public double getTimeUser() { + return timeUser_; + } + /** + * required double time_user = 4; + */ + public Builder setTimeUser(double value) { + bitField0_ |= 0x00000004; + timeUser_ = value; + onChanged(); + return this; + } + /** + * required double time_user = 4; + */ + public Builder clearTimeUser() { + bitField0_ = (bitField0_ & ~0x00000004); + timeUser_ = 0D; + onChanged(); + return this; + } + + private double timeSystem_ ; + /** + * required double time_system = 5; + */ + public boolean hasTimeSystem() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * required double time_system = 5; + */ + public double getTimeSystem() { + return timeSystem_; + } + /** + * required double time_system = 5; + */ + public Builder setTimeSystem(double value) { + bitField0_ |= 0x00000008; + timeSystem_ = value; + onChanged(); + return this; + } + /** + * required double time_system = 5; + */ + public Builder clearTimeSystem() { + bitField0_ = (bitField0_ & ~0x00000008); + timeSystem_ = 0D; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ClientStats) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ClientStats) + private static final grpc.testing.Qpstest.ClientStats defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ClientStats(); + } + + public static grpc.testing.Qpstest.ClientStats getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ClientStats getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ClientStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ClientStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + boolean hasStats(); + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + grpc.testing.Qpstest.ClientStats getStats(); + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + grpc.testing.Qpstest.ClientStatsOrBuilder getStatsOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.ClientStatus} + */ + public static final class ClientStatus extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ClientStatus) + ClientStatusOrBuilder { + // Use ClientStatus.newBuilder() to construct. + private ClientStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ClientStatus() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ClientStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + grpc.testing.Qpstest.ClientStats.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = stats_.toBuilder(); + } + stats_ = input.readMessage(grpc.testing.Qpstest.ClientStats.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientStatus.class, grpc.testing.Qpstest.ClientStatus.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ClientStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ClientStatus(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int STATS_FIELD_NUMBER = 1; + private grpc.testing.Qpstest.ClientStats stats_; + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public grpc.testing.Qpstest.ClientStats getStats() { + return stats_ == null ? grpc.testing.Qpstest.ClientStats.getDefaultInstance() : stats_; + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public grpc.testing.Qpstest.ClientStatsOrBuilder getStatsOrBuilder() { + return stats_ == null ? grpc.testing.Qpstest.ClientStats.getDefaultInstance() : stats_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (hasStats()) { + if (!getStats().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getStats()); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStats()); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ClientStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ClientStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ClientStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ClientStatus prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ClientStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ClientStatus) + grpc.testing.Qpstest.ClientStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ClientStatus.class, grpc.testing.Qpstest.ClientStatus.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ClientStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStatsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (statsBuilder_ == null) { + stats_ = null; + } else { + statsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ClientStatus_descriptor; + } + + public grpc.testing.Qpstest.ClientStatus getDefaultInstanceForType() { + return grpc.testing.Qpstest.ClientStatus.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ClientStatus build() { + grpc.testing.Qpstest.ClientStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ClientStatus buildPartial() { + grpc.testing.Qpstest.ClientStatus result = new grpc.testing.Qpstest.ClientStatus(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ClientStatus) { + return mergeFrom((grpc.testing.Qpstest.ClientStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ClientStatus other) { + if (other == grpc.testing.Qpstest.ClientStatus.getDefaultInstance()) return this; + if (other.hasStats()) { + mergeStats(other.getStats()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (hasStats()) { + if (!getStats().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ClientStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ClientStatus) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private grpc.testing.Qpstest.ClientStats stats_ = null; + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ClientStats, grpc.testing.Qpstest.ClientStats.Builder, grpc.testing.Qpstest.ClientStatsOrBuilder> statsBuilder_; + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public grpc.testing.Qpstest.ClientStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? grpc.testing.Qpstest.ClientStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public Builder setStats(grpc.testing.Qpstest.ClientStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public Builder setStats( + grpc.testing.Qpstest.ClientStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public Builder mergeStats(grpc.testing.Qpstest.ClientStats value) { + if (statsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + stats_ != null && + stats_ != grpc.testing.Qpstest.ClientStats.getDefaultInstance()) { + stats_ = + grpc.testing.Qpstest.ClientStats.newBuilder(stats_).mergeFrom(value).buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + statsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public grpc.testing.Qpstest.ClientStats.Builder getStatsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + public grpc.testing.Qpstest.ClientStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + grpc.testing.Qpstest.ClientStats.getDefaultInstance() : stats_; + } + } + /** + * optional .grpc.testing.ClientStats stats = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ClientStats, grpc.testing.Qpstest.ClientStats.Builder, grpc.testing.Qpstest.ClientStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ClientStats, grpc.testing.Qpstest.ClientStats.Builder, grpc.testing.Qpstest.ClientStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ClientStatus) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ClientStatus) + private static final grpc.testing.Qpstest.ClientStatus defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ClientStatus(); + } + + public static grpc.testing.Qpstest.ClientStatus getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ClientStatus getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ServerConfigOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ServerConfig) + com.google.protobuf.MessageOrBuilder { + + /** + * required .grpc.testing.ServerType server_type = 1; + */ + boolean hasServerType(); + /** + * required .grpc.testing.ServerType server_type = 1; + */ + grpc.testing.Qpstest.ServerType getServerType(); + + /** + * optional int32 threads = 2 [default = 1]; + */ + boolean hasThreads(); + /** + * optional int32 threads = 2 [default = 1]; + */ + int getThreads(); + + /** + * optional bool enable_ssl = 3 [default = false]; + */ + boolean hasEnableSsl(); + /** + * optional bool enable_ssl = 3 [default = false]; + */ + boolean getEnableSsl(); + } + /** + * Protobuf type {@code grpc.testing.ServerConfig} + */ + public static final class ServerConfig extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ServerConfig) + ServerConfigOrBuilder { + // Use ServerConfig.newBuilder() to construct. + private ServerConfig(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ServerConfig() { + serverType_ = 1; + threads_ = 1; + enableSsl_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ServerConfig( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + grpc.testing.Qpstest.ServerType value = grpc.testing.Qpstest.ServerType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + serverType_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + threads_ = input.readInt32(); + break; + } + case 24: { + bitField0_ |= 0x00000004; + enableSsl_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerConfig.class, grpc.testing.Qpstest.ServerConfig.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ServerConfig parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ServerConfig(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int SERVER_TYPE_FIELD_NUMBER = 1; + private int serverType_; + /** + * required .grpc.testing.ServerType server_type = 1; + */ + public boolean hasServerType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .grpc.testing.ServerType server_type = 1; + */ + public grpc.testing.Qpstest.ServerType getServerType() { + grpc.testing.Qpstest.ServerType result = grpc.testing.Qpstest.ServerType.valueOf(serverType_); + return result == null ? grpc.testing.Qpstest.ServerType.SYNCHRONOUS_SERVER : result; + } + + public static final int THREADS_FIELD_NUMBER = 2; + private int threads_; + /** + * optional int32 threads = 2 [default = 1]; + */ + public boolean hasThreads() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 threads = 2 [default = 1]; + */ + public int getThreads() { + return threads_; + } + + public static final int ENABLE_SSL_FIELD_NUMBER = 3; + private boolean enableSsl_; + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean hasEnableSsl() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean getEnableSsl() { + return enableSsl_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasServerType()) { + memoizedIsInitialized = 0; + return false; + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, serverType_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, threads_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBool(3, enableSsl_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, serverType_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, threads_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(3, enableSsl_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ServerConfig parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerConfig parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ServerConfig parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerConfig parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ServerConfig prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ServerConfig} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ServerConfig) + grpc.testing.Qpstest.ServerConfigOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerConfig_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerConfig_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerConfig.class, grpc.testing.Qpstest.ServerConfig.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ServerConfig.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + serverType_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + threads_ = 1; + bitField0_ = (bitField0_ & ~0x00000002); + enableSsl_ = false; + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerConfig_descriptor; + } + + public grpc.testing.Qpstest.ServerConfig getDefaultInstanceForType() { + return grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ServerConfig build() { + grpc.testing.Qpstest.ServerConfig result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ServerConfig buildPartial() { + grpc.testing.Qpstest.ServerConfig result = new grpc.testing.Qpstest.ServerConfig(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.serverType_ = serverType_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.threads_ = threads_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + result.enableSsl_ = enableSsl_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ServerConfig) { + return mergeFrom((grpc.testing.Qpstest.ServerConfig)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ServerConfig other) { + if (other == grpc.testing.Qpstest.ServerConfig.getDefaultInstance()) return this; + if (other.hasServerType()) { + setServerType(other.getServerType()); + } + if (other.hasThreads()) { + setThreads(other.getThreads()); + } + if (other.hasEnableSsl()) { + setEnableSsl(other.getEnableSsl()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasServerType()) { + + return false; + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ServerConfig parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ServerConfig) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int serverType_ = 1; + /** + * required .grpc.testing.ServerType server_type = 1; + */ + public boolean hasServerType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * required .grpc.testing.ServerType server_type = 1; + */ + public grpc.testing.Qpstest.ServerType getServerType() { + grpc.testing.Qpstest.ServerType result = grpc.testing.Qpstest.ServerType.valueOf(serverType_); + return result == null ? grpc.testing.Qpstest.ServerType.SYNCHRONOUS_SERVER : result; + } + /** + * required .grpc.testing.ServerType server_type = 1; + */ + public Builder setServerType(grpc.testing.Qpstest.ServerType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + serverType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * required .grpc.testing.ServerType server_type = 1; + */ + public Builder clearServerType() { + bitField0_ = (bitField0_ & ~0x00000001); + serverType_ = 1; + onChanged(); + return this; + } + + private int threads_ = 1; + /** + * optional int32 threads = 2 [default = 1]; + */ + public boolean hasThreads() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 threads = 2 [default = 1]; + */ + public int getThreads() { + return threads_; + } + /** + * optional int32 threads = 2 [default = 1]; + */ + public Builder setThreads(int value) { + bitField0_ |= 0x00000002; + threads_ = value; + onChanged(); + return this; + } + /** + * optional int32 threads = 2 [default = 1]; + */ + public Builder clearThreads() { + bitField0_ = (bitField0_ & ~0x00000002); + threads_ = 1; + onChanged(); + return this; + } + + private boolean enableSsl_ ; + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean hasEnableSsl() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public boolean getEnableSsl() { + return enableSsl_; + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public Builder setEnableSsl(boolean value) { + bitField0_ |= 0x00000004; + enableSsl_ = value; + onChanged(); + return this; + } + /** + * optional bool enable_ssl = 3 [default = false]; + */ + public Builder clearEnableSsl() { + bitField0_ = (bitField0_ & ~0x00000004); + enableSsl_ = false; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ServerConfig) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ServerConfig) + private static final grpc.testing.Qpstest.ServerConfig defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ServerConfig(); + } + + public static grpc.testing.Qpstest.ServerConfig getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ServerConfig getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ServerArgsOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ServerArgs) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + boolean hasSetup(); + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + grpc.testing.Qpstest.ServerConfig getSetup(); + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + grpc.testing.Qpstest.ServerConfigOrBuilder getSetupOrBuilder(); + + /** + * optional .grpc.testing.Mark mark = 2; + */ + boolean hasMark(); + /** + * optional .grpc.testing.Mark mark = 2; + */ + grpc.testing.Qpstest.Mark getMark(); + /** + * optional .grpc.testing.Mark mark = 2; + */ + grpc.testing.Qpstest.MarkOrBuilder getMarkOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.ServerArgs} + */ + public static final class ServerArgs extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ServerArgs) + ServerArgsOrBuilder { + // Use ServerArgs.newBuilder() to construct. + private ServerArgs(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ServerArgs() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ServerArgs( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + grpc.testing.Qpstest.ServerConfig.Builder subBuilder = null; + if (argtypeCase_ == 1) { + subBuilder = ((grpc.testing.Qpstest.ServerConfig) argtype_).toBuilder(); + } + argtype_ = input.readMessage(grpc.testing.Qpstest.ServerConfig.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((grpc.testing.Qpstest.ServerConfig) argtype_); + argtype_ = subBuilder.buildPartial(); + } + argtypeCase_ = 1; + break; + } + case 18: { + grpc.testing.Qpstest.Mark.Builder subBuilder = null; + if (argtypeCase_ == 2) { + subBuilder = ((grpc.testing.Qpstest.Mark) argtype_).toBuilder(); + } + argtype_ = input.readMessage(grpc.testing.Qpstest.Mark.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((grpc.testing.Qpstest.Mark) argtype_); + argtype_ = subBuilder.buildPartial(); + } + argtypeCase_ = 2; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerArgs_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerArgs.class, grpc.testing.Qpstest.ServerArgs.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ServerArgs parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ServerArgs(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + private int argtypeCase_ = 0; + private java.lang.Object argtype_; + public enum ArgtypeCase + implements com.google.protobuf.Internal.EnumLite { + SETUP(1), + MARK(2), + ARGTYPE_NOT_SET(0); + private int value = 0; + private ArgtypeCase(int value) { + this.value = value; + } + public static ArgtypeCase valueOf(int value) { + switch (value) { + case 1: return SETUP; + case 2: return MARK; + case 0: return ARGTYPE_NOT_SET; + default: throw new java.lang.IllegalArgumentException( + "Value is undefined for this oneof enum."); + } + } + public int getNumber() { + return this.value; + } + }; + + public ArgtypeCase + getArgtypeCase() { + return ArgtypeCase.valueOf( + argtypeCase_); + } + + public static final int SETUP_FIELD_NUMBER = 1; + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public boolean hasSetup() { + return argtypeCase_ == 1; + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public grpc.testing.Qpstest.ServerConfig getSetup() { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ServerConfig) argtype_; + } + return grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public grpc.testing.Qpstest.ServerConfigOrBuilder getSetupOrBuilder() { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ServerConfig) argtype_; + } + return grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } + + public static final int MARK_FIELD_NUMBER = 2; + /** + * optional .grpc.testing.Mark mark = 2; + */ + public boolean hasMark() { + return argtypeCase_ == 2; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.Mark getMark() { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.MarkOrBuilder getMarkOrBuilder() { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (hasSetup()) { + if (!getSetup().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (argtypeCase_ == 1) { + output.writeMessage(1, (grpc.testing.Qpstest.ServerConfig) argtype_); + } + if (argtypeCase_ == 2) { + output.writeMessage(2, (grpc.testing.Qpstest.Mark) argtype_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (argtypeCase_ == 1) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, (grpc.testing.Qpstest.ServerConfig) argtype_); + } + if (argtypeCase_ == 2) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, (grpc.testing.Qpstest.Mark) argtype_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ServerArgs parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerArgs parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ServerArgs parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerArgs parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ServerArgs prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ServerArgs} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ServerArgs) + grpc.testing.Qpstest.ServerArgsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerArgs_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerArgs_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerArgs.class, grpc.testing.Qpstest.ServerArgs.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ServerArgs.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + argtypeCase_ = 0; + argtype_ = null; + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerArgs_descriptor; + } + + public grpc.testing.Qpstest.ServerArgs getDefaultInstanceForType() { + return grpc.testing.Qpstest.ServerArgs.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ServerArgs build() { + grpc.testing.Qpstest.ServerArgs result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ServerArgs buildPartial() { + grpc.testing.Qpstest.ServerArgs result = new grpc.testing.Qpstest.ServerArgs(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (argtypeCase_ == 1) { + if (setupBuilder_ == null) { + result.argtype_ = argtype_; + } else { + result.argtype_ = setupBuilder_.build(); + } + } + if (argtypeCase_ == 2) { + if (markBuilder_ == null) { + result.argtype_ = argtype_; + } else { + result.argtype_ = markBuilder_.build(); + } + } + result.bitField0_ = to_bitField0_; + result.argtypeCase_ = argtypeCase_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ServerArgs) { + return mergeFrom((grpc.testing.Qpstest.ServerArgs)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ServerArgs other) { + if (other == grpc.testing.Qpstest.ServerArgs.getDefaultInstance()) return this; + switch (other.getArgtypeCase()) { + case SETUP: { + mergeSetup(other.getSetup()); + break; + } + case MARK: { + mergeMark(other.getMark()); + break; + } + case ARGTYPE_NOT_SET: { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (hasSetup()) { + if (!getSetup().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ServerArgs parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ServerArgs) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int argtypeCase_ = 0; + private java.lang.Object argtype_; + public ArgtypeCase + getArgtypeCase() { + return ArgtypeCase.valueOf( + argtypeCase_); + } + + public Builder clearArgtype() { + argtypeCase_ = 0; + argtype_ = null; + onChanged(); + return this; + } + + private int bitField0_; + + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ServerConfig, grpc.testing.Qpstest.ServerConfig.Builder, grpc.testing.Qpstest.ServerConfigOrBuilder> setupBuilder_; + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public boolean hasSetup() { + return argtypeCase_ == 1; + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public grpc.testing.Qpstest.ServerConfig getSetup() { + if (setupBuilder_ == null) { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ServerConfig) argtype_; + } + return grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } else { + if (argtypeCase_ == 1) { + return setupBuilder_.getMessage(); + } + return grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public Builder setSetup(grpc.testing.Qpstest.ServerConfig value) { + if (setupBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + argtype_ = value; + onChanged(); + } else { + setupBuilder_.setMessage(value); + } + argtypeCase_ = 1; + return this; + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public Builder setSetup( + grpc.testing.Qpstest.ServerConfig.Builder builderForValue) { + if (setupBuilder_ == null) { + argtype_ = builderForValue.build(); + onChanged(); + } else { + setupBuilder_.setMessage(builderForValue.build()); + } + argtypeCase_ = 1; + return this; + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public Builder mergeSetup(grpc.testing.Qpstest.ServerConfig value) { + if (setupBuilder_ == null) { + if (argtypeCase_ == 1 && + argtype_ != grpc.testing.Qpstest.ServerConfig.getDefaultInstance()) { + argtype_ = grpc.testing.Qpstest.ServerConfig.newBuilder((grpc.testing.Qpstest.ServerConfig) argtype_) + .mergeFrom(value).buildPartial(); + } else { + argtype_ = value; + } + onChanged(); + } else { + if (argtypeCase_ == 1) { + setupBuilder_.mergeFrom(value); + } + setupBuilder_.setMessage(value); + } + argtypeCase_ = 1; + return this; + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public Builder clearSetup() { + if (setupBuilder_ == null) { + if (argtypeCase_ == 1) { + argtypeCase_ = 0; + argtype_ = null; + onChanged(); + } + } else { + if (argtypeCase_ == 1) { + argtypeCase_ = 0; + argtype_ = null; + } + setupBuilder_.clear(); + } + return this; + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public grpc.testing.Qpstest.ServerConfig.Builder getSetupBuilder() { + return getSetupFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + public grpc.testing.Qpstest.ServerConfigOrBuilder getSetupOrBuilder() { + if ((argtypeCase_ == 1) && (setupBuilder_ != null)) { + return setupBuilder_.getMessageOrBuilder(); + } else { + if (argtypeCase_ == 1) { + return (grpc.testing.Qpstest.ServerConfig) argtype_; + } + return grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.ServerConfig setup = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ServerConfig, grpc.testing.Qpstest.ServerConfig.Builder, grpc.testing.Qpstest.ServerConfigOrBuilder> + getSetupFieldBuilder() { + if (setupBuilder_ == null) { + if (!(argtypeCase_ == 1)) { + argtype_ = grpc.testing.Qpstest.ServerConfig.getDefaultInstance(); + } + setupBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ServerConfig, grpc.testing.Qpstest.ServerConfig.Builder, grpc.testing.Qpstest.ServerConfigOrBuilder>( + (grpc.testing.Qpstest.ServerConfig) argtype_, + getParentForChildren(), + isClean()); + argtype_ = null; + } + argtypeCase_ = 1; + onChanged();; + return setupBuilder_; + } + + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Mark, grpc.testing.Qpstest.Mark.Builder, grpc.testing.Qpstest.MarkOrBuilder> markBuilder_; + /** + * optional .grpc.testing.Mark mark = 2; + */ + public boolean hasMark() { + return argtypeCase_ == 2; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.Mark getMark() { + if (markBuilder_ == null) { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } else { + if (argtypeCase_ == 2) { + return markBuilder_.getMessage(); + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder setMark(grpc.testing.Qpstest.Mark value) { + if (markBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + argtype_ = value; + onChanged(); + } else { + markBuilder_.setMessage(value); + } + argtypeCase_ = 2; + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder setMark( + grpc.testing.Qpstest.Mark.Builder builderForValue) { + if (markBuilder_ == null) { + argtype_ = builderForValue.build(); + onChanged(); + } else { + markBuilder_.setMessage(builderForValue.build()); + } + argtypeCase_ = 2; + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder mergeMark(grpc.testing.Qpstest.Mark value) { + if (markBuilder_ == null) { + if (argtypeCase_ == 2 && + argtype_ != grpc.testing.Qpstest.Mark.getDefaultInstance()) { + argtype_ = grpc.testing.Qpstest.Mark.newBuilder((grpc.testing.Qpstest.Mark) argtype_) + .mergeFrom(value).buildPartial(); + } else { + argtype_ = value; + } + onChanged(); + } else { + if (argtypeCase_ == 2) { + markBuilder_.mergeFrom(value); + } + markBuilder_.setMessage(value); + } + argtypeCase_ = 2; + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public Builder clearMark() { + if (markBuilder_ == null) { + if (argtypeCase_ == 2) { + argtypeCase_ = 0; + argtype_ = null; + onChanged(); + } + } else { + if (argtypeCase_ == 2) { + argtypeCase_ = 0; + argtype_ = null; + } + markBuilder_.clear(); + } + return this; + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.Mark.Builder getMarkBuilder() { + return getMarkFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + public grpc.testing.Qpstest.MarkOrBuilder getMarkOrBuilder() { + if ((argtypeCase_ == 2) && (markBuilder_ != null)) { + return markBuilder_.getMessageOrBuilder(); + } else { + if (argtypeCase_ == 2) { + return (grpc.testing.Qpstest.Mark) argtype_; + } + return grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + } + /** + * optional .grpc.testing.Mark mark = 2; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Mark, grpc.testing.Qpstest.Mark.Builder, grpc.testing.Qpstest.MarkOrBuilder> + getMarkFieldBuilder() { + if (markBuilder_ == null) { + if (!(argtypeCase_ == 2)) { + argtype_ = grpc.testing.Qpstest.Mark.getDefaultInstance(); + } + markBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Mark, grpc.testing.Qpstest.Mark.Builder, grpc.testing.Qpstest.MarkOrBuilder>( + (grpc.testing.Qpstest.Mark) argtype_, + getParentForChildren(), + isClean()); + argtype_ = null; + } + argtypeCase_ = 2; + onChanged();; + return markBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ServerArgs) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ServerArgs) + private static final grpc.testing.Qpstest.ServerArgs defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ServerArgs(); + } + + public static grpc.testing.Qpstest.ServerArgs getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ServerArgs getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ServerStatusOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ServerStatus) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + boolean hasStats(); + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + grpc.testing.Qpstest.ServerStats getStats(); + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + grpc.testing.Qpstest.ServerStatsOrBuilder getStatsOrBuilder(); + + /** + * required int32 port = 2; + */ + boolean hasPort(); + /** + * required int32 port = 2; + */ + int getPort(); + } + /** + * Protobuf type {@code grpc.testing.ServerStatus} + */ + public static final class ServerStatus extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ServerStatus) + ServerStatusOrBuilder { + // Use ServerStatus.newBuilder() to construct. + private ServerStatus(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private ServerStatus() { + port_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ServerStatus( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + grpc.testing.Qpstest.ServerStats.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = stats_.toBuilder(); + } + stats_ = input.readMessage(grpc.testing.Qpstest.ServerStats.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(stats_); + stats_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + case 16: { + bitField0_ |= 0x00000002; + port_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerStatus.class, grpc.testing.Qpstest.ServerStatus.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ServerStatus parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ServerStatus(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int STATS_FIELD_NUMBER = 1; + private grpc.testing.Qpstest.ServerStats stats_; + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public grpc.testing.Qpstest.ServerStats getStats() { + return stats_ == null ? grpc.testing.Qpstest.ServerStats.getDefaultInstance() : stats_; + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public grpc.testing.Qpstest.ServerStatsOrBuilder getStatsOrBuilder() { + return stats_ == null ? grpc.testing.Qpstest.ServerStats.getDefaultInstance() : stats_; + } + + public static final int PORT_FIELD_NUMBER = 2; + private int port_; + /** + * required int32 port = 2; + */ + public boolean hasPort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int32 port = 2; + */ + public int getPort() { + return port_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + if (!hasPort()) { + memoizedIsInitialized = 0; + return false; + } + if (hasStats()) { + if (!getStats().isInitialized()) { + memoizedIsInitialized = 0; + return false; + } + } + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getStats()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, port_); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getStats()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, port_); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.ServerStatus parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStatus parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.ServerStatus parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.ServerStatus parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.ServerStatus prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ServerStatus} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.ServerStatus) + grpc.testing.Qpstest.ServerStatusOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStatus_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStatus_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.ServerStatus.class, grpc.testing.Qpstest.ServerStatus.Builder.class); + } + + // Construct using grpc.testing.Qpstest.ServerStatus.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getStatsFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (statsBuilder_ == null) { + stats_ = null; + } else { + statsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + port_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_ServerStatus_descriptor; + } + + public grpc.testing.Qpstest.ServerStatus getDefaultInstanceForType() { + return grpc.testing.Qpstest.ServerStatus.getDefaultInstance(); + } + + public grpc.testing.Qpstest.ServerStatus build() { + grpc.testing.Qpstest.ServerStatus result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.ServerStatus buildPartial() { + grpc.testing.Qpstest.ServerStatus result = new grpc.testing.Qpstest.ServerStatus(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (statsBuilder_ == null) { + result.stats_ = stats_; + } else { + result.stats_ = statsBuilder_.build(); + } + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.port_ = port_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.ServerStatus) { + return mergeFrom((grpc.testing.Qpstest.ServerStatus)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.ServerStatus other) { + if (other == grpc.testing.Qpstest.ServerStatus.getDefaultInstance()) return this; + if (other.hasStats()) { + mergeStats(other.getStats()); + } + if (other.hasPort()) { + setPort(other.getPort()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + if (!hasPort()) { + + return false; + } + if (hasStats()) { + if (!getStats().isInitialized()) { + + return false; + } + } + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + grpc.testing.Qpstest.ServerStatus parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.ServerStatus) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private grpc.testing.Qpstest.ServerStats stats_ = null; + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ServerStats, grpc.testing.Qpstest.ServerStats.Builder, grpc.testing.Qpstest.ServerStatsOrBuilder> statsBuilder_; + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public boolean hasStats() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public grpc.testing.Qpstest.ServerStats getStats() { + if (statsBuilder_ == null) { + return stats_ == null ? grpc.testing.Qpstest.ServerStats.getDefaultInstance() : stats_; + } else { + return statsBuilder_.getMessage(); + } + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public Builder setStats(grpc.testing.Qpstest.ServerStats value) { + if (statsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + stats_ = value; + onChanged(); + } else { + statsBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public Builder setStats( + grpc.testing.Qpstest.ServerStats.Builder builderForValue) { + if (statsBuilder_ == null) { + stats_ = builderForValue.build(); + onChanged(); + } else { + statsBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public Builder mergeStats(grpc.testing.Qpstest.ServerStats value) { + if (statsBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + stats_ != null && + stats_ != grpc.testing.Qpstest.ServerStats.getDefaultInstance()) { + stats_ = + grpc.testing.Qpstest.ServerStats.newBuilder(stats_).mergeFrom(value).buildPartial(); + } else { + stats_ = value; + } + onChanged(); + } else { + statsBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public Builder clearStats() { + if (statsBuilder_ == null) { + stats_ = null; + onChanged(); + } else { + statsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public grpc.testing.Qpstest.ServerStats.Builder getStatsBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getStatsFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + public grpc.testing.Qpstest.ServerStatsOrBuilder getStatsOrBuilder() { + if (statsBuilder_ != null) { + return statsBuilder_.getMessageOrBuilder(); + } else { + return stats_ == null ? + grpc.testing.Qpstest.ServerStats.getDefaultInstance() : stats_; + } + } + /** + * optional .grpc.testing.ServerStats stats = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ServerStats, grpc.testing.Qpstest.ServerStats.Builder, grpc.testing.Qpstest.ServerStatsOrBuilder> + getStatsFieldBuilder() { + if (statsBuilder_ == null) { + statsBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.ServerStats, grpc.testing.Qpstest.ServerStats.Builder, grpc.testing.Qpstest.ServerStatsOrBuilder>( + getStats(), + getParentForChildren(), + isClean()); + stats_ = null; + } + return statsBuilder_; + } + + private int port_ ; + /** + * required int32 port = 2; + */ + public boolean hasPort() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * required int32 port = 2; + */ + public int getPort() { + return port_; + } + /** + * required int32 port = 2; + */ + public Builder setPort(int value) { + bitField0_ |= 0x00000002; + port_ = value; + onChanged(); + return this; + } + /** + * required int32 port = 2; + */ + public Builder clearPort() { + bitField0_ = (bitField0_ & ~0x00000002); + port_ = 0; + onChanged(); + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.ServerStatus) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.ServerStatus) + private static final grpc.testing.Qpstest.ServerStatus defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.ServerStatus(); + } + + public static grpc.testing.Qpstest.ServerStatus getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.ServerStatus getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface SimpleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + boolean hasResponseType(); + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + grpc.testing.Qpstest.PayloadType getResponseType(); + + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+     * Desired payload size in the response from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + boolean hasResponseSize(); + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+     * Desired payload size in the response from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + int getResponseSize(); + + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + grpc.testing.Qpstest.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + grpc.testing.Qpstest.PayloadOrBuilder getPayloadOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.SimpleRequest} + */ + public static final class SimpleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.SimpleRequest) + SimpleRequestOrBuilder { + // Use SimpleRequest.newBuilder() to construct. + private SimpleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SimpleRequest() { + responseType_ = 1; + responseSize_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SimpleRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + int rawValue = input.readEnum(); + grpc.testing.Qpstest.PayloadType value = grpc.testing.Qpstest.PayloadType.valueOf(rawValue); + if (value == null) { + unknownFields.mergeVarintField(1, rawValue); + } else { + bitField0_ |= 0x00000001; + responseType_ = rawValue; + } + break; + } + case 16: { + bitField0_ |= 0x00000002; + responseSize_ = input.readInt32(); + break; + } + case 26: { + grpc.testing.Qpstest.Payload.Builder subBuilder = null; + if (((bitField0_ & 0x00000004) == 0x00000004)) { + subBuilder = payload_.toBuilder(); + } + payload_ = input.readMessage(grpc.testing.Qpstest.Payload.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(payload_); + payload_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000004; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.SimpleRequest.class, grpc.testing.Qpstest.SimpleRequest.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SimpleRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int RESPONSE_TYPE_FIELD_NUMBER = 1; + private int responseType_; + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + public boolean hasResponseType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + public grpc.testing.Qpstest.PayloadType getResponseType() { + grpc.testing.Qpstest.PayloadType result = grpc.testing.Qpstest.PayloadType.valueOf(responseType_); + return result == null ? grpc.testing.Qpstest.PayloadType.COMPRESSABLE : result; + } + + public static final int RESPONSE_SIZE_FIELD_NUMBER = 2; + private int responseSize_; + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+     * Desired payload size in the response from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + public boolean hasResponseSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+     * Desired payload size in the response from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + public int getResponseSize() { + return responseSize_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private grpc.testing.Qpstest.Payload payload_; + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public grpc.testing.Qpstest.Payload getPayload() { + return payload_ == null ? grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public grpc.testing.Qpstest.PayloadOrBuilder getPayloadOrBuilder() { + return payload_ == null ? grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } + + 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 (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeEnum(1, responseType_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeInt32(2, responseSize_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeMessage(3, getPayload()); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeEnumSize(1, responseType_); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, responseSize_); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(3, getPayload()); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.SimpleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.SimpleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.SimpleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.SimpleRequest prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.SimpleRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleRequest) + grpc.testing.Qpstest.SimpleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.SimpleRequest.class, grpc.testing.Qpstest.SimpleRequest.Builder.class); + } + + // Construct using grpc.testing.Qpstest.SimpleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + responseType_ = 1; + bitField0_ = (bitField0_ & ~0x00000001); + responseSize_ = 0; + bitField0_ = (bitField0_ & ~0x00000002); + if (payloadBuilder_ == null) { + payload_ = null; + } else { + payloadBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleRequest_descriptor; + } + + public grpc.testing.Qpstest.SimpleRequest getDefaultInstanceForType() { + return grpc.testing.Qpstest.SimpleRequest.getDefaultInstance(); + } + + public grpc.testing.Qpstest.SimpleRequest build() { + grpc.testing.Qpstest.SimpleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.SimpleRequest buildPartial() { + grpc.testing.Qpstest.SimpleRequest result = new grpc.testing.Qpstest.SimpleRequest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + result.responseType_ = responseType_; + if (((from_bitField0_ & 0x00000002) == 0x00000002)) { + to_bitField0_ |= 0x00000002; + } + result.responseSize_ = responseSize_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000004; + } + if (payloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = payloadBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.SimpleRequest) { + return mergeFrom((grpc.testing.Qpstest.SimpleRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.SimpleRequest other) { + if (other == grpc.testing.Qpstest.SimpleRequest.getDefaultInstance()) return this; + if (other.hasResponseType()) { + setResponseType(other.getResponseType()); + } + if (other.hasResponseSize()) { + setResponseSize(other.getResponseSize()); + } + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + 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 { + grpc.testing.Qpstest.SimpleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.SimpleRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int responseType_ = 1; + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public boolean hasResponseType() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public grpc.testing.Qpstest.PayloadType getResponseType() { + grpc.testing.Qpstest.PayloadType result = grpc.testing.Qpstest.PayloadType.valueOf(responseType_); + return result == null ? grpc.testing.Qpstest.PayloadType.COMPRESSABLE : result; + } + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public Builder setResponseType(grpc.testing.Qpstest.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000001; + responseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType response_type = 1 [default = COMPRESSABLE]; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public Builder clearResponseType() { + bitField0_ = (bitField0_ & ~0x00000001); + responseType_ = 1; + onChanged(); + return this; + } + + private int responseSize_ ; + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public boolean hasResponseSize() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public int getResponseSize() { + return responseSize_; + } + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public Builder setResponseSize(int value) { + bitField0_ |= 0x00000002; + responseSize_ = value; + onChanged(); + return this; + } + /** + * optional int32 response_size = 2 [default = 0]; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public Builder clearResponseSize() { + bitField0_ = (bitField0_ & ~0x00000002); + responseSize_ = 0; + onChanged(); + return this; + } + + private grpc.testing.Qpstest.Payload payload_ = null; + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Payload, grpc.testing.Qpstest.Payload.Builder, grpc.testing.Qpstest.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public grpc.testing.Qpstest.Payload getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null ? grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder setPayload(grpc.testing.Qpstest.Payload value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder setPayload( + grpc.testing.Qpstest.Payload.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder mergePayload(grpc.testing.Qpstest.Payload value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000004) == 0x00000004) && + payload_ != null && + payload_ != grpc.testing.Qpstest.Payload.getDefaultInstance()) { + payload_ = + grpc.testing.Qpstest.Payload.newBuilder(payload_).mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000004; + return this; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payloadBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public grpc.testing.Qpstest.Payload.Builder getPayloadBuilder() { + bitField0_ |= 0x00000004; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public grpc.testing.Qpstest.PayloadOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null ? + grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Payload, grpc.testing.Qpstest.Payload.Builder, grpc.testing.Qpstest.PayloadOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Payload, grpc.testing.Qpstest.Payload.Builder, grpc.testing.Qpstest.PayloadOrBuilder>( + getPayload(), + getParentForChildren(), + isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.SimpleRequest) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest) + private static final grpc.testing.Qpstest.SimpleRequest defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.SimpleRequest(); + } + + public static grpc.testing.Qpstest.SimpleRequest getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.SimpleRequest getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface SimpleResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.Payload payload = 1; + */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + */ + grpc.testing.Qpstest.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + */ + grpc.testing.Qpstest.PayloadOrBuilder getPayloadOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.SimpleResponse} + */ + public static final class SimpleResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.SimpleResponse) + SimpleResponseOrBuilder { + // Use SimpleResponse.newBuilder() to construct. + private SimpleResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SimpleResponse() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private SimpleResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownField(input, unknownFields, + extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + grpc.testing.Qpstest.Payload.Builder subBuilder = null; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + subBuilder = payload_.toBuilder(); + } + payload_ = input.readMessage(grpc.testing.Qpstest.Payload.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(payload_); + payload_ = subBuilder.buildPartial(); + } + bitField0_ |= 0x00000001; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.SimpleResponse.class, grpc.testing.Qpstest.SimpleResponse.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SimpleResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int PAYLOAD_FIELD_NUMBER = 1; + private grpc.testing.Qpstest.Payload payload_; + /** + * optional .grpc.testing.Payload payload = 1; + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public grpc.testing.Qpstest.Payload getPayload() { + return payload_ == null ? grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public grpc.testing.Qpstest.PayloadOrBuilder getPayloadOrBuilder() { + return payload_ == null ? grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } + + 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 (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeMessage(1, getPayload()); + } + unknownFields.writeTo(output); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPayload()); + } + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static grpc.testing.Qpstest.SimpleResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static grpc.testing.Qpstest.SimpleResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static grpc.testing.Qpstest.SimpleResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(grpc.testing.Qpstest.SimpleResponse prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.SimpleResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:grpc.testing.SimpleResponse) + grpc.testing.Qpstest.SimpleResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + grpc.testing.Qpstest.SimpleResponse.class, grpc.testing.Qpstest.SimpleResponse.Builder.class); + } + + // Construct using grpc.testing.Qpstest.SimpleResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + getPayloadFieldBuilder(); + } + } + public Builder clear() { + super.clear(); + if (payloadBuilder_ == null) { + payload_ = null; + } else { + payloadBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return grpc.testing.Qpstest.internal_static_grpc_testing_SimpleResponse_descriptor; + } + + public grpc.testing.Qpstest.SimpleResponse getDefaultInstanceForType() { + return grpc.testing.Qpstest.SimpleResponse.getDefaultInstance(); + } + + public grpc.testing.Qpstest.SimpleResponse build() { + grpc.testing.Qpstest.SimpleResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public grpc.testing.Qpstest.SimpleResponse buildPartial() { + grpc.testing.Qpstest.SimpleResponse result = new grpc.testing.Qpstest.SimpleResponse(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000001) == 0x00000001)) { + to_bitField0_ |= 0x00000001; + } + if (payloadBuilder_ == null) { + result.payload_ = payload_; + } else { + result.payload_ = payloadBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof grpc.testing.Qpstest.SimpleResponse) { + return mergeFrom((grpc.testing.Qpstest.SimpleResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(grpc.testing.Qpstest.SimpleResponse other) { + if (other == grpc.testing.Qpstest.SimpleResponse.getDefaultInstance()) return this; + if (other.hasPayload()) { + mergePayload(other.getPayload()); + } + 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 { + grpc.testing.Qpstest.SimpleResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (grpc.testing.Qpstest.SimpleResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private grpc.testing.Qpstest.Payload payload_ = null; + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Payload, grpc.testing.Qpstest.Payload.Builder, grpc.testing.Qpstest.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 1; + */ + public boolean hasPayload() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public grpc.testing.Qpstest.Payload getPayload() { + if (payloadBuilder_ == null) { + return payload_ == null ? grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } else { + return payloadBuilder_.getMessage(); + } + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public Builder setPayload(grpc.testing.Qpstest.Payload value) { + if (payloadBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + payload_ = value; + onChanged(); + } else { + payloadBuilder_.setMessage(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public Builder setPayload( + grpc.testing.Qpstest.Payload.Builder builderForValue) { + if (payloadBuilder_ == null) { + payload_ = builderForValue.build(); + onChanged(); + } else { + payloadBuilder_.setMessage(builderForValue.build()); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public Builder mergePayload(grpc.testing.Qpstest.Payload value) { + if (payloadBuilder_ == null) { + if (((bitField0_ & 0x00000001) == 0x00000001) && + payload_ != null && + payload_ != grpc.testing.Qpstest.Payload.getDefaultInstance()) { + payload_ = + grpc.testing.Qpstest.Payload.newBuilder(payload_).mergeFrom(value).buildPartial(); + } else { + payload_ = value; + } + onChanged(); + } else { + payloadBuilder_.mergeFrom(value); + } + bitField0_ |= 0x00000001; + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payloadBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public grpc.testing.Qpstest.Payload.Builder getPayloadBuilder() { + bitField0_ |= 0x00000001; + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + public grpc.testing.Qpstest.PayloadOrBuilder getPayloadOrBuilder() { + if (payloadBuilder_ != null) { + return payloadBuilder_.getMessageOrBuilder(); + } else { + return payload_ == null ? + grpc.testing.Qpstest.Payload.getDefaultInstance() : payload_; + } + } + /** + * optional .grpc.testing.Payload payload = 1; + */ + private com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Payload, grpc.testing.Qpstest.Payload.Builder, grpc.testing.Qpstest.PayloadOrBuilder> + getPayloadFieldBuilder() { + if (payloadBuilder_ == null) { + payloadBuilder_ = new com.google.protobuf.SingleFieldBuilder< + grpc.testing.Qpstest.Payload, grpc.testing.Qpstest.Payload.Builder, grpc.testing.Qpstest.PayloadOrBuilder>( + getPayload(), + getParentForChildren(), + isClean()); + payload_ = null; + } + return payloadBuilder_; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.SimpleResponse) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.SimpleResponse) + private static final grpc.testing.Qpstest.SimpleResponse defaultInstance; + static { + defaultInstance = new grpc.testing.Qpstest.SimpleResponse(); + } + + public static grpc.testing.Qpstest.SimpleResponse getDefaultInstance() { + return defaultInstance; + } + + public grpc.testing.Qpstest.SimpleResponse getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_StatsRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_StatsRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ServerStats_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ServerStats_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_Payload_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_Payload_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_HistogramData_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_HistogramData_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ClientConfig_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ClientConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_Mark_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_Mark_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ClientArgs_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ClientArgs_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ClientStats_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ClientStats_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ClientStatus_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ClientStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ServerConfig_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ServerConfig_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ServerArgs_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ServerArgs_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ServerStatus_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ServerStatus_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_SimpleRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_SimpleRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_SimpleResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.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\rqpstest.proto\022\014grpc.testing\" \n\014StatsRe" + + "quest\022\020\n\010test_num\030\001 \001(\005\"K\n\013ServerStats\022\024" + + "\n\014time_elapsed\030\001 \002(\001\022\021\n\ttime_user\030\002 \002(\001\022" + + "\023\n\013time_system\030\003 \002(\001\"@\n\007Payload\022\'\n\004type\030" + + "\001 \001(\0162\031.grpc.testing.PayloadType\022\014\n\004body" + + "\030\002 \001(\014\"w\n\rHistogramData\022\016\n\006bucket\030\001 \003(\r\022" + + "\020\n\010min_seen\030\002 \002(\001\022\020\n\010max_seen\030\003 \002(\001\022\013\n\003s" + + "um\030\004 \002(\001\022\026\n\016sum_of_squares\030\005 \002(\001\022\r\n\005coun" + + "t\030\006 \002(\001\"\223\002\n\014ClientConfig\022\026\n\016server_targe" + + "ts\030\001 \003(\t\022-\n\013client_type\030\002 \002(\0162\030.grpc.tes", + "ting.ClientType\022\031\n\nenable_ssl\030\003 \001(\010:\005fal" + + "se\022$\n\034outstanding_rpcs_per_channel\030\004 \002(\005" + + "\022\027\n\017client_channels\030\005 \002(\005\022\024\n\014payload_siz" + + "e\030\006 \002(\005\022\034\n\024async_client_threads\030\007 \001(\005\022.\n" + + "\010rpc_type\030\010 \001(\0162\025.grpc.testing.RpcType:\005" + + "UNARY\"\006\n\004Mark\"h\n\nClientArgs\022+\n\005setup\030\001 \001" + + "(\0132\032.grpc.testing.ClientConfigH\000\022\"\n\004mark" + + "\030\002 \001(\0132\022.grpc.testing.MarkH\000B\t\n\007argtype\"" + + "{\n\013ClientStats\022.\n\tlatencies\030\001 \002(\0132\033.grpc" + + ".testing.HistogramData\022\024\n\014time_elapsed\030\003", + " \002(\001\022\021\n\ttime_user\030\004 \002(\001\022\023\n\013time_system\030\005" + + " \002(\001\"8\n\014ClientStatus\022(\n\005stats\030\001 \001(\0132\031.gr" + + "pc.testing.ClientStats\"l\n\014ServerConfig\022-" + + "\n\013server_type\030\001 \002(\0162\030.grpc.testing.Serve" + + "rType\022\022\n\007threads\030\002 \001(\005:\0011\022\031\n\nenable_ssl\030" + + "\003 \001(\010:\005false\"h\n\nServerArgs\022+\n\005setup\030\001 \001(" + + "\0132\032.grpc.testing.ServerConfigH\000\022\"\n\004mark\030" + + "\002 \001(\0132\022.grpc.testing.MarkH\000B\t\n\007argtype\"F" + + "\n\014ServerStatus\022(\n\005stats\030\001 \001(\0132\031.grpc.tes" + + "ting.ServerStats\022\014\n\004port\030\002 \002(\005\"\221\001\n\rSimpl", + "eRequest\022>\n\rresponse_type\030\001 \001(\0162\031.grpc.t" + + "esting.PayloadType:\014COMPRESSABLE\022\030\n\rresp" + + "onse_size\030\002 \001(\005:\0010\022&\n\007payload\030\003 \001(\0132\025.gr" + + "pc.testing.Payload\"8\n\016SimpleResponse\022&\n\007" + + "payload\030\001 \001(\0132\025.grpc.testing.Payload*?\n\013" + + "PayloadType\022\020\n\014COMPRESSABLE\020\001\022\022\n\016UNCOMPR" + + "ESSABLE\020\002\022\n\n\006RANDOM\020\003*6\n\nClientType\022\026\n\022S" + + "YNCHRONOUS_CLIENT\020\001\022\020\n\014ASYNC_CLIENT\020\002*6\n" + + "\nServerType\022\026\n\022SYNCHRONOUS_SERVER\020\001\022\020\n\014A" + + "SYNC_SERVER\020\002*#\n\007RpcType\022\t\n\005UNARY\020\001\022\r\n\tS", + "TREAMING\020\0022\245\001\n\013TestService\022F\n\tUnaryCall\022" + + "\033.grpc.testing.SimpleRequest\032\034.grpc.test" + + "ing.SimpleResponse\022N\n\rStreamingCall\022\033.gr" + + "pc.testing.SimpleRequest\032\034.grpc.testing." + + "SimpleResponse(\0010\0012\224\001\n\006Worker\022C\n\007RunTest" + + "\022\030.grpc.testing.ClientArgs\032\032.grpc.testin" + + "g.ClientStatus(\0010\001\022E\n\tRunServer\022\030.grpc.t" + + "esting.ServerArgs\032\032.grpc.testing.ServerS" + + "tatus(\0010\001" + }; + 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_StatsRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_testing_StatsRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_StatsRequest_descriptor, + new java.lang.String[] { "TestNum", }); + internal_static_grpc_testing_ServerStats_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grpc_testing_ServerStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ServerStats_descriptor, + new java.lang.String[] { "TimeElapsed", "TimeUser", "TimeSystem", }); + internal_static_grpc_testing_Payload_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grpc_testing_Payload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_Payload_descriptor, + new java.lang.String[] { "Type", "Body", }); + internal_static_grpc_testing_HistogramData_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grpc_testing_HistogramData_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_HistogramData_descriptor, + new java.lang.String[] { "Bucket", "MinSeen", "MaxSeen", "Sum", "SumOfSquares", "Count", }); + internal_static_grpc_testing_ClientConfig_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grpc_testing_ClientConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ClientConfig_descriptor, + new java.lang.String[] { "ServerTargets", "ClientType", "EnableSsl", "OutstandingRpcsPerChannel", "ClientChannels", "PayloadSize", "AsyncClientThreads", "RpcType", }); + internal_static_grpc_testing_Mark_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grpc_testing_Mark_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_Mark_descriptor, + new java.lang.String[] { }); + internal_static_grpc_testing_ClientArgs_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grpc_testing_ClientArgs_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ClientArgs_descriptor, + new java.lang.String[] { "Setup", "Mark", "Argtype", }); + internal_static_grpc_testing_ClientStats_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grpc_testing_ClientStats_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ClientStats_descriptor, + new java.lang.String[] { "Latencies", "TimeElapsed", "TimeUser", "TimeSystem", }); + internal_static_grpc_testing_ClientStatus_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grpc_testing_ClientStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ClientStatus_descriptor, + new java.lang.String[] { "Stats", }); + internal_static_grpc_testing_ServerConfig_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_grpc_testing_ServerConfig_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ServerConfig_descriptor, + new java.lang.String[] { "ServerType", "Threads", "EnableSsl", }); + internal_static_grpc_testing_ServerArgs_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_grpc_testing_ServerArgs_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ServerArgs_descriptor, + new java.lang.String[] { "Setup", "Mark", "Argtype", }); + internal_static_grpc_testing_ServerStatus_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_grpc_testing_ServerStatus_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ServerStatus_descriptor, + new java.lang.String[] { "Stats", "Port", }); + internal_static_grpc_testing_SimpleRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_grpc_testing_SimpleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_SimpleRequest_descriptor, + new java.lang.String[] { "ResponseType", "ResponseSize", "Payload", }); + internal_static_grpc_testing_SimpleResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_grpc_testing_SimpleResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_SimpleResponse_descriptor, + new java.lang.String[] { "Payload", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/benchmarks/src/generated/main/grpc/testing/TestServiceGrpc.java b/benchmarks/src/generated/main/grpc/testing/TestServiceGrpc.java new file mode 100644 index 00000000000..626716768e6 --- /dev/null +++ b/benchmarks/src/generated/main/grpc/testing/TestServiceGrpc.java @@ -0,0 +1,209 @@ +package grpc.testing; + +import static io.grpc.stub.Calls.createMethodDescriptor; +import static io.grpc.stub.Calls.asyncUnaryCall; +import static io.grpc.stub.Calls.asyncServerStreamingCall; +import static io.grpc.stub.Calls.asyncClientStreamingCall; +import static io.grpc.stub.Calls.duplexStreamingCall; +import static io.grpc.stub.Calls.blockingUnaryCall; +import static io.grpc.stub.Calls.blockingServerStreamingCall; +import static io.grpc.stub.Calls.unaryFutureCall; +import static io.grpc.stub.ServerCalls.createMethodDefinition; +import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall; +import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class TestServiceGrpc { + + private static final io.grpc.stub.Method METHOD_UNARY_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.UNARY, "UnaryCall", + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.SimpleRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.SimpleResponse.PARSER)); + private static final io.grpc.stub.Method METHOD_STREAMING_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.DUPLEX_STREAMING, "StreamingCall", + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.SimpleRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.SimpleResponse.PARSER)); + + public static TestServiceStub newStub(io.grpc.Channel channel) { + return new TestServiceStub(channel, CONFIG); + } + + public static TestServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new TestServiceBlockingStub(channel, CONFIG); + } + + public static TestServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + return new TestServiceFutureStub(channel, CONFIG); + } + + public static final TestServiceServiceDescriptor CONFIG = + new TestServiceServiceDescriptor(); + + @javax.annotation.concurrent.Immutable + public static class TestServiceServiceDescriptor extends + io.grpc.stub.AbstractServiceDescriptor { + public final io.grpc.MethodDescriptor unaryCall; + public final io.grpc.MethodDescriptor streamingCall; + + private TestServiceServiceDescriptor() { + unaryCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_UNARY_CALL); + streamingCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_STREAMING_CALL); + } + + @SuppressWarnings("unchecked") + private TestServiceServiceDescriptor( + java.util.Map> methodMap) { + unaryCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.unaryCall.getName()); + streamingCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.streamingCall.getName()); + } + + @java.lang.Override + protected TestServiceServiceDescriptor build( + java.util.Map> methodMap) { + return new TestServiceServiceDescriptor(methodMap); + } + + @java.lang.Override + public com.google.common.collect.ImmutableList> methods() { + return com.google.common.collect.ImmutableList.>of( + unaryCall, + streamingCall); + } + } + + public static interface TestService { + + public void unaryCall(grpc.testing.Qpstest.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver streamingCall( + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface TestServiceBlockingClient { + + public grpc.testing.Qpstest.SimpleResponse unaryCall(grpc.testing.Qpstest.SimpleRequest request); + } + + public static interface TestServiceFutureClient { + + public com.google.common.util.concurrent.ListenableFuture unaryCall( + grpc.testing.Qpstest.SimpleRequest request); + } + + public static class TestServiceStub extends + io.grpc.stub.AbstractStub + implements TestService { + private TestServiceStub(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected TestServiceStub build(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + return new TestServiceStub(channel, config); + } + + @java.lang.Override + public void unaryCall(grpc.testing.Qpstest.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + channel.newCall(config.unaryCall), request, responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver streamingCall( + io.grpc.stub.StreamObserver responseObserver) { + return duplexStreamingCall( + channel.newCall(config.streamingCall), responseObserver); + } + } + + public static class TestServiceBlockingStub extends + io.grpc.stub.AbstractStub + implements TestServiceBlockingClient { + private TestServiceBlockingStub(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected TestServiceBlockingStub build(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + return new TestServiceBlockingStub(channel, config); + } + + @java.lang.Override + public grpc.testing.Qpstest.SimpleResponse unaryCall(grpc.testing.Qpstest.SimpleRequest request) { + return blockingUnaryCall( + channel.newCall(config.unaryCall), request); + } + } + + public static class TestServiceFutureStub extends + io.grpc.stub.AbstractStub + implements TestServiceFutureClient { + private TestServiceFutureStub(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected TestServiceFutureStub build(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + return new TestServiceFutureStub(channel, config); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture unaryCall( + grpc.testing.Qpstest.SimpleRequest request) { + return unaryFutureCall( + channel.newCall(config.unaryCall), request); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final TestService serviceImpl) { + return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService") + .addMethod(createMethodDefinition( + METHOD_UNARY_CALL, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + grpc.testing.Qpstest.SimpleRequest, + grpc.testing.Qpstest.SimpleResponse>() { + @java.lang.Override + public void invoke( + grpc.testing.Qpstest.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.unaryCall(request, responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_STREAMING_CALL, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + grpc.testing.Qpstest.SimpleRequest, + grpc.testing.Qpstest.SimpleResponse>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.streamingCall(responseObserver); + } + }))).build(); + } +} diff --git a/benchmarks/src/generated/main/grpc/testing/WorkerGrpc.java b/benchmarks/src/generated/main/grpc/testing/WorkerGrpc.java new file mode 100644 index 00000000000..5f287efd2cf --- /dev/null +++ b/benchmarks/src/generated/main/grpc/testing/WorkerGrpc.java @@ -0,0 +1,190 @@ +package grpc.testing; + +import static io.grpc.stub.Calls.createMethodDescriptor; +import static io.grpc.stub.Calls.asyncUnaryCall; +import static io.grpc.stub.Calls.asyncServerStreamingCall; +import static io.grpc.stub.Calls.asyncClientStreamingCall; +import static io.grpc.stub.Calls.duplexStreamingCall; +import static io.grpc.stub.Calls.blockingUnaryCall; +import static io.grpc.stub.Calls.blockingServerStreamingCall; +import static io.grpc.stub.Calls.unaryFutureCall; +import static io.grpc.stub.ServerCalls.createMethodDefinition; +import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall; +import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class WorkerGrpc { + + private static final io.grpc.stub.Method METHOD_RUN_TEST = + io.grpc.stub.Method.create( + io.grpc.MethodType.DUPLEX_STREAMING, "RunTest", + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.ClientArgs.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.ClientStatus.PARSER)); + private static final io.grpc.stub.Method METHOD_RUN_SERVER = + io.grpc.stub.Method.create( + io.grpc.MethodType.DUPLEX_STREAMING, "RunServer", + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.ServerArgs.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(grpc.testing.Qpstest.ServerStatus.PARSER)); + + public static WorkerStub newStub(io.grpc.Channel channel) { + return new WorkerStub(channel, CONFIG); + } + + public static WorkerBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new WorkerBlockingStub(channel, CONFIG); + } + + public static WorkerFutureStub newFutureStub( + io.grpc.Channel channel) { + return new WorkerFutureStub(channel, CONFIG); + } + + public static final WorkerServiceDescriptor CONFIG = + new WorkerServiceDescriptor(); + + @javax.annotation.concurrent.Immutable + public static class WorkerServiceDescriptor extends + io.grpc.stub.AbstractServiceDescriptor { + public final io.grpc.MethodDescriptor runTest; + public final io.grpc.MethodDescriptor runServer; + + private WorkerServiceDescriptor() { + runTest = createMethodDescriptor( + "grpc.testing.Worker", METHOD_RUN_TEST); + runServer = createMethodDescriptor( + "grpc.testing.Worker", METHOD_RUN_SERVER); + } + + @SuppressWarnings("unchecked") + private WorkerServiceDescriptor( + java.util.Map> methodMap) { + runTest = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.runTest.getName()); + runServer = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.runServer.getName()); + } + + @java.lang.Override + protected WorkerServiceDescriptor build( + java.util.Map> methodMap) { + return new WorkerServiceDescriptor(methodMap); + } + + @java.lang.Override + public com.google.common.collect.ImmutableList> methods() { + return com.google.common.collect.ImmutableList.>of( + runTest, + runServer); + } + } + + public static interface Worker { + + public io.grpc.stub.StreamObserver runTest( + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver runServer( + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface WorkerBlockingClient { + } + + public static interface WorkerFutureClient { + } + + public static class WorkerStub extends + io.grpc.stub.AbstractStub + implements Worker { + private WorkerStub(io.grpc.Channel channel, + WorkerServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected WorkerStub build(io.grpc.Channel channel, + WorkerServiceDescriptor config) { + return new WorkerStub(channel, config); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver runTest( + io.grpc.stub.StreamObserver responseObserver) { + return duplexStreamingCall( + channel.newCall(config.runTest), responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver runServer( + io.grpc.stub.StreamObserver responseObserver) { + return duplexStreamingCall( + channel.newCall(config.runServer), responseObserver); + } + } + + public static class WorkerBlockingStub extends + io.grpc.stub.AbstractStub + implements WorkerBlockingClient { + private WorkerBlockingStub(io.grpc.Channel channel, + WorkerServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected WorkerBlockingStub build(io.grpc.Channel channel, + WorkerServiceDescriptor config) { + return new WorkerBlockingStub(channel, config); + } + } + + public static class WorkerFutureStub extends + io.grpc.stub.AbstractStub + implements WorkerFutureClient { + private WorkerFutureStub(io.grpc.Channel channel, + WorkerServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected WorkerFutureStub build(io.grpc.Channel channel, + WorkerServiceDescriptor config) { + return new WorkerFutureStub(channel, config); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final Worker serviceImpl) { + return io.grpc.ServerServiceDefinition.builder("grpc.testing.Worker") + .addMethod(createMethodDefinition( + METHOD_RUN_TEST, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + grpc.testing.Qpstest.ClientArgs, + grpc.testing.Qpstest.ClientStatus>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.runTest(responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_RUN_SERVER, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + grpc.testing.Qpstest.ServerArgs, + grpc.testing.Qpstest.ServerStatus>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.runServer(responseObserver); + } + }))).build(); + } +} diff --git a/build.gradle b/build.gradle index b1b5fdb091d..1174e30810d 100644 --- a/build.gradle +++ b/build.gradle @@ -39,6 +39,28 @@ subprojects { } ext { + configureProtoCompilation = { + if (rootProject.childProjects.containsKey('grpc-compiler')) { + // Only when the codegen is built along with the project, will we be able to recompile + // the proto files. + project.apply plugin: 'com.google.protobuf' + project.protobufCodeGenPlugins = ["java_plugin:$javaPluginPath"] + project.generatedFileDir = "${projectDir}/src/generated" + project.afterEvaluate { + generateProto.dependsOn ':grpc-compiler:java_pluginExecutable' + } + } else { + // Otherwise, we just use the checked-in generated code. + project.sourceSets { + main { + java { + srcDir 'src/generated/main' + } + } + } + } + } + libraries = [ guava: 'com.google.guava:guava:18.0', // used to collect benchmark results diff --git a/examples/build.gradle b/examples/build.gradle index c2b0f80e3f2..18e2b551c58 100644 --- a/examples/build.gradle +++ b/examples/build.gradle @@ -1,5 +1,4 @@ apply plugin: 'application' -apply plugin: 'com.google.protobuf' description = "grpc Examples" @@ -22,11 +21,7 @@ dependencies { libraries.jsonp } -protobufCodeGenPlugins = ["java_plugin:$javaPluginPath"] - -project.afterEvaluate { - generateProto.dependsOn ':grpc-compiler:java_pluginExecutable' -} +configureProtoCompilation() task routeGuideServer(type: JavaExec) { main = "io.grpc.examples.routeguide.RouteGuideServer" diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/GreeterGrpc.java b/examples/src/generated/main/io/grpc/examples/helloworld/GreeterGrpc.java new file mode 100644 index 00000000000..2a0bf8872c7 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/helloworld/GreeterGrpc.java @@ -0,0 +1,173 @@ +package io.grpc.examples.helloworld; + +import static io.grpc.stub.Calls.createMethodDescriptor; +import static io.grpc.stub.Calls.asyncUnaryCall; +import static io.grpc.stub.Calls.asyncServerStreamingCall; +import static io.grpc.stub.Calls.asyncClientStreamingCall; +import static io.grpc.stub.Calls.duplexStreamingCall; +import static io.grpc.stub.Calls.blockingUnaryCall; +import static io.grpc.stub.Calls.blockingServerStreamingCall; +import static io.grpc.stub.Calls.unaryFutureCall; +import static io.grpc.stub.ServerCalls.createMethodDefinition; +import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall; +import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class GreeterGrpc { + + private static final io.grpc.stub.Method METHOD_SAY_HELLO = + io.grpc.stub.Method.create( + io.grpc.MethodType.UNARY, "SayHello", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.helloworld.HelloResponse.PARSER)); + + public static GreeterStub newStub(io.grpc.Channel channel) { + return new GreeterStub(channel, CONFIG); + } + + public static GreeterBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new GreeterBlockingStub(channel, CONFIG); + } + + public static GreeterFutureStub newFutureStub( + io.grpc.Channel channel) { + return new GreeterFutureStub(channel, CONFIG); + } + + public static final GreeterServiceDescriptor CONFIG = + new GreeterServiceDescriptor(); + + @javax.annotation.concurrent.Immutable + public static class GreeterServiceDescriptor extends + io.grpc.stub.AbstractServiceDescriptor { + public final io.grpc.MethodDescriptor sayHello; + + private GreeterServiceDescriptor() { + sayHello = createMethodDescriptor( + "helloworld.Greeter", METHOD_SAY_HELLO); + } + + @SuppressWarnings("unchecked") + private GreeterServiceDescriptor( + java.util.Map> methodMap) { + sayHello = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.sayHello.getName()); + } + + @java.lang.Override + protected GreeterServiceDescriptor build( + java.util.Map> methodMap) { + return new GreeterServiceDescriptor(methodMap); + } + + @java.lang.Override + public com.google.common.collect.ImmutableList> methods() { + return com.google.common.collect.ImmutableList.>of( + sayHello); + } + } + + public static interface Greeter { + + public void sayHello(io.grpc.examples.helloworld.HelloRequest request, + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface GreeterBlockingClient { + + public io.grpc.examples.helloworld.HelloResponse sayHello(io.grpc.examples.helloworld.HelloRequest request); + } + + public static interface GreeterFutureClient { + + public com.google.common.util.concurrent.ListenableFuture sayHello( + io.grpc.examples.helloworld.HelloRequest request); + } + + public static class GreeterStub extends + io.grpc.stub.AbstractStub + implements Greeter { + private GreeterStub(io.grpc.Channel channel, + GreeterServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected GreeterStub build(io.grpc.Channel channel, + GreeterServiceDescriptor config) { + return new GreeterStub(channel, config); + } + + @java.lang.Override + public void sayHello(io.grpc.examples.helloworld.HelloRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + channel.newCall(config.sayHello), request, responseObserver); + } + } + + public static class GreeterBlockingStub extends + io.grpc.stub.AbstractStub + implements GreeterBlockingClient { + private GreeterBlockingStub(io.grpc.Channel channel, + GreeterServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected GreeterBlockingStub build(io.grpc.Channel channel, + GreeterServiceDescriptor config) { + return new GreeterBlockingStub(channel, config); + } + + @java.lang.Override + public io.grpc.examples.helloworld.HelloResponse sayHello(io.grpc.examples.helloworld.HelloRequest request) { + return blockingUnaryCall( + channel.newCall(config.sayHello), request); + } + } + + public static class GreeterFutureStub extends + io.grpc.stub.AbstractStub + implements GreeterFutureClient { + private GreeterFutureStub(io.grpc.Channel channel, + GreeterServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected GreeterFutureStub build(io.grpc.Channel channel, + GreeterServiceDescriptor config) { + return new GreeterFutureStub(channel, config); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture sayHello( + io.grpc.examples.helloworld.HelloRequest request) { + return unaryFutureCall( + channel.newCall(config.sayHello), request); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final Greeter serviceImpl) { + return io.grpc.ServerServiceDefinition.builder("helloworld.Greeter") + .addMethod(createMethodDefinition( + METHOD_SAY_HELLO, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + io.grpc.examples.helloworld.HelloRequest, + io.grpc.examples.helloworld.HelloResponse>() { + @java.lang.Override + public void invoke( + io.grpc.examples.helloworld.HelloRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.sayHello(request, responseObserver); + } + }))).build(); + } +} diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java new file mode 100644 index 00000000000..0b1285bba5c --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java @@ -0,0 +1,451 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello_world.proto + +package io.grpc.examples.helloworld; + +/** + * Protobuf type {@code helloworld.HelloRequest} + * + *
+ * The request message containing the user's name.
+ * 
+ */ +public final class HelloRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:helloworld.HelloRequest) + HelloRequestOrBuilder { + // Use HelloRequest.newBuilder() to construct. + private HelloRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HelloRequest() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private HelloRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + + name_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.helloworld.HelloRequest.class, io.grpc.examples.helloworld.HelloRequest.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public HelloRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HelloRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + output.writeBytes(1, getNameBytes()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.helloworld.HelloRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.helloworld.HelloRequest 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.examples.helloworld.HelloRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.helloworld.HelloRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.helloworld.HelloRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.helloworld.HelloRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.helloworld.HelloRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.helloworld.HelloRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.helloworld.HelloRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.helloworld.HelloRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.helloworld.HelloRequest prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code helloworld.HelloRequest} + * + *
+   * The request message containing the user's name.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:helloworld.HelloRequest) + io.grpc.examples.helloworld.HelloRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.helloworld.HelloRequest.class, io.grpc.examples.helloworld.HelloRequest.Builder.class); + } + + // Construct using io.grpc.examples.helloworld.HelloRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloRequest_descriptor; + } + + public io.grpc.examples.helloworld.HelloRequest getDefaultInstanceForType() { + return io.grpc.examples.helloworld.HelloRequest.getDefaultInstance(); + } + + public io.grpc.examples.helloworld.HelloRequest build() { + io.grpc.examples.helloworld.HelloRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.helloworld.HelloRequest buildPartial() { + io.grpc.examples.helloworld.HelloRequest result = new io.grpc.examples.helloworld.HelloRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.helloworld.HelloRequest) { + return mergeFrom((io.grpc.examples.helloworld.HelloRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.helloworld.HelloRequest other) { + if (other == io.grpc.examples.helloworld.HelloRequest.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.examples.helloworld.HelloRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.helloworld.HelloRequest) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + */ + public com.google.protobuf.ByteString + getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string name = 1; + */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + 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:helloworld.HelloRequest) + } + + // @@protoc_insertion_point(class_scope:helloworld.HelloRequest) + private static final io.grpc.examples.helloworld.HelloRequest defaultInstance; + static { + defaultInstance = new io.grpc.examples.helloworld.HelloRequest(); + } + + public static io.grpc.examples.helloworld.HelloRequest getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.helloworld.HelloRequest getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequestOrBuilder.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequestOrBuilder.java new file mode 100644 index 00000000000..554dff3b1ae --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequestOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello_world.proto + +package io.grpc.examples.helloworld; + +public interface HelloRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:helloworld.HelloRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + */ + java.lang.String getName(); + /** + * optional string name = 1; + */ + com.google.protobuf.ByteString + getNameBytes(); +} diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java new file mode 100644 index 00000000000..e5cfd9cfd4a --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java @@ -0,0 +1,451 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello_world.proto + +package io.grpc.examples.helloworld; + +/** + * Protobuf type {@code helloworld.HelloResponse} + * + *
+ * The response message containing the greetings
+ * 
+ */ +public final class HelloResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:helloworld.HelloResponse) + HelloResponseOrBuilder { + // Use HelloResponse.newBuilder() to construct. + private HelloResponse(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private HelloResponse() { + message_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private HelloResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + + message_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.helloworld.HelloResponse.class, io.grpc.examples.helloworld.HelloResponse.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public HelloResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new HelloResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int MESSAGE_FIELD_NUMBER = 1; + private java.lang.Object message_; + /** + * optional string message = 1; + */ + 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(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } + } + /** + * optional string message = 1; + */ + 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 (!getMessageBytes().isEmpty()) { + output.writeBytes(1, getMessageBytes()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getMessageBytes()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.helloworld.HelloResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.helloworld.HelloResponse 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.examples.helloworld.HelloResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.helloworld.HelloResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.helloworld.HelloResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.helloworld.HelloResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.helloworld.HelloResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.helloworld.HelloResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.helloworld.HelloResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.helloworld.HelloResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.helloworld.HelloResponse prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code helloworld.HelloResponse} + * + *
+   * The response message containing the greetings
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:helloworld.HelloResponse) + io.grpc.examples.helloworld.HelloResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.helloworld.HelloResponse.class, io.grpc.examples.helloworld.HelloResponse.Builder.class); + } + + // Construct using io.grpc.examples.helloworld.HelloResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + message_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.helloworld.HelloWorldProto.internal_static_helloworld_HelloResponse_descriptor; + } + + public io.grpc.examples.helloworld.HelloResponse getDefaultInstanceForType() { + return io.grpc.examples.helloworld.HelloResponse.getDefaultInstance(); + } + + public io.grpc.examples.helloworld.HelloResponse build() { + io.grpc.examples.helloworld.HelloResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.helloworld.HelloResponse buildPartial() { + io.grpc.examples.helloworld.HelloResponse result = new io.grpc.examples.helloworld.HelloResponse(this); + result.message_ = message_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.helloworld.HelloResponse) { + return mergeFrom((io.grpc.examples.helloworld.HelloResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.helloworld.HelloResponse other) { + if (other == io.grpc.examples.helloworld.HelloResponse.getDefaultInstance()) return this; + 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.examples.helloworld.HelloResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.helloworld.HelloResponse) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object message_ = ""; + /** + * optional string message = 1; + */ + 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(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string message = 1; + */ + 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; + } + } + /** + * optional string message = 1; + */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + * optional string message = 1; + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * optional string message = 1; + */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + 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:helloworld.HelloResponse) + } + + // @@protoc_insertion_point(class_scope:helloworld.HelloResponse) + private static final io.grpc.examples.helloworld.HelloResponse defaultInstance; + static { + defaultInstance = new io.grpc.examples.helloworld.HelloResponse(); + } + + public static io.grpc.examples.helloworld.HelloResponse getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.helloworld.HelloResponse getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponseOrBuilder.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponseOrBuilder.java new file mode 100644 index 00000000000..b68cd1a0211 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponseOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello_world.proto + +package io.grpc.examples.helloworld; + +public interface HelloResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:helloworld.HelloResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string message = 1; + */ + java.lang.String getMessage(); + /** + * optional string message = 1; + */ + com.google.protobuf.ByteString + getMessageBytes(); +} diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java new file mode 100644 index 00000000000..3c80f407ac2 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java @@ -0,0 +1,64 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: hello_world.proto + +package io.grpc.examples.helloworld; + +public final class HelloWorldProto { + private HelloWorldProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_helloworld_HelloRequest_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_helloworld_HelloRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_helloworld_HelloResponse_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_helloworld_HelloResponse_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\021hello_world.proto\022\nhelloworld\"\034\n\014Hello" + + "Request\022\014\n\004name\030\001 \001(\t\" \n\rHelloResponse\022\017" + + "\n\007message\030\001 \001(\t2L\n\007Greeter\022A\n\010SayHello\022\030" + + ".helloworld.HelloRequest\032\031.helloworld.He" + + "lloResponse\"\000B0\n\033io.grpc.examples.hellow" + + "orldB\017HelloWorldProtoP\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_helloworld_HelloRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_helloworld_HelloRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_helloworld_HelloRequest_descriptor, + new java.lang.String[] { "Name", }); + internal_static_helloworld_HelloResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_helloworld_HelloResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_helloworld_HelloResponse_descriptor, + new java.lang.String[] { "Message", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java b/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java new file mode 100644 index 00000000000..0f4250c9550 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java @@ -0,0 +1,701 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +/** + * Protobuf type {@code routeguide.Feature} + * + *
+ * A feature names something at a given point.
+ * If a feature could not be named, the name is empty.
+ * 
+ */ +public final class Feature extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:routeguide.Feature) + FeatureOrBuilder { + // Use Feature.newBuilder() to construct. + private Feature(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Feature() { + name_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Feature( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + + name_ = bs; + break; + } + case 18: { + io.grpc.examples.routeguide.Point.Builder subBuilder = null; + if (location_ != null) { + subBuilder = location_.toBuilder(); + } + location_ = input.readMessage(io.grpc.examples.routeguide.Point.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(location_); + location_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Feature_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.Feature.class, io.grpc.examples.routeguide.Feature.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Feature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Feature(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int NAME_FIELD_NUMBER = 1; + private java.lang.Object name_; + /** + * optional string name = 1; + * + *
+   * The name of the feature.
+   * 
+ */ + 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(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } + } + /** + * optional string name = 1; + * + *
+   * The name of the feature.
+   * 
+ */ + 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 LOCATION_FIELD_NUMBER = 2; + private io.grpc.examples.routeguide.Point location_; + /** + * optional .routeguide.Point location = 2; + * + *
+   * The point where the feature is detected.
+   * 
+ */ + public boolean hasLocation() { + return location_ != null; + } + /** + * optional .routeguide.Point location = 2; + * + *
+   * The point where the feature is detected.
+   * 
+ */ + public io.grpc.examples.routeguide.Point getLocation() { + return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; + } + /** + * optional .routeguide.Point location = 2; + * + *
+   * The point where the feature is detected.
+   * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { + return getLocation(); + } + + 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()) { + output.writeBytes(1, getNameBytes()); + } + if (location_ != null) { + output.writeMessage(2, getLocation()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getNameBytes()); + } + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getLocation()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.routeguide.Feature parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.Feature 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.examples.routeguide.Feature parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.Feature parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.routeguide.Feature parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.Feature parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.Feature parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.routeguide.Feature parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.Feature parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.Feature parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.routeguide.Feature prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code routeguide.Feature} + * + *
+   * A feature names something at a given point.
+   * If a feature could not be named, the name is empty.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:routeguide.Feature) + io.grpc.examples.routeguide.FeatureOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Feature_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Feature_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.Feature.class, io.grpc.examples.routeguide.Feature.Builder.class); + } + + // Construct using io.grpc.examples.routeguide.Feature.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + name_ = ""; + + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Feature_descriptor; + } + + public io.grpc.examples.routeguide.Feature getDefaultInstanceForType() { + return io.grpc.examples.routeguide.Feature.getDefaultInstance(); + } + + public io.grpc.examples.routeguide.Feature build() { + io.grpc.examples.routeguide.Feature result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.routeguide.Feature buildPartial() { + io.grpc.examples.routeguide.Feature result = new io.grpc.examples.routeguide.Feature(this); + result.name_ = name_; + if (locationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.routeguide.Feature) { + return mergeFrom((io.grpc.examples.routeguide.Feature)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.routeguide.Feature other) { + if (other == io.grpc.examples.routeguide.Feature.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + 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.examples.routeguide.Feature parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.routeguide.Feature) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * optional string name = 1; + * + *
+     * The name of the feature.
+     * 
+ */ + 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(); + if (bs.isValidUtf8()) { + name_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string name = 1; + * + *
+     * The name of the feature.
+     * 
+ */ + 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; + } + } + /** + * optional string name = 1; + * + *
+     * The name of the feature.
+     * 
+ */ + public Builder setName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the feature.
+     * 
+ */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * optional string name = 1; + * + *
+     * The name of the feature.
+     * 
+ */ + public Builder setNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + + private io.grpc.examples.routeguide.Point location_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> locationBuilder_; + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public io.grpc.examples.routeguide.Point getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public Builder setLocation(io.grpc.examples.routeguide.Point value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public Builder setLocation( + io.grpc.examples.routeguide.Point.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public Builder mergeLocation(io.grpc.examples.routeguide.Point value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = + io.grpc.examples.routeguide.Point.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + + return this; + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public io.grpc.examples.routeguide.Point.Builder getLocationBuilder() { + + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? + io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; + } + } + /** + * optional .routeguide.Point location = 2; + * + *
+     * The point where the feature is detected.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>( + getLocation(), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + 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:routeguide.Feature) + } + + // @@protoc_insertion_point(class_scope:routeguide.Feature) + private static final io.grpc.examples.routeguide.Feature defaultInstance; + static { + defaultInstance = new io.grpc.examples.routeguide.Feature(); + } + + public static io.grpc.examples.routeguide.Feature getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.routeguide.Feature getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/FeatureOrBuilder.java b/examples/src/generated/main/io/grpc/examples/routeguide/FeatureOrBuilder.java new file mode 100644 index 00000000000..e8fb7264f84 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/FeatureOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +public interface FeatureOrBuilder extends + // @@protoc_insertion_point(interface_extends:routeguide.Feature) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string name = 1; + * + *
+   * The name of the feature.
+   * 
+ */ + java.lang.String getName(); + /** + * optional string name = 1; + * + *
+   * The name of the feature.
+   * 
+ */ + com.google.protobuf.ByteString + getNameBytes(); + + /** + * optional .routeguide.Point location = 2; + * + *
+   * The point where the feature is detected.
+   * 
+ */ + boolean hasLocation(); + /** + * optional .routeguide.Point location = 2; + * + *
+   * The point where the feature is detected.
+   * 
+ */ + io.grpc.examples.routeguide.Point getLocation(); + /** + * optional .routeguide.Point location = 2; + * + *
+   * The point where the feature is detected.
+   * 
+ */ + io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder(); +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/Point.java b/examples/src/generated/main/io/grpc/examples/routeguide/Point.java new file mode 100644 index 00000000000..f3e2fb41ac9 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/Point.java @@ -0,0 +1,438 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +/** + * Protobuf type {@code routeguide.Point} + * + *
+ * Points are represented as latitude-longitude pairs in the E7 representation
+ * (degrees multiplied by 10**7 and rounded to the nearest integer).
+ * Latitudes should be in the range +/- 90 degrees and longitude should be in
+ * the range +/- 180 degrees (inclusive).
+ * 
+ */ +public final class Point extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:routeguide.Point) + PointOrBuilder { + // Use Point.newBuilder() to construct. + private Point(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Point() { + latitude_ = 0; + longitude_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Point( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + 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: { + + latitude_ = input.readInt32(); + break; + } + case 16: { + + longitude_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Point_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Point_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.Point.class, io.grpc.examples.routeguide.Point.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Point parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Point(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int LATITUDE_FIELD_NUMBER = 1; + private int latitude_; + /** + * optional int32 latitude = 1; + */ + public int getLatitude() { + return latitude_; + } + + public static final int LONGITUDE_FIELD_NUMBER = 2; + private int longitude_; + /** + * optional int32 longitude = 2; + */ + public int getLongitude() { + return longitude_; + } + + 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 (latitude_ != 0) { + output.writeInt32(1, latitude_); + } + if (longitude_ != 0) { + output.writeInt32(2, longitude_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (latitude_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, latitude_); + } + if (longitude_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, longitude_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.routeguide.Point parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.Point 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.examples.routeguide.Point parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.Point parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.routeguide.Point parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.Point parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.Point parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.routeguide.Point parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.Point parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.Point parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.routeguide.Point prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code routeguide.Point} + * + *
+   * Points are represented as latitude-longitude pairs in the E7 representation
+   * (degrees multiplied by 10**7 and rounded to the nearest integer).
+   * Latitudes should be in the range +/- 90 degrees and longitude should be in
+   * the range +/- 180 degrees (inclusive).
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:routeguide.Point) + io.grpc.examples.routeguide.PointOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Point_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Point_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.Point.class, io.grpc.examples.routeguide.Point.Builder.class); + } + + // Construct using io.grpc.examples.routeguide.Point.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + latitude_ = 0; + + longitude_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Point_descriptor; + } + + public io.grpc.examples.routeguide.Point getDefaultInstanceForType() { + return io.grpc.examples.routeguide.Point.getDefaultInstance(); + } + + public io.grpc.examples.routeguide.Point build() { + io.grpc.examples.routeguide.Point result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.routeguide.Point buildPartial() { + io.grpc.examples.routeguide.Point result = new io.grpc.examples.routeguide.Point(this); + result.latitude_ = latitude_; + result.longitude_ = longitude_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.routeguide.Point) { + return mergeFrom((io.grpc.examples.routeguide.Point)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.routeguide.Point other) { + if (other == io.grpc.examples.routeguide.Point.getDefaultInstance()) return this; + if (other.getLatitude() != 0) { + setLatitude(other.getLatitude()); + } + if (other.getLongitude() != 0) { + setLongitude(other.getLongitude()); + } + 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.examples.routeguide.Point parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.routeguide.Point) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int latitude_ ; + /** + * optional int32 latitude = 1; + */ + public int getLatitude() { + return latitude_; + } + /** + * optional int32 latitude = 1; + */ + public Builder setLatitude(int value) { + + latitude_ = value; + onChanged(); + return this; + } + /** + * optional int32 latitude = 1; + */ + public Builder clearLatitude() { + + latitude_ = 0; + onChanged(); + return this; + } + + private int longitude_ ; + /** + * optional int32 longitude = 2; + */ + public int getLongitude() { + return longitude_; + } + /** + * optional int32 longitude = 2; + */ + public Builder setLongitude(int value) { + + longitude_ = value; + onChanged(); + return this; + } + /** + * optional int32 longitude = 2; + */ + public Builder clearLongitude() { + + longitude_ = 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:routeguide.Point) + } + + // @@protoc_insertion_point(class_scope:routeguide.Point) + private static final io.grpc.examples.routeguide.Point defaultInstance; + static { + defaultInstance = new io.grpc.examples.routeguide.Point(); + } + + public static io.grpc.examples.routeguide.Point getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.routeguide.Point getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/PointOrBuilder.java b/examples/src/generated/main/io/grpc/examples/routeguide/PointOrBuilder.java new file mode 100644 index 00000000000..0ae9ac05a95 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/PointOrBuilder.java @@ -0,0 +1,19 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +public interface PointOrBuilder extends + // @@protoc_insertion_point(interface_extends:routeguide.Point) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 latitude = 1; + */ + int getLatitude(); + + /** + * optional int32 longitude = 2; + */ + int getLongitude(); +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java b/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java new file mode 100644 index 00000000000..d58ff09a720 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java @@ -0,0 +1,766 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +/** + * Protobuf type {@code routeguide.Rectangle} + * + *
+ * A latitude-longitude rectangle, represented as two diagonally opposite
+ * points "lo" and "hi".
+ * 
+ */ +public final class Rectangle extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:routeguide.Rectangle) + RectangleOrBuilder { + // Use Rectangle.newBuilder() to construct. + private Rectangle(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private Rectangle() { + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private Rectangle( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + 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.examples.routeguide.Point.Builder subBuilder = null; + if (lo_ != null) { + subBuilder = lo_.toBuilder(); + } + lo_ = input.readMessage(io.grpc.examples.routeguide.Point.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(lo_); + lo_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + io.grpc.examples.routeguide.Point.Builder subBuilder = null; + if (hi_ != null) { + subBuilder = hi_.toBuilder(); + } + hi_ = input.readMessage(io.grpc.examples.routeguide.Point.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(hi_); + hi_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Rectangle_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Rectangle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.Rectangle.class, io.grpc.examples.routeguide.Rectangle.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Rectangle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Rectangle(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int LO_FIELD_NUMBER = 1; + private io.grpc.examples.routeguide.Point lo_; + /** + * optional .routeguide.Point lo = 1; + * + *
+   * One corner of the rectangle.
+   * 
+ */ + public boolean hasLo() { + return lo_ != null; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+   * One corner of the rectangle.
+   * 
+ */ + public io.grpc.examples.routeguide.Point getLo() { + return lo_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : lo_; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+   * One corner of the rectangle.
+   * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder() { + return getLo(); + } + + public static final int HI_FIELD_NUMBER = 2; + private io.grpc.examples.routeguide.Point hi_; + /** + * optional .routeguide.Point hi = 2; + * + *
+   * The other corner of the rectangle.
+   * 
+ */ + public boolean hasHi() { + return hi_ != null; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+   * The other corner of the rectangle.
+   * 
+ */ + public io.grpc.examples.routeguide.Point getHi() { + return hi_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : hi_; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+   * The other corner of the rectangle.
+   * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder() { + return getHi(); + } + + 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 (lo_ != null) { + output.writeMessage(1, getLo()); + } + if (hi_ != null) { + output.writeMessage(2, getHi()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (lo_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLo()); + } + if (hi_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getHi()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.routeguide.Rectangle parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.Rectangle 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.examples.routeguide.Rectangle parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.Rectangle parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.routeguide.Rectangle parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.Rectangle parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.Rectangle parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.routeguide.Rectangle parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.Rectangle parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.Rectangle parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.routeguide.Rectangle prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code routeguide.Rectangle} + * + *
+   * A latitude-longitude rectangle, represented as two diagonally opposite
+   * points "lo" and "hi".
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:routeguide.Rectangle) + io.grpc.examples.routeguide.RectangleOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Rectangle_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Rectangle_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.Rectangle.class, io.grpc.examples.routeguide.Rectangle.Builder.class); + } + + // Construct using io.grpc.examples.routeguide.Rectangle.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (loBuilder_ == null) { + lo_ = null; + } else { + lo_ = null; + loBuilder_ = null; + } + if (hiBuilder_ == null) { + hi_ = null; + } else { + hi_ = null; + hiBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_Rectangle_descriptor; + } + + public io.grpc.examples.routeguide.Rectangle getDefaultInstanceForType() { + return io.grpc.examples.routeguide.Rectangle.getDefaultInstance(); + } + + public io.grpc.examples.routeguide.Rectangle build() { + io.grpc.examples.routeguide.Rectangle result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.routeguide.Rectangle buildPartial() { + io.grpc.examples.routeguide.Rectangle result = new io.grpc.examples.routeguide.Rectangle(this); + if (loBuilder_ == null) { + result.lo_ = lo_; + } else { + result.lo_ = loBuilder_.build(); + } + if (hiBuilder_ == null) { + result.hi_ = hi_; + } else { + result.hi_ = hiBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.routeguide.Rectangle) { + return mergeFrom((io.grpc.examples.routeguide.Rectangle)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.routeguide.Rectangle other) { + if (other == io.grpc.examples.routeguide.Rectangle.getDefaultInstance()) return this; + if (other.hasLo()) { + mergeLo(other.getLo()); + } + if (other.hasHi()) { + mergeHi(other.getHi()); + } + 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.examples.routeguide.Rectangle parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.routeguide.Rectangle) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.examples.routeguide.Point lo_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> loBuilder_; + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public boolean hasLo() { + return loBuilder_ != null || lo_ != null; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public io.grpc.examples.routeguide.Point getLo() { + if (loBuilder_ == null) { + return lo_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : lo_; + } else { + return loBuilder_.getMessage(); + } + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public Builder setLo(io.grpc.examples.routeguide.Point value) { + if (loBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lo_ = value; + onChanged(); + } else { + loBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public Builder setLo( + io.grpc.examples.routeguide.Point.Builder builderForValue) { + if (loBuilder_ == null) { + lo_ = builderForValue.build(); + onChanged(); + } else { + loBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public Builder mergeLo(io.grpc.examples.routeguide.Point value) { + if (loBuilder_ == null) { + if (lo_ != null) { + lo_ = + io.grpc.examples.routeguide.Point.newBuilder(lo_).mergeFrom(value).buildPartial(); + } else { + lo_ = value; + } + onChanged(); + } else { + loBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public Builder clearLo() { + if (loBuilder_ == null) { + lo_ = null; + onChanged(); + } else { + lo_ = null; + loBuilder_ = null; + } + + return this; + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public io.grpc.examples.routeguide.Point.Builder getLoBuilder() { + + onChanged(); + return getLoFieldBuilder().getBuilder(); + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder() { + if (loBuilder_ != null) { + return loBuilder_.getMessageOrBuilder(); + } else { + return lo_ == null ? + io.grpc.examples.routeguide.Point.getDefaultInstance() : lo_; + } + } + /** + * optional .routeguide.Point lo = 1; + * + *
+     * One corner of the rectangle.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> + getLoFieldBuilder() { + if (loBuilder_ == null) { + loBuilder_ = new com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>( + getLo(), + getParentForChildren(), + isClean()); + lo_ = null; + } + return loBuilder_; + } + + private io.grpc.examples.routeguide.Point hi_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> hiBuilder_; + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public boolean hasHi() { + return hiBuilder_ != null || hi_ != null; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public io.grpc.examples.routeguide.Point getHi() { + if (hiBuilder_ == null) { + return hi_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : hi_; + } else { + return hiBuilder_.getMessage(); + } + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public Builder setHi(io.grpc.examples.routeguide.Point value) { + if (hiBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + hi_ = value; + onChanged(); + } else { + hiBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public Builder setHi( + io.grpc.examples.routeguide.Point.Builder builderForValue) { + if (hiBuilder_ == null) { + hi_ = builderForValue.build(); + onChanged(); + } else { + hiBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public Builder mergeHi(io.grpc.examples.routeguide.Point value) { + if (hiBuilder_ == null) { + if (hi_ != null) { + hi_ = + io.grpc.examples.routeguide.Point.newBuilder(hi_).mergeFrom(value).buildPartial(); + } else { + hi_ = value; + } + onChanged(); + } else { + hiBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public Builder clearHi() { + if (hiBuilder_ == null) { + hi_ = null; + onChanged(); + } else { + hi_ = null; + hiBuilder_ = null; + } + + return this; + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public io.grpc.examples.routeguide.Point.Builder getHiBuilder() { + + onChanged(); + return getHiFieldBuilder().getBuilder(); + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder() { + if (hiBuilder_ != null) { + return hiBuilder_.getMessageOrBuilder(); + } else { + return hi_ == null ? + io.grpc.examples.routeguide.Point.getDefaultInstance() : hi_; + } + } + /** + * optional .routeguide.Point hi = 2; + * + *
+     * The other corner of the rectangle.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> + getHiFieldBuilder() { + if (hiBuilder_ == null) { + hiBuilder_ = new com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>( + getHi(), + getParentForChildren(), + isClean()); + hi_ = null; + } + return hiBuilder_; + } + 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:routeguide.Rectangle) + } + + // @@protoc_insertion_point(class_scope:routeguide.Rectangle) + private static final io.grpc.examples.routeguide.Rectangle defaultInstance; + static { + defaultInstance = new io.grpc.examples.routeguide.Rectangle(); + } + + public static io.grpc.examples.routeguide.Rectangle getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.routeguide.Rectangle getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RectangleOrBuilder.java b/examples/src/generated/main/io/grpc/examples/routeguide/RectangleOrBuilder.java new file mode 100644 index 00000000000..df3961d6301 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RectangleOrBuilder.java @@ -0,0 +1,59 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +public interface RectangleOrBuilder extends + // @@protoc_insertion_point(interface_extends:routeguide.Rectangle) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .routeguide.Point lo = 1; + * + *
+   * One corner of the rectangle.
+   * 
+ */ + boolean hasLo(); + /** + * optional .routeguide.Point lo = 1; + * + *
+   * One corner of the rectangle.
+   * 
+ */ + io.grpc.examples.routeguide.Point getLo(); + /** + * optional .routeguide.Point lo = 1; + * + *
+   * One corner of the rectangle.
+   * 
+ */ + io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder(); + + /** + * optional .routeguide.Point hi = 2; + * + *
+   * The other corner of the rectangle.
+   * 
+ */ + boolean hasHi(); + /** + * optional .routeguide.Point hi = 2; + * + *
+   * The other corner of the rectangle.
+   * 
+ */ + io.grpc.examples.routeguide.Point getHi(); + /** + * optional .routeguide.Point hi = 2; + * + *
+   * The other corner of the rectangle.
+   * 
+ */ + io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder(); +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideGrpc.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideGrpc.java new file mode 100644 index 00000000000..3d580ae42cd --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideGrpc.java @@ -0,0 +1,292 @@ +package io.grpc.examples.routeguide; + +import static io.grpc.stub.Calls.createMethodDescriptor; +import static io.grpc.stub.Calls.asyncUnaryCall; +import static io.grpc.stub.Calls.asyncServerStreamingCall; +import static io.grpc.stub.Calls.asyncClientStreamingCall; +import static io.grpc.stub.Calls.duplexStreamingCall; +import static io.grpc.stub.Calls.blockingUnaryCall; +import static io.grpc.stub.Calls.blockingServerStreamingCall; +import static io.grpc.stub.Calls.unaryFutureCall; +import static io.grpc.stub.ServerCalls.createMethodDefinition; +import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall; +import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class RouteGuideGrpc { + + private static final io.grpc.stub.Method METHOD_GET_FEATURE = + io.grpc.stub.Method.create( + io.grpc.MethodType.UNARY, "GetFeature", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.PARSER)); + private static final io.grpc.stub.Method METHOD_LIST_FEATURES = + io.grpc.stub.Method.create( + io.grpc.MethodType.SERVER_STREAMING, "ListFeatures", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Rectangle.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Feature.PARSER)); + private static final io.grpc.stub.Method METHOD_RECORD_ROUTE = + io.grpc.stub.Method.create( + io.grpc.MethodType.CLIENT_STREAMING, "RecordRoute", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.Point.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteSummary.PARSER)); + private static final io.grpc.stub.Method METHOD_ROUTE_CHAT = + io.grpc.stub.Method.create( + io.grpc.MethodType.DUPLEX_STREAMING, "RouteChat", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.examples.routeguide.RouteNote.PARSER)); + + public static RouteGuideStub newStub(io.grpc.Channel channel) { + return new RouteGuideStub(channel, CONFIG); + } + + public static RouteGuideBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new RouteGuideBlockingStub(channel, CONFIG); + } + + public static RouteGuideFutureStub newFutureStub( + io.grpc.Channel channel) { + return new RouteGuideFutureStub(channel, CONFIG); + } + + public static final RouteGuideServiceDescriptor CONFIG = + new RouteGuideServiceDescriptor(); + + @javax.annotation.concurrent.Immutable + public static class RouteGuideServiceDescriptor extends + io.grpc.stub.AbstractServiceDescriptor { + public final io.grpc.MethodDescriptor getFeature; + public final io.grpc.MethodDescriptor listFeatures; + public final io.grpc.MethodDescriptor recordRoute; + public final io.grpc.MethodDescriptor routeChat; + + private RouteGuideServiceDescriptor() { + getFeature = createMethodDescriptor( + "routeguide.RouteGuide", METHOD_GET_FEATURE); + listFeatures = createMethodDescriptor( + "routeguide.RouteGuide", METHOD_LIST_FEATURES); + recordRoute = createMethodDescriptor( + "routeguide.RouteGuide", METHOD_RECORD_ROUTE); + routeChat = createMethodDescriptor( + "routeguide.RouteGuide", METHOD_ROUTE_CHAT); + } + + @SuppressWarnings("unchecked") + private RouteGuideServiceDescriptor( + java.util.Map> methodMap) { + getFeature = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.getFeature.getName()); + listFeatures = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.listFeatures.getName()); + recordRoute = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.recordRoute.getName()); + routeChat = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.routeChat.getName()); + } + + @java.lang.Override + protected RouteGuideServiceDescriptor build( + java.util.Map> methodMap) { + return new RouteGuideServiceDescriptor(methodMap); + } + + @java.lang.Override + public com.google.common.collect.ImmutableList> methods() { + return com.google.common.collect.ImmutableList.>of( + getFeature, + listFeatures, + recordRoute, + routeChat); + } + } + + public static interface RouteGuide { + + public void getFeature(io.grpc.examples.routeguide.Point request, + io.grpc.stub.StreamObserver responseObserver); + + public void listFeatures(io.grpc.examples.routeguide.Rectangle request, + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver recordRoute( + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver routeChat( + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface RouteGuideBlockingClient { + + public io.grpc.examples.routeguide.Feature getFeature(io.grpc.examples.routeguide.Point request); + + public java.util.Iterator listFeatures( + io.grpc.examples.routeguide.Rectangle request); + } + + public static interface RouteGuideFutureClient { + + public com.google.common.util.concurrent.ListenableFuture getFeature( + io.grpc.examples.routeguide.Point request); + } + + public static class RouteGuideStub extends + io.grpc.stub.AbstractStub + implements RouteGuide { + private RouteGuideStub(io.grpc.Channel channel, + RouteGuideServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected RouteGuideStub build(io.grpc.Channel channel, + RouteGuideServiceDescriptor config) { + return new RouteGuideStub(channel, config); + } + + @java.lang.Override + public void getFeature(io.grpc.examples.routeguide.Point request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + channel.newCall(config.getFeature), request, responseObserver); + } + + @java.lang.Override + public void listFeatures(io.grpc.examples.routeguide.Rectangle request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + channel.newCall(config.listFeatures), request, responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver recordRoute( + io.grpc.stub.StreamObserver responseObserver) { + return asyncClientStreamingCall( + channel.newCall(config.recordRoute), responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver routeChat( + io.grpc.stub.StreamObserver responseObserver) { + return duplexStreamingCall( + channel.newCall(config.routeChat), responseObserver); + } + } + + public static class RouteGuideBlockingStub extends + io.grpc.stub.AbstractStub + implements RouteGuideBlockingClient { + private RouteGuideBlockingStub(io.grpc.Channel channel, + RouteGuideServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected RouteGuideBlockingStub build(io.grpc.Channel channel, + RouteGuideServiceDescriptor config) { + return new RouteGuideBlockingStub(channel, config); + } + + @java.lang.Override + public io.grpc.examples.routeguide.Feature getFeature(io.grpc.examples.routeguide.Point request) { + return blockingUnaryCall( + channel.newCall(config.getFeature), request); + } + + @java.lang.Override + public java.util.Iterator listFeatures( + io.grpc.examples.routeguide.Rectangle request) { + return blockingServerStreamingCall( + channel.newCall(config.listFeatures), request); + } + } + + public static class RouteGuideFutureStub extends + io.grpc.stub.AbstractStub + implements RouteGuideFutureClient { + private RouteGuideFutureStub(io.grpc.Channel channel, + RouteGuideServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected RouteGuideFutureStub build(io.grpc.Channel channel, + RouteGuideServiceDescriptor config) { + return new RouteGuideFutureStub(channel, config); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture getFeature( + io.grpc.examples.routeguide.Point request) { + return unaryFutureCall( + channel.newCall(config.getFeature), request); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final RouteGuide serviceImpl) { + return io.grpc.ServerServiceDefinition.builder("routeguide.RouteGuide") + .addMethod(createMethodDefinition( + METHOD_GET_FEATURE, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + io.grpc.examples.routeguide.Point, + io.grpc.examples.routeguide.Feature>() { + @java.lang.Override + public void invoke( + io.grpc.examples.routeguide.Point request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.getFeature(request, responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_LIST_FEATURES, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + io.grpc.examples.routeguide.Rectangle, + io.grpc.examples.routeguide.Feature>() { + @java.lang.Override + public void invoke( + io.grpc.examples.routeguide.Rectangle request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.listFeatures(request, responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_RECORD_ROUTE, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + io.grpc.examples.routeguide.Point, + io.grpc.examples.routeguide.RouteSummary>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.recordRoute(responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_ROUTE_CHAT, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + io.grpc.examples.routeguide.RouteNote, + io.grpc.examples.routeguide.RouteNote>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.routeChat(responseObserver); + } + }))).build(); + } +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java new file mode 100644 index 00000000000..59c0c3393ea --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java @@ -0,0 +1,109 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +public final class RouteGuideProto { + private RouteGuideProto() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + } + static final com.google.protobuf.Descriptors.Descriptor + internal_static_routeguide_Point_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_routeguide_Point_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_routeguide_Rectangle_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_routeguide_Rectangle_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_routeguide_Feature_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_routeguide_Feature_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_routeguide_RouteNote_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_routeguide_RouteNote_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_routeguide_RouteSummary_descriptor; + static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_routeguide_RouteSummary_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\021route_guide.proto\022\nrouteguide\",\n\005Point" + + "\022\020\n\010latitude\030\001 \001(\005\022\021\n\tlongitude\030\002 \001(\005\"I\n" + + "\tRectangle\022\035\n\002lo\030\001 \001(\0132\021.routeguide.Poin" + + "t\022\035\n\002hi\030\002 \001(\0132\021.routeguide.Point\"<\n\007Feat" + + "ure\022\014\n\004name\030\001 \001(\t\022#\n\010location\030\002 \001(\0132\021.ro" + + "uteguide.Point\"A\n\tRouteNote\022#\n\010location\030" + + "\001 \001(\0132\021.routeguide.Point\022\017\n\007message\030\002 \001(" + + "\t\"b\n\014RouteSummary\022\023\n\013point_count\030\001 \001(\005\022\025" + + "\n\rfeature_count\030\002 \001(\005\022\020\n\010distance\030\003 \001(\005\022" + + "\024\n\014elapsed_time\030\004 \001(\0052\205\002\n\nRouteGuide\0226\n\n", + "GetFeature\022\021.routeguide.Point\032\023.routegui" + + "de.Feature\"\000\022>\n\014ListFeatures\022\025.routeguid" + + "e.Rectangle\032\023.routeguide.Feature\"\0000\001\022>\n\013" + + "RecordRoute\022\021.routeguide.Point\032\030.routegu" + + "ide.RouteSummary\"\000(\001\022?\n\tRouteChat\022\025.rout" + + "eguide.RouteNote\032\025.routeguide.RouteNote\"" + + "\000(\0010\001B0\n\033io.grpc.examples.routeguideB\017Ro" + + "uteGuideProtoP\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_routeguide_Point_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_routeguide_Point_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_routeguide_Point_descriptor, + new java.lang.String[] { "Latitude", "Longitude", }); + internal_static_routeguide_Rectangle_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_routeguide_Rectangle_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_routeguide_Rectangle_descriptor, + new java.lang.String[] { "Lo", "Hi", }); + internal_static_routeguide_Feature_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_routeguide_Feature_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_routeguide_Feature_descriptor, + new java.lang.String[] { "Name", "Location", }); + internal_static_routeguide_RouteNote_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_routeguide_RouteNote_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_routeguide_RouteNote_descriptor, + new java.lang.String[] { "Location", "Message", }); + internal_static_routeguide_RouteSummary_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_routeguide_RouteSummary_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_routeguide_RouteSummary_descriptor, + new java.lang.String[] { "PointCount", "FeatureCount", "Distance", "ElapsedTime", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java new file mode 100644 index 00000000000..70df9dcb9c7 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java @@ -0,0 +1,699 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +/** + * Protobuf type {@code routeguide.RouteNote} + * + *
+ * A RouteNote is a message sent while at a given point.
+ * 
+ */ +public final class RouteNote extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:routeguide.RouteNote) + RouteNoteOrBuilder { + // Use RouteNote.newBuilder() to construct. + private RouteNote(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RouteNote() { + message_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private RouteNote( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + 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.examples.routeguide.Point.Builder subBuilder = null; + if (location_ != null) { + subBuilder = location_.toBuilder(); + } + location_ = input.readMessage(io.grpc.examples.routeguide.Point.PARSER, extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(location_); + location_ = subBuilder.buildPartial(); + } + + break; + } + case 18: { + com.google.protobuf.ByteString bs = input.readBytes(); + + message_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteNote_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.RouteNote.class, io.grpc.examples.routeguide.RouteNote.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RouteNote parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new RouteNote(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private io.grpc.examples.routeguide.Point location_; + /** + * optional .routeguide.Point location = 1; + * + *
+   * The location from which the message is sent.
+   * 
+ */ + public boolean hasLocation() { + return location_ != null; + } + /** + * optional .routeguide.Point location = 1; + * + *
+   * The location from which the message is sent.
+   * 
+ */ + public io.grpc.examples.routeguide.Point getLocation() { + return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; + } + /** + * optional .routeguide.Point location = 1; + * + *
+   * The location from which the message is sent.
+   * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { + return getLocation(); + } + + public static final int MESSAGE_FIELD_NUMBER = 2; + private java.lang.Object message_; + /** + * optional string message = 2; + * + *
+   * The message to be sent.
+   * 
+ */ + 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(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } + } + /** + * optional string message = 2; + * + *
+   * The message to be sent.
+   * 
+ */ + 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 (location_ != null) { + output.writeMessage(1, getLocation()); + } + if (!getMessageBytes().isEmpty()) { + output.writeBytes(2, getMessageBytes()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (location_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getLocation()); + } + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(2, getMessageBytes()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.routeguide.RouteNote parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.RouteNote 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.examples.routeguide.RouteNote parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.RouteNote parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.routeguide.RouteNote parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.RouteNote parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.RouteNote parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.routeguide.RouteNote parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.RouteNote parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.RouteNote parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.routeguide.RouteNote prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code routeguide.RouteNote} + * + *
+   * A RouteNote is a message sent while at a given point.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:routeguide.RouteNote) + io.grpc.examples.routeguide.RouteNoteOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteNote_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteNote_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.RouteNote.class, io.grpc.examples.routeguide.RouteNote.Builder.class); + } + + // Construct using io.grpc.examples.routeguide.RouteNote.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + if (locationBuilder_ == null) { + location_ = null; + } else { + location_ = null; + locationBuilder_ = null; + } + message_ = ""; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteNote_descriptor; + } + + public io.grpc.examples.routeguide.RouteNote getDefaultInstanceForType() { + return io.grpc.examples.routeguide.RouteNote.getDefaultInstance(); + } + + public io.grpc.examples.routeguide.RouteNote build() { + io.grpc.examples.routeguide.RouteNote result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.routeguide.RouteNote buildPartial() { + io.grpc.examples.routeguide.RouteNote result = new io.grpc.examples.routeguide.RouteNote(this); + if (locationBuilder_ == null) { + result.location_ = location_; + } else { + result.location_ = locationBuilder_.build(); + } + result.message_ = message_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.routeguide.RouteNote) { + return mergeFrom((io.grpc.examples.routeguide.RouteNote)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.routeguide.RouteNote other) { + if (other == io.grpc.examples.routeguide.RouteNote.getDefaultInstance()) return this; + if (other.hasLocation()) { + mergeLocation(other.getLocation()); + } + 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.examples.routeguide.RouteNote parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.routeguide.RouteNote) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.examples.routeguide.Point location_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> locationBuilder_; + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public boolean hasLocation() { + return locationBuilder_ != null || location_ != null; + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public io.grpc.examples.routeguide.Point getLocation() { + if (locationBuilder_ == null) { + return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; + } else { + return locationBuilder_.getMessage(); + } + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public Builder setLocation(io.grpc.examples.routeguide.Point value) { + if (locationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + location_ = value; + onChanged(); + } else { + locationBuilder_.setMessage(value); + } + + return this; + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public Builder setLocation( + io.grpc.examples.routeguide.Point.Builder builderForValue) { + if (locationBuilder_ == null) { + location_ = builderForValue.build(); + onChanged(); + } else { + locationBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public Builder mergeLocation(io.grpc.examples.routeguide.Point value) { + if (locationBuilder_ == null) { + if (location_ != null) { + location_ = + io.grpc.examples.routeguide.Point.newBuilder(location_).mergeFrom(value).buildPartial(); + } else { + location_ = value; + } + onChanged(); + } else { + locationBuilder_.mergeFrom(value); + } + + return this; + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public Builder clearLocation() { + if (locationBuilder_ == null) { + location_ = null; + onChanged(); + } else { + location_ = null; + locationBuilder_ = null; + } + + return this; + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public io.grpc.examples.routeguide.Point.Builder getLocationBuilder() { + + onChanged(); + return getLocationFieldBuilder().getBuilder(); + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { + if (locationBuilder_ != null) { + return locationBuilder_.getMessageOrBuilder(); + } else { + return location_ == null ? + io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; + } + } + /** + * optional .routeguide.Point location = 1; + * + *
+     * The location from which the message is sent.
+     * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> + getLocationFieldBuilder() { + if (locationBuilder_ == null) { + locationBuilder_ = new com.google.protobuf.SingleFieldBuilder< + io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>( + getLocation(), + getParentForChildren(), + isClean()); + location_ = null; + } + return locationBuilder_; + } + + private java.lang.Object message_ = ""; + /** + * optional string message = 2; + * + *
+     * The message to be sent.
+     * 
+ */ + 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(); + if (bs.isValidUtf8()) { + message_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string message = 2; + * + *
+     * The message to be sent.
+     * 
+ */ + 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; + } + } + /** + * optional string message = 2; + * + *
+     * The message to be sent.
+     * 
+ */ + public Builder setMessage( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + * optional string message = 2; + * + *
+     * The message to be sent.
+     * 
+ */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * optional string message = 2; + * + *
+     * The message to be sent.
+     * 
+ */ + public Builder setMessageBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + 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:routeguide.RouteNote) + } + + // @@protoc_insertion_point(class_scope:routeguide.RouteNote) + private static final io.grpc.examples.routeguide.RouteNote defaultInstance; + static { + defaultInstance = new io.grpc.examples.routeguide.RouteNote(); + } + + public static io.grpc.examples.routeguide.RouteNote getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.routeguide.RouteNote getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteNoteOrBuilder.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteNoteOrBuilder.java new file mode 100644 index 00000000000..f6b429a048f --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteNoteOrBuilder.java @@ -0,0 +1,52 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +public interface RouteNoteOrBuilder extends + // @@protoc_insertion_point(interface_extends:routeguide.RouteNote) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .routeguide.Point location = 1; + * + *
+   * The location from which the message is sent.
+   * 
+ */ + boolean hasLocation(); + /** + * optional .routeguide.Point location = 1; + * + *
+   * The location from which the message is sent.
+   * 
+ */ + io.grpc.examples.routeguide.Point getLocation(); + /** + * optional .routeguide.Point location = 1; + * + *
+   * The location from which the message is sent.
+   * 
+ */ + io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder(); + + /** + * optional string message = 2; + * + *
+   * The message to be sent.
+   * 
+ */ + java.lang.String getMessage(); + /** + * optional string message = 2; + * + *
+   * The message to be sent.
+   * 
+ */ + com.google.protobuf.ByteString + getMessageBytes(); +} diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java new file mode 100644 index 00000000000..89459656845 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java @@ -0,0 +1,610 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +/** + * Protobuf type {@code routeguide.RouteSummary} + * + *
+ * A RouteSummary is received in response to a RecordRoute rpc.
+ * It contains the number of individual points received, the number of
+ * detected features, and the total distance covered as the cumulative sum of
+ * the distance between each point.
+ * 
+ */ +public final class RouteSummary extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:routeguide.RouteSummary) + RouteSummaryOrBuilder { + // Use RouteSummary.newBuilder() to construct. + private RouteSummary(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private RouteSummary() { + pointCount_ = 0; + featureCount_ = 0; + distance_ = 0; + elapsedTime_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return com.google.protobuf.UnknownFieldSet.getDefaultInstance(); + } + private RouteSummary( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) { + 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: { + + pointCount_ = input.readInt32(); + break; + } + case 16: { + + featureCount_ = input.readInt32(); + break; + } + case 24: { + + distance_ = input.readInt32(); + break; + } + case 32: { + + elapsedTime_ = input.readInt32(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).setUnfinishedMessage(this)); + } finally { + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteSummary_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.RouteSummary.class, io.grpc.examples.routeguide.RouteSummary.Builder.class); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public RouteSummary parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new RouteSummary(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int POINT_COUNT_FIELD_NUMBER = 1; + private int pointCount_; + /** + * optional int32 point_count = 1; + * + *
+   * The number of points received.
+   * 
+ */ + public int getPointCount() { + return pointCount_; + } + + public static final int FEATURE_COUNT_FIELD_NUMBER = 2; + private int featureCount_; + /** + * optional int32 feature_count = 2; + * + *
+   * The number of known features passed while traversing the route.
+   * 
+ */ + public int getFeatureCount() { + return featureCount_; + } + + public static final int DISTANCE_FIELD_NUMBER = 3; + private int distance_; + /** + * optional int32 distance = 3; + * + *
+   * The distance covered in metres.
+   * 
+ */ + public int getDistance() { + return distance_; + } + + public static final int ELAPSED_TIME_FIELD_NUMBER = 4; + private int elapsedTime_; + /** + * optional int32 elapsed_time = 4; + * + *
+   * The duration of the traversal in seconds.
+   * 
+ */ + public int getElapsedTime() { + return elapsedTime_; + } + + 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 (pointCount_ != 0) { + output.writeInt32(1, pointCount_); + } + if (featureCount_ != 0) { + output.writeInt32(2, featureCount_); + } + if (distance_ != 0) { + output.writeInt32(3, distance_); + } + if (elapsedTime_ != 0) { + output.writeInt32(4, elapsedTime_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (pointCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, pointCount_); + } + if (featureCount_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(2, featureCount_); + } + if (distance_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(3, distance_); + } + if (elapsedTime_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(4, elapsedTime_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + public static io.grpc.examples.routeguide.RouteSummary parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.RouteSummary 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.examples.routeguide.RouteSummary parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.grpc.examples.routeguide.RouteSummary parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.grpc.examples.routeguide.RouteSummary parseFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.RouteSummary parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.RouteSummary parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.examples.routeguide.RouteSummary parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.examples.routeguide.RouteSummary parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static io.grpc.examples.routeguide.RouteSummary parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.examples.routeguide.RouteSummary prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code routeguide.RouteSummary} + * + *
+   * A RouteSummary is received in response to a RecordRoute rpc.
+   * It contains the number of individual points received, the number of
+   * detected features, and the total distance covered as the cumulative sum of
+   * the distance between each point.
+   * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.Builder implements + // @@protoc_insertion_point(builder_implements:routeguide.RouteSummary) + io.grpc.examples.routeguide.RouteSummaryOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteSummary_descriptor; + } + + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteSummary_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.grpc.examples.routeguide.RouteSummary.class, io.grpc.examples.routeguide.RouteSummary.Builder.class); + } + + // Construct using io.grpc.examples.routeguide.RouteSummary.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + pointCount_ = 0; + + featureCount_ = 0; + + distance_ = 0; + + elapsedTime_ = 0; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.grpc.examples.routeguide.RouteGuideProto.internal_static_routeguide_RouteSummary_descriptor; + } + + public io.grpc.examples.routeguide.RouteSummary getDefaultInstanceForType() { + return io.grpc.examples.routeguide.RouteSummary.getDefaultInstance(); + } + + public io.grpc.examples.routeguide.RouteSummary build() { + io.grpc.examples.routeguide.RouteSummary result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public io.grpc.examples.routeguide.RouteSummary buildPartial() { + io.grpc.examples.routeguide.RouteSummary result = new io.grpc.examples.routeguide.RouteSummary(this); + result.pointCount_ = pointCount_; + result.featureCount_ = featureCount_; + result.distance_ = distance_; + result.elapsedTime_ = elapsedTime_; + onBuilt(); + return result; + } + + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.grpc.examples.routeguide.RouteSummary) { + return mergeFrom((io.grpc.examples.routeguide.RouteSummary)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.grpc.examples.routeguide.RouteSummary other) { + if (other == io.grpc.examples.routeguide.RouteSummary.getDefaultInstance()) return this; + if (other.getPointCount() != 0) { + setPointCount(other.getPointCount()); + } + if (other.getFeatureCount() != 0) { + setFeatureCount(other.getFeatureCount()); + } + if (other.getDistance() != 0) { + setDistance(other.getDistance()); + } + if (other.getElapsedTime() != 0) { + setElapsedTime(other.getElapsedTime()); + } + 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.examples.routeguide.RouteSummary parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (io.grpc.examples.routeguide.RouteSummary) e.getUnfinishedMessage(); + throw e; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int pointCount_ ; + /** + * optional int32 point_count = 1; + * + *
+     * The number of points received.
+     * 
+ */ + public int getPointCount() { + return pointCount_; + } + /** + * optional int32 point_count = 1; + * + *
+     * The number of points received.
+     * 
+ */ + public Builder setPointCount(int value) { + + pointCount_ = value; + onChanged(); + return this; + } + /** + * optional int32 point_count = 1; + * + *
+     * The number of points received.
+     * 
+ */ + public Builder clearPointCount() { + + pointCount_ = 0; + onChanged(); + return this; + } + + private int featureCount_ ; + /** + * optional int32 feature_count = 2; + * + *
+     * The number of known features passed while traversing the route.
+     * 
+ */ + public int getFeatureCount() { + return featureCount_; + } + /** + * optional int32 feature_count = 2; + * + *
+     * The number of known features passed while traversing the route.
+     * 
+ */ + public Builder setFeatureCount(int value) { + + featureCount_ = value; + onChanged(); + return this; + } + /** + * optional int32 feature_count = 2; + * + *
+     * The number of known features passed while traversing the route.
+     * 
+ */ + public Builder clearFeatureCount() { + + featureCount_ = 0; + onChanged(); + return this; + } + + private int distance_ ; + /** + * optional int32 distance = 3; + * + *
+     * The distance covered in metres.
+     * 
+ */ + public int getDistance() { + return distance_; + } + /** + * optional int32 distance = 3; + * + *
+     * The distance covered in metres.
+     * 
+ */ + public Builder setDistance(int value) { + + distance_ = value; + onChanged(); + return this; + } + /** + * optional int32 distance = 3; + * + *
+     * The distance covered in metres.
+     * 
+ */ + public Builder clearDistance() { + + distance_ = 0; + onChanged(); + return this; + } + + private int elapsedTime_ ; + /** + * optional int32 elapsed_time = 4; + * + *
+     * The duration of the traversal in seconds.
+     * 
+ */ + public int getElapsedTime() { + return elapsedTime_; + } + /** + * optional int32 elapsed_time = 4; + * + *
+     * The duration of the traversal in seconds.
+     * 
+ */ + public Builder setElapsedTime(int value) { + + elapsedTime_ = value; + onChanged(); + return this; + } + /** + * optional int32 elapsed_time = 4; + * + *
+     * The duration of the traversal in seconds.
+     * 
+ */ + public Builder clearElapsedTime() { + + elapsedTime_ = 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:routeguide.RouteSummary) + } + + // @@protoc_insertion_point(class_scope:routeguide.RouteSummary) + private static final io.grpc.examples.routeguide.RouteSummary defaultInstance; + static { + defaultInstance = new io.grpc.examples.routeguide.RouteSummary(); + } + + public static io.grpc.examples.routeguide.RouteSummary getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.examples.routeguide.RouteSummary getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } +} + diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummaryOrBuilder.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummaryOrBuilder.java new file mode 100644 index 00000000000..bdffc55d136 --- /dev/null +++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummaryOrBuilder.java @@ -0,0 +1,45 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: route_guide.proto + +package io.grpc.examples.routeguide; + +public interface RouteSummaryOrBuilder extends + // @@protoc_insertion_point(interface_extends:routeguide.RouteSummary) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 point_count = 1; + * + *
+   * The number of points received.
+   * 
+ */ + int getPointCount(); + + /** + * optional int32 feature_count = 2; + * + *
+   * The number of known features passed while traversing the route.
+   * 
+ */ + int getFeatureCount(); + + /** + * optional int32 distance = 3; + * + *
+   * The distance covered in metres.
+   * 
+ */ + int getDistance(); + + /** + * optional int32 elapsed_time = 4; + * + *
+   * The duration of the traversal in seconds.
+   * 
+ */ + int getElapsedTime(); +} diff --git a/integration-testing/build.gradle b/integration-testing/build.gradle index 3ce27d00757..371d6d2ee62 100644 --- a/integration-testing/build.gradle +++ b/integration-testing/build.gradle @@ -1,4 +1,3 @@ -apply plugin: 'com.google.protobuf' apply plugin: 'application' description = "gRPC: Integration Testing" @@ -63,11 +62,7 @@ applicationDistribution.into("bin") { fileMode = 0755 } -protobufCodeGenPlugins = ["java_plugin:$javaPluginPath"] - -project.afterEvaluate { - generateProto.dependsOn ':grpc-compiler:java_pluginExecutable' -} +configureProtoCompilation() // Allow intellij projects to refer to generated-sources idea { diff --git a/integration-testing/src/generated/main/com/google/protobuf/EmptyProtos.java b/integration-testing/src/generated/main/com/google/protobuf/EmptyProtos.java new file mode 100644 index 00000000000..3c326117508 --- /dev/null +++ b/integration-testing/src/generated/main/com/google/protobuf/EmptyProtos.java @@ -0,0 +1,379 @@ +// 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.ExtensionRegistry registry) { + } + public interface EmptyOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.Empty) + com.google.protobuf.MessageOrBuilder { + } + /** + * Protobuf type {@code grpc.testing.Empty} + * + *
+   * 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) { };
+   *   };
+   * 
+ */ + public static final class Empty extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.Empty) + EmptyOrBuilder { + // Use Empty.newBuilder() to construct. + private Empty(com.google.protobuf.GeneratedMessage.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) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Empty parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Empty(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + 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); + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static com.google.protobuf.EmptyProtos.Empty parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static com.google.protobuf.EmptyProtos.Empty parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static com.google.protobuf.EmptyProtos.Empty parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static com.google.protobuf.EmptyProtos.Empty parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(input); + } + public static com.google.protobuf.EmptyProtos.Empty parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(com.google.protobuf.EmptyProtos.Empty prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.Empty} + * + *
+     * 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) { };
+     *   };
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + // @@protoc_insertion_point(builder_scope:grpc.testing.Empty) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.Empty) + private static final com.google.protobuf.EmptyProtos.Empty defaultInstance; + static { + defaultInstance = new com.google.protobuf.EmptyProtos.Empty(); + } + + public static com.google.protobuf.EmptyProtos.Empty getDefaultInstance() { + return defaultInstance; + } + + public com.google.protobuf.EmptyProtos.Empty getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_Empty_descriptor; + private static + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_Empty_descriptor, + new java.lang.String[] { }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/integration-testing/src/generated/main/io/grpc/testing/integration/Messages.java b/integration-testing/src/generated/main/io/grpc/testing/integration/Messages.java new file mode 100644 index 00000000000..4a9cb321944 --- /dev/null +++ b/integration-testing/src/generated/main/io/grpc/testing/integration/Messages.java @@ -0,0 +1,6364 @@ +// 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.ExtensionRegistry registry) { + } + /** + * Protobuf enum {@code grpc.testing.PayloadType} + * + *
+   * The type of payload that should be returned.
+   * 
+ */ + public enum PayloadType + implements com.google.protobuf.ProtocolMessageEnum { + /** + * COMPRESSABLE = 0; + * + *
+     * Compressable text format.
+     * 
+ */ + COMPRESSABLE(0, 0), + /** + * UNCOMPRESSABLE = 1; + * + *
+     * Uncompressable binary format.
+     * 
+ */ + UNCOMPRESSABLE(1, 1), + /** + * RANDOM = 2; + * + *
+     * Randomly chosen from all other formats defined in this enum.
+     * 
+ */ + RANDOM(2, 2), + UNRECOGNIZED(-1, -1), + ; + + /** + * COMPRESSABLE = 0; + * + *
+     * Compressable text format.
+     * 
+ */ + public static final int COMPRESSABLE_VALUE = 0; + /** + * UNCOMPRESSABLE = 1; + * + *
+     * Uncompressable binary format.
+     * 
+ */ + public static final int UNCOMPRESSABLE_VALUE = 1; + /** + * RANDOM = 2; + * + *
+     * Randomly chosen from all other formats defined in this enum.
+     * 
+ */ + public static final int RANDOM_VALUE = 2; + + + public final int getNumber() { + if (index == -1) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + public static PayloadType valueOf(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 + internalGetValueMap() { + return internalValueMap; + } + private static com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PayloadType findValueByNumber(int number) { + return PayloadType.valueOf(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(index); + } + 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 index; + private final int value; + + private PayloadType(int index, int value) { + this.index = index; + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:grpc.testing.PayloadType) + } + + public interface PayloadOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.Payload) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + int getTypeValue(); + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadType getType(); + + /** + * optional bytes body = 2; + * + *
+     * Primary contents of payload.
+     * 
+ */ + com.google.protobuf.ByteString getBody(); + } + /** + * Protobuf type {@code grpc.testing.Payload} + * + *
+   * A block of data, to simply increase gRPC message size.
+   * 
+ */ + public static final class Payload extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.Payload) + PayloadOrBuilder { + // Use Payload.newBuilder() to construct. + private Payload(com.google.protobuf.GeneratedMessage.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) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public Payload parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Payload(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int TYPE_FIELD_NUMBER = 1; + private int type_; + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + public int getTypeValue() { + return type_; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+     * The type of data in body.
+     * 
+ */ + 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_; + /** + * optional bytes body = 2; + * + *
+     * Primary contents of payload.
+     * 
+ */ + 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_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + 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_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.Payload parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.Payload parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.Payload parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.Payload parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.Payload prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.Payload} + * + *
+     * A block of data, to simply increase gRPC message size.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int type_ = 0; + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public int getTypeValue() { + return type_; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public Builder setTypeValue(int value) { + type_ = value; + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public Builder setType(io.grpc.testing.integration.Messages.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType type = 1; + * + *
+       * The type of data in body.
+       * 
+ */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString body_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + public com.google.protobuf.ByteString getBody() { + return body_; + } + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + public Builder setBody(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + body_ = value; + onChanged(); + return this; + } + /** + * optional bytes body = 2; + * + *
+       * Primary contents of payload.
+       * 
+ */ + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.Payload(); + } + + public static io.grpc.testing.integration.Messages.Payload getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.Payload getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface SimpleRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + int getResponseTypeValue(); + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadType getResponseType(); + + /** + * optional int32 response_size = 2; + * + *
+     * Desired payload size in the response from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + int getResponseSize(); + + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + io.grpc.testing.integration.Messages.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder(); + + /** + * optional bool fill_username = 4; + * + *
+     * Whether SimpleResponse should include username.
+     * 
+ */ + boolean getFillUsername(); + + /** + * optional bool fill_oauth_scope = 5; + * + *
+     * Whether SimpleResponse should include OAuth scope.
+     * 
+ */ + boolean getFillOauthScope(); + } + /** + * Protobuf type {@code grpc.testing.SimpleRequest} + * + *
+   * Unary request.
+   * 
+ */ + public static final class SimpleRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.SimpleRequest) + SimpleRequestOrBuilder { + // Use SimpleRequest.newBuilder() to construct. + private SimpleRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private SimpleRequest() { + responseType_ = 0; + responseSize_ = 0; + fillUsername_ = false; + fillOauthScope_ = false; + } + + @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) { + 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; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SimpleRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int RESPONSE_TYPE_FIELD_NUMBER = 1; + private int responseType_; + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + public int getResponseTypeValue() { + return responseType_; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * Desired payload type in the response from the server.
+     * If response_type is RANDOM, server randomly chooses one from other formats.
+     * 
+ */ + 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_; + /** + * optional int32 response_size = 2; + * + *
+     * Desired payload size in the response from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + public int getResponseSize() { + return responseSize_; + } + + public static final int PAYLOAD_FIELD_NUMBER = 3; + private io.grpc.testing.integration.Messages.Payload payload_; + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public boolean hasPayload() { + return payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public io.grpc.testing.integration.Messages.Payload getPayload() { + return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() { + return getPayload(); + } + + public static final int FILL_USERNAME_FIELD_NUMBER = 4; + private boolean fillUsername_; + /** + * optional bool fill_username = 4; + * + *
+     * Whether SimpleResponse should include username.
+     * 
+ */ + public boolean getFillUsername() { + return fillUsername_; + } + + public static final int FILL_OAUTH_SCOPE_FIELD_NUMBER = 5; + private boolean fillOauthScope_; + /** + * optional bool fill_oauth_scope = 5; + * + *
+     * Whether SimpleResponse should include OAuth scope.
+     * 
+ */ + public boolean getFillOauthScope() { + return fillOauthScope_; + } + + 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_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + 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_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.SimpleRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.SimpleRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.SimpleRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleRequest prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.SimpleRequest} + * + *
+     * Unary request.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + responseType_ = 0; + + responseSize_ = 0; + + if (payloadBuilder_ == null) { + payload_ = null; + } else { + payload_ = null; + payloadBuilder_ = null; + } + fillUsername_ = false; + + fillOauthScope_ = false; + + 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_; + onBuilt(); + return result; + } + + 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()); + } + 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int responseType_ = 0; + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public int getResponseTypeValue() { + return responseType_; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public Builder setResponseTypeValue(int value) { + responseType_ = value; + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public Builder setResponseType(io.grpc.testing.integration.Messages.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + + responseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * Desired payload type in the response from the server.
+       * If response_type is RANDOM, server randomly chooses one from other formats.
+       * 
+ */ + public Builder clearResponseType() { + + responseType_ = 0; + onChanged(); + return this; + } + + private int responseSize_ ; + /** + * optional int32 response_size = 2; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public int getResponseSize() { + return responseSize_; + } + /** + * optional int32 response_size = 2; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public Builder setResponseSize(int value) { + + responseSize_ = value; + onChanged(); + return this; + } + /** + * optional int32 response_size = 2; + * + *
+       * Desired payload size in the response from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public Builder clearResponseSize() { + + responseSize_ = 0; + onChanged(); + return this; + } + + private io.grpc.testing.integration.Messages.Payload payload_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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(); + } + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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_; + } + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + 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_ ; + /** + * optional bool fill_username = 4; + * + *
+       * Whether SimpleResponse should include username.
+       * 
+ */ + public boolean getFillUsername() { + return fillUsername_; + } + /** + * optional bool fill_username = 4; + * + *
+       * Whether SimpleResponse should include username.
+       * 
+ */ + public Builder setFillUsername(boolean value) { + + fillUsername_ = value; + onChanged(); + return this; + } + /** + * optional bool fill_username = 4; + * + *
+       * Whether SimpleResponse should include username.
+       * 
+ */ + public Builder clearFillUsername() { + + fillUsername_ = false; + onChanged(); + return this; + } + + private boolean fillOauthScope_ ; + /** + * optional bool fill_oauth_scope = 5; + * + *
+       * Whether SimpleResponse should include OAuth scope.
+       * 
+ */ + public boolean getFillOauthScope() { + return fillOauthScope_; + } + /** + * optional bool fill_oauth_scope = 5; + * + *
+       * Whether SimpleResponse should include OAuth scope.
+       * 
+ */ + public Builder setFillOauthScope(boolean value) { + + fillOauthScope_ = value; + onChanged(); + return this; + } + /** + * optional bool fill_oauth_scope = 5; + * + *
+       * Whether SimpleResponse should include OAuth scope.
+       * 
+ */ + public Builder clearFillOauthScope() { + + fillOauthScope_ = false; + 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.SimpleRequest) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest) + private static final io.grpc.testing.integration.Messages.SimpleRequest defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.SimpleRequest(); + } + + public static io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface SimpleResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase message size.
+     * 
+ */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase message size.
+     * 
+ */ + io.grpc.testing.integration.Messages.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase message size.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder(); + + /** + * optional string username = 2; + * + *
+     * The user the request came from, for verifying authentication was
+     * successful when the client expected it.
+     * 
+ */ + java.lang.String getUsername(); + /** + * optional string username = 2; + * + *
+     * The user the request came from, for verifying authentication was
+     * successful when the client expected it.
+     * 
+ */ + com.google.protobuf.ByteString + getUsernameBytes(); + + /** + * optional string oauth_scope = 3; + * + *
+     * OAuth scope.
+     * 
+ */ + java.lang.String getOauthScope(); + /** + * optional string oauth_scope = 3; + * + *
+     * OAuth scope.
+     * 
+ */ + com.google.protobuf.ByteString + getOauthScopeBytes(); + } + /** + * Protobuf type {@code grpc.testing.SimpleResponse} + * + *
+   * Unary response, as configured by the request.
+   * 
+ */ + public static final class SimpleResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.SimpleResponse) + SimpleResponseOrBuilder { + // Use SimpleResponse.newBuilder() to construct. + private SimpleResponse(com.google.protobuf.GeneratedMessage.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) { + 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: { + com.google.protobuf.ByteString bs = input.readBytes(); + + username_ = bs; + break; + } + case 26: { + com.google.protobuf.ByteString bs = input.readBytes(); + + oauthScope_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SimpleResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private io.grpc.testing.integration.Messages.Payload payload_; + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase message size.
+     * 
+ */ + public boolean hasPayload() { + return payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase message size.
+     * 
+ */ + public io.grpc.testing.integration.Messages.Payload getPayload() { + return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase message size.
+     * 
+ */ + public io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder() { + return getPayload(); + } + + public static final int USERNAME_FIELD_NUMBER = 2; + private java.lang.Object username_; + /** + * optional string username = 2; + * + *
+     * The user the request came from, for verifying authentication was
+     * successful when the client expected it.
+     * 
+ */ + 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(); + if (bs.isValidUtf8()) { + username_ = s; + } + return s; + } + } + /** + * optional string username = 2; + * + *
+     * The user the request came from, for verifying authentication was
+     * successful when the client expected it.
+     * 
+ */ + 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 java.lang.Object oauthScope_; + /** + * optional string oauth_scope = 3; + * + *
+     * OAuth scope.
+     * 
+ */ + 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(); + if (bs.isValidUtf8()) { + oauthScope_ = s; + } + return s; + } + } + /** + * optional string oauth_scope = 3; + * + *
+     * OAuth scope.
+     * 
+ */ + 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()) { + output.writeBytes(2, getUsernameBytes()); + } + if (!getOauthScopeBytes().isEmpty()) { + output.writeBytes(3, getOauthScopeBytes()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + 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.CodedOutputStream + .computeBytesSize(2, getUsernameBytes()); + } + if (!getOauthScopeBytes().isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getOauthScopeBytes()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.SimpleResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.SimpleResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.SimpleResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleResponse prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.SimpleResponse} + * + *
+     * Unary response, as configured by the request.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.testing.integration.Messages.Payload payload_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + 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(); + } + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + 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_; + } + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase message size.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + 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_ = ""; + /** + * optional string username = 2; + * + *
+       * The user the request came from, for verifying authentication was
+       * successful when the client expected it.
+       * 
+ */ + 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(); + if (bs.isValidUtf8()) { + username_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string username = 2; + * + *
+       * The user the request came from, for verifying authentication was
+       * successful when the client expected it.
+       * 
+ */ + 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; + } + } + /** + * optional string username = 2; + * + *
+       * The user the request came from, for verifying authentication was
+       * successful when the client expected it.
+       * 
+ */ + public Builder setUsername( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + /** + * optional string username = 2; + * + *
+       * The user the request came from, for verifying authentication was
+       * successful when the client expected it.
+       * 
+ */ + public Builder clearUsername() { + + username_ = getDefaultInstance().getUsername(); + onChanged(); + return this; + } + /** + * optional string username = 2; + * + *
+       * The user the request came from, for verifying authentication was
+       * successful when the client expected it.
+       * 
+ */ + public Builder setUsernameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + username_ = value; + onChanged(); + return this; + } + + private java.lang.Object oauthScope_ = ""; + /** + * optional string oauth_scope = 3; + * + *
+       * OAuth scope.
+       * 
+ */ + 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(); + if (bs.isValidUtf8()) { + oauthScope_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string oauth_scope = 3; + * + *
+       * OAuth scope.
+       * 
+ */ + 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; + } + } + /** + * optional string oauth_scope = 3; + * + *
+       * OAuth scope.
+       * 
+ */ + public Builder setOauthScope( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + oauthScope_ = value; + onChanged(); + return this; + } + /** + * optional string oauth_scope = 3; + * + *
+       * OAuth scope.
+       * 
+ */ + public Builder clearOauthScope() { + + oauthScope_ = getDefaultInstance().getOauthScope(); + onChanged(); + return this; + } + /** + * optional string oauth_scope = 3; + * + *
+       * OAuth scope.
+       * 
+ */ + public Builder setOauthScopeBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.SimpleResponse(); + } + + public static io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface SimpleContextOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.SimpleContext) + com.google.protobuf.MessageOrBuilder { + + /** + * optional string value = 1; + */ + java.lang.String getValue(); + /** + * optional string value = 1; + */ + com.google.protobuf.ByteString + getValueBytes(); + } + /** + * Protobuf type {@code grpc.testing.SimpleContext} + */ + public static final class SimpleContext extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.SimpleContext) + SimpleContextOrBuilder { + // Use SimpleContext.newBuilder() to construct. + private SimpleContext(com.google.protobuf.GeneratedMessage.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) { + this(); + int mutable_bitField0_ = 0; + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!input.skipField(tag)) { + done = true; + } + break; + } + case 10: { + com.google.protobuf.ByteString bs = input.readBytes(); + + value_ = bs; + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public SimpleContext parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new SimpleContext(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int VALUE_FIELD_NUMBER = 1; + private java.lang.Object value_; + /** + * optional string value = 1; + */ + 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(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } + } + /** + * optional string value = 1; + */ + 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()) { + output.writeBytes(1, getValueBytes()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (!getValueBytes().isEmpty()) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(1, getValueBytes()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.SimpleContext parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.SimpleContext parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.SimpleContext parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.SimpleContext parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleContext prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.SimpleContext} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object value_ = ""; + /** + * optional string value = 1; + */ + 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(); + if (bs.isValidUtf8()) { + value_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string value = 1; + */ + 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; + } + } + /** + * optional string value = 1; + */ + public Builder setValue( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + value_ = value; + onChanged(); + return this; + } + /** + * optional string value = 1; + */ + public Builder clearValue() { + + value_ = getDefaultInstance().getValue(); + onChanged(); + return this; + } + /** + * optional string value = 1; + */ + public Builder setValueBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.SimpleContext(); + } + + public static io.grpc.testing.integration.Messages.SimpleContext getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.SimpleContext getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface StreamingInputCallRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingInputCallRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + io.grpc.testing.integration.Messages.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.StreamingInputCallRequest} + * + *
+   * Client-streaming request.
+   * 
+ */ + public static final class StreamingInputCallRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.StreamingInputCallRequest) + StreamingInputCallRequestOrBuilder { + // Use StreamingInputCallRequest.newBuilder() to construct. + private StreamingInputCallRequest(com.google.protobuf.GeneratedMessage.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) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StreamingInputCallRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new StreamingInputCallRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private io.grpc.testing.integration.Messages.Payload payload_; + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public boolean hasPayload() { + return payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public io.grpc.testing.integration.Messages.Payload getPayload() { + return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + 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()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (payload_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPayload()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingInputCallRequest prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.StreamingInputCallRequest} + * + *
+     * Client-streaming request.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.testing.integration.Messages.Payload payload_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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(); + } + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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_; + } + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.StreamingInputCallRequest(); + } + + public static io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface StreamingInputCallResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingInputCallResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 aggregated_payload_size = 1; + * + *
+     * Aggregated size of payloads received from the client.
+     * 
+ */ + int getAggregatedPayloadSize(); + } + /** + * Protobuf type {@code grpc.testing.StreamingInputCallResponse} + * + *
+   * Client-streaming response.
+   * 
+ */ + public static final class StreamingInputCallResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.StreamingInputCallResponse) + StreamingInputCallResponseOrBuilder { + // Use StreamingInputCallResponse.newBuilder() to construct. + private StreamingInputCallResponse(com.google.protobuf.GeneratedMessage.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) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StreamingInputCallResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new StreamingInputCallResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int AGGREGATED_PAYLOAD_SIZE_FIELD_NUMBER = 1; + private int aggregatedPayloadSize_; + /** + * optional int32 aggregated_payload_size = 1; + * + *
+     * Aggregated size of payloads received from the client.
+     * 
+ */ + 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_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (aggregatedPayloadSize_ != 0) { + size += com.google.protobuf.CodedOutputStream + .computeInt32Size(1, aggregatedPayloadSize_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingInputCallResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingInputCallResponse prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.StreamingInputCallResponse} + * + *
+     * Client-streaming response.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int aggregatedPayloadSize_ ; + /** + * optional int32 aggregated_payload_size = 1; + * + *
+       * Aggregated size of payloads received from the client.
+       * 
+ */ + public int getAggregatedPayloadSize() { + return aggregatedPayloadSize_; + } + /** + * optional int32 aggregated_payload_size = 1; + * + *
+       * Aggregated size of payloads received from the client.
+       * 
+ */ + public Builder setAggregatedPayloadSize(int value) { + + aggregatedPayloadSize_ = value; + onChanged(); + return this; + } + /** + * optional int32 aggregated_payload_size = 1; + * + *
+       * Aggregated size of payloads received from the client.
+       * 
+ */ + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.StreamingInputCallResponse(); + } + + public static io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface ResponseParametersOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.ResponseParameters) + com.google.protobuf.MessageOrBuilder { + + /** + * optional int32 size = 1; + * + *
+     * Desired payload sizes in responses from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + int getSize(); + + /** + * optional int32 interval_us = 2; + * + *
+     * Desired interval between consecutive responses in the response stream in
+     * microseconds.
+     * 
+ */ + int getIntervalUs(); + } + /** + * Protobuf type {@code grpc.testing.ResponseParameters} + * + *
+   * Configuration for a particular response.
+   * 
+ */ + public static final class ResponseParameters extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.ResponseParameters) + ResponseParametersOrBuilder { + // Use ResponseParameters.newBuilder() to construct. + private ResponseParameters(com.google.protobuf.GeneratedMessage.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) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public ResponseParameters parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ResponseParameters(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int SIZE_FIELD_NUMBER = 1; + private int size_; + /** + * optional int32 size = 1; + * + *
+     * Desired payload sizes in responses from the server.
+     * If response_type is COMPRESSABLE, this denotes the size before compression.
+     * 
+ */ + public int getSize() { + return size_; + } + + public static final int INTERVAL_US_FIELD_NUMBER = 2; + private int intervalUs_; + /** + * optional int32 interval_us = 2; + * + *
+     * Desired interval between consecutive responses in the response stream in
+     * microseconds.
+     * 
+ */ + 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_); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + 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_); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.ResponseParameters parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.ResponseParameters parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.ResponseParameters parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.ResponseParameters prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.ResponseParameters} + * + *
+     * Configuration for a particular response.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int size_ ; + /** + * optional int32 size = 1; + * + *
+       * Desired payload sizes in responses from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public int getSize() { + return size_; + } + /** + * optional int32 size = 1; + * + *
+       * Desired payload sizes in responses from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public Builder setSize(int value) { + + size_ = value; + onChanged(); + return this; + } + /** + * optional int32 size = 1; + * + *
+       * Desired payload sizes in responses from the server.
+       * If response_type is COMPRESSABLE, this denotes the size before compression.
+       * 
+ */ + public Builder clearSize() { + + size_ = 0; + onChanged(); + return this; + } + + private int intervalUs_ ; + /** + * optional int32 interval_us = 2; + * + *
+       * Desired interval between consecutive responses in the response stream in
+       * microseconds.
+       * 
+ */ + public int getIntervalUs() { + return intervalUs_; + } + /** + * optional int32 interval_us = 2; + * + *
+       * Desired interval between consecutive responses in the response stream in
+       * microseconds.
+       * 
+ */ + public Builder setIntervalUs(int value) { + + intervalUs_ = value; + onChanged(); + return this; + } + /** + * optional int32 interval_us = 2; + * + *
+       * Desired interval between consecutive responses in the response stream in
+       * microseconds.
+       * 
+ */ + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.ResponseParameters(); + } + + public static io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface StreamingOutputCallRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingOutputCallRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * 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.
+     * 
+ */ + int getResponseTypeValue(); + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * 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.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadType getResponseType(); + + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + java.util.List + getResponseParametersList(); + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + io.grpc.testing.integration.Messages.ResponseParameters getResponseParameters(int index); + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + int getResponseParametersCount(); + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + java.util.List + getResponseParametersOrBuilderList(); + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + io.grpc.testing.integration.Messages.ResponseParametersOrBuilder getResponseParametersOrBuilder( + int index); + + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + io.grpc.testing.integration.Messages.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.StreamingOutputCallRequest} + * + *
+   * Server-streaming request.
+   * 
+ */ + public static final class StreamingOutputCallRequest extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.StreamingOutputCallRequest) + StreamingOutputCallRequestOrBuilder { + // Use StreamingOutputCallRequest.newBuilder() to construct. + private StreamingOutputCallRequest(com.google.protobuf.GeneratedMessage.Builder builder) { + super(builder); + } + private StreamingOutputCallRequest() { + responseType_ = 0; + responseParameters_ = java.util.Collections.emptyList(); + } + + @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) { + 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(); + 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; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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); + } + + public static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StreamingOutputCallRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new StreamingOutputCallRequest(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + private int bitField0_; + public static final int RESPONSE_TYPE_FIELD_NUMBER = 1; + private int responseType_; + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * 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.
+     * 
+ */ + public int getResponseTypeValue() { + return responseType_; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+     * 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.
+     * 
+ */ + 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 responseParameters_; + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + public java.util.List getResponseParametersList() { + return responseParameters_; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + public java.util.List + getResponseParametersOrBuilderList() { + return responseParameters_; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + public int getResponseParametersCount() { + return responseParameters_.size(); + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + public io.grpc.testing.integration.Messages.ResponseParameters getResponseParameters(int index) { + return responseParameters_.get(index); + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+     * Configuration for each expected response message.
+     * 
+ */ + 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_; + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public boolean hasPayload() { + return payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + public io.grpc.testing.integration.Messages.Payload getPayload() { + return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+     * Optional input payload sent along with the request.
+     * 
+ */ + 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 (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()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + 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()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingOutputCallRequest prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.StreamingOutputCallRequest} + * + *
+     * Server-streaming request.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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; + } + 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.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + 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.GeneratedMessage.alwaysUseFieldBuilders ? + getResponseParametersFieldBuilder() : null; + } else { + responseParametersBuilder_.addAllMessages(other.responseParameters_); + } + } + } + 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.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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + private int bitField0_; + + private int responseType_ = 0; + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * 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.
+       * 
+ */ + public int getResponseTypeValue() { + return responseType_; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * 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.
+       * 
+ */ + public Builder setResponseTypeValue(int value) { + responseType_ = value; + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * 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.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * 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.
+       * 
+ */ + public Builder setResponseType(io.grpc.testing.integration.Messages.PayloadType value) { + if (value == null) { + throw new NullPointerException(); + } + + responseType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * optional .grpc.testing.PayloadType response_type = 1; + * + *
+       * 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.
+       * 
+ */ + public Builder clearResponseType() { + + responseType_ = 0; + onChanged(); + return this; + } + + private java.util.List responseParameters_ = + java.util.Collections.emptyList(); + private void ensureResponseParametersIsMutable() { + if (!((bitField0_ & 0x00000002) == 0x00000002)) { + responseParameters_ = new java.util.ArrayList(responseParameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilder< + io.grpc.testing.integration.Messages.ResponseParameters, io.grpc.testing.integration.Messages.ResponseParameters.Builder, io.grpc.testing.integration.Messages.ResponseParametersOrBuilder> responseParametersBuilder_; + + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public java.util.List getResponseParametersList() { + if (responseParametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(responseParameters_); + } else { + return responseParametersBuilder_.getMessageList(); + } + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public int getResponseParametersCount() { + if (responseParametersBuilder_ == null) { + return responseParameters_.size(); + } else { + return responseParametersBuilder_.getCount(); + } + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public io.grpc.testing.integration.Messages.ResponseParameters getResponseParameters(int index) { + if (responseParametersBuilder_ == null) { + return responseParameters_.get(index); + } else { + return responseParametersBuilder_.getMessage(index); + } + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + 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; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + 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; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + 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; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + 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; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + 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; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + 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; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public Builder addAllResponseParameters( + java.lang.Iterable values) { + if (responseParametersBuilder_ == null) { + ensureResponseParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, responseParameters_); + onChanged(); + } else { + responseParametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public Builder clearResponseParameters() { + if (responseParametersBuilder_ == null) { + responseParameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + responseParametersBuilder_.clear(); + } + return this; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public Builder removeResponseParameters(int index) { + if (responseParametersBuilder_ == null) { + ensureResponseParametersIsMutable(); + responseParameters_.remove(index); + onChanged(); + } else { + responseParametersBuilder_.remove(index); + } + return this; + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public io.grpc.testing.integration.Messages.ResponseParameters.Builder getResponseParametersBuilder( + int index) { + return getResponseParametersFieldBuilder().getBuilder(index); + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public io.grpc.testing.integration.Messages.ResponseParametersOrBuilder getResponseParametersOrBuilder( + int index) { + if (responseParametersBuilder_ == null) { + return responseParameters_.get(index); } else { + return responseParametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public java.util.List + getResponseParametersOrBuilderList() { + if (responseParametersBuilder_ != null) { + return responseParametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responseParameters_); + } + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public io.grpc.testing.integration.Messages.ResponseParameters.Builder addResponseParametersBuilder() { + return getResponseParametersFieldBuilder().addBuilder( + io.grpc.testing.integration.Messages.ResponseParameters.getDefaultInstance()); + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public io.grpc.testing.integration.Messages.ResponseParameters.Builder addResponseParametersBuilder( + int index) { + return getResponseParametersFieldBuilder().addBuilder( + index, io.grpc.testing.integration.Messages.ResponseParameters.getDefaultInstance()); + } + /** + * repeated .grpc.testing.ResponseParameters response_parameters = 2; + * + *
+       * Configuration for each expected response message.
+       * 
+ */ + public java.util.List + getResponseParametersBuilderList() { + return getResponseParametersFieldBuilder().getBuilderList(); + } + private com.google.protobuf.RepeatedFieldBuilder< + 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.RepeatedFieldBuilder< + 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.SingleFieldBuilder< + io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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(); + } + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + 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_; + } + } + /** + * optional .grpc.testing.Payload payload = 3; + * + *
+       * Optional input payload sent along with the request.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + 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.StreamingOutputCallRequest) + } + + // @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallRequest) + private static final io.grpc.testing.integration.Messages.StreamingOutputCallRequest defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.StreamingOutputCallRequest(); + } + + public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + public interface StreamingOutputCallResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:grpc.testing.StreamingOutputCallResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase response size.
+     * 
+ */ + boolean hasPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase response size.
+     * 
+ */ + io.grpc.testing.integration.Messages.Payload getPayload(); + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase response size.
+     * 
+ */ + io.grpc.testing.integration.Messages.PayloadOrBuilder getPayloadOrBuilder(); + } + /** + * Protobuf type {@code grpc.testing.StreamingOutputCallResponse} + * + *
+   * Server-streaming response, as configured by the request and parameters.
+   * 
+ */ + public static final class StreamingOutputCallResponse extends + com.google.protobuf.GeneratedMessage implements + // @@protoc_insertion_point(message_implements:grpc.testing.StreamingOutputCallResponse) + StreamingOutputCallResponseOrBuilder { + // Use StreamingOutputCallResponse.newBuilder() to construct. + private StreamingOutputCallResponse(com.google.protobuf.GeneratedMessage.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) { + 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 new RuntimeException(e.setUnfinishedMessage(this)); + } catch (java.io.IOException e) { + throw new RuntimeException( + new com.google.protobuf.InvalidProtocolBufferException( + e.getMessage()).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.GeneratedMessage.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 com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + public StreamingOutputCallResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new StreamingOutputCallResponse(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + public static final int PAYLOAD_FIELD_NUMBER = 1; + private io.grpc.testing.integration.Messages.Payload payload_; + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase response size.
+     * 
+ */ + public boolean hasPayload() { + return payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase response size.
+     * 
+ */ + public io.grpc.testing.integration.Messages.Payload getPayload() { + return payload_ == null ? io.grpc.testing.integration.Messages.Payload.getDefaultInstance() : payload_; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+     * Payload to increase response size.
+     * 
+ */ + 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()); + } + } + + private int memoizedSerializedSize = -1; + public int getSerializedSize() { + int size = memoizedSerializedSize; + if (size != -1) return size; + + size = 0; + if (payload_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(1, getPayload()); + } + memoizedSerializedSize = size; + return size; + } + + private static final long serialVersionUID = 0L; + 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 PARSER.parseFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return PARSER.parseDelimitedFrom(input, extensionRegistry); + } + public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return PARSER.parseFrom(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 PARSER.parseFrom(input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return defaultInstance.toBuilder(); + } + public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingOutputCallResponse prototype) { + return defaultInstance.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == defaultInstance + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessage.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code grpc.testing.StreamingOutputCallResponse} + * + *
+     * Server-streaming response, as configured by the request and parameters.
+     * 
+ */ + public static final class Builder extends + com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.GeneratedMessage.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessage.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 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; + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private io.grpc.testing.integration.Messages.Payload payload_ = null; + private com.google.protobuf.SingleFieldBuilder< + io.grpc.testing.integration.Messages.Payload, io.grpc.testing.integration.Messages.Payload.Builder, io.grpc.testing.integration.Messages.PayloadOrBuilder> payloadBuilder_; + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + public boolean hasPayload() { + return payloadBuilder_ != null || payload_ != null; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + 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(); + } + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + 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; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + public Builder clearPayload() { + if (payloadBuilder_ == null) { + payload_ = null; + onChanged(); + } else { + payload_ = null; + payloadBuilder_ = null; + } + + return this; + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + public io.grpc.testing.integration.Messages.Payload.Builder getPayloadBuilder() { + + onChanged(); + return getPayloadFieldBuilder().getBuilder(); + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + 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_; + } + } + /** + * optional .grpc.testing.Payload payload = 1; + * + *
+       * Payload to increase response size.
+       * 
+ */ + private com.google.protobuf.SingleFieldBuilder< + 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.SingleFieldBuilder< + 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 defaultInstance; + static { + defaultInstance = new io.grpc.testing.integration.Messages.StreamingOutputCallResponse(); + } + + public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstance() { + return defaultInstance; + } + + public io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstanceForType() { + return defaultInstance; + } + + static { + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_Payload_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_Payload_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_SimpleRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_SimpleRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_SimpleResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_SimpleResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_SimpleContext_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_SimpleContext_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_StreamingInputCallRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_StreamingInputCallResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_ResponseParameters_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_ResponseParameters_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_StreamingOutputCallRequest_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_grpc_testing_StreamingOutputCallResponse_descriptor; + private static + com.google.protobuf.GeneratedMessage.FieldAccessorTable + internal_static_grpc_testing_StreamingOutputCallResponse_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\"\261\001\n\rSimpleRequest\0220\n\rresponse_type\030" + + "\001 \001(\0162\031.grpc.testing.PayloadType\022\025\n\rresp" + + "onse_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\"_\n\016SimpleRespon" + + "se\022&\n\007payload\030\001 \001(\0132\025.grpc.testing.Paylo" + + "ad\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\031Str" + + "eamingInputCallRequest\022&\n\007payload\030\001 \001(\0132" + + "\025.grpc.testing.Payload\"=\n\032StreamingInput" + + "CallResponse\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\"\265\001\n\032StreamingOutp" + + "utCallRequest\0220\n\rresponse_type\030\001 \001(\0162\031.g" + + "rpc.testing.PayloadType\022=\n\023response_para" + + "meters\030\002 \003(\0132 .grpc.testing.ResponsePara" + + "meters\022&\n\007payload\030\003 \001(\0132\025.grpc.testing.P", + "ayload\"E\n\033StreamingOutputCallResponse\022&\n" + + "\007payload\030\001 \001(\0132\025.grpc.testing.Payload*?\n" + + "\013PayloadType\022\020\n\014COMPRESSABLE\020\000\022\022\n\016UNCOMP" + + "RESSABLE\020\001\022\n\n\006RANDOM\020\002B\035\n\033io.grpc.testin" + + "g.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[] { + }, assigner); + internal_static_grpc_testing_Payload_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_grpc_testing_Payload_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_Payload_descriptor, + new java.lang.String[] { "Type", "Body", }); + internal_static_grpc_testing_SimpleRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_grpc_testing_SimpleRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_SimpleRequest_descriptor, + new java.lang.String[] { "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", }); + internal_static_grpc_testing_SimpleResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_grpc_testing_SimpleResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_SimpleResponse_descriptor, + new java.lang.String[] { "Payload", "Username", "OauthScope", }); + internal_static_grpc_testing_SimpleContext_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_grpc_testing_SimpleContext_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_SimpleContext_descriptor, + new java.lang.String[] { "Value", }); + internal_static_grpc_testing_StreamingInputCallRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_StreamingInputCallRequest_descriptor, + new java.lang.String[] { "Payload", }); + internal_static_grpc_testing_StreamingInputCallResponse_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_StreamingInputCallResponse_descriptor, + new java.lang.String[] { "AggregatedPayloadSize", }); + internal_static_grpc_testing_ResponseParameters_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_grpc_testing_ResponseParameters_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_ResponseParameters_descriptor, + new java.lang.String[] { "Size", "IntervalUs", }); + internal_static_grpc_testing_StreamingOutputCallRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_StreamingOutputCallRequest_descriptor, + new java.lang.String[] { "ResponseType", "ResponseParameters", "Payload", }); + internal_static_grpc_testing_StreamingOutputCallResponse_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_grpc_testing_StreamingOutputCallResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessage.FieldAccessorTable( + internal_static_grpc_testing_StreamingOutputCallResponse_descriptor, + new java.lang.String[] { "Payload", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/integration-testing/src/generated/main/io/grpc/testing/integration/Test.java b/integration-testing/src/generated/main/io/grpc/testing/integration/Test.java new file mode 100644 index 00000000000..6d96241c59c --- /dev/null +++ b/integration-testing/src/generated/main/io/grpc/testing/integration/Test.java @@ -0,0 +1,59 @@ +// 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.ExtensionRegistry 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\273\004\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\022l\n\023StreamingOutputCall\022(.grpc.testing" + + ".StreamingOutputCallRequest\032).grpc.testi" + + "ng.StreamingOutputCallResponse0\001\022i\n\022Stre", + "amingInputCall\022\'.grpc.testing.StreamingI" + + "nputCallRequest\032(.grpc.testing.Streaming" + + "InputCallResponse(\001\022i\n\016FullDuplexCall\022(." + + "grpc.testing.StreamingOutputCallRequest\032" + + ").grpc.testing.StreamingOutputCallRespon" + + "se(\0010\001\022i\n\016HalfDuplexCall\022(.grpc.testing." + + "StreamingOutputCallRequest\032).grpc.testin" + + "g.StreamingOutputCallResponse(\0010\001B\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/integration-testing/src/generated/main/io/grpc/testing/integration/TestServiceGrpc.java b/integration-testing/src/generated/main/io/grpc/testing/integration/TestServiceGrpc.java new file mode 100644 index 00000000000..fea6a488800 --- /dev/null +++ b/integration-testing/src/generated/main/io/grpc/testing/integration/TestServiceGrpc.java @@ -0,0 +1,383 @@ +package io.grpc.testing.integration; + +import static io.grpc.stub.Calls.createMethodDescriptor; +import static io.grpc.stub.Calls.asyncUnaryCall; +import static io.grpc.stub.Calls.asyncServerStreamingCall; +import static io.grpc.stub.Calls.asyncClientStreamingCall; +import static io.grpc.stub.Calls.duplexStreamingCall; +import static io.grpc.stub.Calls.blockingUnaryCall; +import static io.grpc.stub.Calls.blockingServerStreamingCall; +import static io.grpc.stub.Calls.unaryFutureCall; +import static io.grpc.stub.ServerCalls.createMethodDefinition; +import static io.grpc.stub.ServerCalls.asyncUnaryRequestCall; +import static io.grpc.stub.ServerCalls.asyncStreamingRequestCall; + +@javax.annotation.Generated("by gRPC proto compiler") +public class TestServiceGrpc { + + private static final io.grpc.stub.Method METHOD_EMPTY_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.UNARY, "EmptyCall", + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(com.google.protobuf.EmptyProtos.Empty.PARSER)); + private static final io.grpc.stub.Method METHOD_UNARY_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.UNARY, "UnaryCall", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.SimpleResponse.PARSER)); + private static final io.grpc.stub.Method METHOD_STREAMING_OUTPUT_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.SERVER_STREAMING, "StreamingOutputCall", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER)); + private static final io.grpc.stub.Method METHOD_STREAMING_INPUT_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.CLIENT_STREAMING, "StreamingInputCall", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingInputCallResponse.PARSER)); + private static final io.grpc.stub.Method METHOD_FULL_DUPLEX_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.DUPLEX_STREAMING, "FullDuplexCall", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER)); + private static final io.grpc.stub.Method METHOD_HALF_DUPLEX_CALL = + io.grpc.stub.Method.create( + io.grpc.MethodType.DUPLEX_STREAMING, "HalfDuplexCall", + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallRequest.PARSER), + io.grpc.protobuf.ProtoUtils.marshaller(io.grpc.testing.integration.Messages.StreamingOutputCallResponse.PARSER)); + + public static TestServiceStub newStub(io.grpc.Channel channel) { + return new TestServiceStub(channel, CONFIG); + } + + public static TestServiceBlockingStub newBlockingStub( + io.grpc.Channel channel) { + return new TestServiceBlockingStub(channel, CONFIG); + } + + public static TestServiceFutureStub newFutureStub( + io.grpc.Channel channel) { + return new TestServiceFutureStub(channel, CONFIG); + } + + public static final TestServiceServiceDescriptor CONFIG = + new TestServiceServiceDescriptor(); + + @javax.annotation.concurrent.Immutable + public static class TestServiceServiceDescriptor extends + io.grpc.stub.AbstractServiceDescriptor { + public final io.grpc.MethodDescriptor emptyCall; + public final io.grpc.MethodDescriptor unaryCall; + public final io.grpc.MethodDescriptor streamingOutputCall; + public final io.grpc.MethodDescriptor streamingInputCall; + public final io.grpc.MethodDescriptor fullDuplexCall; + public final io.grpc.MethodDescriptor halfDuplexCall; + + private TestServiceServiceDescriptor() { + emptyCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_EMPTY_CALL); + unaryCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_UNARY_CALL); + streamingOutputCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_STREAMING_OUTPUT_CALL); + streamingInputCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_STREAMING_INPUT_CALL); + fullDuplexCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_FULL_DUPLEX_CALL); + halfDuplexCall = createMethodDescriptor( + "grpc.testing.TestService", METHOD_HALF_DUPLEX_CALL); + } + + @SuppressWarnings("unchecked") + private TestServiceServiceDescriptor( + java.util.Map> methodMap) { + emptyCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.emptyCall.getName()); + unaryCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.unaryCall.getName()); + streamingOutputCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.streamingOutputCall.getName()); + streamingInputCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.streamingInputCall.getName()); + fullDuplexCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.fullDuplexCall.getName()); + halfDuplexCall = (io.grpc.MethodDescriptor) methodMap.get( + CONFIG.halfDuplexCall.getName()); + } + + @java.lang.Override + protected TestServiceServiceDescriptor build( + java.util.Map> methodMap) { + return new TestServiceServiceDescriptor(methodMap); + } + + @java.lang.Override + public com.google.common.collect.ImmutableList> methods() { + return com.google.common.collect.ImmutableList.>of( + emptyCall, + unaryCall, + streamingOutputCall, + streamingInputCall, + fullDuplexCall, + halfDuplexCall); + } + } + + public static interface TestService { + + public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, + io.grpc.stub.StreamObserver responseObserver); + + public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver fullDuplexCall( + io.grpc.stub.StreamObserver responseObserver); + + public io.grpc.stub.StreamObserver halfDuplexCall( + io.grpc.stub.StreamObserver responseObserver); + } + + public static interface TestServiceBlockingClient { + + public com.google.protobuf.EmptyProtos.Empty emptyCall(com.google.protobuf.EmptyProtos.Empty request); + + public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request); + + public java.util.Iterator streamingOutputCall( + io.grpc.testing.integration.Messages.StreamingOutputCallRequest request); + } + + public static interface TestServiceFutureClient { + + public com.google.common.util.concurrent.ListenableFuture emptyCall( + com.google.protobuf.EmptyProtos.Empty request); + + public com.google.common.util.concurrent.ListenableFuture unaryCall( + io.grpc.testing.integration.Messages.SimpleRequest request); + } + + public static class TestServiceStub extends + io.grpc.stub.AbstractStub + implements TestService { + private TestServiceStub(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected TestServiceStub build(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + return new TestServiceStub(channel, config); + } + + @java.lang.Override + public void emptyCall(com.google.protobuf.EmptyProtos.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + channel.newCall(config.emptyCall), request, responseObserver); + } + + @java.lang.Override + public void unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + channel.newCall(config.unaryCall), request, responseObserver); + } + + @java.lang.Override + public void streamingOutputCall(io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncServerStreamingCall( + channel.newCall(config.streamingOutputCall), request, responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver streamingInputCall( + io.grpc.stub.StreamObserver responseObserver) { + return asyncClientStreamingCall( + channel.newCall(config.streamingInputCall), responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver fullDuplexCall( + io.grpc.stub.StreamObserver responseObserver) { + return duplexStreamingCall( + channel.newCall(config.fullDuplexCall), responseObserver); + } + + @java.lang.Override + public io.grpc.stub.StreamObserver halfDuplexCall( + io.grpc.stub.StreamObserver responseObserver) { + return duplexStreamingCall( + channel.newCall(config.halfDuplexCall), responseObserver); + } + } + + public static class TestServiceBlockingStub extends + io.grpc.stub.AbstractStub + implements TestServiceBlockingClient { + private TestServiceBlockingStub(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected TestServiceBlockingStub build(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + return new TestServiceBlockingStub(channel, config); + } + + @java.lang.Override + public com.google.protobuf.EmptyProtos.Empty emptyCall(com.google.protobuf.EmptyProtos.Empty request) { + return blockingUnaryCall( + channel.newCall(config.emptyCall), request); + } + + @java.lang.Override + public io.grpc.testing.integration.Messages.SimpleResponse unaryCall(io.grpc.testing.integration.Messages.SimpleRequest request) { + return blockingUnaryCall( + channel.newCall(config.unaryCall), request); + } + + @java.lang.Override + public java.util.Iterator streamingOutputCall( + io.grpc.testing.integration.Messages.StreamingOutputCallRequest request) { + return blockingServerStreamingCall( + channel.newCall(config.streamingOutputCall), request); + } + } + + public static class TestServiceFutureStub extends + io.grpc.stub.AbstractStub + implements TestServiceFutureClient { + private TestServiceFutureStub(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + super(channel, config); + } + + @java.lang.Override + protected TestServiceFutureStub build(io.grpc.Channel channel, + TestServiceServiceDescriptor config) { + return new TestServiceFutureStub(channel, config); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture emptyCall( + com.google.protobuf.EmptyProtos.Empty request) { + return unaryFutureCall( + channel.newCall(config.emptyCall), request); + } + + @java.lang.Override + public com.google.common.util.concurrent.ListenableFuture unaryCall( + io.grpc.testing.integration.Messages.SimpleRequest request) { + return unaryFutureCall( + channel.newCall(config.unaryCall), request); + } + } + + public static io.grpc.ServerServiceDefinition bindService( + final TestService serviceImpl) { + return io.grpc.ServerServiceDefinition.builder("grpc.testing.TestService") + .addMethod(createMethodDefinition( + METHOD_EMPTY_CALL, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + com.google.protobuf.EmptyProtos.Empty, + com.google.protobuf.EmptyProtos.Empty>() { + @java.lang.Override + public void invoke( + com.google.protobuf.EmptyProtos.Empty request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.emptyCall(request, responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_UNARY_CALL, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + io.grpc.testing.integration.Messages.SimpleRequest, + io.grpc.testing.integration.Messages.SimpleResponse>() { + @java.lang.Override + public void invoke( + io.grpc.testing.integration.Messages.SimpleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.unaryCall(request, responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_STREAMING_OUTPUT_CALL, + asyncUnaryRequestCall( + new io.grpc.stub.ServerCalls.UnaryRequestMethod< + io.grpc.testing.integration.Messages.StreamingOutputCallRequest, + io.grpc.testing.integration.Messages.StreamingOutputCallResponse>() { + @java.lang.Override + public void invoke( + io.grpc.testing.integration.Messages.StreamingOutputCallRequest request, + io.grpc.stub.StreamObserver responseObserver) { + serviceImpl.streamingOutputCall(request, responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_STREAMING_INPUT_CALL, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + io.grpc.testing.integration.Messages.StreamingInputCallRequest, + io.grpc.testing.integration.Messages.StreamingInputCallResponse>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.streamingInputCall(responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_FULL_DUPLEX_CALL, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + io.grpc.testing.integration.Messages.StreamingOutputCallRequest, + io.grpc.testing.integration.Messages.StreamingOutputCallResponse>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.fullDuplexCall(responseObserver); + } + }))) + .addMethod(createMethodDefinition( + METHOD_HALF_DUPLEX_CALL, + asyncStreamingRequestCall( + new io.grpc.stub.ServerCalls.StreamingRequestMethod< + io.grpc.testing.integration.Messages.StreamingOutputCallRequest, + io.grpc.testing.integration.Messages.StreamingOutputCallResponse>() { + @java.lang.Override + public io.grpc.stub.StreamObserver invoke( + io.grpc.stub.StreamObserver responseObserver) { + return serviceImpl.halfDuplexCall(responseObserver); + } + }))).build(); + } +} diff --git a/settings.gradle b/settings.gradle index 761c35c6541..fbc654159fd 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,7 +7,6 @@ include ":grpc-protobuf" include ":grpc-protobuf-nano" include ":grpc-netty" include ":grpc-testing" -include ":grpc-compiler" include ":grpc-integration-testing" include ":grpc-all" include ":grpc-benchmarks" @@ -21,8 +20,15 @@ project(':grpc-protobuf').projectDir = "$rootDir/protobuf" as File project(':grpc-protobuf-nano').projectDir = "$rootDir/protobuf-nano" as File project(':grpc-netty').projectDir = "$rootDir/netty" as File project(':grpc-testing').projectDir = "$rootDir/testing" as File -project(':grpc-compiler').projectDir = "$rootDir/compiler" as File project(':grpc-integration-testing').projectDir = "$rootDir/integration-testing" as File project(':grpc-all').projectDir = "$rootDir/all" as File project(':grpc-benchmarks').projectDir = "$rootDir/benchmarks" as File project(':grpc-examples').projectDir = "$rootDir/examples" as File + +if (settings.hasProperty('grpc.skip.codegen') + && settings.getProperty('grpc.skip.codegen').toBoolean()) { + println '*** Skipping the build of codegen and compilation of proto files because grpc.skip.codegen=true' +} else { + include ":grpc-compiler" + project(':grpc-compiler').projectDir = "$rootDir/compiler" as File +}