Bump protobuf dependency to 3.0.0-beta-3

This allows us to play with zero-copy and proto3 support for lite.
Unfortunately, it introduced some warnings, so deprecated warnings are
now ignored for benchmarks and interop-testing.
This commit is contained in:
Eric Anderson 2016-05-23 12:05:41 -07:00
parent fe5b7e3e9b
commit dbef1af29a
52 changed files with 3651 additions and 3792 deletions

View File

@ -5,7 +5,7 @@ language: java
env: env:
global: global:
- GRADLE_OPTS=-Xmx512m - GRADLE_OPTS=-Xmx512m
- PROTOBUF_VERSION=3.0.0-beta-2 - PROTOBUF_VERSION=3.0.0-beta-3
- LDFLAGS=-L/tmp/protobuf/lib - LDFLAGS=-L/tmp/protobuf/lib
- CXXFLAGS=-I/tmp/protobuf/include - CXXFLAGS=-I/tmp/protobuf/include
- LD_LIBRARY_PATH=/tmp/protobuf/lib - LD_LIBRARY_PATH=/tmp/protobuf/lib

View File

@ -27,13 +27,13 @@ This section is only necessary if you are making changes to the code
generation. Most users only need to use `skipCodegen=true` as discussed above. generation. Most users only need to use `skipCodegen=true` as discussed above.
### Build Protobuf ### Build Protobuf
The codegen plugin is C++ code and requires protobuf 3.0.0-beta-2. The codegen plugin is C++ code and requires protobuf 3.0.0-beta-3.
For Linux, Mac and MinGW: For Linux, Mac and MinGW:
``` ```
$ git clone https://github.com/google/protobuf.git $ git clone https://github.com/google/protobuf.git
$ cd protobuf $ cd protobuf
$ git checkout v3.0.0-beta-2 $ git checkout v3.0.0-beta-3
$ ./autogen.sh $ ./autogen.sh
$ ./configure $ ./configure
$ make $ make
@ -72,16 +72,16 @@ When building on Windows and VC++, you need to specify project properties for
Gradle to find protobuf: Gradle to find protobuf:
``` ```
.\gradlew install ^ .\gradlew install ^
-PvcProtobufInclude=C:\path\to\protobuf-3.0.0-beta-2\src ^ -PvcProtobufInclude=C:\path\to\protobuf-3.0.0-beta-3\src ^
-PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-2\vsprojects\Release ^ -PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-3\vsprojects\Release ^
-PtargetArch=x86_32 -PtargetArch=x86_32
``` ```
Since specifying those properties every build is bothersome, you can instead Since specifying those properties every build is bothersome, you can instead
create ``<project-root>\gradle.properties`` with contents like: create ``<project-root>\gradle.properties`` with contents like:
``` ```
vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-beta-2\\src vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-beta-3\\src
vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-2\\vsprojects\\Release vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-3\\vsprojects\\Release
targetArch=x86_32 targetArch=x86_32
``` ```

View File

@ -28,7 +28,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-beta-2' artifact = 'com.google.protobuf:protoc:3.0.0-beta-3'
} }
plugins { plugins {
grpc { grpc {

View File

@ -45,7 +45,8 @@ public final class Payloads {
} }
private ByteBufferParams( private ByteBufferParams(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -75,11 +76,10 @@ public final class Payloads {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -175,34 +175,40 @@ public final class Payloads {
} }
public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseDelimitedFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseDelimitedFrom( public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.ByteBufferParams parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -324,7 +330,7 @@ public final class Payloads {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.benchmarks.proto.Payloads.ByteBufferParams) e.getUnfinishedMessage(); parsedMessage = (io.grpc.benchmarks.proto.Payloads.ByteBufferParams) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -414,16 +420,7 @@ public final class Payloads {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new ByteBufferParams(input, extensionRegistry); return new ByteBufferParams(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -479,7 +476,8 @@ public final class Payloads {
} }
private SimpleProtoParams( private SimpleProtoParams(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -509,11 +507,10 @@ public final class Payloads {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -609,34 +606,40 @@ public final class Payloads {
} }
public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseDelimitedFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseDelimitedFrom( public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.SimpleProtoParams parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -758,7 +761,7 @@ public final class Payloads {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.benchmarks.proto.Payloads.SimpleProtoParams) e.getUnfinishedMessage(); parsedMessage = (io.grpc.benchmarks.proto.Payloads.SimpleProtoParams) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -848,16 +851,7 @@ public final class Payloads {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new SimpleProtoParams(input, extensionRegistry); return new SimpleProtoParams(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -881,12 +875,12 @@ public final class Payloads {
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
} }
/** /**
* Protobuf type {@code grpc.testing.ComplexProtoParams}
*
* <pre> * <pre>
* TODO (vpai): Fill this in once the details of complex, representative * TODO (vpai): Fill this in once the details of complex, representative
* protos are decided * protos are decided
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.ComplexProtoParams}
*/ */
public static final class ComplexProtoParams extends public static final class ComplexProtoParams extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -906,7 +900,8 @@ public final class Payloads {
} }
private ComplexProtoParams( private ComplexProtoParams(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
try { try {
boolean done = false; boolean done = false;
@ -925,11 +920,10 @@ public final class Payloads {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -993,34 +987,40 @@ public final class Payloads {
} }
public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseDelimitedFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseDelimitedFrom( public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom( public static io.grpc.benchmarks.proto.Payloads.ComplexProtoParams parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -1042,12 +1042,12 @@ public final class Payloads {
return builder; return builder;
} }
/** /**
* Protobuf type {@code grpc.testing.ComplexProtoParams}
*
* <pre> * <pre>
* TODO (vpai): Fill this in once the details of complex, representative * TODO (vpai): Fill this in once the details of complex, representative
* protos are decided * protos are decided
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.ComplexProtoParams}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -1135,7 +1135,7 @@ public final class Payloads {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.benchmarks.proto.Payloads.ComplexProtoParams) e.getUnfinishedMessage(); parsedMessage = (io.grpc.benchmarks.proto.Payloads.ComplexProtoParams) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -1173,16 +1173,7 @@ public final class Payloads {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new ComplexProtoParams(input, extensionRegistry); return new ComplexProtoParams(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -1255,7 +1246,8 @@ public final class Payloads {
} }
private PayloadConfig( private PayloadConfig(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -1317,11 +1309,10 @@ public final class Payloads {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -1346,18 +1337,25 @@ public final class Payloads {
SIMPLE_PARAMS(2), SIMPLE_PARAMS(2),
COMPLEX_PARAMS(3), COMPLEX_PARAMS(3),
PAYLOAD_NOT_SET(0); PAYLOAD_NOT_SET(0);
private int value = 0; private final int value;
private PayloadCase(int value) { private PayloadCase(int value) {
this.value = value; this.value = value;
} }
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PayloadCase valueOf(int value) { public static PayloadCase valueOf(int value) {
return forNumber(value);
}
public static PayloadCase forNumber(int value) {
switch (value) { switch (value) {
case 1: return BYTEBUF_PARAMS; case 1: return BYTEBUF_PARAMS;
case 2: return SIMPLE_PARAMS; case 2: return SIMPLE_PARAMS;
case 3: return COMPLEX_PARAMS; case 3: return COMPLEX_PARAMS;
case 0: return PAYLOAD_NOT_SET; case 0: return PAYLOAD_NOT_SET;
default: throw new java.lang.IllegalArgumentException( default: return null;
"Value is undefined for this oneof enum.");
} }
} }
public int getNumber() { public int getNumber() {
@ -1367,7 +1365,7 @@ public final class Payloads {
public PayloadCase public PayloadCase
getPayloadCase() { getPayloadCase() {
return PayloadCase.valueOf( return PayloadCase.forNumber(
payloadCase_); payloadCase_);
} }
@ -1499,34 +1497,40 @@ public final class Payloads {
} }
public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom( public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseDelimitedFrom(java.io.InputStream input) public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseDelimitedFrom( public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom( public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom( public static io.grpc.benchmarks.proto.Payloads.PayloadConfig parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -1677,7 +1681,7 @@ public final class Payloads {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.benchmarks.proto.Payloads.PayloadConfig) e.getUnfinishedMessage(); parsedMessage = (io.grpc.benchmarks.proto.Payloads.PayloadConfig) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -1689,7 +1693,7 @@ public final class Payloads {
private java.lang.Object payload_; private java.lang.Object payload_;
public PayloadCase public PayloadCase
getPayloadCase() { getPayloadCase() {
return PayloadCase.valueOf( return PayloadCase.forNumber(
payloadCase_); payloadCase_);
} }
@ -2120,16 +2124,7 @@ public final class Payloads {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new PayloadConfig(input, extensionRegistry); return new PayloadConfig(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -2148,24 +2143,24 @@ public final class Payloads {
} }
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ByteBufferParams_descriptor; internal_static_grpc_testing_ByteBufferParams_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ByteBufferParams_fieldAccessorTable; internal_static_grpc_testing_ByteBufferParams_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_SimpleProtoParams_descriptor; internal_static_grpc_testing_SimpleProtoParams_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_SimpleProtoParams_fieldAccessorTable; internal_static_grpc_testing_SimpleProtoParams_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ComplexProtoParams_descriptor; internal_static_grpc_testing_ComplexProtoParams_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ComplexProtoParams_fieldAccessorTable; internal_static_grpc_testing_ComplexProtoParams_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_PayloadConfig_descriptor; internal_static_grpc_testing_PayloadConfig_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_PayloadConfig_fieldAccessorTable; internal_static_grpc_testing_PayloadConfig_fieldAccessorTable;
@ -2173,7 +2168,7 @@ public final class Payloads {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -13,7 +13,7 @@ public final class Services {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -59,7 +59,7 @@ subprojects {
javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix" javaPluginPath = "$rootDir/compiler/build/exe/java_plugin/$protocPluginBaseName$exeSuffix"
guavaVersion = '19.0' guavaVersion = '19.0'
protobufVersion = '3.0.0-beta-2' protobufVersion = '3.0.0-beta-3'
protobufNanoVersion = '3.0.0-alpha-5' protobufNanoVersion = '3.0.0-alpha-5'
configureProtoCompilation = { configureProtoCompilation = {
@ -123,6 +123,11 @@ subprojects {
} }
} }
} }
compileJava {
// Protobuf-generated code produces some warnings.
options.compilerArgs = compileJava.options.compilerArgs + ["-Xlint:-deprecation"]
}
} }
def epoll_suffix = ""; def epoll_suffix = "";

View File

@ -13,5 +13,5 @@ cd "%WORKSPACE%"
set ESCWORKSPACE=%WORKSPACE:\=\\% set ESCWORKSPACE=%WORKSPACE:\=\\%
echo targetArch=x86_32> gradle.properties echo targetArch=x86_32> gradle.properties
echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-2\\cmake\\build\\Release>> gradle.properties echo vcProtobufLibs=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-3\\cmake\\build\\Release>> gradle.properties
echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-2\\cmake\\build\\include>> gradle.properties echo vcProtobufInclude=%ESCWORKSPACE%\\grpc-java-helper\\protobuf-3.0.0-beta-3\\cmake\\build\\include>> gradle.properties

View File

@ -4,7 +4,7 @@ REM 7za is in http://www.7-zip.org/a/7z1507-extra.7z
REM Prerequisite: REM Prerequisite:
REM 7za.exe in current directory or PATH REM 7za.exe in current directory or PATH
set PROTOBUF_VER=3.0.0-beta-2 set PROTOBUF_VER=3.0.0-beta-3
set CMAKE_NAME=cmake-3.3.2-win32-x86 set CMAKE_NAME=cmake-3.3.2-win32-x86
if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" ( if not exist "protobuf-%PROTOBUF_VER%\cmake\build\Release\" (
@ -25,7 +25,7 @@ set PATH=%PATH%;%cd%\%CMAKE_NAME%\bin
powershell -command "& { iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }" powershell -command "& { iwr https://github.com/google/protobuf/archive/v%PROTOBUF_VER%.zip -OutFile protobuf.zip }"
7za X protobuf.zip 7za X protobuf.zip
del protobuf.zip del protobuf.zip
pushd protobuf-3.0.0-beta-2\cmake pushd protobuf-3.0.0-beta-3\cmake
mkdir build mkdir build
cd build cd build
cmake -Dprotobuf_BUILD_TESTS=OFF .. cmake -Dprotobuf_BUILD_TESTS=OFF ..

View File

@ -2,7 +2,7 @@ FROM protoc-artifacts:latest
RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \ RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \
git fetch && \ git fetch && \
git checkout v3.0.0-beta-2 && \ git checkout v3.0.0-beta-3 && \
./autogen.sh && \ ./autogen.sh && \
CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \ CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \
make clean && make -j$(nproc) && make -j$(nproc) install"' make clean && make -j$(nproc) && make -j$(nproc) install"'

View File

@ -13,7 +13,7 @@ build your own codegen.
* Linux, Mac OS X with Clang, or Windows with MSYS2 * Linux, Mac OS X with Clang, or Windows with MSYS2
* Java 7 or up * Java 7 or up
* [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-2 or up * [Protobuf](https://github.com/google/protobuf) 3.0.0-beta-3 or up
## Compiling and testing the codegen ## Compiling and testing the codegen
Change to the `compiler` directory: Change to the `compiler` directory:
@ -37,6 +37,11 @@ To compile a proto file and generate Java interfaces out of the service definiti
$ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \ $ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \
--grpc-java_out="$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE" --grpc-java_out="$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
``` ```
To generate Java interfaces with protobuf lite:
```
$ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \
--grpc-java_out=lite:"$OUTPUT_FILE" --proto_path="$DIR_OF_PROTO_FILE" "$PROTO_FILE"
```
To generate Java interfaces with protobuf nano: To generate Java interfaces with protobuf nano:
``` ```
$ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \ $ protoc --plugin=protoc-gen-grpc-java=build/binaries/java_pluginExecutable/protoc-gen-grpc-java \

View File

@ -125,7 +125,11 @@ dependencies {
} }
sourceSets { sourceSets {
testLite {} testLite {
proto {
setSrcDirs(['src/test/proto'])
}
}
testNano { testNano {
proto { proto {
setSrcDirs(['src/test/proto']) setSrcDirs(['src/test/proto'])
@ -136,7 +140,7 @@ sourceSets {
compileTestLiteJava { compileTestLiteJava {
// Protobuf-generated Lite produces quite a few warnings. // Protobuf-generated Lite produces quite a few warnings.
options.compilerArgs = compileTestJava.options.compilerArgs + options.compilerArgs = compileTestJava.options.compilerArgs +
["-Xlint:-unchecked", "-Xlint:-rawtypes"] ["-Xlint:-unchecked", "-Xlint:-rawtypes", "-Xlint:-fallthrough"]
} }
compileTestNanoJava { compileTestNanoJava {

View File

@ -1,55 +0,0 @@
// A simple service definition for testing the protoc plugin.
syntax = "proto2";
package grpc.testing;
option java_package = "io.grpc.testing.integration";
option optimize_for = LITE_RUNTIME;
message SimpleRequest {
}
message SimpleResponse {
}
message StreamingInputCallRequest {
}
message StreamingInputCallResponse {
}
message StreamingOutputCallRequest {
}
message StreamingOutputCallResponse {
}
// Test service that supports all call types.
service TestService {
// One request followed by one response.
// The server returns the client payload as-is.
rpc UnaryCall(SimpleRequest) returns (SimpleResponse);
// One request followed by a sequence of responses (streamed download).
// The server returns the payload with client desired type and sizes.
rpc StreamingOutputCall(StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
// A sequence of requests followed by one response (streamed upload).
// The server returns the aggregated size of client payload as the result.
rpc StreamingInputCall(stream StreamingInputCallRequest)
returns (StreamingInputCallResponse);
// A sequence of requests with each request served by the server immediately.
// As one request could lead to multiple responses, this interface
// demonstrates the idea of full bidirectionality.
rpc FullBidiCall(stream StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
// A sequence of requests followed by a sequence of responses.
// The server buffers all the client requests and then serves them in order. A
// stream of responses are returned to the client when the server starts with
// first request.
rpc HalfBidiCall(stream StreamingOutputCallRequest)
returns (stream StreamingOutputCallResponse);
}

View File

@ -27,7 +27,7 @@ android {
protobuf { protobuf {
protoc { protoc {
artifact = 'com.google.protobuf:protoc:3.0.0-beta-2' artifact = 'com.google.protobuf:protoc:3.0.0-beta-3'
} }
plugins { plugins {
grpc { grpc {

View File

@ -4,11 +4,11 @@
package io.grpc.examples.helloworld; package io.grpc.examples.helloworld;
/** /**
* Protobuf type {@code helloworld.HelloReply}
*
* <pre> * <pre>
* The response message containing the greetings * The response message containing the greetings
* </pre> * </pre>
*
* Protobuf type {@code helloworld.HelloReply}
*/ */
public final class HelloReply extends public final class HelloReply extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -29,7 +29,8 @@ public final class HelloReply extends
} }
private HelloReply( private HelloReply(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -55,11 +56,10 @@ public final class HelloReply extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -163,34 +163,40 @@ public final class HelloReply extends
} }
public static io.grpc.examples.helloworld.HelloReply parseFrom(java.io.InputStream input) public static io.grpc.examples.helloworld.HelloReply parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.helloworld.HelloReply parseFrom( public static io.grpc.examples.helloworld.HelloReply parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.helloworld.HelloReply parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.helloworld.HelloReply parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.helloworld.HelloReply parseDelimitedFrom( public static io.grpc.examples.helloworld.HelloReply parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.helloworld.HelloReply parseFrom( public static io.grpc.examples.helloworld.HelloReply parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.helloworld.HelloReply parseFrom( public static io.grpc.examples.helloworld.HelloReply parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -212,11 +218,11 @@ public final class HelloReply extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code helloworld.HelloReply}
*
* <pre> * <pre>
* The response message containing the greetings * The response message containing the greetings
* </pre> * </pre>
*
* Protobuf type {@code helloworld.HelloReply}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -311,7 +317,7 @@ public final class HelloReply extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.helloworld.HelloReply) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.helloworld.HelloReply) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -418,16 +424,7 @@ public final class HelloReply extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new HelloReply(input, extensionRegistry); return new HelloReply(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -4,11 +4,11 @@
package io.grpc.examples.helloworld; package io.grpc.examples.helloworld;
/** /**
* Protobuf type {@code helloworld.HelloRequest}
*
* <pre> * <pre>
* The request message containing the user's name. * The request message containing the user's name.
* </pre> * </pre>
*
* Protobuf type {@code helloworld.HelloRequest}
*/ */
public final class HelloRequest extends public final class HelloRequest extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -29,7 +29,8 @@ public final class HelloRequest extends
} }
private HelloRequest( private HelloRequest(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -55,11 +56,10 @@ public final class HelloRequest extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -163,34 +163,40 @@ public final class HelloRequest extends
} }
public static io.grpc.examples.helloworld.HelloRequest parseFrom(java.io.InputStream input) public static io.grpc.examples.helloworld.HelloRequest parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.helloworld.HelloRequest parseFrom( public static io.grpc.examples.helloworld.HelloRequest parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.helloworld.HelloRequest parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.helloworld.HelloRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.helloworld.HelloRequest parseDelimitedFrom( public static io.grpc.examples.helloworld.HelloRequest parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.helloworld.HelloRequest parseFrom( public static io.grpc.examples.helloworld.HelloRequest parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.helloworld.HelloRequest parseFrom( public static io.grpc.examples.helloworld.HelloRequest parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -212,11 +218,11 @@ public final class HelloRequest extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code helloworld.HelloRequest}
*
* <pre> * <pre>
* The request message containing the user's name. * The request message containing the user's name.
* </pre> * </pre>
*
* Protobuf type {@code helloworld.HelloRequest}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -311,7 +317,7 @@ public final class HelloRequest extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.helloworld.HelloRequest) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.helloworld.HelloRequest) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -418,16 +424,7 @@ public final class HelloRequest extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new HelloRequest(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -8,14 +8,14 @@ public final class HelloWorldProto {
public static void registerAllExtensions( public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) { com.google.protobuf.ExtensionRegistry registry) {
} }
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_helloworld_HelloRequest_descriptor; internal_static_helloworld_HelloRequest_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_helloworld_HelloRequest_fieldAccessorTable; internal_static_helloworld_HelloRequest_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_helloworld_HelloReply_descriptor; internal_static_helloworld_HelloReply_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_helloworld_HelloReply_fieldAccessorTable; internal_static_helloworld_HelloReply_fieldAccessorTable;
@ -23,7 +23,7 @@ public final class HelloWorldProto {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -4,12 +4,12 @@
package io.grpc.examples.routeguide; package io.grpc.examples.routeguide;
/** /**
* Protobuf type {@code routeguide.Feature}
*
* <pre> * <pre>
* A feature names something at a given point. * A feature names something at a given point.
* If a feature could not be named, the name is empty. * If a feature could not be named, the name is empty.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.Feature}
*/ */
public final class Feature extends public final class Feature extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -30,7 +30,8 @@ public final class Feature extends
} }
private Feature( private Feature(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -69,11 +70,10 @@ public final class Feature extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -93,11 +93,11 @@ public final class Feature extends
public static final int NAME_FIELD_NUMBER = 1; public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_; private volatile java.lang.Object name_;
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public java.lang.String getName() { public java.lang.String getName() {
java.lang.Object ref = name_; java.lang.Object ref = name_;
@ -112,11 +112,11 @@ public final class Feature extends
} }
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getNameBytes() { getNameBytes() {
@ -135,31 +135,31 @@ public final class Feature extends
public static final int LOCATION_FIELD_NUMBER = 2; public static final int LOCATION_FIELD_NUMBER = 2;
private io.grpc.examples.routeguide.Point location_; private io.grpc.examples.routeguide.Point location_;
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public boolean hasLocation() { public boolean hasLocation() {
return location_ != null; return location_ != null;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public io.grpc.examples.routeguide.Point getLocation() { public io.grpc.examples.routeguide.Point getLocation() {
return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() {
return getLocation(); return getLocation();
@ -225,34 +225,40 @@ public final class Feature extends
} }
public static io.grpc.examples.routeguide.Feature parseFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.Feature parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Feature parseFrom( public static io.grpc.examples.routeguide.Feature parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.Feature parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.Feature parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Feature parseDelimitedFrom( public static io.grpc.examples.routeguide.Feature parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.Feature parseFrom( public static io.grpc.examples.routeguide.Feature parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Feature parseFrom( public static io.grpc.examples.routeguide.Feature parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -274,12 +280,12 @@ public final class Feature extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code routeguide.Feature}
*
* <pre> * <pre>
* A feature names something at a given point. * A feature names something at a given point.
* If a feature could not be named, the name is empty. * If a feature could not be named, the name is empty.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.Feature}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -388,7 +394,7 @@ public final class Feature extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.routeguide.Feature) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.routeguide.Feature) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -399,11 +405,11 @@ public final class Feature extends
private java.lang.Object name_ = ""; private java.lang.Object name_ = "";
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public java.lang.String getName() { public java.lang.String getName() {
java.lang.Object ref = name_; java.lang.Object ref = name_;
@ -418,11 +424,11 @@ public final class Feature extends
} }
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getNameBytes() { getNameBytes() {
@ -438,11 +444,11 @@ public final class Feature extends
} }
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public Builder setName( public Builder setName(
java.lang.String value) { java.lang.String value) {
@ -455,11 +461,11 @@ public final class Feature extends
return this; return this;
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public Builder clearName() { public Builder clearName() {
@ -468,11 +474,11 @@ public final class Feature extends
return this; return this;
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public Builder setNameBytes( public Builder setNameBytes(
com.google.protobuf.ByteString value) { com.google.protobuf.ByteString value) {
@ -490,21 +496,21 @@ public final class Feature extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> locationBuilder_; io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> locationBuilder_;
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public boolean hasLocation() { public boolean hasLocation() {
return locationBuilder_ != null || location_ != null; return locationBuilder_ != null || location_ != null;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public io.grpc.examples.routeguide.Point getLocation() { public io.grpc.examples.routeguide.Point getLocation() {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -514,11 +520,11 @@ public final class Feature extends
} }
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public Builder setLocation(io.grpc.examples.routeguide.Point value) { public Builder setLocation(io.grpc.examples.routeguide.Point value) {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -534,11 +540,11 @@ public final class Feature extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public Builder setLocation( public Builder setLocation(
io.grpc.examples.routeguide.Point.Builder builderForValue) { io.grpc.examples.routeguide.Point.Builder builderForValue) {
@ -552,11 +558,11 @@ public final class Feature extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public Builder mergeLocation(io.grpc.examples.routeguide.Point value) { public Builder mergeLocation(io.grpc.examples.routeguide.Point value) {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -574,11 +580,11 @@ public final class Feature extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public Builder clearLocation() { public Builder clearLocation() {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -592,11 +598,11 @@ public final class Feature extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public io.grpc.examples.routeguide.Point.Builder getLocationBuilder() { public io.grpc.examples.routeguide.Point.Builder getLocationBuilder() {
@ -604,11 +610,11 @@ public final class Feature extends
return getLocationFieldBuilder().getBuilder(); return getLocationFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() {
if (locationBuilder_ != null) { if (locationBuilder_ != null) {
@ -619,11 +625,11 @@ public final class Feature extends
} }
} }
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>
@ -668,16 +674,7 @@ public final class Feature extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new Feature(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -4,11 +4,11 @@
package io.grpc.examples.routeguide; package io.grpc.examples.routeguide;
/** /**
* Protobuf type {@code routeguide.FeatureDatabase}
*
* <pre> * <pre>
* Not used in the RPC. Instead, this is here for the form serialized to disk. * Not used in the RPC. Instead, this is here for the form serialized to disk.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.FeatureDatabase}
*/ */
public final class FeatureDatabase extends public final class FeatureDatabase extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -29,7 +29,8 @@ public final class FeatureDatabase extends
} }
private FeatureDatabase( private FeatureDatabase(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -57,11 +58,10 @@ public final class FeatureDatabase extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
feature_ = java.util.Collections.unmodifiableList(feature_); feature_ = java.util.Collections.unmodifiableList(feature_);
@ -170,34 +170,40 @@ public final class FeatureDatabase extends
} }
public static io.grpc.examples.routeguide.FeatureDatabase parseFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.FeatureDatabase parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.FeatureDatabase parseFrom( public static io.grpc.examples.routeguide.FeatureDatabase parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.FeatureDatabase parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.FeatureDatabase parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.FeatureDatabase parseDelimitedFrom( public static io.grpc.examples.routeguide.FeatureDatabase parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.FeatureDatabase parseFrom( public static io.grpc.examples.routeguide.FeatureDatabase parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.FeatureDatabase parseFrom( public static io.grpc.examples.routeguide.FeatureDatabase parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -219,11 +225,11 @@ public final class FeatureDatabase extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code routeguide.FeatureDatabase}
*
* <pre> * <pre>
* Not used in the RPC. Instead, this is here for the form serialized to disk. * Not used in the RPC. Instead, this is here for the form serialized to disk.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.FeatureDatabase}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -354,7 +360,7 @@ public final class FeatureDatabase extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.routeguide.FeatureDatabase) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.routeguide.FeatureDatabase) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -633,16 +639,7 @@ public final class FeatureDatabase extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new FeatureDatabase(input, extensionRegistry); return new FeatureDatabase(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,45 +8,45 @@ public interface FeatureOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
java.lang.String getName(); java.lang.String getName();
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* The name of the feature. * The name of the feature.
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
com.google.protobuf.ByteString com.google.protobuf.ByteString
getNameBytes(); getNameBytes();
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
boolean hasLocation(); boolean hasLocation();
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
io.grpc.examples.routeguide.Point getLocation(); io.grpc.examples.routeguide.Point getLocation();
/** /**
* <code>optional .routeguide.Point location = 2;</code>
*
* <pre> * <pre>
* The point where the feature is detected. * The point where the feature is detected.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 2;</code>
*/ */
io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder(); io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder();
} }

View File

@ -4,14 +4,14 @@
package io.grpc.examples.routeguide; package io.grpc.examples.routeguide;
/** /**
* Protobuf type {@code routeguide.Point}
*
* <pre> * <pre>
* Points are represented as latitude-longitude pairs in the E7 representation * Points are represented as latitude-longitude pairs in the E7 representation
* (degrees multiplied by 10**7 and rounded to the nearest integer). * (degrees multiplied by 10**7 and rounded to the nearest integer).
* Latitudes should be in the range +/- 90 degrees and longitude should be in * Latitudes should be in the range +/- 90 degrees and longitude should be in
* the range +/- 180 degrees (inclusive). * the range +/- 180 degrees (inclusive).
* </pre> * </pre>
*
* Protobuf type {@code routeguide.Point}
*/ */
public final class Point extends public final class Point extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -33,7 +33,8 @@ public final class Point extends
} }
private Point( private Point(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -63,11 +64,10 @@ public final class Point extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -163,34 +163,40 @@ public final class Point extends
} }
public static io.grpc.examples.routeguide.Point parseFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.Point parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Point parseFrom( public static io.grpc.examples.routeguide.Point parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.Point parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.Point parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Point parseDelimitedFrom( public static io.grpc.examples.routeguide.Point parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.Point parseFrom( public static io.grpc.examples.routeguide.Point parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Point parseFrom( public static io.grpc.examples.routeguide.Point parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -212,14 +218,14 @@ public final class Point extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code routeguide.Point}
*
* <pre> * <pre>
* Points are represented as latitude-longitude pairs in the E7 representation * Points are represented as latitude-longitude pairs in the E7 representation
* (degrees multiplied by 10**7 and rounded to the nearest integer). * (degrees multiplied by 10**7 and rounded to the nearest integer).
* Latitudes should be in the range +/- 90 degrees and longitude should be in * Latitudes should be in the range +/- 90 degrees and longitude should be in
* the range +/- 180 degrees (inclusive). * the range +/- 180 degrees (inclusive).
* </pre> * </pre>
*
* Protobuf type {@code routeguide.Point}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -319,7 +325,7 @@ public final class Point extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.routeguide.Point) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.routeguide.Point) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -409,16 +415,7 @@ public final class Point extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new Point(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -4,12 +4,12 @@
package io.grpc.examples.routeguide; package io.grpc.examples.routeguide;
/** /**
* Protobuf type {@code routeguide.Rectangle}
*
* <pre> * <pre>
* A latitude-longitude rectangle, represented as two diagonally opposite * A latitude-longitude rectangle, represented as two diagonally opposite
* points "lo" and "hi". * points "lo" and "hi".
* </pre> * </pre>
*
* Protobuf type {@code routeguide.Rectangle}
*/ */
public final class Rectangle extends public final class Rectangle extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -29,7 +29,8 @@ public final class Rectangle extends
} }
private Rectangle( private Rectangle(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -75,11 +76,10 @@ public final class Rectangle extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -99,31 +99,31 @@ public final class Rectangle extends
public static final int LO_FIELD_NUMBER = 1; public static final int LO_FIELD_NUMBER = 1;
private io.grpc.examples.routeguide.Point lo_; private io.grpc.examples.routeguide.Point lo_;
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public boolean hasLo() { public boolean hasLo() {
return lo_ != null; return lo_ != null;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public io.grpc.examples.routeguide.Point getLo() { public io.grpc.examples.routeguide.Point getLo() {
return lo_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : lo_; return lo_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : lo_;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder() {
return getLo(); return getLo();
@ -132,31 +132,31 @@ public final class Rectangle extends
public static final int HI_FIELD_NUMBER = 2; public static final int HI_FIELD_NUMBER = 2;
private io.grpc.examples.routeguide.Point hi_; private io.grpc.examples.routeguide.Point hi_;
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public boolean hasHi() { public boolean hasHi() {
return hi_ != null; return hi_ != null;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public io.grpc.examples.routeguide.Point getHi() { public io.grpc.examples.routeguide.Point getHi() {
return hi_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : hi_; return hi_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : hi_;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder() {
return getHi(); return getHi();
@ -223,34 +223,40 @@ public final class Rectangle extends
} }
public static io.grpc.examples.routeguide.Rectangle parseFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.Rectangle parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Rectangle parseFrom( public static io.grpc.examples.routeguide.Rectangle parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.Rectangle parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.Rectangle parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Rectangle parseDelimitedFrom( public static io.grpc.examples.routeguide.Rectangle parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.Rectangle parseFrom( public static io.grpc.examples.routeguide.Rectangle parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.Rectangle parseFrom( public static io.grpc.examples.routeguide.Rectangle parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -272,12 +278,12 @@ public final class Rectangle extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code routeguide.Rectangle}
*
* <pre> * <pre>
* A latitude-longitude rectangle, represented as two diagonally opposite * A latitude-longitude rectangle, represented as two diagonally opposite
* points "lo" and "hi". * points "lo" and "hi".
* </pre> * </pre>
*
* Protobuf type {@code routeguide.Rectangle}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -393,7 +399,7 @@ public final class Rectangle extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.routeguide.Rectangle) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.routeguide.Rectangle) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -406,21 +412,21 @@ public final class Rectangle extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> loBuilder_; io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> loBuilder_;
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public boolean hasLo() { public boolean hasLo() {
return loBuilder_ != null || lo_ != null; return loBuilder_ != null || lo_ != null;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public io.grpc.examples.routeguide.Point getLo() { public io.grpc.examples.routeguide.Point getLo() {
if (loBuilder_ == null) { if (loBuilder_ == null) {
@ -430,11 +436,11 @@ public final class Rectangle extends
} }
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public Builder setLo(io.grpc.examples.routeguide.Point value) { public Builder setLo(io.grpc.examples.routeguide.Point value) {
if (loBuilder_ == null) { if (loBuilder_ == null) {
@ -450,11 +456,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public Builder setLo( public Builder setLo(
io.grpc.examples.routeguide.Point.Builder builderForValue) { io.grpc.examples.routeguide.Point.Builder builderForValue) {
@ -468,11 +474,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public Builder mergeLo(io.grpc.examples.routeguide.Point value) { public Builder mergeLo(io.grpc.examples.routeguide.Point value) {
if (loBuilder_ == null) { if (loBuilder_ == null) {
@ -490,11 +496,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public Builder clearLo() { public Builder clearLo() {
if (loBuilder_ == null) { if (loBuilder_ == null) {
@ -508,11 +514,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public io.grpc.examples.routeguide.Point.Builder getLoBuilder() { public io.grpc.examples.routeguide.Point.Builder getLoBuilder() {
@ -520,11 +526,11 @@ public final class Rectangle extends
return getLoFieldBuilder().getBuilder(); return getLoFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder() {
if (loBuilder_ != null) { if (loBuilder_ != null) {
@ -535,11 +541,11 @@ public final class Rectangle extends
} }
} }
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>
@ -559,21 +565,21 @@ public final class Rectangle extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> hiBuilder_; io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> hiBuilder_;
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public boolean hasHi() { public boolean hasHi() {
return hiBuilder_ != null || hi_ != null; return hiBuilder_ != null || hi_ != null;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public io.grpc.examples.routeguide.Point getHi() { public io.grpc.examples.routeguide.Point getHi() {
if (hiBuilder_ == null) { if (hiBuilder_ == null) {
@ -583,11 +589,11 @@ public final class Rectangle extends
} }
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public Builder setHi(io.grpc.examples.routeguide.Point value) { public Builder setHi(io.grpc.examples.routeguide.Point value) {
if (hiBuilder_ == null) { if (hiBuilder_ == null) {
@ -603,11 +609,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public Builder setHi( public Builder setHi(
io.grpc.examples.routeguide.Point.Builder builderForValue) { io.grpc.examples.routeguide.Point.Builder builderForValue) {
@ -621,11 +627,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public Builder mergeHi(io.grpc.examples.routeguide.Point value) { public Builder mergeHi(io.grpc.examples.routeguide.Point value) {
if (hiBuilder_ == null) { if (hiBuilder_ == null) {
@ -643,11 +649,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public Builder clearHi() { public Builder clearHi() {
if (hiBuilder_ == null) { if (hiBuilder_ == null) {
@ -661,11 +667,11 @@ public final class Rectangle extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public io.grpc.examples.routeguide.Point.Builder getHiBuilder() { public io.grpc.examples.routeguide.Point.Builder getHiBuilder() {
@ -673,11 +679,11 @@ public final class Rectangle extends
return getHiFieldBuilder().getBuilder(); return getHiFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder() {
if (hiBuilder_ != null) { if (hiBuilder_ != null) {
@ -688,11 +694,11 @@ public final class Rectangle extends
} }
} }
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>
@ -737,16 +743,7 @@ public final class Rectangle extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new Rectangle(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -8,52 +8,52 @@ public interface RectangleOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
boolean hasLo(); boolean hasLo();
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
io.grpc.examples.routeguide.Point getLo(); io.grpc.examples.routeguide.Point getLo();
/** /**
* <code>optional .routeguide.Point lo = 1;</code>
*
* <pre> * <pre>
* One corner of the rectangle. * One corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point lo = 1;</code>
*/ */
io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder(); io.grpc.examples.routeguide.PointOrBuilder getLoOrBuilder();
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
boolean hasHi(); boolean hasHi();
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
io.grpc.examples.routeguide.Point getHi(); io.grpc.examples.routeguide.Point getHi();
/** /**
* <code>optional .routeguide.Point hi = 2;</code>
*
* <pre> * <pre>
* The other corner of the rectangle. * The other corner of the rectangle.
* </pre> * </pre>
*
* <code>optional .routeguide.Point hi = 2;</code>
*/ */
io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder(); io.grpc.examples.routeguide.PointOrBuilder getHiOrBuilder();
} }

View File

@ -8,34 +8,34 @@ public final class RouteGuideProto {
public static void registerAllExtensions( public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) { com.google.protobuf.ExtensionRegistry registry) {
} }
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_Point_descriptor; internal_static_routeguide_Point_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_Point_fieldAccessorTable; internal_static_routeguide_Point_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_Rectangle_descriptor; internal_static_routeguide_Rectangle_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_Rectangle_fieldAccessorTable; internal_static_routeguide_Rectangle_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_Feature_descriptor; internal_static_routeguide_Feature_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_Feature_fieldAccessorTable; internal_static_routeguide_Feature_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_FeatureDatabase_descriptor; internal_static_routeguide_FeatureDatabase_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_FeatureDatabase_fieldAccessorTable; internal_static_routeguide_FeatureDatabase_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_RouteNote_descriptor; internal_static_routeguide_RouteNote_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_RouteNote_fieldAccessorTable; internal_static_routeguide_RouteNote_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_RouteSummary_descriptor; internal_static_routeguide_RouteSummary_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_RouteSummary_fieldAccessorTable; internal_static_routeguide_RouteSummary_fieldAccessorTable;
@ -43,7 +43,7 @@ public final class RouteGuideProto {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -4,11 +4,11 @@
package io.grpc.examples.routeguide; package io.grpc.examples.routeguide;
/** /**
* Protobuf type {@code routeguide.RouteNote}
*
* <pre> * <pre>
* A RouteNote is a message sent while at a given point. * A RouteNote is a message sent while at a given point.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.RouteNote}
*/ */
public final class RouteNote extends public final class RouteNote extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -29,7 +29,8 @@ public final class RouteNote extends
} }
private RouteNote( private RouteNote(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -68,11 +69,10 @@ public final class RouteNote extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -92,31 +92,31 @@ public final class RouteNote extends
public static final int LOCATION_FIELD_NUMBER = 1; public static final int LOCATION_FIELD_NUMBER = 1;
private io.grpc.examples.routeguide.Point location_; private io.grpc.examples.routeguide.Point location_;
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public boolean hasLocation() { public boolean hasLocation() {
return location_ != null; return location_ != null;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public io.grpc.examples.routeguide.Point getLocation() { public io.grpc.examples.routeguide.Point getLocation() {
return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_; return location_ == null ? io.grpc.examples.routeguide.Point.getDefaultInstance() : location_;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() {
return getLocation(); return getLocation();
@ -125,11 +125,11 @@ public final class RouteNote extends
public static final int MESSAGE_FIELD_NUMBER = 2; public static final int MESSAGE_FIELD_NUMBER = 2;
private volatile java.lang.Object message_; private volatile java.lang.Object message_;
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public java.lang.String getMessage() { public java.lang.String getMessage() {
java.lang.Object ref = message_; java.lang.Object ref = message_;
@ -144,11 +144,11 @@ public final class RouteNote extends
} }
} }
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getMessageBytes() { getMessageBytes() {
@ -224,34 +224,40 @@ public final class RouteNote extends
} }
public static io.grpc.examples.routeguide.RouteNote parseFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.RouteNote parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.RouteNote parseFrom( public static io.grpc.examples.routeguide.RouteNote parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.RouteNote parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.RouteNote parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.RouteNote parseDelimitedFrom( public static io.grpc.examples.routeguide.RouteNote parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.RouteNote parseFrom( public static io.grpc.examples.routeguide.RouteNote parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.RouteNote parseFrom( public static io.grpc.examples.routeguide.RouteNote parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -273,11 +279,11 @@ public final class RouteNote extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code routeguide.RouteNote}
*
* <pre> * <pre>
* A RouteNote is a message sent while at a given point. * A RouteNote is a message sent while at a given point.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.RouteNote}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -386,7 +392,7 @@ public final class RouteNote extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.routeguide.RouteNote) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.routeguide.RouteNote) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -399,21 +405,21 @@ public final class RouteNote extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> locationBuilder_; io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> locationBuilder_;
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public boolean hasLocation() { public boolean hasLocation() {
return locationBuilder_ != null || location_ != null; return locationBuilder_ != null || location_ != null;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public io.grpc.examples.routeguide.Point getLocation() { public io.grpc.examples.routeguide.Point getLocation() {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -423,11 +429,11 @@ public final class RouteNote extends
} }
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public Builder setLocation(io.grpc.examples.routeguide.Point value) { public Builder setLocation(io.grpc.examples.routeguide.Point value) {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -443,11 +449,11 @@ public final class RouteNote extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public Builder setLocation( public Builder setLocation(
io.grpc.examples.routeguide.Point.Builder builderForValue) { io.grpc.examples.routeguide.Point.Builder builderForValue) {
@ -461,11 +467,11 @@ public final class RouteNote extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public Builder mergeLocation(io.grpc.examples.routeguide.Point value) { public Builder mergeLocation(io.grpc.examples.routeguide.Point value) {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -483,11 +489,11 @@ public final class RouteNote extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public Builder clearLocation() { public Builder clearLocation() {
if (locationBuilder_ == null) { if (locationBuilder_ == null) {
@ -501,11 +507,11 @@ public final class RouteNote extends
return this; return this;
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public io.grpc.examples.routeguide.Point.Builder getLocationBuilder() { public io.grpc.examples.routeguide.Point.Builder getLocationBuilder() {
@ -513,11 +519,11 @@ public final class RouteNote extends
return getLocationFieldBuilder().getBuilder(); return getLocationFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() { public io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder() {
if (locationBuilder_ != null) { if (locationBuilder_ != null) {
@ -528,11 +534,11 @@ public final class RouteNote extends
} }
} }
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder> io.grpc.examples.routeguide.Point, io.grpc.examples.routeguide.Point.Builder, io.grpc.examples.routeguide.PointOrBuilder>
@ -550,11 +556,11 @@ public final class RouteNote extends
private java.lang.Object message_ = ""; private java.lang.Object message_ = "";
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public java.lang.String getMessage() { public java.lang.String getMessage() {
java.lang.Object ref = message_; java.lang.Object ref = message_;
@ -569,11 +575,11 @@ public final class RouteNote extends
} }
} }
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getMessageBytes() { getMessageBytes() {
@ -589,11 +595,11 @@ public final class RouteNote extends
} }
} }
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public Builder setMessage( public Builder setMessage(
java.lang.String value) { java.lang.String value) {
@ -606,11 +612,11 @@ public final class RouteNote extends
return this; return this;
} }
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public Builder clearMessage() { public Builder clearMessage() {
@ -619,11 +625,11 @@ public final class RouteNote extends
return this; return this;
} }
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
public Builder setMessageBytes( public Builder setMessageBytes(
com.google.protobuf.ByteString value) { com.google.protobuf.ByteString value) {
@ -666,16 +672,7 @@ public final class RouteNote extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new RouteNote(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -8,44 +8,44 @@ public interface RouteNoteOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
boolean hasLocation(); boolean hasLocation();
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
io.grpc.examples.routeguide.Point getLocation(); io.grpc.examples.routeguide.Point getLocation();
/** /**
* <code>optional .routeguide.Point location = 1;</code>
*
* <pre> * <pre>
* The location from which the message is sent. * The location from which the message is sent.
* </pre> * </pre>
*
* <code>optional .routeguide.Point location = 1;</code>
*/ */
io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder(); io.grpc.examples.routeguide.PointOrBuilder getLocationOrBuilder();
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
java.lang.String getMessage(); java.lang.String getMessage();
/** /**
* <code>optional string message = 2;</code>
*
* <pre> * <pre>
* The message to be sent. * The message to be sent.
* </pre> * </pre>
*
* <code>optional string message = 2;</code>
*/ */
com.google.protobuf.ByteString com.google.protobuf.ByteString
getMessageBytes(); getMessageBytes();

View File

@ -4,14 +4,14 @@
package io.grpc.examples.routeguide; package io.grpc.examples.routeguide;
/** /**
* Protobuf type {@code routeguide.RouteSummary}
*
* <pre> * <pre>
* A RouteSummary is received in response to a RecordRoute rpc. * A RouteSummary is received in response to a RecordRoute rpc.
* It contains the number of individual points received, the number of * It contains the number of individual points received, the number of
* detected features, and the total distance covered as the cumulative sum of * detected features, and the total distance covered as the cumulative sum of
* the distance between each point. * the distance between each point.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.RouteSummary}
*/ */
public final class RouteSummary extends public final class RouteSummary extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -35,7 +35,8 @@ public final class RouteSummary extends
} }
private RouteSummary( private RouteSummary(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -75,11 +76,10 @@ public final class RouteSummary extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -99,11 +99,11 @@ public final class RouteSummary extends
public static final int POINT_COUNT_FIELD_NUMBER = 1; public static final int POINT_COUNT_FIELD_NUMBER = 1;
private int pointCount_; private int pointCount_;
/** /**
* <code>optional int32 point_count = 1;</code>
*
* <pre> * <pre>
* The number of points received. * The number of points received.
* </pre> * </pre>
*
* <code>optional int32 point_count = 1;</code>
*/ */
public int getPointCount() { public int getPointCount() {
return pointCount_; return pointCount_;
@ -112,11 +112,11 @@ public final class RouteSummary extends
public static final int FEATURE_COUNT_FIELD_NUMBER = 2; public static final int FEATURE_COUNT_FIELD_NUMBER = 2;
private int featureCount_; private int featureCount_;
/** /**
* <code>optional int32 feature_count = 2;</code>
*
* <pre> * <pre>
* The number of known features passed while traversing the route. * The number of known features passed while traversing the route.
* </pre> * </pre>
*
* <code>optional int32 feature_count = 2;</code>
*/ */
public int getFeatureCount() { public int getFeatureCount() {
return featureCount_; return featureCount_;
@ -125,11 +125,11 @@ public final class RouteSummary extends
public static final int DISTANCE_FIELD_NUMBER = 3; public static final int DISTANCE_FIELD_NUMBER = 3;
private int distance_; private int distance_;
/** /**
* <code>optional int32 distance = 3;</code>
*
* <pre> * <pre>
* The distance covered in metres. * The distance covered in metres.
* </pre> * </pre>
*
* <code>optional int32 distance = 3;</code>
*/ */
public int getDistance() { public int getDistance() {
return distance_; return distance_;
@ -138,11 +138,11 @@ public final class RouteSummary extends
public static final int ELAPSED_TIME_FIELD_NUMBER = 4; public static final int ELAPSED_TIME_FIELD_NUMBER = 4;
private int elapsedTime_; private int elapsedTime_;
/** /**
* <code>optional int32 elapsed_time = 4;</code>
*
* <pre> * <pre>
* The duration of the traversal in seconds. * The duration of the traversal in seconds.
* </pre> * </pre>
*
* <code>optional int32 elapsed_time = 4;</code>
*/ */
public int getElapsedTime() { public int getElapsedTime() {
return elapsedTime_; return elapsedTime_;
@ -223,34 +223,40 @@ public final class RouteSummary extends
} }
public static io.grpc.examples.routeguide.RouteSummary parseFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.RouteSummary parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.RouteSummary parseFrom( public static io.grpc.examples.routeguide.RouteSummary parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.RouteSummary parseDelimitedFrom(java.io.InputStream input) public static io.grpc.examples.routeguide.RouteSummary parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.RouteSummary parseDelimitedFrom( public static io.grpc.examples.routeguide.RouteSummary parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.examples.routeguide.RouteSummary parseFrom( public static io.grpc.examples.routeguide.RouteSummary parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.examples.routeguide.RouteSummary parseFrom( public static io.grpc.examples.routeguide.RouteSummary parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -272,14 +278,14 @@ public final class RouteSummary extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code routeguide.RouteSummary}
*
* <pre> * <pre>
* A RouteSummary is received in response to a RecordRoute rpc. * A RouteSummary is received in response to a RecordRoute rpc.
* It contains the number of individual points received, the number of * It contains the number of individual points received, the number of
* detected features, and the total distance covered as the cumulative sum of * detected features, and the total distance covered as the cumulative sum of
* the distance between each point. * the distance between each point.
* </pre> * </pre>
*
* Protobuf type {@code routeguide.RouteSummary}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -391,7 +397,7 @@ public final class RouteSummary extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.examples.routeguide.RouteSummary) e.getUnfinishedMessage(); parsedMessage = (io.grpc.examples.routeguide.RouteSummary) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -402,21 +408,21 @@ public final class RouteSummary extends
private int pointCount_ ; private int pointCount_ ;
/** /**
* <code>optional int32 point_count = 1;</code>
*
* <pre> * <pre>
* The number of points received. * The number of points received.
* </pre> * </pre>
*
* <code>optional int32 point_count = 1;</code>
*/ */
public int getPointCount() { public int getPointCount() {
return pointCount_; return pointCount_;
} }
/** /**
* <code>optional int32 point_count = 1;</code>
*
* <pre> * <pre>
* The number of points received. * The number of points received.
* </pre> * </pre>
*
* <code>optional int32 point_count = 1;</code>
*/ */
public Builder setPointCount(int value) { public Builder setPointCount(int value) {
@ -425,11 +431,11 @@ public final class RouteSummary extends
return this; return this;
} }
/** /**
* <code>optional int32 point_count = 1;</code>
*
* <pre> * <pre>
* The number of points received. * The number of points received.
* </pre> * </pre>
*
* <code>optional int32 point_count = 1;</code>
*/ */
public Builder clearPointCount() { public Builder clearPointCount() {
@ -440,21 +446,21 @@ public final class RouteSummary extends
private int featureCount_ ; private int featureCount_ ;
/** /**
* <code>optional int32 feature_count = 2;</code>
*
* <pre> * <pre>
* The number of known features passed while traversing the route. * The number of known features passed while traversing the route.
* </pre> * </pre>
*
* <code>optional int32 feature_count = 2;</code>
*/ */
public int getFeatureCount() { public int getFeatureCount() {
return featureCount_; return featureCount_;
} }
/** /**
* <code>optional int32 feature_count = 2;</code>
*
* <pre> * <pre>
* The number of known features passed while traversing the route. * The number of known features passed while traversing the route.
* </pre> * </pre>
*
* <code>optional int32 feature_count = 2;</code>
*/ */
public Builder setFeatureCount(int value) { public Builder setFeatureCount(int value) {
@ -463,11 +469,11 @@ public final class RouteSummary extends
return this; return this;
} }
/** /**
* <code>optional int32 feature_count = 2;</code>
*
* <pre> * <pre>
* The number of known features passed while traversing the route. * The number of known features passed while traversing the route.
* </pre> * </pre>
*
* <code>optional int32 feature_count = 2;</code>
*/ */
public Builder clearFeatureCount() { public Builder clearFeatureCount() {
@ -478,21 +484,21 @@ public final class RouteSummary extends
private int distance_ ; private int distance_ ;
/** /**
* <code>optional int32 distance = 3;</code>
*
* <pre> * <pre>
* The distance covered in metres. * The distance covered in metres.
* </pre> * </pre>
*
* <code>optional int32 distance = 3;</code>
*/ */
public int getDistance() { public int getDistance() {
return distance_; return distance_;
} }
/** /**
* <code>optional int32 distance = 3;</code>
*
* <pre> * <pre>
* The distance covered in metres. * The distance covered in metres.
* </pre> * </pre>
*
* <code>optional int32 distance = 3;</code>
*/ */
public Builder setDistance(int value) { public Builder setDistance(int value) {
@ -501,11 +507,11 @@ public final class RouteSummary extends
return this; return this;
} }
/** /**
* <code>optional int32 distance = 3;</code>
*
* <pre> * <pre>
* The distance covered in metres. * The distance covered in metres.
* </pre> * </pre>
*
* <code>optional int32 distance = 3;</code>
*/ */
public Builder clearDistance() { public Builder clearDistance() {
@ -516,21 +522,21 @@ public final class RouteSummary extends
private int elapsedTime_ ; private int elapsedTime_ ;
/** /**
* <code>optional int32 elapsed_time = 4;</code>
*
* <pre> * <pre>
* The duration of the traversal in seconds. * The duration of the traversal in seconds.
* </pre> * </pre>
*
* <code>optional int32 elapsed_time = 4;</code>
*/ */
public int getElapsedTime() { public int getElapsedTime() {
return elapsedTime_; return elapsedTime_;
} }
/** /**
* <code>optional int32 elapsed_time = 4;</code>
*
* <pre> * <pre>
* The duration of the traversal in seconds. * The duration of the traversal in seconds.
* </pre> * </pre>
*
* <code>optional int32 elapsed_time = 4;</code>
*/ */
public Builder setElapsedTime(int value) { public Builder setElapsedTime(int value) {
@ -539,11 +545,11 @@ public final class RouteSummary extends
return this; return this;
} }
/** /**
* <code>optional int32 elapsed_time = 4;</code>
*
* <pre> * <pre>
* The duration of the traversal in seconds. * The duration of the traversal in seconds.
* </pre> * </pre>
*
* <code>optional int32 elapsed_time = 4;</code>
*/ */
public Builder clearElapsedTime() { public Builder clearElapsedTime() {
@ -581,16 +587,7 @@ public final class RouteSummary extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new RouteSummary(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -8,38 +8,38 @@ public interface RouteSummaryOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional int32 point_count = 1;</code>
*
* <pre> * <pre>
* The number of points received. * The number of points received.
* </pre> * </pre>
*
* <code>optional int32 point_count = 1;</code>
*/ */
int getPointCount(); int getPointCount();
/** /**
* <code>optional int32 feature_count = 2;</code>
*
* <pre> * <pre>
* The number of known features passed while traversing the route. * The number of known features passed while traversing the route.
* </pre> * </pre>
*
* <code>optional int32 feature_count = 2;</code>
*/ */
int getFeatureCount(); int getFeatureCount();
/** /**
* <code>optional int32 distance = 3;</code>
*
* <pre> * <pre>
* The distance covered in metres. * The distance covered in metres.
* </pre> * </pre>
*
* <code>optional int32 distance = 3;</code>
*/ */
int getDistance(); int getDistance();
/** /**
* <code>optional int32 elapsed_time = 4;</code>
*
* <pre> * <pre>
* The duration of the traversal in seconds. * The duration of the traversal in seconds.
* </pre> * </pre>
*
* <code>optional int32 elapsed_time = 4;</code>
*/ */
int getElapsedTime(); int getElapsedTime();
} }

View File

@ -4,12 +4,12 @@
package io.grpc.grpclb; package io.grpc.grpclb;
/** /**
* Protobuf type {@code grpc.lb.v1.ClientStats}
*
* <pre> * <pre>
* Contains client level statistics that are useful to load balancing. Each * Contains client level statistics that are useful to load balancing. Each
* count should be reset to zero after reporting the stats. * count should be reset to zero after reporting the stats.
* </pre> * </pre>
*
* Protobuf type {@code grpc.lb.v1.ClientStats}
*/ */
public final class ClientStats extends public final class ClientStats extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -32,7 +32,8 @@ public final class ClientStats extends
} }
private ClientStats( private ClientStats(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -67,11 +68,10 @@ public final class ClientStats extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -91,11 +91,11 @@ public final class ClientStats extends
public static final int TOTAL_REQUESTS_FIELD_NUMBER = 1; public static final int TOTAL_REQUESTS_FIELD_NUMBER = 1;
private long totalRequests_; private long totalRequests_;
/** /**
* <code>optional int64 total_requests = 1;</code>
*
* <pre> * <pre>
* The total number of requests sent by the client since the last report. * The total number of requests sent by the client since the last report.
* </pre> * </pre>
*
* <code>optional int64 total_requests = 1;</code>
*/ */
public long getTotalRequests() { public long getTotalRequests() {
return totalRequests_; return totalRequests_;
@ -104,11 +104,11 @@ public final class ClientStats extends
public static final int CLIENT_RPC_ERRORS_FIELD_NUMBER = 2; public static final int CLIENT_RPC_ERRORS_FIELD_NUMBER = 2;
private long clientRpcErrors_; private long clientRpcErrors_;
/** /**
* <code>optional int64 client_rpc_errors = 2;</code>
*
* <pre> * <pre>
* The number of client rpc errors since the last report. * The number of client rpc errors since the last report.
* </pre> * </pre>
*
* <code>optional int64 client_rpc_errors = 2;</code>
*/ */
public long getClientRpcErrors() { public long getClientRpcErrors() {
return clientRpcErrors_; return clientRpcErrors_;
@ -117,11 +117,11 @@ public final class ClientStats extends
public static final int DROPPED_REQUESTS_FIELD_NUMBER = 3; public static final int DROPPED_REQUESTS_FIELD_NUMBER = 3;
private long droppedRequests_; private long droppedRequests_;
/** /**
* <code>optional int64 dropped_requests = 3;</code>
*
* <pre> * <pre>
* The number of dropped requests since the last report. * The number of dropped requests since the last report.
* </pre> * </pre>
*
* <code>optional int64 dropped_requests = 3;</code>
*/ */
public long getDroppedRequests() { public long getDroppedRequests() {
return droppedRequests_; return droppedRequests_;
@ -195,34 +195,40 @@ public final class ClientStats extends
} }
public static io.grpc.grpclb.ClientStats parseFrom(java.io.InputStream input) public static io.grpc.grpclb.ClientStats parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.ClientStats parseFrom( public static io.grpc.grpclb.ClientStats parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.ClientStats parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.ClientStats parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.ClientStats parseDelimitedFrom( public static io.grpc.grpclb.ClientStats parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.ClientStats parseFrom( public static io.grpc.grpclb.ClientStats parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.ClientStats parseFrom( public static io.grpc.grpclb.ClientStats parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -244,12 +250,12 @@ public final class ClientStats extends
return builder; return builder;
} }
/** /**
* Protobuf type {@code grpc.lb.v1.ClientStats}
*
* <pre> * <pre>
* Contains client level statistics that are useful to load balancing. Each * Contains client level statistics that are useful to load balancing. Each
* count should be reset to zero after reporting the stats. * count should be reset to zero after reporting the stats.
* </pre> * </pre>
*
* Protobuf type {@code grpc.lb.v1.ClientStats}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -355,7 +361,7 @@ public final class ClientStats extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.ClientStats) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.ClientStats) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -366,21 +372,21 @@ public final class ClientStats extends
private long totalRequests_ ; private long totalRequests_ ;
/** /**
* <code>optional int64 total_requests = 1;</code>
*
* <pre> * <pre>
* The total number of requests sent by the client since the last report. * The total number of requests sent by the client since the last report.
* </pre> * </pre>
*
* <code>optional int64 total_requests = 1;</code>
*/ */
public long getTotalRequests() { public long getTotalRequests() {
return totalRequests_; return totalRequests_;
} }
/** /**
* <code>optional int64 total_requests = 1;</code>
*
* <pre> * <pre>
* The total number of requests sent by the client since the last report. * The total number of requests sent by the client since the last report.
* </pre> * </pre>
*
* <code>optional int64 total_requests = 1;</code>
*/ */
public Builder setTotalRequests(long value) { public Builder setTotalRequests(long value) {
@ -389,11 +395,11 @@ public final class ClientStats extends
return this; return this;
} }
/** /**
* <code>optional int64 total_requests = 1;</code>
*
* <pre> * <pre>
* The total number of requests sent by the client since the last report. * The total number of requests sent by the client since the last report.
* </pre> * </pre>
*
* <code>optional int64 total_requests = 1;</code>
*/ */
public Builder clearTotalRequests() { public Builder clearTotalRequests() {
@ -404,21 +410,21 @@ public final class ClientStats extends
private long clientRpcErrors_ ; private long clientRpcErrors_ ;
/** /**
* <code>optional int64 client_rpc_errors = 2;</code>
*
* <pre> * <pre>
* The number of client rpc errors since the last report. * The number of client rpc errors since the last report.
* </pre> * </pre>
*
* <code>optional int64 client_rpc_errors = 2;</code>
*/ */
public long getClientRpcErrors() { public long getClientRpcErrors() {
return clientRpcErrors_; return clientRpcErrors_;
} }
/** /**
* <code>optional int64 client_rpc_errors = 2;</code>
*
* <pre> * <pre>
* The number of client rpc errors since the last report. * The number of client rpc errors since the last report.
* </pre> * </pre>
*
* <code>optional int64 client_rpc_errors = 2;</code>
*/ */
public Builder setClientRpcErrors(long value) { public Builder setClientRpcErrors(long value) {
@ -427,11 +433,11 @@ public final class ClientStats extends
return this; return this;
} }
/** /**
* <code>optional int64 client_rpc_errors = 2;</code>
*
* <pre> * <pre>
* The number of client rpc errors since the last report. * The number of client rpc errors since the last report.
* </pre> * </pre>
*
* <code>optional int64 client_rpc_errors = 2;</code>
*/ */
public Builder clearClientRpcErrors() { public Builder clearClientRpcErrors() {
@ -442,21 +448,21 @@ public final class ClientStats extends
private long droppedRequests_ ; private long droppedRequests_ ;
/** /**
* <code>optional int64 dropped_requests = 3;</code>
*
* <pre> * <pre>
* The number of dropped requests since the last report. * The number of dropped requests since the last report.
* </pre> * </pre>
*
* <code>optional int64 dropped_requests = 3;</code>
*/ */
public long getDroppedRequests() { public long getDroppedRequests() {
return droppedRequests_; return droppedRequests_;
} }
/** /**
* <code>optional int64 dropped_requests = 3;</code>
*
* <pre> * <pre>
* The number of dropped requests since the last report. * The number of dropped requests since the last report.
* </pre> * </pre>
*
* <code>optional int64 dropped_requests = 3;</code>
*/ */
public Builder setDroppedRequests(long value) { public Builder setDroppedRequests(long value) {
@ -465,11 +471,11 @@ public final class ClientStats extends
return this; return this;
} }
/** /**
* <code>optional int64 dropped_requests = 3;</code>
*
* <pre> * <pre>
* The number of dropped requests since the last report. * The number of dropped requests since the last report.
* </pre> * </pre>
*
* <code>optional int64 dropped_requests = 3;</code>
*/ */
public Builder clearDroppedRequests() { public Builder clearDroppedRequests() {
@ -507,16 +513,7 @@ public final class ClientStats extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new ClientStats(input, extensionRegistry); 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;
}
} }
}; };

View File

@ -8,29 +8,29 @@ public interface ClientStatsOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional int64 total_requests = 1;</code>
*
* <pre> * <pre>
* The total number of requests sent by the client since the last report. * The total number of requests sent by the client since the last report.
* </pre> * </pre>
*
* <code>optional int64 total_requests = 1;</code>
*/ */
long getTotalRequests(); long getTotalRequests();
/** /**
* <code>optional int64 client_rpc_errors = 2;</code>
*
* <pre> * <pre>
* The number of client rpc errors since the last report. * The number of client rpc errors since the last report.
* </pre> * </pre>
*
* <code>optional int64 client_rpc_errors = 2;</code>
*/ */
long getClientRpcErrors(); long getClientRpcErrors();
/** /**
* <code>optional int64 dropped_requests = 3;</code>
*
* <pre> * <pre>
* The number of dropped requests since the last report. * The number of dropped requests since the last report.
* </pre> * </pre>
*
* <code>optional int64 dropped_requests = 3;</code>
*/ */
long getDroppedRequests(); long getDroppedRequests();
} }

View File

@ -25,7 +25,8 @@ public final class InitialLoadBalanceRequest extends
} }
private InitialLoadBalanceRequest( private InitialLoadBalanceRequest(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -51,11 +52,10 @@ public final class InitialLoadBalanceRequest extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -75,11 +75,11 @@ public final class InitialLoadBalanceRequest extends
public static final int NAME_FIELD_NUMBER = 1; public static final int NAME_FIELD_NUMBER = 1;
private volatile java.lang.Object name_; private volatile java.lang.Object name_;
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public java.lang.String getName() { public java.lang.String getName() {
java.lang.Object ref = name_; java.lang.Object ref = name_;
@ -94,11 +94,11 @@ public final class InitialLoadBalanceRequest extends
} }
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getNameBytes() { getNameBytes() {
@ -167,34 +167,40 @@ public final class InitialLoadBalanceRequest extends
} }
public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom(java.io.InputStream input) public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom( public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.InitialLoadBalanceRequest parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.InitialLoadBalanceRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.InitialLoadBalanceRequest parseDelimitedFrom( public static io.grpc.grpclb.InitialLoadBalanceRequest parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom( public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom( public static io.grpc.grpclb.InitialLoadBalanceRequest parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -311,7 +317,7 @@ public final class InitialLoadBalanceRequest extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.InitialLoadBalanceRequest) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.InitialLoadBalanceRequest) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -322,11 +328,11 @@ public final class InitialLoadBalanceRequest extends
private java.lang.Object name_ = ""; private java.lang.Object name_ = "";
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public java.lang.String getName() { public java.lang.String getName() {
java.lang.Object ref = name_; java.lang.Object ref = name_;
@ -341,11 +347,11 @@ public final class InitialLoadBalanceRequest extends
} }
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getNameBytes() { getNameBytes() {
@ -361,11 +367,11 @@ public final class InitialLoadBalanceRequest extends
} }
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public Builder setName( public Builder setName(
java.lang.String value) { java.lang.String value) {
@ -378,11 +384,11 @@ public final class InitialLoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public Builder clearName() { public Builder clearName() {
@ -391,11 +397,11 @@ public final class InitialLoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
public Builder setNameBytes( public Builder setNameBytes(
com.google.protobuf.ByteString value) { com.google.protobuf.ByteString value) {
@ -438,16 +444,7 @@ public final class InitialLoadBalanceRequest extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new InitialLoadBalanceRequest(input, extensionRegistry); return new InitialLoadBalanceRequest(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,19 +8,19 @@ public interface InitialLoadBalanceRequestOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
java.lang.String getName(); java.lang.String getName();
/** /**
* <code>optional string name = 1;</code>
*
* <pre> * <pre>
* Name of load balanced service * Name of load balanced service
* </pre> * </pre>
*
* <code>optional string name = 1;</code>
*/ */
com.google.protobuf.ByteString com.google.protobuf.ByteString
getNameBytes(); getNameBytes();

View File

@ -24,7 +24,8 @@ public final class InitialLoadBalanceResponse extends
} }
private InitialLoadBalanceResponse( private InitialLoadBalanceResponse(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -63,11 +64,10 @@ public final class InitialLoadBalanceResponse extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -90,16 +90,23 @@ public final class InitialLoadBalanceResponse extends
implements com.google.protobuf.Internal.EnumLite { implements com.google.protobuf.Internal.EnumLite {
LOAD_BALANCER_DELEGATE(2), LOAD_BALANCER_DELEGATE(2),
INITIALRESPONSETYPE_NOT_SET(0); INITIALRESPONSETYPE_NOT_SET(0);
private int value = 0; private final int value;
private InitialResponseTypeCase(int value) { private InitialResponseTypeCase(int value) {
this.value = value; this.value = value;
} }
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static InitialResponseTypeCase valueOf(int value) { public static InitialResponseTypeCase valueOf(int value) {
return forNumber(value);
}
public static InitialResponseTypeCase forNumber(int value) {
switch (value) { switch (value) {
case 2: return LOAD_BALANCER_DELEGATE; case 2: return LOAD_BALANCER_DELEGATE;
case 0: return INITIALRESPONSETYPE_NOT_SET; case 0: return INITIALRESPONSETYPE_NOT_SET;
default: throw new java.lang.IllegalArgumentException( default: return null;
"Value is undefined for this oneof enum.");
} }
} }
public int getNumber() { public int getNumber() {
@ -109,20 +116,20 @@ public final class InitialLoadBalanceResponse extends
public InitialResponseTypeCase public InitialResponseTypeCase
getInitialResponseTypeCase() { getInitialResponseTypeCase() {
return InitialResponseTypeCase.valueOf( return InitialResponseTypeCase.forNumber(
initialResponseTypeCase_); initialResponseTypeCase_);
} }
public static final int LOAD_BALANCER_DELEGATE_FIELD_NUMBER = 2; public static final int LOAD_BALANCER_DELEGATE_FIELD_NUMBER = 2;
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public java.lang.String getLoadBalancerDelegate() { public java.lang.String getLoadBalancerDelegate() {
java.lang.Object ref = ""; java.lang.Object ref = "";
@ -142,14 +149,14 @@ public final class InitialLoadBalanceResponse extends
} }
} }
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getLoadBalancerDelegateBytes() { getLoadBalancerDelegateBytes() {
@ -173,37 +180,37 @@ public final class InitialLoadBalanceResponse extends
public static final int CLIENT_STATS_REPORT_INTERVAL_FIELD_NUMBER = 3; public static final int CLIENT_STATS_REPORT_INTERVAL_FIELD_NUMBER = 3;
private com.google.protobuf.Duration clientStatsReportInterval_; private com.google.protobuf.Duration clientStatsReportInterval_;
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public boolean hasClientStatsReportInterval() { public boolean hasClientStatsReportInterval() {
return clientStatsReportInterval_ != null; return clientStatsReportInterval_ != null;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public com.google.protobuf.Duration getClientStatsReportInterval() { public com.google.protobuf.Duration getClientStatsReportInterval() {
return clientStatsReportInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : clientStatsReportInterval_; return clientStatsReportInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : clientStatsReportInterval_;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public com.google.protobuf.DurationOrBuilder getClientStatsReportIntervalOrBuilder() { public com.google.protobuf.DurationOrBuilder getClientStatsReportIntervalOrBuilder() {
return getClientStatsReportInterval(); return getClientStatsReportInterval();
@ -269,34 +276,40 @@ public final class InitialLoadBalanceResponse extends
} }
public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom(java.io.InputStream input) public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom( public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.InitialLoadBalanceResponse parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.InitialLoadBalanceResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.InitialLoadBalanceResponse parseDelimitedFrom( public static io.grpc.grpclb.InitialLoadBalanceResponse parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom( public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom( public static io.grpc.grpclb.InitialLoadBalanceResponse parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -437,7 +450,7 @@ public final class InitialLoadBalanceResponse extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.InitialLoadBalanceResponse) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.InitialLoadBalanceResponse) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -449,7 +462,7 @@ public final class InitialLoadBalanceResponse extends
private java.lang.Object initialResponseType_; private java.lang.Object initialResponseType_;
public InitialResponseTypeCase public InitialResponseTypeCase
getInitialResponseTypeCase() { getInitialResponseTypeCase() {
return InitialResponseTypeCase.valueOf( return InitialResponseTypeCase.forNumber(
initialResponseTypeCase_); initialResponseTypeCase_);
} }
@ -462,14 +475,14 @@ public final class InitialLoadBalanceResponse extends
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public java.lang.String getLoadBalancerDelegate() { public java.lang.String getLoadBalancerDelegate() {
java.lang.Object ref = ""; java.lang.Object ref = "";
@ -489,14 +502,14 @@ public final class InitialLoadBalanceResponse extends
} }
} }
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getLoadBalancerDelegateBytes() { getLoadBalancerDelegateBytes() {
@ -517,14 +530,14 @@ public final class InitialLoadBalanceResponse extends
} }
} }
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public Builder setLoadBalancerDelegate( public Builder setLoadBalancerDelegate(
java.lang.String value) { java.lang.String value) {
@ -537,14 +550,14 @@ public final class InitialLoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public Builder clearLoadBalancerDelegate() { public Builder clearLoadBalancerDelegate() {
if (initialResponseTypeCase_ == 2) { if (initialResponseTypeCase_ == 2) {
@ -555,14 +568,14 @@ public final class InitialLoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
public Builder setLoadBalancerDelegateBytes( public Builder setLoadBalancerDelegateBytes(
com.google.protobuf.ByteString value) { com.google.protobuf.ByteString value) {
@ -580,25 +593,25 @@ public final class InitialLoadBalanceResponse extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> clientStatsReportIntervalBuilder_; com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> clientStatsReportIntervalBuilder_;
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public boolean hasClientStatsReportInterval() { public boolean hasClientStatsReportInterval() {
return clientStatsReportIntervalBuilder_ != null || clientStatsReportInterval_ != null; return clientStatsReportIntervalBuilder_ != null || clientStatsReportInterval_ != null;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public com.google.protobuf.Duration getClientStatsReportInterval() { public com.google.protobuf.Duration getClientStatsReportInterval() {
if (clientStatsReportIntervalBuilder_ == null) { if (clientStatsReportIntervalBuilder_ == null) {
@ -608,13 +621,13 @@ public final class InitialLoadBalanceResponse extends
} }
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public Builder setClientStatsReportInterval(com.google.protobuf.Duration value) { public Builder setClientStatsReportInterval(com.google.protobuf.Duration value) {
if (clientStatsReportIntervalBuilder_ == null) { if (clientStatsReportIntervalBuilder_ == null) {
@ -630,13 +643,13 @@ public final class InitialLoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public Builder setClientStatsReportInterval( public Builder setClientStatsReportInterval(
com.google.protobuf.Duration.Builder builderForValue) { com.google.protobuf.Duration.Builder builderForValue) {
@ -650,13 +663,13 @@ public final class InitialLoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public Builder mergeClientStatsReportInterval(com.google.protobuf.Duration value) { public Builder mergeClientStatsReportInterval(com.google.protobuf.Duration value) {
if (clientStatsReportIntervalBuilder_ == null) { if (clientStatsReportIntervalBuilder_ == null) {
@ -674,13 +687,13 @@ public final class InitialLoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public Builder clearClientStatsReportInterval() { public Builder clearClientStatsReportInterval() {
if (clientStatsReportIntervalBuilder_ == null) { if (clientStatsReportIntervalBuilder_ == null) {
@ -694,13 +707,13 @@ public final class InitialLoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public com.google.protobuf.Duration.Builder getClientStatsReportIntervalBuilder() { public com.google.protobuf.Duration.Builder getClientStatsReportIntervalBuilder() {
@ -708,13 +721,13 @@ public final class InitialLoadBalanceResponse extends
return getClientStatsReportIntervalFieldBuilder().getBuilder(); return getClientStatsReportIntervalFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
public com.google.protobuf.DurationOrBuilder getClientStatsReportIntervalOrBuilder() { public com.google.protobuf.DurationOrBuilder getClientStatsReportIntervalOrBuilder() {
if (clientStatsReportIntervalBuilder_ != null) { if (clientStatsReportIntervalBuilder_ != null) {
@ -725,13 +738,13 @@ public final class InitialLoadBalanceResponse extends
} }
} }
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
@ -776,16 +789,7 @@ public final class InitialLoadBalanceResponse extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new InitialLoadBalanceResponse(input, extensionRegistry); return new InitialLoadBalanceResponse(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,57 +8,57 @@ public interface InitialLoadBalanceResponseOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
java.lang.String getLoadBalancerDelegate(); java.lang.String getLoadBalancerDelegate();
/** /**
* <code>optional string load_balancer_delegate = 2;</code>
*
* <pre> * <pre>
* This is an application layer redirect that indicates the client should * This is an application layer redirect that indicates the client should
* use the specified server for load balancing. When this field is set in * use the specified server for load balancing. When this field is set in
* the response, the client should open a separate connection to the * the response, the client should open a separate connection to the
* load_balancer_delegate and call the BalanceLoad method. * load_balancer_delegate and call the BalanceLoad method.
* </pre> * </pre>
*
* <code>optional string load_balancer_delegate = 2;</code>
*/ */
com.google.protobuf.ByteString com.google.protobuf.ByteString
getLoadBalancerDelegateBytes(); getLoadBalancerDelegateBytes();
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
boolean hasClientStatsReportInterval(); boolean hasClientStatsReportInterval();
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
com.google.protobuf.Duration getClientStatsReportInterval(); com.google.protobuf.Duration getClientStatsReportInterval();
/** /**
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*
* <pre> * <pre>
* This interval defines how often the client should send the client stats * This interval defines how often the client should send the client stats
* to the load balancer. Stats should only be reported when the duration is * to the load balancer. Stats should only be reported when the duration is
* positive. * positive.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration client_stats_report_interval = 3;</code>
*/ */
com.google.protobuf.DurationOrBuilder getClientStatsReportIntervalOrBuilder(); com.google.protobuf.DurationOrBuilder getClientStatsReportIntervalOrBuilder();

View File

@ -24,7 +24,8 @@ public final class LoadBalanceRequest extends
} }
private LoadBalanceRequest( private LoadBalanceRequest(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -72,11 +73,10 @@ public final class LoadBalanceRequest extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -100,17 +100,24 @@ public final class LoadBalanceRequest extends
INITIAL_REQUEST(1), INITIAL_REQUEST(1),
CLIENT_STATS(2), CLIENT_STATS(2),
LOADBALANCEREQUESTTYPE_NOT_SET(0); LOADBALANCEREQUESTTYPE_NOT_SET(0);
private int value = 0; private final int value;
private LoadBalanceRequestTypeCase(int value) { private LoadBalanceRequestTypeCase(int value) {
this.value = value; this.value = value;
} }
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LoadBalanceRequestTypeCase valueOf(int value) { public static LoadBalanceRequestTypeCase valueOf(int value) {
return forNumber(value);
}
public static LoadBalanceRequestTypeCase forNumber(int value) {
switch (value) { switch (value) {
case 1: return INITIAL_REQUEST; case 1: return INITIAL_REQUEST;
case 2: return CLIENT_STATS; case 2: return CLIENT_STATS;
case 0: return LOADBALANCEREQUESTTYPE_NOT_SET; case 0: return LOADBALANCEREQUESTTYPE_NOT_SET;
default: throw new java.lang.IllegalArgumentException( default: return null;
"Value is undefined for this oneof enum.");
} }
} }
public int getNumber() { public int getNumber() {
@ -120,17 +127,17 @@ public final class LoadBalanceRequest extends
public LoadBalanceRequestTypeCase public LoadBalanceRequestTypeCase
getLoadBalanceRequestTypeCase() { getLoadBalanceRequestTypeCase() {
return LoadBalanceRequestTypeCase.valueOf( return LoadBalanceRequestTypeCase.forNumber(
loadBalanceRequestTypeCase_); loadBalanceRequestTypeCase_);
} }
public static final int INITIAL_REQUEST_FIELD_NUMBER = 1; public static final int INITIAL_REQUEST_FIELD_NUMBER = 1;
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceRequest getInitialRequest() { public io.grpc.grpclb.InitialLoadBalanceRequest getInitialRequest() {
if (loadBalanceRequestTypeCase_ == 1) { if (loadBalanceRequestTypeCase_ == 1) {
@ -139,11 +146,11 @@ public final class LoadBalanceRequest extends
return io.grpc.grpclb.InitialLoadBalanceRequest.getDefaultInstance(); return io.grpc.grpclb.InitialLoadBalanceRequest.getDefaultInstance();
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder() { public io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder() {
if (loadBalanceRequestTypeCase_ == 1) { if (loadBalanceRequestTypeCase_ == 1) {
@ -154,12 +161,12 @@ public final class LoadBalanceRequest extends
public static final int CLIENT_STATS_FIELD_NUMBER = 2; public static final int CLIENT_STATS_FIELD_NUMBER = 2;
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public io.grpc.grpclb.ClientStats getClientStats() { public io.grpc.grpclb.ClientStats getClientStats() {
if (loadBalanceRequestTypeCase_ == 2) { if (loadBalanceRequestTypeCase_ == 2) {
@ -168,12 +175,12 @@ public final class LoadBalanceRequest extends
return io.grpc.grpclb.ClientStats.getDefaultInstance(); return io.grpc.grpclb.ClientStats.getDefaultInstance();
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public io.grpc.grpclb.ClientStatsOrBuilder getClientStatsOrBuilder() { public io.grpc.grpclb.ClientStatsOrBuilder getClientStatsOrBuilder() {
if (loadBalanceRequestTypeCase_ == 2) { if (loadBalanceRequestTypeCase_ == 2) {
@ -243,34 +250,40 @@ public final class LoadBalanceRequest extends
} }
public static io.grpc.grpclb.LoadBalanceRequest parseFrom(java.io.InputStream input) public static io.grpc.grpclb.LoadBalanceRequest parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.LoadBalanceRequest parseFrom( public static io.grpc.grpclb.LoadBalanceRequest parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.LoadBalanceRequest parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.LoadBalanceRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.LoadBalanceRequest parseDelimitedFrom( public static io.grpc.grpclb.LoadBalanceRequest parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.LoadBalanceRequest parseFrom( public static io.grpc.grpclb.LoadBalanceRequest parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.LoadBalanceRequest parseFrom( public static io.grpc.grpclb.LoadBalanceRequest parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -410,7 +423,7 @@ public final class LoadBalanceRequest extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.LoadBalanceRequest) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.LoadBalanceRequest) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -422,7 +435,7 @@ public final class LoadBalanceRequest extends
private java.lang.Object loadBalanceRequestType_; private java.lang.Object loadBalanceRequestType_;
public LoadBalanceRequestTypeCase public LoadBalanceRequestTypeCase
getLoadBalanceRequestTypeCase() { getLoadBalanceRequestTypeCase() {
return LoadBalanceRequestTypeCase.valueOf( return LoadBalanceRequestTypeCase.forNumber(
loadBalanceRequestTypeCase_); loadBalanceRequestTypeCase_);
} }
@ -437,11 +450,11 @@ public final class LoadBalanceRequest extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.InitialLoadBalanceRequest, io.grpc.grpclb.InitialLoadBalanceRequest.Builder, io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder> initialRequestBuilder_; io.grpc.grpclb.InitialLoadBalanceRequest, io.grpc.grpclb.InitialLoadBalanceRequest.Builder, io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder> initialRequestBuilder_;
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceRequest getInitialRequest() { public io.grpc.grpclb.InitialLoadBalanceRequest getInitialRequest() {
if (initialRequestBuilder_ == null) { if (initialRequestBuilder_ == null) {
@ -457,11 +470,11 @@ public final class LoadBalanceRequest extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public Builder setInitialRequest(io.grpc.grpclb.InitialLoadBalanceRequest value) { public Builder setInitialRequest(io.grpc.grpclb.InitialLoadBalanceRequest value) {
if (initialRequestBuilder_ == null) { if (initialRequestBuilder_ == null) {
@ -477,11 +490,11 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public Builder setInitialRequest( public Builder setInitialRequest(
io.grpc.grpclb.InitialLoadBalanceRequest.Builder builderForValue) { io.grpc.grpclb.InitialLoadBalanceRequest.Builder builderForValue) {
@ -495,11 +508,11 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public Builder mergeInitialRequest(io.grpc.grpclb.InitialLoadBalanceRequest value) { public Builder mergeInitialRequest(io.grpc.grpclb.InitialLoadBalanceRequest value) {
if (initialRequestBuilder_ == null) { if (initialRequestBuilder_ == null) {
@ -521,11 +534,11 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public Builder clearInitialRequest() { public Builder clearInitialRequest() {
if (initialRequestBuilder_ == null) { if (initialRequestBuilder_ == null) {
@ -544,21 +557,21 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceRequest.Builder getInitialRequestBuilder() { public io.grpc.grpclb.InitialLoadBalanceRequest.Builder getInitialRequestBuilder() {
return getInitialRequestFieldBuilder().getBuilder(); return getInitialRequestFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder() { public io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder() {
if ((loadBalanceRequestTypeCase_ == 1) && (initialRequestBuilder_ != null)) { if ((loadBalanceRequestTypeCase_ == 1) && (initialRequestBuilder_ != null)) {
@ -571,11 +584,11 @@ public final class LoadBalanceRequest extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.InitialLoadBalanceRequest, io.grpc.grpclb.InitialLoadBalanceRequest.Builder, io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder> io.grpc.grpclb.InitialLoadBalanceRequest, io.grpc.grpclb.InitialLoadBalanceRequest.Builder, io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder>
@ -599,12 +612,12 @@ public final class LoadBalanceRequest extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.ClientStats, io.grpc.grpclb.ClientStats.Builder, io.grpc.grpclb.ClientStatsOrBuilder> clientStatsBuilder_; io.grpc.grpclb.ClientStats, io.grpc.grpclb.ClientStats.Builder, io.grpc.grpclb.ClientStatsOrBuilder> clientStatsBuilder_;
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public io.grpc.grpclb.ClientStats getClientStats() { public io.grpc.grpclb.ClientStats getClientStats() {
if (clientStatsBuilder_ == null) { if (clientStatsBuilder_ == null) {
@ -620,12 +633,12 @@ public final class LoadBalanceRequest extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public Builder setClientStats(io.grpc.grpclb.ClientStats value) { public Builder setClientStats(io.grpc.grpclb.ClientStats value) {
if (clientStatsBuilder_ == null) { if (clientStatsBuilder_ == null) {
@ -641,12 +654,12 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public Builder setClientStats( public Builder setClientStats(
io.grpc.grpclb.ClientStats.Builder builderForValue) { io.grpc.grpclb.ClientStats.Builder builderForValue) {
@ -660,12 +673,12 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public Builder mergeClientStats(io.grpc.grpclb.ClientStats value) { public Builder mergeClientStats(io.grpc.grpclb.ClientStats value) {
if (clientStatsBuilder_ == null) { if (clientStatsBuilder_ == null) {
@ -687,12 +700,12 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public Builder clearClientStats() { public Builder clearClientStats() {
if (clientStatsBuilder_ == null) { if (clientStatsBuilder_ == null) {
@ -711,23 +724,23 @@ public final class LoadBalanceRequest extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public io.grpc.grpclb.ClientStats.Builder getClientStatsBuilder() { public io.grpc.grpclb.ClientStats.Builder getClientStatsBuilder() {
return getClientStatsFieldBuilder().getBuilder(); return getClientStatsFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
public io.grpc.grpclb.ClientStatsOrBuilder getClientStatsOrBuilder() { public io.grpc.grpclb.ClientStatsOrBuilder getClientStatsOrBuilder() {
if ((loadBalanceRequestTypeCase_ == 2) && (clientStatsBuilder_ != null)) { if ((loadBalanceRequestTypeCase_ == 2) && (clientStatsBuilder_ != null)) {
@ -740,12 +753,12 @@ public final class LoadBalanceRequest extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.ClientStats, io.grpc.grpclb.ClientStats.Builder, io.grpc.grpclb.ClientStatsOrBuilder> io.grpc.grpclb.ClientStats, io.grpc.grpclb.ClientStats.Builder, io.grpc.grpclb.ClientStatsOrBuilder>
@ -795,16 +808,7 @@ public final class LoadBalanceRequest extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new LoadBalanceRequest(input, extensionRegistry); return new LoadBalanceRequest(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,38 +8,38 @@ public interface LoadBalanceRequestOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
io.grpc.grpclb.InitialLoadBalanceRequest getInitialRequest(); io.grpc.grpclb.InitialLoadBalanceRequest getInitialRequest();
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first request to the load balancer. * This message should be sent on the first request to the load balancer.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceRequest initial_request = 1;</code>
*/ */
io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder(); io.grpc.grpclb.InitialLoadBalanceRequestOrBuilder getInitialRequestOrBuilder();
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
io.grpc.grpclb.ClientStats getClientStats(); io.grpc.grpclb.ClientStats getClientStats();
/** /**
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*
* <pre> * <pre>
* The client stats should be periodically reported to the load balancer * The client stats should be periodically reported to the load balancer
* based on the duration defined in the InitialLoadBalanceResponse. * based on the duration defined in the InitialLoadBalanceResponse.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ClientStats client_stats = 2;</code>
*/ */
io.grpc.grpclb.ClientStatsOrBuilder getClientStatsOrBuilder(); io.grpc.grpclb.ClientStatsOrBuilder getClientStatsOrBuilder();

View File

@ -24,7 +24,8 @@ public final class LoadBalanceResponse extends
} }
private LoadBalanceResponse( private LoadBalanceResponse(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -72,11 +73,10 @@ public final class LoadBalanceResponse extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -100,17 +100,24 @@ public final class LoadBalanceResponse extends
INITIAL_RESPONSE(1), INITIAL_RESPONSE(1),
SERVER_LIST(2), SERVER_LIST(2),
LOADBALANCERESPONSETYPE_NOT_SET(0); LOADBALANCERESPONSETYPE_NOT_SET(0);
private int value = 0; private final int value;
private LoadBalanceResponseTypeCase(int value) { private LoadBalanceResponseTypeCase(int value) {
this.value = value; this.value = value;
} }
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static LoadBalanceResponseTypeCase valueOf(int value) { public static LoadBalanceResponseTypeCase valueOf(int value) {
return forNumber(value);
}
public static LoadBalanceResponseTypeCase forNumber(int value) {
switch (value) { switch (value) {
case 1: return INITIAL_RESPONSE; case 1: return INITIAL_RESPONSE;
case 2: return SERVER_LIST; case 2: return SERVER_LIST;
case 0: return LOADBALANCERESPONSETYPE_NOT_SET; case 0: return LOADBALANCERESPONSETYPE_NOT_SET;
default: throw new java.lang.IllegalArgumentException( default: return null;
"Value is undefined for this oneof enum.");
} }
} }
public int getNumber() { public int getNumber() {
@ -120,17 +127,17 @@ public final class LoadBalanceResponse extends
public LoadBalanceResponseTypeCase public LoadBalanceResponseTypeCase
getLoadBalanceResponseTypeCase() { getLoadBalanceResponseTypeCase() {
return LoadBalanceResponseTypeCase.valueOf( return LoadBalanceResponseTypeCase.forNumber(
loadBalanceResponseTypeCase_); loadBalanceResponseTypeCase_);
} }
public static final int INITIAL_RESPONSE_FIELD_NUMBER = 1; public static final int INITIAL_RESPONSE_FIELD_NUMBER = 1;
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceResponse getInitialResponse() { public io.grpc.grpclb.InitialLoadBalanceResponse getInitialResponse() {
if (loadBalanceResponseTypeCase_ == 1) { if (loadBalanceResponseTypeCase_ == 1) {
@ -139,11 +146,11 @@ public final class LoadBalanceResponse extends
return io.grpc.grpclb.InitialLoadBalanceResponse.getDefaultInstance(); return io.grpc.grpclb.InitialLoadBalanceResponse.getDefaultInstance();
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() { public io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() {
if (loadBalanceResponseTypeCase_ == 1) { if (loadBalanceResponseTypeCase_ == 1) {
@ -154,12 +161,12 @@ public final class LoadBalanceResponse extends
public static final int SERVER_LIST_FIELD_NUMBER = 2; public static final int SERVER_LIST_FIELD_NUMBER = 2;
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public io.grpc.grpclb.ServerList getServerList() { public io.grpc.grpclb.ServerList getServerList() {
if (loadBalanceResponseTypeCase_ == 2) { if (loadBalanceResponseTypeCase_ == 2) {
@ -168,12 +175,12 @@ public final class LoadBalanceResponse extends
return io.grpc.grpclb.ServerList.getDefaultInstance(); return io.grpc.grpclb.ServerList.getDefaultInstance();
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public io.grpc.grpclb.ServerListOrBuilder getServerListOrBuilder() { public io.grpc.grpclb.ServerListOrBuilder getServerListOrBuilder() {
if (loadBalanceResponseTypeCase_ == 2) { if (loadBalanceResponseTypeCase_ == 2) {
@ -243,34 +250,40 @@ public final class LoadBalanceResponse extends
} }
public static io.grpc.grpclb.LoadBalanceResponse parseFrom(java.io.InputStream input) public static io.grpc.grpclb.LoadBalanceResponse parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.LoadBalanceResponse parseFrom( public static io.grpc.grpclb.LoadBalanceResponse parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.LoadBalanceResponse parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.LoadBalanceResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.LoadBalanceResponse parseDelimitedFrom( public static io.grpc.grpclb.LoadBalanceResponse parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.LoadBalanceResponse parseFrom( public static io.grpc.grpclb.LoadBalanceResponse parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.LoadBalanceResponse parseFrom( public static io.grpc.grpclb.LoadBalanceResponse parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -410,7 +423,7 @@ public final class LoadBalanceResponse extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.LoadBalanceResponse) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.LoadBalanceResponse) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -422,7 +435,7 @@ public final class LoadBalanceResponse extends
private java.lang.Object loadBalanceResponseType_; private java.lang.Object loadBalanceResponseType_;
public LoadBalanceResponseTypeCase public LoadBalanceResponseTypeCase
getLoadBalanceResponseTypeCase() { getLoadBalanceResponseTypeCase() {
return LoadBalanceResponseTypeCase.valueOf( return LoadBalanceResponseTypeCase.forNumber(
loadBalanceResponseTypeCase_); loadBalanceResponseTypeCase_);
} }
@ -437,11 +450,11 @@ public final class LoadBalanceResponse extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.InitialLoadBalanceResponse, io.grpc.grpclb.InitialLoadBalanceResponse.Builder, io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder> initialResponseBuilder_; io.grpc.grpclb.InitialLoadBalanceResponse, io.grpc.grpclb.InitialLoadBalanceResponse.Builder, io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder> initialResponseBuilder_;
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceResponse getInitialResponse() { public io.grpc.grpclb.InitialLoadBalanceResponse getInitialResponse() {
if (initialResponseBuilder_ == null) { if (initialResponseBuilder_ == null) {
@ -457,11 +470,11 @@ public final class LoadBalanceResponse extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public Builder setInitialResponse(io.grpc.grpclb.InitialLoadBalanceResponse value) { public Builder setInitialResponse(io.grpc.grpclb.InitialLoadBalanceResponse value) {
if (initialResponseBuilder_ == null) { if (initialResponseBuilder_ == null) {
@ -477,11 +490,11 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public Builder setInitialResponse( public Builder setInitialResponse(
io.grpc.grpclb.InitialLoadBalanceResponse.Builder builderForValue) { io.grpc.grpclb.InitialLoadBalanceResponse.Builder builderForValue) {
@ -495,11 +508,11 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public Builder mergeInitialResponse(io.grpc.grpclb.InitialLoadBalanceResponse value) { public Builder mergeInitialResponse(io.grpc.grpclb.InitialLoadBalanceResponse value) {
if (initialResponseBuilder_ == null) { if (initialResponseBuilder_ == null) {
@ -521,11 +534,11 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public Builder clearInitialResponse() { public Builder clearInitialResponse() {
if (initialResponseBuilder_ == null) { if (initialResponseBuilder_ == null) {
@ -544,21 +557,21 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceResponse.Builder getInitialResponseBuilder() { public io.grpc.grpclb.InitialLoadBalanceResponse.Builder getInitialResponseBuilder() {
return getInitialResponseFieldBuilder().getBuilder(); return getInitialResponseFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
public io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() { public io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder() {
if ((loadBalanceResponseTypeCase_ == 1) && (initialResponseBuilder_ != null)) { if ((loadBalanceResponseTypeCase_ == 1) && (initialResponseBuilder_ != null)) {
@ -571,11 +584,11 @@ public final class LoadBalanceResponse extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.InitialLoadBalanceResponse, io.grpc.grpclb.InitialLoadBalanceResponse.Builder, io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder> io.grpc.grpclb.InitialLoadBalanceResponse, io.grpc.grpclb.InitialLoadBalanceResponse.Builder, io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder>
@ -599,12 +612,12 @@ public final class LoadBalanceResponse extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.ServerList, io.grpc.grpclb.ServerList.Builder, io.grpc.grpclb.ServerListOrBuilder> serverListBuilder_; io.grpc.grpclb.ServerList, io.grpc.grpclb.ServerList.Builder, io.grpc.grpclb.ServerListOrBuilder> serverListBuilder_;
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public io.grpc.grpclb.ServerList getServerList() { public io.grpc.grpclb.ServerList getServerList() {
if (serverListBuilder_ == null) { if (serverListBuilder_ == null) {
@ -620,12 +633,12 @@ public final class LoadBalanceResponse extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public Builder setServerList(io.grpc.grpclb.ServerList value) { public Builder setServerList(io.grpc.grpclb.ServerList value) {
if (serverListBuilder_ == null) { if (serverListBuilder_ == null) {
@ -641,12 +654,12 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public Builder setServerList( public Builder setServerList(
io.grpc.grpclb.ServerList.Builder builderForValue) { io.grpc.grpclb.ServerList.Builder builderForValue) {
@ -660,12 +673,12 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public Builder mergeServerList(io.grpc.grpclb.ServerList value) { public Builder mergeServerList(io.grpc.grpclb.ServerList value) {
if (serverListBuilder_ == null) { if (serverListBuilder_ == null) {
@ -687,12 +700,12 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public Builder clearServerList() { public Builder clearServerList() {
if (serverListBuilder_ == null) { if (serverListBuilder_ == null) {
@ -711,23 +724,23 @@ public final class LoadBalanceResponse extends
return this; return this;
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public io.grpc.grpclb.ServerList.Builder getServerListBuilder() { public io.grpc.grpclb.ServerList.Builder getServerListBuilder() {
return getServerListFieldBuilder().getBuilder(); return getServerListFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
public io.grpc.grpclb.ServerListOrBuilder getServerListOrBuilder() { public io.grpc.grpclb.ServerListOrBuilder getServerListOrBuilder() {
if ((loadBalanceResponseTypeCase_ == 2) && (serverListBuilder_ != null)) { if ((loadBalanceResponseTypeCase_ == 2) && (serverListBuilder_ != null)) {
@ -740,12 +753,12 @@ public final class LoadBalanceResponse extends
} }
} }
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
io.grpc.grpclb.ServerList, io.grpc.grpclb.ServerList.Builder, io.grpc.grpclb.ServerListOrBuilder> io.grpc.grpclb.ServerList, io.grpc.grpclb.ServerList.Builder, io.grpc.grpclb.ServerListOrBuilder>
@ -795,16 +808,7 @@ public final class LoadBalanceResponse extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new LoadBalanceResponse(input, extensionRegistry); return new LoadBalanceResponse(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,38 +8,38 @@ public interface LoadBalanceResponseOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
io.grpc.grpclb.InitialLoadBalanceResponse getInitialResponse(); io.grpc.grpclb.InitialLoadBalanceResponse getInitialResponse();
/** /**
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*
* <pre> * <pre>
* This message should be sent on the first response to the client. * This message should be sent on the first response to the client.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.InitialLoadBalanceResponse initial_response = 1;</code>
*/ */
io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder(); io.grpc.grpclb.InitialLoadBalanceResponseOrBuilder getInitialResponseOrBuilder();
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
io.grpc.grpclb.ServerList getServerList(); io.grpc.grpclb.ServerList getServerList();
/** /**
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*
* <pre> * <pre>
* Contains the list of servers selected by the load balancer. The client * Contains the list of servers selected by the load balancer. The client
* should send requests to these servers in the specified order. * should send requests to these servers in the specified order.
* </pre> * </pre>
*
* <code>optional .grpc.lb.v1.ServerList server_list = 2;</code>
*/ */
io.grpc.grpclb.ServerListOrBuilder getServerListOrBuilder(); io.grpc.grpclb.ServerListOrBuilder getServerListOrBuilder();

View File

@ -8,39 +8,39 @@ public final class LoadBalancerProto {
public static void registerAllExtensions( public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) { com.google.protobuf.ExtensionRegistry registry) {
} }
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_LoadBalanceRequest_descriptor; internal_static_grpc_lb_v1_LoadBalanceRequest_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_LoadBalanceRequest_fieldAccessorTable; internal_static_grpc_lb_v1_LoadBalanceRequest_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_InitialLoadBalanceRequest_descriptor; internal_static_grpc_lb_v1_InitialLoadBalanceRequest_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_InitialLoadBalanceRequest_fieldAccessorTable; internal_static_grpc_lb_v1_InitialLoadBalanceRequest_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_ClientStats_descriptor; internal_static_grpc_lb_v1_ClientStats_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_ClientStats_fieldAccessorTable; internal_static_grpc_lb_v1_ClientStats_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor; internal_static_grpc_lb_v1_LoadBalanceResponse_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_LoadBalanceResponse_fieldAccessorTable; internal_static_grpc_lb_v1_LoadBalanceResponse_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_InitialLoadBalanceResponse_descriptor; internal_static_grpc_lb_v1_InitialLoadBalanceResponse_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_InitialLoadBalanceResponse_fieldAccessorTable; internal_static_grpc_lb_v1_InitialLoadBalanceResponse_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_ServerList_descriptor; internal_static_grpc_lb_v1_ServerList_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_ServerList_fieldAccessorTable; internal_static_grpc_lb_v1_ServerList_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_lb_v1_Server_descriptor; internal_static_grpc_lb_v1_Server_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_lb_v1_Server_fieldAccessorTable; internal_static_grpc_lb_v1_Server_fieldAccessorTable;
@ -48,7 +48,7 @@ public final class LoadBalancerProto {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -28,7 +28,8 @@ public final class Server extends
} }
private Server( private Server(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -69,11 +70,10 @@ public final class Server extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -93,12 +93,12 @@ public final class Server extends
public static final int IP_ADDRESS_FIELD_NUMBER = 1; public static final int IP_ADDRESS_FIELD_NUMBER = 1;
private com.google.protobuf.ByteString ipAddress_; private com.google.protobuf.ByteString ipAddress_;
/** /**
* <code>optional bytes ip_address = 1;</code>
*
* <pre> * <pre>
* A resolved address for the server, serialized in network-byte-order. It may * A resolved address for the server, serialized in network-byte-order. It may
* either be an IPv4 or IPv6 address. * either be an IPv4 or IPv6 address.
* </pre> * </pre>
*
* <code>optional bytes ip_address = 1;</code>
*/ */
public com.google.protobuf.ByteString getIpAddress() { public com.google.protobuf.ByteString getIpAddress() {
return ipAddress_; return ipAddress_;
@ -107,11 +107,11 @@ public final class Server extends
public static final int PORT_FIELD_NUMBER = 2; public static final int PORT_FIELD_NUMBER = 2;
private int port_; private int port_;
/** /**
* <code>optional int32 port = 2;</code>
*
* <pre> * <pre>
* A resolved port number for the server. * A resolved port number for the server.
* </pre> * </pre>
*
* <code>optional int32 port = 2;</code>
*/ */
public int getPort() { public int getPort() {
return port_; return port_;
@ -120,13 +120,13 @@ public final class Server extends
public static final int LOAD_BALANCE_TOKEN_FIELD_NUMBER = 3; public static final int LOAD_BALANCE_TOKEN_FIELD_NUMBER = 3;
private volatile java.lang.Object loadBalanceToken_; private volatile java.lang.Object loadBalanceToken_;
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public java.lang.String getLoadBalanceToken() { public java.lang.String getLoadBalanceToken() {
java.lang.Object ref = loadBalanceToken_; java.lang.Object ref = loadBalanceToken_;
@ -141,13 +141,13 @@ public final class Server extends
} }
} }
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getLoadBalanceTokenBytes() { getLoadBalanceTokenBytes() {
@ -166,12 +166,12 @@ public final class Server extends
public static final int DROP_REQUEST_FIELD_NUMBER = 4; public static final int DROP_REQUEST_FIELD_NUMBER = 4;
private boolean dropRequest_; private boolean dropRequest_;
/** /**
* <code>optional bool drop_request = 4;</code>
*
* <pre> * <pre>
* Indicates whether this particular request should be dropped by the client * Indicates whether this particular request should be dropped by the client
* when this server is chosen from the list. * when this server is chosen from the list.
* </pre> * </pre>
*
* <code>optional bool drop_request = 4;</code>
*/ */
public boolean getDropRequest() { public boolean getDropRequest() {
return dropRequest_; return dropRequest_;
@ -251,34 +251,40 @@ public final class Server extends
} }
public static io.grpc.grpclb.Server parseFrom(java.io.InputStream input) public static io.grpc.grpclb.Server parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.Server parseFrom( public static io.grpc.grpclb.Server parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.Server parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.Server parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.Server parseDelimitedFrom( public static io.grpc.grpclb.Server parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.Server parseFrom( public static io.grpc.grpclb.Server parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.Server parseFrom( public static io.grpc.grpclb.Server parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -413,7 +419,7 @@ public final class Server extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.Server) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.Server) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -424,23 +430,23 @@ public final class Server extends
private com.google.protobuf.ByteString ipAddress_ = com.google.protobuf.ByteString.EMPTY; private com.google.protobuf.ByteString ipAddress_ = com.google.protobuf.ByteString.EMPTY;
/** /**
* <code>optional bytes ip_address = 1;</code>
*
* <pre> * <pre>
* A resolved address for the server, serialized in network-byte-order. It may * A resolved address for the server, serialized in network-byte-order. It may
* either be an IPv4 or IPv6 address. * either be an IPv4 or IPv6 address.
* </pre> * </pre>
*
* <code>optional bytes ip_address = 1;</code>
*/ */
public com.google.protobuf.ByteString getIpAddress() { public com.google.protobuf.ByteString getIpAddress() {
return ipAddress_; return ipAddress_;
} }
/** /**
* <code>optional bytes ip_address = 1;</code>
*
* <pre> * <pre>
* A resolved address for the server, serialized in network-byte-order. It may * A resolved address for the server, serialized in network-byte-order. It may
* either be an IPv4 or IPv6 address. * either be an IPv4 or IPv6 address.
* </pre> * </pre>
*
* <code>optional bytes ip_address = 1;</code>
*/ */
public Builder setIpAddress(com.google.protobuf.ByteString value) { public Builder setIpAddress(com.google.protobuf.ByteString value) {
if (value == null) { if (value == null) {
@ -452,12 +458,12 @@ public final class Server extends
return this; return this;
} }
/** /**
* <code>optional bytes ip_address = 1;</code>
*
* <pre> * <pre>
* A resolved address for the server, serialized in network-byte-order. It may * A resolved address for the server, serialized in network-byte-order. It may
* either be an IPv4 or IPv6 address. * either be an IPv4 or IPv6 address.
* </pre> * </pre>
*
* <code>optional bytes ip_address = 1;</code>
*/ */
public Builder clearIpAddress() { public Builder clearIpAddress() {
@ -468,21 +474,21 @@ public final class Server extends
private int port_ ; private int port_ ;
/** /**
* <code>optional int32 port = 2;</code>
*
* <pre> * <pre>
* A resolved port number for the server. * A resolved port number for the server.
* </pre> * </pre>
*
* <code>optional int32 port = 2;</code>
*/ */
public int getPort() { public int getPort() {
return port_; return port_;
} }
/** /**
* <code>optional int32 port = 2;</code>
*
* <pre> * <pre>
* A resolved port number for the server. * A resolved port number for the server.
* </pre> * </pre>
*
* <code>optional int32 port = 2;</code>
*/ */
public Builder setPort(int value) { public Builder setPort(int value) {
@ -491,11 +497,11 @@ public final class Server extends
return this; return this;
} }
/** /**
* <code>optional int32 port = 2;</code>
*
* <pre> * <pre>
* A resolved port number for the server. * A resolved port number for the server.
* </pre> * </pre>
*
* <code>optional int32 port = 2;</code>
*/ */
public Builder clearPort() { public Builder clearPort() {
@ -506,13 +512,13 @@ public final class Server extends
private java.lang.Object loadBalanceToken_ = ""; private java.lang.Object loadBalanceToken_ = "";
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public java.lang.String getLoadBalanceToken() { public java.lang.String getLoadBalanceToken() {
java.lang.Object ref = loadBalanceToken_; java.lang.Object ref = loadBalanceToken_;
@ -527,13 +533,13 @@ public final class Server extends
} }
} }
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public com.google.protobuf.ByteString public com.google.protobuf.ByteString
getLoadBalanceTokenBytes() { getLoadBalanceTokenBytes() {
@ -549,13 +555,13 @@ public final class Server extends
} }
} }
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public Builder setLoadBalanceToken( public Builder setLoadBalanceToken(
java.lang.String value) { java.lang.String value) {
@ -568,13 +574,13 @@ public final class Server extends
return this; return this;
} }
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public Builder clearLoadBalanceToken() { public Builder clearLoadBalanceToken() {
@ -583,13 +589,13 @@ public final class Server extends
return this; return this;
} }
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
public Builder setLoadBalanceTokenBytes( public Builder setLoadBalanceTokenBytes(
com.google.protobuf.ByteString value) { com.google.protobuf.ByteString value) {
@ -605,23 +611,23 @@ public final class Server extends
private boolean dropRequest_ ; private boolean dropRequest_ ;
/** /**
* <code>optional bool drop_request = 4;</code>
*
* <pre> * <pre>
* Indicates whether this particular request should be dropped by the client * Indicates whether this particular request should be dropped by the client
* when this server is chosen from the list. * when this server is chosen from the list.
* </pre> * </pre>
*
* <code>optional bool drop_request = 4;</code>
*/ */
public boolean getDropRequest() { public boolean getDropRequest() {
return dropRequest_; return dropRequest_;
} }
/** /**
* <code>optional bool drop_request = 4;</code>
*
* <pre> * <pre>
* Indicates whether this particular request should be dropped by the client * Indicates whether this particular request should be dropped by the client
* when this server is chosen from the list. * when this server is chosen from the list.
* </pre> * </pre>
*
* <code>optional bool drop_request = 4;</code>
*/ */
public Builder setDropRequest(boolean value) { public Builder setDropRequest(boolean value) {
@ -630,12 +636,12 @@ public final class Server extends
return this; return this;
} }
/** /**
* <code>optional bool drop_request = 4;</code>
*
* <pre> * <pre>
* Indicates whether this particular request should be dropped by the client * Indicates whether this particular request should be dropped by the client
* when this server is chosen from the list. * when this server is chosen from the list.
* </pre> * </pre>
*
* <code>optional bool drop_request = 4;</code>
*/ */
public Builder clearDropRequest() { public Builder clearDropRequest() {
@ -673,16 +679,7 @@ public final class Server extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new Server(input, extensionRegistry); return new Server(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -25,7 +25,8 @@ public final class ServerList extends
} }
private ServerList( private ServerList(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -66,11 +67,10 @@ public final class ServerList extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
servers_ = java.util.Collections.unmodifiableList(servers_); servers_ = java.util.Collections.unmodifiableList(servers_);
@ -94,67 +94,67 @@ public final class ServerList extends
public static final int SERVERS_FIELD_NUMBER = 1; public static final int SERVERS_FIELD_NUMBER = 1;
private java.util.List<io.grpc.grpclb.Server> servers_; private java.util.List<io.grpc.grpclb.Server> servers_;
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public java.util.List<io.grpc.grpclb.Server> getServersList() { public java.util.List<io.grpc.grpclb.Server> getServersList() {
return servers_; return servers_;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public java.util.List<? extends io.grpc.grpclb.ServerOrBuilder> public java.util.List<? extends io.grpc.grpclb.ServerOrBuilder>
getServersOrBuilderList() { getServersOrBuilderList() {
return servers_; return servers_;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public int getServersCount() { public int getServersCount() {
return servers_.size(); return servers_.size();
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.Server getServers(int index) { public io.grpc.grpclb.Server getServers(int index) {
return servers_.get(index); return servers_.get(index);
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.ServerOrBuilder getServersOrBuilder( public io.grpc.grpclb.ServerOrBuilder getServersOrBuilder(
int index) { int index) {
@ -164,40 +164,40 @@ public final class ServerList extends
public static final int EXPIRATION_INTERVAL_FIELD_NUMBER = 3; public static final int EXPIRATION_INTERVAL_FIELD_NUMBER = 3;
private com.google.protobuf.Duration expirationInterval_; private com.google.protobuf.Duration expirationInterval_;
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public boolean hasExpirationInterval() { public boolean hasExpirationInterval() {
return expirationInterval_ != null; return expirationInterval_ != null;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public com.google.protobuf.Duration getExpirationInterval() { public com.google.protobuf.Duration getExpirationInterval() {
return expirationInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expirationInterval_; return expirationInterval_ == null ? com.google.protobuf.Duration.getDefaultInstance() : expirationInterval_;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public com.google.protobuf.DurationOrBuilder getExpirationIntervalOrBuilder() { public com.google.protobuf.DurationOrBuilder getExpirationIntervalOrBuilder() {
return getExpirationInterval(); return getExpirationInterval();
@ -264,34 +264,40 @@ public final class ServerList extends
} }
public static io.grpc.grpclb.ServerList parseFrom(java.io.InputStream input) public static io.grpc.grpclb.ServerList parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.ServerList parseFrom( public static io.grpc.grpclb.ServerList parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.ServerList parseDelimitedFrom(java.io.InputStream input) public static io.grpc.grpclb.ServerList parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.ServerList parseDelimitedFrom( public static io.grpc.grpclb.ServerList parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.grpclb.ServerList parseFrom( public static io.grpc.grpclb.ServerList parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.grpclb.ServerList parseFrom( public static io.grpc.grpclb.ServerList parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -460,7 +466,7 @@ public final class ServerList extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.grpclb.ServerList) e.getUnfinishedMessage(); parsedMessage = (io.grpc.grpclb.ServerList) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -483,14 +489,14 @@ public final class ServerList extends
io.grpc.grpclb.Server, io.grpc.grpclb.Server.Builder, io.grpc.grpclb.ServerOrBuilder> serversBuilder_; io.grpc.grpclb.Server, io.grpc.grpclb.Server.Builder, io.grpc.grpclb.ServerOrBuilder> serversBuilder_;
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public java.util.List<io.grpc.grpclb.Server> getServersList() { public java.util.List<io.grpc.grpclb.Server> getServersList() {
if (serversBuilder_ == null) { if (serversBuilder_ == null) {
@ -500,14 +506,14 @@ public final class ServerList extends
} }
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public int getServersCount() { public int getServersCount() {
if (serversBuilder_ == null) { if (serversBuilder_ == null) {
@ -517,14 +523,14 @@ public final class ServerList extends
} }
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.Server getServers(int index) { public io.grpc.grpclb.Server getServers(int index) {
if (serversBuilder_ == null) { if (serversBuilder_ == null) {
@ -534,14 +540,14 @@ public final class ServerList extends
} }
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder setServers( public Builder setServers(
int index, io.grpc.grpclb.Server value) { int index, io.grpc.grpclb.Server value) {
@ -558,14 +564,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder setServers( public Builder setServers(
int index, io.grpc.grpclb.Server.Builder builderForValue) { int index, io.grpc.grpclb.Server.Builder builderForValue) {
@ -579,14 +585,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder addServers(io.grpc.grpclb.Server value) { public Builder addServers(io.grpc.grpclb.Server value) {
if (serversBuilder_ == null) { if (serversBuilder_ == null) {
@ -602,14 +608,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder addServers( public Builder addServers(
int index, io.grpc.grpclb.Server value) { int index, io.grpc.grpclb.Server value) {
@ -626,14 +632,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder addServers( public Builder addServers(
io.grpc.grpclb.Server.Builder builderForValue) { io.grpc.grpclb.Server.Builder builderForValue) {
@ -647,14 +653,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder addServers( public Builder addServers(
int index, io.grpc.grpclb.Server.Builder builderForValue) { int index, io.grpc.grpclb.Server.Builder builderForValue) {
@ -668,14 +674,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder addAllServers( public Builder addAllServers(
java.lang.Iterable<? extends io.grpc.grpclb.Server> values) { java.lang.Iterable<? extends io.grpc.grpclb.Server> values) {
@ -690,14 +696,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder clearServers() { public Builder clearServers() {
if (serversBuilder_ == null) { if (serversBuilder_ == null) {
@ -710,14 +716,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public Builder removeServers(int index) { public Builder removeServers(int index) {
if (serversBuilder_ == null) { if (serversBuilder_ == null) {
@ -730,28 +736,28 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.Server.Builder getServersBuilder( public io.grpc.grpclb.Server.Builder getServersBuilder(
int index) { int index) {
return getServersFieldBuilder().getBuilder(index); return getServersFieldBuilder().getBuilder(index);
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.ServerOrBuilder getServersOrBuilder( public io.grpc.grpclb.ServerOrBuilder getServersOrBuilder(
int index) { int index) {
@ -761,14 +767,14 @@ public final class ServerList extends
} }
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public java.util.List<? extends io.grpc.grpclb.ServerOrBuilder> public java.util.List<? extends io.grpc.grpclb.ServerOrBuilder>
getServersOrBuilderList() { getServersOrBuilderList() {
@ -779,28 +785,28 @@ public final class ServerList extends
} }
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.Server.Builder addServersBuilder() { public io.grpc.grpclb.Server.Builder addServersBuilder() {
return getServersFieldBuilder().addBuilder( return getServersFieldBuilder().addBuilder(
io.grpc.grpclb.Server.getDefaultInstance()); io.grpc.grpclb.Server.getDefaultInstance());
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public io.grpc.grpclb.Server.Builder addServersBuilder( public io.grpc.grpclb.Server.Builder addServersBuilder(
int index) { int index) {
@ -808,14 +814,14 @@ public final class ServerList extends
index, io.grpc.grpclb.Server.getDefaultInstance()); index, io.grpc.grpclb.Server.getDefaultInstance());
} }
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
public java.util.List<io.grpc.grpclb.Server.Builder> public java.util.List<io.grpc.grpclb.Server.Builder>
getServersBuilderList() { getServersBuilderList() {
@ -840,27 +846,27 @@ public final class ServerList extends
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> expirationIntervalBuilder_; com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> expirationIntervalBuilder_;
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public boolean hasExpirationInterval() { public boolean hasExpirationInterval() {
return expirationIntervalBuilder_ != null || expirationInterval_ != null; return expirationIntervalBuilder_ != null || expirationInterval_ != null;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public com.google.protobuf.Duration getExpirationInterval() { public com.google.protobuf.Duration getExpirationInterval() {
if (expirationIntervalBuilder_ == null) { if (expirationIntervalBuilder_ == null) {
@ -870,14 +876,14 @@ public final class ServerList extends
} }
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public Builder setExpirationInterval(com.google.protobuf.Duration value) { public Builder setExpirationInterval(com.google.protobuf.Duration value) {
if (expirationIntervalBuilder_ == null) { if (expirationIntervalBuilder_ == null) {
@ -893,14 +899,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public Builder setExpirationInterval( public Builder setExpirationInterval(
com.google.protobuf.Duration.Builder builderForValue) { com.google.protobuf.Duration.Builder builderForValue) {
@ -914,14 +920,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public Builder mergeExpirationInterval(com.google.protobuf.Duration value) { public Builder mergeExpirationInterval(com.google.protobuf.Duration value) {
if (expirationIntervalBuilder_ == null) { if (expirationIntervalBuilder_ == null) {
@ -939,14 +945,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public Builder clearExpirationInterval() { public Builder clearExpirationInterval() {
if (expirationIntervalBuilder_ == null) { if (expirationIntervalBuilder_ == null) {
@ -960,14 +966,14 @@ public final class ServerList extends
return this; return this;
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public com.google.protobuf.Duration.Builder getExpirationIntervalBuilder() { public com.google.protobuf.Duration.Builder getExpirationIntervalBuilder() {
@ -975,14 +981,14 @@ public final class ServerList extends
return getExpirationIntervalFieldBuilder().getBuilder(); return getExpirationIntervalFieldBuilder().getBuilder();
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
public com.google.protobuf.DurationOrBuilder getExpirationIntervalOrBuilder() { public com.google.protobuf.DurationOrBuilder getExpirationIntervalOrBuilder() {
if (expirationIntervalBuilder_ != null) { if (expirationIntervalBuilder_ != null) {
@ -993,14 +999,14 @@ public final class ServerList extends
} }
} }
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
private com.google.protobuf.SingleFieldBuilder< private com.google.protobuf.SingleFieldBuilder<
com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder> com.google.protobuf.Duration, com.google.protobuf.Duration.Builder, com.google.protobuf.DurationOrBuilder>
@ -1045,16 +1051,7 @@ public final class ServerList extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new ServerList(input, extensionRegistry); return new ServerList(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,95 +8,95 @@ public interface ServerListOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
java.util.List<io.grpc.grpclb.Server> java.util.List<io.grpc.grpclb.Server>
getServersList(); getServersList();
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
io.grpc.grpclb.Server getServers(int index); io.grpc.grpclb.Server getServers(int index);
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
int getServersCount(); int getServersCount();
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
java.util.List<? extends io.grpc.grpclb.ServerOrBuilder> java.util.List<? extends io.grpc.grpclb.ServerOrBuilder>
getServersOrBuilderList(); getServersOrBuilderList();
/** /**
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*
* <pre> * <pre>
* Contains a list of servers selected by the load balancer. The list will * Contains a list of servers selected by the load balancer. The list will
* be updated when server resolutions change or as needed to balance load * be updated when server resolutions change or as needed to balance load
* across more servers. The client should consume the server list in order * across more servers. The client should consume the server list in order
* unless instructed otherwise via the client_config. * unless instructed otherwise via the client_config.
* </pre> * </pre>
*
* <code>repeated .grpc.lb.v1.Server servers = 1;</code>
*/ */
io.grpc.grpclb.ServerOrBuilder getServersOrBuilder( io.grpc.grpclb.ServerOrBuilder getServersOrBuilder(
int index); int index);
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
boolean hasExpirationInterval(); boolean hasExpirationInterval();
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
com.google.protobuf.Duration getExpirationInterval(); com.google.protobuf.Duration getExpirationInterval();
/** /**
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*
* <pre> * <pre>
* Indicates the amount of time that the client should consider this server * Indicates the amount of time that the client should consider this server
* list as valid. It may be considered stale after waiting this interval of * list as valid. It may be considered stale after waiting this interval of
* time after receiving the list. If the interval is not positive, the * time after receiving the list. If the interval is not positive, the
* client can assume the list is valid until the next list is received. * client can assume the list is valid until the next list is received.
* </pre> * </pre>
*
* <code>optional .google.protobuf.Duration expiration_interval = 3;</code>
*/ */
com.google.protobuf.DurationOrBuilder getExpirationIntervalOrBuilder(); com.google.protobuf.DurationOrBuilder getExpirationIntervalOrBuilder();
} }

View File

@ -8,53 +8,53 @@ public interface ServerOrBuilder extends
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
/** /**
* <code>optional bytes ip_address = 1;</code>
*
* <pre> * <pre>
* A resolved address for the server, serialized in network-byte-order. It may * A resolved address for the server, serialized in network-byte-order. It may
* either be an IPv4 or IPv6 address. * either be an IPv4 or IPv6 address.
* </pre> * </pre>
*
* <code>optional bytes ip_address = 1;</code>
*/ */
com.google.protobuf.ByteString getIpAddress(); com.google.protobuf.ByteString getIpAddress();
/** /**
* <code>optional int32 port = 2;</code>
*
* <pre> * <pre>
* A resolved port number for the server. * A resolved port number for the server.
* </pre> * </pre>
*
* <code>optional int32 port = 2;</code>
*/ */
int getPort(); int getPort();
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
java.lang.String getLoadBalanceToken(); java.lang.String getLoadBalanceToken();
/** /**
* <code>optional string load_balance_token = 3;</code>
*
* <pre> * <pre>
* An opaque token that is passed from the client to the server in metadata. * An opaque token that is passed from the client to the server in metadata.
* The server may expect this token to indicate that the request from the * The server may expect this token to indicate that the request from the
* client was load balanced. * client was load balanced.
* </pre> * </pre>
*
* <code>optional string load_balance_token = 3;</code>
*/ */
com.google.protobuf.ByteString com.google.protobuf.ByteString
getLoadBalanceTokenBytes(); getLoadBalanceTokenBytes();
/** /**
* <code>optional bool drop_request = 4;</code>
*
* <pre> * <pre>
* Indicates whether this particular request should be dropped by the client * Indicates whether this particular request should be dropped by the client
* when this server is chosen from the list. * when this server is chosen from the list.
* </pre> * </pre>
*
* <code>optional bool drop_request = 4;</code>
*/ */
boolean getDropRequest(); boolean getDropRequest();
} }

View File

@ -13,8 +13,6 @@ public final class EmptyProtos {
com.google.protobuf.MessageOrBuilder { com.google.protobuf.MessageOrBuilder {
} }
/** /**
* Protobuf type {@code grpc.testing.Empty}
*
* <pre> * <pre>
* An empty message that you can re-use to avoid defining duplicated 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 * messages in your project. A typical example is to use it as argument or the
@ -23,6 +21,8 @@ public final class EmptyProtos {
* rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; * rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
* }; * };
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.Empty}
*/ */
public static final class Empty extends public static final class Empty extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -42,7 +42,8 @@ public final class EmptyProtos {
} }
private Empty( private Empty(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder(); com.google.protobuf.UnknownFieldSet.newBuilder();
@ -64,11 +65,10 @@ public final class EmptyProtos {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
this.unknownFields = unknownFields.build(); this.unknownFields = unknownFields.build();
makeExtensionsImmutable(); makeExtensionsImmutable();
@ -135,34 +135,40 @@ public final class EmptyProtos {
} }
public static com.google.protobuf.EmptyProtos.Empty parseFrom(java.io.InputStream input) public static com.google.protobuf.EmptyProtos.Empty parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static com.google.protobuf.EmptyProtos.Empty parseFrom( public static com.google.protobuf.EmptyProtos.Empty parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static com.google.protobuf.EmptyProtos.Empty parseDelimitedFrom(java.io.InputStream input) public static com.google.protobuf.EmptyProtos.Empty parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static com.google.protobuf.EmptyProtos.Empty parseDelimitedFrom( public static com.google.protobuf.EmptyProtos.Empty parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static com.google.protobuf.EmptyProtos.Empty parseFrom( public static com.google.protobuf.EmptyProtos.Empty parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static com.google.protobuf.EmptyProtos.Empty parseFrom( public static com.google.protobuf.EmptyProtos.Empty parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -184,8 +190,6 @@ public final class EmptyProtos {
return builder; return builder;
} }
/** /**
* Protobuf type {@code grpc.testing.Empty}
*
* <pre> * <pre>
* An empty message that you can re-use to avoid defining duplicated 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 * messages in your project. A typical example is to use it as argument or the
@ -194,6 +198,8 @@ public final class EmptyProtos {
* rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; * rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { };
* }; * };
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.Empty}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -282,7 +288,7 @@ public final class EmptyProtos {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.google.protobuf.EmptyProtos.Empty) e.getUnfinishedMessage(); parsedMessage = (com.google.protobuf.EmptyProtos.Empty) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -310,16 +316,7 @@ public final class EmptyProtos {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new Empty(input, extensionRegistry); 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;
}
} }
}; };
@ -338,9 +335,9 @@ public final class EmptyProtos {
} }
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_Empty_descriptor; internal_static_grpc_testing_Empty_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_Empty_fieldAccessorTable; internal_static_grpc_testing_Empty_fieldAccessorTable;
@ -348,7 +345,7 @@ public final class EmptyProtos {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -45,11 +45,11 @@ public final class Metrics {
public io.grpc.testing.integration.Metrics.GaugeResponse.ValueCase getValueCase(); public io.grpc.testing.integration.Metrics.GaugeResponse.ValueCase getValueCase();
} }
/** /**
* Protobuf type {@code grpc.testing.GaugeResponse}
*
* <pre> * <pre>
* Reponse message containing the gauge name and value * Reponse message containing the gauge name and value
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.GaugeResponse}
*/ */
public static final class GaugeResponse extends public static final class GaugeResponse extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -70,7 +70,8 @@ public final class Metrics {
} }
private GaugeResponse( private GaugeResponse(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -112,11 +113,10 @@ public final class Metrics {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -141,18 +141,25 @@ public final class Metrics {
DOUBLE_VALUE(3), DOUBLE_VALUE(3),
STRING_VALUE(4), STRING_VALUE(4),
VALUE_NOT_SET(0); VALUE_NOT_SET(0);
private int value = 0; private final int value;
private ValueCase(int value) { private ValueCase(int value) {
this.value = value; this.value = value;
} }
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ValueCase valueOf(int value) { public static ValueCase valueOf(int value) {
return forNumber(value);
}
public static ValueCase forNumber(int value) {
switch (value) { switch (value) {
case 2: return LONG_VALUE; case 2: return LONG_VALUE;
case 3: return DOUBLE_VALUE; case 3: return DOUBLE_VALUE;
case 4: return STRING_VALUE; case 4: return STRING_VALUE;
case 0: return VALUE_NOT_SET; case 0: return VALUE_NOT_SET;
default: throw new java.lang.IllegalArgumentException( default: return null;
"Value is undefined for this oneof enum.");
} }
} }
public int getNumber() { public int getNumber() {
@ -162,7 +169,7 @@ public final class Metrics {
public ValueCase public ValueCase
getValueCase() { getValueCase() {
return ValueCase.valueOf( return ValueCase.forNumber(
valueCase_); valueCase_);
} }
@ -342,34 +349,40 @@ public final class Metrics {
} }
public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(java.io.InputStream input) public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom( public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.testing.integration.Metrics.GaugeResponse parseDelimitedFrom(java.io.InputStream input) public static io.grpc.testing.integration.Metrics.GaugeResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.GaugeResponse parseDelimitedFrom( public static io.grpc.testing.integration.Metrics.GaugeResponse parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom( public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom( public static io.grpc.testing.integration.Metrics.GaugeResponse parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -391,11 +404,11 @@ public final class Metrics {
return builder; return builder;
} }
/** /**
* Protobuf type {@code grpc.testing.GaugeResponse}
*
* <pre> * <pre>
* Reponse message containing the gauge name and value * Reponse message containing the gauge name and value
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.GaugeResponse}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -521,7 +534,7 @@ public final class Metrics {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.testing.integration.Metrics.GaugeResponse) e.getUnfinishedMessage(); parsedMessage = (io.grpc.testing.integration.Metrics.GaugeResponse) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -533,7 +546,7 @@ public final class Metrics {
private java.lang.Object value_; private java.lang.Object value_;
public ValueCase public ValueCase
getValueCase() { getValueCase() {
return ValueCase.valueOf( return ValueCase.forNumber(
valueCase_); valueCase_);
} }
@ -783,16 +796,7 @@ public final class Metrics {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new GaugeResponse(input, extensionRegistry); return new GaugeResponse(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -826,11 +830,11 @@ public final class Metrics {
getNameBytes(); getNameBytes();
} }
/** /**
* Protobuf type {@code grpc.testing.GaugeRequest}
*
* <pre> * <pre>
* Request message containing the gauge name * Request message containing the gauge name
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.GaugeRequest}
*/ */
public static final class GaugeRequest extends public static final class GaugeRequest extends
com.google.protobuf.GeneratedMessage implements com.google.protobuf.GeneratedMessage implements
@ -851,7 +855,8 @@ public final class Metrics {
} }
private GaugeRequest( private GaugeRequest(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -877,11 +882,10 @@ public final class Metrics {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -985,34 +989,40 @@ public final class Metrics {
} }
public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(java.io.InputStream input) public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom( public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.testing.integration.Metrics.GaugeRequest parseDelimitedFrom(java.io.InputStream input) public static io.grpc.testing.integration.Metrics.GaugeRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.GaugeRequest parseDelimitedFrom( public static io.grpc.testing.integration.Metrics.GaugeRequest parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom( public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom( public static io.grpc.testing.integration.Metrics.GaugeRequest parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -1034,11 +1044,11 @@ public final class Metrics {
return builder; return builder;
} }
/** /**
* Protobuf type {@code grpc.testing.GaugeRequest}
*
* <pre> * <pre>
* Request message containing the gauge name * Request message containing the gauge name
* </pre> * </pre>
*
* Protobuf type {@code grpc.testing.GaugeRequest}
*/ */
public static final class Builder extends public static final class Builder extends
com.google.protobuf.GeneratedMessage.Builder<Builder> implements com.google.protobuf.GeneratedMessage.Builder<Builder> implements
@ -1133,7 +1143,7 @@ public final class Metrics {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.testing.integration.Metrics.GaugeRequest) e.getUnfinishedMessage(); parsedMessage = (io.grpc.testing.integration.Metrics.GaugeRequest) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -1240,16 +1250,7 @@ public final class Metrics {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new GaugeRequest(input, extensionRegistry); return new GaugeRequest(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -1293,7 +1294,8 @@ public final class Metrics {
} }
private EmptyMessage( private EmptyMessage(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
try { try {
boolean done = false; boolean done = false;
@ -1312,11 +1314,10 @@ public final class Metrics {
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -1380,34 +1381,40 @@ public final class Metrics {
} }
public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(java.io.InputStream input) public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom( public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.testing.integration.Metrics.EmptyMessage parseDelimitedFrom(java.io.InputStream input) public static io.grpc.testing.integration.Metrics.EmptyMessage parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.EmptyMessage parseDelimitedFrom( public static io.grpc.testing.integration.Metrics.EmptyMessage parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom( public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom( public static io.grpc.testing.integration.Metrics.EmptyMessage parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -1517,7 +1524,7 @@ public final class Metrics {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.testing.integration.Metrics.EmptyMessage) e.getUnfinishedMessage(); parsedMessage = (io.grpc.testing.integration.Metrics.EmptyMessage) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -1555,16 +1562,7 @@ public final class Metrics {
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new EmptyMessage(input, extensionRegistry); return new EmptyMessage(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };
@ -1583,19 +1581,19 @@ public final class Metrics {
} }
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_GaugeResponse_descriptor; internal_static_grpc_testing_GaugeResponse_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_GaugeResponse_fieldAccessorTable; internal_static_grpc_testing_GaugeResponse_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_GaugeRequest_descriptor; internal_static_grpc_testing_GaugeRequest_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_GaugeRequest_fieldAccessorTable; internal_static_grpc_testing_GaugeRequest_fieldAccessorTable;
private static com.google.protobuf.Descriptors.Descriptor private static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_EmptyMessage_descriptor; internal_static_grpc_testing_EmptyMessage_descriptor;
private static private static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_EmptyMessage_fieldAccessorTable; internal_static_grpc_testing_EmptyMessage_fieldAccessorTable;
@ -1603,7 +1601,7 @@ public final class Metrics {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -13,7 +13,7 @@ public final class Test {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {

View File

@ -25,7 +25,8 @@ public final class HealthCheckRequest extends
} }
private HealthCheckRequest( private HealthCheckRequest(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -51,11 +52,10 @@ public final class HealthCheckRequest extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -159,34 +159,40 @@ public final class HealthCheckRequest extends
} }
public static io.grpc.health.v1.HealthCheckRequest parseFrom(java.io.InputStream input) public static io.grpc.health.v1.HealthCheckRequest parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.health.v1.HealthCheckRequest parseFrom( public static io.grpc.health.v1.HealthCheckRequest parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.health.v1.HealthCheckRequest parseDelimitedFrom(java.io.InputStream input) public static io.grpc.health.v1.HealthCheckRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.health.v1.HealthCheckRequest parseDelimitedFrom( public static io.grpc.health.v1.HealthCheckRequest parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.health.v1.HealthCheckRequest parseFrom( public static io.grpc.health.v1.HealthCheckRequest parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.health.v1.HealthCheckRequest parseFrom( public static io.grpc.health.v1.HealthCheckRequest parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -303,7 +309,7 @@ public final class HealthCheckRequest extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.health.v1.HealthCheckRequest) e.getUnfinishedMessage(); parsedMessage = (io.grpc.health.v1.HealthCheckRequest) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -410,16 +416,7 @@ public final class HealthCheckRequest extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new HealthCheckRequest(input, extensionRegistry); return new HealthCheckRequest(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -25,7 +25,8 @@ public final class HealthCheckResponse extends
} }
private HealthCheckResponse( private HealthCheckResponse(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) { com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this(); this();
int mutable_bitField0_ = 0; int mutable_bitField0_ = 0;
try { try {
@ -51,11 +52,10 @@ public final class HealthCheckResponse extends
} }
} }
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw new RuntimeException(e.setUnfinishedMessage(this)); throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) { } catch (java.io.IOException e) {
throw new RuntimeException( throw new com.google.protobuf.InvalidProtocolBufferException(
new com.google.protobuf.InvalidProtocolBufferException( e).setUnfinishedMessage(this);
e.getMessage()).setUnfinishedMessage(this));
} finally { } finally {
makeExtensionsImmutable(); makeExtensionsImmutable();
} }
@ -80,16 +80,16 @@ public final class HealthCheckResponse extends
/** /**
* <code>UNKNOWN = 0;</code> * <code>UNKNOWN = 0;</code>
*/ */
UNKNOWN(0, 0), UNKNOWN(0),
/** /**
* <code>SERVING = 1;</code> * <code>SERVING = 1;</code>
*/ */
SERVING(1, 1), SERVING(1),
/** /**
* <code>NOT_SERVING = 2;</code> * <code>NOT_SERVING = 2;</code>
*/ */
NOT_SERVING(2, 2), NOT_SERVING(2),
UNRECOGNIZED(-1, -1), UNRECOGNIZED(-1),
; ;
/** /**
@ -107,14 +107,22 @@ public final class HealthCheckResponse extends
public final int getNumber() { public final int getNumber() {
if (index == -1) { if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException( throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value."); "Can't get the number of an unknown enum value.");
} }
return value; return value;
} }
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ServingStatus valueOf(int value) { public static ServingStatus valueOf(int value) {
return forNumber(value);
}
public static ServingStatus forNumber(int value) {
switch (value) { switch (value) {
case 0: return UNKNOWN; case 0: return UNKNOWN;
case 1: return SERVING; case 1: return SERVING;
@ -131,13 +139,13 @@ public final class HealthCheckResponse extends
ServingStatus> internalValueMap = ServingStatus> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<ServingStatus>() { new com.google.protobuf.Internal.EnumLiteMap<ServingStatus>() {
public ServingStatus findValueByNumber(int number) { public ServingStatus findValueByNumber(int number) {
return ServingStatus.valueOf(number); return ServingStatus.forNumber(number);
} }
}; };
public final com.google.protobuf.Descriptors.EnumValueDescriptor public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() { getValueDescriptor() {
return getDescriptor().getValues().get(index); return getDescriptor().getValues().get(ordinal());
} }
public final com.google.protobuf.Descriptors.EnumDescriptor public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() { getDescriptorForType() {
@ -162,11 +170,9 @@ public final class HealthCheckResponse extends
return VALUES[desc.getIndex()]; return VALUES[desc.getIndex()];
} }
private final int index;
private final int value; private final int value;
private ServingStatus(int index, int value) { private ServingStatus(int value) {
this.index = index;
this.value = value; this.value = value;
} }
@ -185,7 +191,7 @@ public final class HealthCheckResponse extends
* <code>optional .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1;</code> * <code>optional .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1;</code>
*/ */
public io.grpc.health.v1.HealthCheckResponse.ServingStatus getStatus() { public io.grpc.health.v1.HealthCheckResponse.ServingStatus getStatus() {
io.grpc.health.v1.HealthCheckResponse.ServingStatus result = io.grpc.health.v1.HealthCheckResponse.ServingStatus.valueOf(status_); io.grpc.health.v1.HealthCheckResponse.ServingStatus result = io.grpc.health.v1.HealthCheckResponse.ServingStatus.forNumber(status_);
return result == null ? io.grpc.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result; return result == null ? io.grpc.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result;
} }
@ -243,34 +249,40 @@ public final class HealthCheckResponse extends
} }
public static io.grpc.health.v1.HealthCheckResponse parseFrom(java.io.InputStream input) public static io.grpc.health.v1.HealthCheckResponse parseFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.health.v1.HealthCheckResponse parseFrom( public static io.grpc.health.v1.HealthCheckResponse parseFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.health.v1.HealthCheckResponse parseDelimitedFrom(java.io.InputStream input) public static io.grpc.health.v1.HealthCheckResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input);
} }
public static io.grpc.health.v1.HealthCheckResponse parseDelimitedFrom( public static io.grpc.health.v1.HealthCheckResponse parseDelimitedFrom(
java.io.InputStream input, java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseDelimitedFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
} }
public static io.grpc.health.v1.HealthCheckResponse parseFrom( public static io.grpc.health.v1.HealthCheckResponse parseFrom(
com.google.protobuf.CodedInputStream input) com.google.protobuf.CodedInputStream input)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input);
} }
public static io.grpc.health.v1.HealthCheckResponse parseFrom( public static io.grpc.health.v1.HealthCheckResponse parseFrom(
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException { throws java.io.IOException {
return PARSER.parseFrom(input, extensionRegistry); return com.google.protobuf.GeneratedMessage
.parseWithIOException(PARSER, input, extensionRegistry);
} }
public Builder newBuilderForType() { return newBuilder(); } public Builder newBuilderForType() { return newBuilder(); }
@ -386,7 +398,7 @@ public final class HealthCheckResponse extends
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) { } catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (io.grpc.health.v1.HealthCheckResponse) e.getUnfinishedMessage(); parsedMessage = (io.grpc.health.v1.HealthCheckResponse) e.getUnfinishedMessage();
throw e; throw e.unwrapIOException();
} finally { } finally {
if (parsedMessage != null) { if (parsedMessage != null) {
mergeFrom(parsedMessage); mergeFrom(parsedMessage);
@ -414,7 +426,7 @@ public final class HealthCheckResponse extends
* <code>optional .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1;</code> * <code>optional .grpc.health.v1.HealthCheckResponse.ServingStatus status = 1;</code>
*/ */
public io.grpc.health.v1.HealthCheckResponse.ServingStatus getStatus() { public io.grpc.health.v1.HealthCheckResponse.ServingStatus getStatus() {
io.grpc.health.v1.HealthCheckResponse.ServingStatus result = io.grpc.health.v1.HealthCheckResponse.ServingStatus.valueOf(status_); io.grpc.health.v1.HealthCheckResponse.ServingStatus result = io.grpc.health.v1.HealthCheckResponse.ServingStatus.forNumber(status_);
return result == null ? io.grpc.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result; return result == null ? io.grpc.health.v1.HealthCheckResponse.ServingStatus.UNRECOGNIZED : result;
} }
/** /**
@ -468,16 +480,7 @@ public final class HealthCheckResponse extends
com.google.protobuf.CodedInputStream input, com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException { throws com.google.protobuf.InvalidProtocolBufferException {
try {
return new HealthCheckResponse(input, extensionRegistry); return new HealthCheckResponse(input, extensionRegistry);
} catch (RuntimeException e) {
if (e.getCause() instanceof
com.google.protobuf.InvalidProtocolBufferException) {
throw (com.google.protobuf.InvalidProtocolBufferException)
e.getCause();
}
throw e;
}
} }
}; };

View File

@ -8,14 +8,14 @@ public final class HealthProto {
public static void registerAllExtensions( public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) { com.google.protobuf.ExtensionRegistry registry) {
} }
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_health_v1_HealthCheckRequest_descriptor; internal_static_grpc_health_v1_HealthCheckRequest_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_health_v1_HealthCheckRequest_fieldAccessorTable; internal_static_grpc_health_v1_HealthCheckRequest_fieldAccessorTable;
static com.google.protobuf.Descriptors.Descriptor static final com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_health_v1_HealthCheckResponse_descriptor; internal_static_grpc_health_v1_HealthCheckResponse_descriptor;
static static final
com.google.protobuf.GeneratedMessage.FieldAccessorTable com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_health_v1_HealthCheckResponse_fieldAccessorTable; internal_static_grpc_health_v1_HealthCheckResponse_fieldAccessorTable;
@ -23,7 +23,7 @@ public final class HealthProto {
getDescriptor() { getDescriptor() {
return descriptor; return descriptor;
} }
private static com.google.protobuf.Descriptors.FileDescriptor private static com.google.protobuf.Descriptors.FileDescriptor
descriptor; descriptor;
static { static {
java.lang.String[] descriptorData = { java.lang.String[] descriptorData = {