diff --git a/README.md b/README.md
index c70213b..2e80f6b 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
# kafka-connect-protobuf-converter
Converter plugin for [Kafka Connect](https://docs.confluent.io/current/connect/). A converter
-controls the format of the data that will be written to Kafka for source connectors or
+controls the format of the data that will be written to Kafka for source connectors or
read from Kafka for sink connectors.
## Compatibility
@@ -11,7 +11,7 @@ The 2.x release series is compatible with Kafka Connect 5.x. and up (older relea
## Usage
-Copy the `kafka-connect-protobuf-converter` jar and the jar containing your compiled protocol buffers to
+Copy the `kafka-connect-protobuf-converter` jar and the jar containing your compiled protocol buffers to
`/usr/share/java/kafka-serde-tools` on your Kafka Connect instance and restart Kafka Connect.
Converters can be specified on a per-connector basis.
@@ -19,7 +19,7 @@ Converters can be specified on a per-connector basis.
To use the protobuf converter in Kafka Connect, specify the converter as your key and value converter and specify the
protocol buffer class you want to use to deserialize the message (ex: `com.google.protobuf.Int32Value`).
-Note: Nested classes must be specified using the `$` notation, for example
+Note: Nested classes must be specified using the `$` notation, for example
`com.blueapron.connect.protobuf.NestedTestProtoOuterClass$NestedTestProto`
Example Kafka Connect JDBC source:
@@ -105,7 +105,7 @@ original name and keep the Kafka Connect schema consistent.
You can specify the name for this field option using the `legacyName` configuration item. By default, the field option
used is `legacy_name`
-Example: `value.converter.legacyName=legacy_name`
+Example: `value.converter.legacyName=blueapron.connect.protobuf.legacy_name`
This annotation provides a hint that allows renamed fields to be mapped to correctly to their output schema names.
@@ -127,7 +127,7 @@ import "path/to/LegacyName.proto";
message TestMessage {
string yet_another_named_string = 1 [(blueapron.connect.protobuf.legacy_name) = "test_string"];
-}
+}
```
@@ -166,8 +166,8 @@ mvn test
mvn clean package
```
-Copy the JAR with dependencies (`kafka-connect-protobuf-converter-*-jar-with-dependencies.jar`) to
-`/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the
+Copy the JAR with dependencies (`kafka-connect-protobuf-converter-*-jar-with-dependencies.jar`) to
+`/usr/share/java/kafka-serde-tools` on your local Kafka Connect instance to make the
converter available in Kafka Connect.
#### Deploy to Maven Central:
@@ -194,3 +194,10 @@ converter available in Kafka Connect.
```
mvn release:perform
```
+
+#### Generate protos:
+
+ Run the below command from the repository root.
+ ```
+ protoc -I=src/test/java/com/blueapron/connect/protobuf/protos --java_out=src/test/java/ src/test/java/com/blueapron/connect/protobuf/protos/*.proto
+ ```
diff --git a/pom.xml b/pom.xml
index 17a993e..bddf7d2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.blueapron
kafka-connect-protobuf-converter
jar
- 2.3.1-SNAPSHOT
+ 3.0.0-SNAPSHOT
com.blueapron:kafka-connect-protobuf-converter
Converter plugin for Kafka Connect. A converter controls the format of the data
diff --git a/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java b/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java
index e4afc53..0013d38 100644
--- a/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java
+++ b/src/main/java/com/blueapron/connect/protobuf/ProtobufData.java
@@ -73,7 +73,7 @@ private String getProtoMapKey(String descriptorContainingTypeName, String connec
private String getConnectFieldName(Descriptors.FieldDescriptor descriptor) {
String name = descriptor.getName();
for (Map.Entry option: descriptor.getOptions().getAllFields().entrySet()) {
- if (option.getKey().getName().equalsIgnoreCase(this.legacyName)) {
+ if (option.getKey().getFullName().equalsIgnoreCase(this.legacyName)) {
name = option.getValue().toString();
}
}
diff --git a/src/test/java/com/blueapron/connect/protobuf/BytesValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/BytesValueOuterClass.java
index 9311605..1dc2724 100644
--- a/src/test/java/com/blueapron/connect/protobuf/BytesValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/BytesValueOuterClass.java
@@ -20,6 +20,7 @@ public interface BytesValueOrBuilder extends
/**
* bytes value = 1;
+ * @return The value.
*/
com.google.protobuf.ByteString getValue();
}
@@ -39,6 +40,13 @@ private BytesValue() {
value_ = com.google.protobuf.ByteString.EMPTY;
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new BytesValue();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -52,7 +60,6 @@ private BytesValue(
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
- int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -63,18 +70,18 @@ private BytesValue(
case 0:
done = true;
break;
+ case 10: {
+
+ value_ = input.readBytes();
+ break;
+ }
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
- case 10: {
-
- value_ = input.readBytes();
- break;
- }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -92,6 +99,7 @@ private BytesValue(
return com.blueapron.connect.protobuf.BytesValueOuterClass.internal_static_BytesValue_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.BytesValueOuterClass.internal_static_BytesValue_fieldAccessorTable
@@ -103,12 +111,14 @@ private BytesValue(
private com.google.protobuf.ByteString value_;
/**
* bytes value = 1;
+ * @return The value.
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -118,6 +128,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!value_.isEmpty()) {
@@ -126,6 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -150,11 +162,10 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue other = (com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue) obj;
- boolean result = true;
- result = result && getValue()
- .equals(other.getValue());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getValue()
+ .equals(other.getValue())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -241,6 +252,7 @@ public static com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue par
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -248,6 +260,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -271,6 +284,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.BytesValueOuterClass.internal_static_BytesValue_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.BytesValueOuterClass.internal_static_BytesValue_fieldAccessorTable
@@ -293,6 +307,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
value_ = com.google.protobuf.ByteString.EMPTY;
@@ -300,15 +315,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.BytesValueOuterClass.internal_static_BytesValue_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue build() {
com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue result = buildPartial();
if (!result.isInitialized()) {
@@ -317,6 +335,7 @@ public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue build() {
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue buildPartial() {
com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue result = new com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue(this);
result.value_ = value_;
@@ -324,32 +343,39 @@ public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue buildParti
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue) {
return mergeFrom((com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue)other);
@@ -369,10 +395,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.BytesValueOuterClass.Byt
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -394,12 +422,15 @@ public Builder mergeFrom(
private com.google.protobuf.ByteString value_ = com.google.protobuf.ByteString.EMPTY;
/**
* bytes value = 1;
+ * @return The value.
*/
public com.google.protobuf.ByteString getValue() {
return value_;
}
/**
* bytes value = 1;
+ * @param value The value to set.
+ * @return This builder for chaining.
*/
public Builder setValue(com.google.protobuf.ByteString value) {
if (value == null) {
@@ -412,6 +443,7 @@ public Builder setValue(com.google.protobuf.ByteString value) {
}
/**
* bytes value = 1;
+ * @return This builder for chaining.
*/
public Builder clearValue() {
@@ -419,11 +451,13 @@ public Builder clearValue() {
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -445,6 +479,7 @@ public static com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue get
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public BytesValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -462,6 +497,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -486,18 +522,10 @@ public com.blueapron.connect.protobuf.BytesValueOuterClass.BytesValue getDefault
"e\030\001 \001(\014B \n\036com.blueapron.connect.protobu" +
"fb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
+ });
internal_static_BytesValue_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_BytesValue_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/DateValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/DateValueOuterClass.java
index 1d31071..ca7afad 100644
--- a/src/test/java/com/blueapron/connect/protobuf/DateValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/DateValueOuterClass.java
@@ -24,6 +24,7 @@ public interface DateValueOrBuilder extends
*
*
* .google.type.Date value = 1;
+ * @return Whether the value field is set.
*/
boolean hasValue();
/**
@@ -32,6 +33,7 @@ public interface DateValueOrBuilder extends
*
*
* .google.type.Date value = 1;
+ * @return The value.
*/
com.google.type.Date getValue();
/**
@@ -62,6 +64,13 @@ private DateValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
private DateValue() {
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new DateValue();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -72,7 +81,9 @@ private DateValue(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -83,13 +94,6 @@ private DateValue(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
com.google.type.Date.Builder subBuilder = null;
if (value_ != null) {
@@ -103,6 +107,13 @@ private DateValue(
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -120,6 +131,7 @@ private DateValue(
return com.blueapron.connect.protobuf.DateValueOuterClass.internal_static_DateValue_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.DateValueOuterClass.internal_static_DateValue_fieldAccessorTable
@@ -135,6 +147,7 @@ private DateValue(
*
*
* .google.type.Date value = 1;
+ * @return Whether the value field is set.
*/
public boolean hasValue() {
return value_ != null;
@@ -145,6 +158,7 @@ public boolean hasValue() {
*
*
* .google.type.Date value = 1;
+ * @return The value.
*/
public com.google.type.Date getValue() {
return value_ == null ? com.google.type.Date.getDefaultInstance() : value_;
@@ -161,6 +175,7 @@ public com.google.type.DateOrBuilder getValueOrBuilder() {
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -170,6 +185,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (value_ != null) {
@@ -178,6 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -202,14 +219,13 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.DateValueOuterClass.DateValue other = (com.blueapron.connect.protobuf.DateValueOuterClass.DateValue) obj;
- boolean result = true;
- result = result && (hasValue() == other.hasValue());
+ if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
- result = result && getValue()
- .equals(other.getValue());
+ if (!getValue()
+ .equals(other.getValue())) return false;
}
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -298,6 +314,7 @@ public static com.blueapron.connect.protobuf.DateValueOuterClass.DateValue parse
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -305,6 +322,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.DateValueOuterClass.DateValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -332,6 +350,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.DateValueOuterClass.internal_static_DateValue_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.DateValueOuterClass.internal_static_DateValue_fieldAccessorTable
@@ -354,6 +373,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
if (valueBuilder_ == null) {
@@ -365,15 +385,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.DateValueOuterClass.internal_static_DateValue_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.DateValueOuterClass.DateValue.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue build() {
com.blueapron.connect.protobuf.DateValueOuterClass.DateValue result = buildPartial();
if (!result.isInitialized()) {
@@ -382,6 +405,7 @@ public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue build() {
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue buildPartial() {
com.blueapron.connect.protobuf.DateValueOuterClass.DateValue result = new com.blueapron.connect.protobuf.DateValueOuterClass.DateValue(this);
if (valueBuilder_ == null) {
@@ -393,32 +417,39 @@ public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue buildPartial
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.DateValueOuterClass.DateValue) {
return mergeFrom((com.blueapron.connect.protobuf.DateValueOuterClass.DateValue)other);
@@ -438,10 +469,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.DateValueOuterClass.Date
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -460,7 +493,7 @@ public Builder mergeFrom(
return this;
}
- private com.google.type.Date value_ = null;
+ private com.google.type.Date value_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder> valueBuilder_;
/**
@@ -469,6 +502,7 @@ public Builder mergeFrom(
*
*
* .google.type.Date value = 1;
+ * @return Whether the value field is set.
*/
public boolean hasValue() {
return valueBuilder_ != null || value_ != null;
@@ -479,6 +513,7 @@ public boolean hasValue() {
*
*
* .google.type.Date value = 1;
+ * @return The value.
*/
public com.google.type.Date getValue() {
if (valueBuilder_ == null) {
@@ -612,11 +647,13 @@ public com.google.type.DateOrBuilder getValueOrBuilder() {
}
return valueBuilder_;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -638,11 +675,12 @@ public static com.blueapron.connect.protobuf.DateValueOuterClass.DateValue getDe
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public DateValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new DateValue(input, extensionRegistry);
+ return new DateValue(input, extensionRegistry);
}
};
@@ -655,6 +693,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -680,19 +719,11 @@ public com.blueapron.connect.protobuf.DateValueOuterClass.DateValue getDefaultIn
"ype.DateB \n\036com.blueapron.connect.protob" +
"ufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.type.DateProto.getDescriptor(),
- }, assigner);
+ });
internal_static_DateValue_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_DateValue_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/LegacyName.java b/src/test/java/com/blueapron/connect/protobuf/LegacyName.java
new file mode 100644
index 0000000..c6a5008
--- /dev/null
+++ b/src/test/java/com/blueapron/connect/protobuf/LegacyName.java
@@ -0,0 +1,54 @@
+// Generated by the protocol buffer compiler. DO NOT EDIT!
+// source: LegacyName.proto
+
+package com.blueapron.connect.protobuf;
+
+public final class LegacyName {
+ private LegacyName() {}
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistryLite registry) {
+ registry.add(com.blueapron.connect.protobuf.LegacyName.legacyName);
+ }
+
+ public static void registerAllExtensions(
+ com.google.protobuf.ExtensionRegistry registry) {
+ registerAllExtensions(
+ (com.google.protobuf.ExtensionRegistryLite) registry);
+ }
+ public static final int LEGACY_NAME_FIELD_NUMBER = 60000;
+ /**
+ * extend .google.protobuf.FieldOptions { ... }
+ */
+ public static final
+ com.google.protobuf.GeneratedMessage.GeneratedExtension<
+ com.google.protobuf.DescriptorProtos.FieldOptions,
+ java.lang.String> legacyName = com.google.protobuf.GeneratedMessage
+ .newFileScopedGeneratedExtension(
+ java.lang.String.class,
+ null);
+
+ public static com.google.protobuf.Descriptors.FileDescriptor
+ getDescriptor() {
+ return descriptor;
+ }
+ private static com.google.protobuf.Descriptors.FileDescriptor
+ descriptor;
+ static {
+ java.lang.String[] descriptorData = {
+ "\n\020LegacyName.proto\022\032blueapron.connect.pr" +
+ "otobuf\032 google/protobuf/descriptor.proto" +
+ ":4\n\013legacy_name\022\035.google.protobuf.FieldO" +
+ "ptions\030\340\324\003 \001(\tB \n\036com.blueapron.connect." +
+ "protobufb\006proto3"
+ };
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
+ .internalBuildGeneratedFileFrom(descriptorData,
+ new com.google.protobuf.Descriptors.FileDescriptor[] {
+ com.google.protobuf.DescriptorProtos.getDescriptor(),
+ });
+ legacyName.internalInit(descriptor.getExtensions().get(0));
+ com.google.protobuf.DescriptorProtos.getDescriptor();
+ }
+
+ // @@protoc_insertion_point(outer_class_scope)
+}
diff --git a/src/test/java/com/blueapron/connect/protobuf/NestedTestProtoOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/NestedTestProtoOuterClass.java
index 5e5935a..b7d3f6f 100644
--- a/src/test/java/com/blueapron/connect/protobuf/NestedTestProtoOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/NestedTestProtoOuterClass.java
@@ -49,6 +49,8 @@ public final int getNumber() {
}
/**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
@@ -56,6 +58,10 @@ public static Status valueOf(int value) {
return forNumber(value);
}
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
public static Status forNumber(int value) {
switch (value) {
case 0: return ACTIVE;
@@ -118,25 +124,30 @@ public interface UserIdOrBuilder extends
/**
* string ba_com_user_id = 1;
+ * @return The baComUserId.
*/
java.lang.String getBaComUserId();
/**
* string ba_com_user_id = 1;
+ * @return The bytes for baComUserId.
*/
com.google.protobuf.ByteString
getBaComUserIdBytes();
/**
* int32 other_user_id = 2;
+ * @return The otherUserId.
*/
int getOtherUserId();
/**
* .blueapron.connect.protobuf.MessageId another_id = 3;
+ * @return Whether the anotherId field is set.
*/
boolean hasAnotherId();
/**
* .blueapron.connect.protobuf.MessageId another_id = 3;
+ * @return The anotherId.
*/
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId getAnotherId();
/**
@@ -161,6 +172,13 @@ private UserId(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
private UserId() {
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new UserId();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -171,7 +189,9 @@ private UserId(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -182,13 +202,6 @@ private UserId(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
java.lang.String s = input.readStringRequireUtf8();
userIdCase_ = 1;
@@ -214,6 +227,13 @@ private UserId(
userIdCase_ = 3;
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -231,6 +251,7 @@ private UserId(
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_UserId_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_UserId_fieldAccessorTable
@@ -241,7 +262,8 @@ private UserId(
private int userIdCase_ = 0;
private java.lang.Object userId_;
public enum UserIdCase
- implements com.google.protobuf.Internal.EnumLite {
+ implements com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
BA_COM_USER_ID(1),
OTHER_USER_ID(2),
ANOTHER_ID(3),
@@ -251,6 +273,8 @@ private UserIdCase(int value) {
this.value = value;
}
/**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
@@ -281,6 +305,7 @@ public int getNumber() {
public static final int BA_COM_USER_ID_FIELD_NUMBER = 1;
/**
* string ba_com_user_id = 1;
+ * @return The baComUserId.
*/
public java.lang.String getBaComUserId() {
java.lang.Object ref = "";
@@ -301,6 +326,7 @@ public java.lang.String getBaComUserId() {
}
/**
* string ba_com_user_id = 1;
+ * @return The bytes for baComUserId.
*/
public com.google.protobuf.ByteString
getBaComUserIdBytes() {
@@ -324,6 +350,7 @@ public java.lang.String getBaComUserId() {
public static final int OTHER_USER_ID_FIELD_NUMBER = 2;
/**
* int32 other_user_id = 2;
+ * @return The otherUserId.
*/
public int getOtherUserId() {
if (userIdCase_ == 2) {
@@ -335,12 +362,14 @@ public int getOtherUserId() {
public static final int ANOTHER_ID_FIELD_NUMBER = 3;
/**
* .blueapron.connect.protobuf.MessageId another_id = 3;
+ * @return Whether the anotherId field is set.
*/
public boolean hasAnotherId() {
return userIdCase_ == 3;
}
/**
* .blueapron.connect.protobuf.MessageId another_id = 3;
+ * @return The anotherId.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId getAnotherId() {
if (userIdCase_ == 3) {
@@ -359,6 +388,7 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageIdOrBuild
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -368,6 +398,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (userIdCase_ == 1) {
@@ -383,6 +414,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -415,28 +447,25 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId other = (com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId) obj;
- boolean result = true;
- result = result && getUserIdCase().equals(
- other.getUserIdCase());
- if (!result) return false;
+ if (!getUserIdCase().equals(other.getUserIdCase())) return false;
switch (userIdCase_) {
case 1:
- result = result && getBaComUserId()
- .equals(other.getBaComUserId());
+ if (!getBaComUserId()
+ .equals(other.getBaComUserId())) return false;
break;
case 2:
- result = result && (getOtherUserId()
- == other.getOtherUserId());
+ if (getOtherUserId()
+ != other.getOtherUserId()) return false;
break;
case 3:
- result = result && getAnotherId()
- .equals(other.getAnotherId());
+ if (!getAnotherId()
+ .equals(other.getAnotherId())) return false;
break;
case 0:
default:
}
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -537,6 +566,7 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId pa
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -544,6 +574,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -567,6 +598,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_UserId_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_UserId_fieldAccessorTable
@@ -589,6 +621,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
userIdCase_ = 0;
@@ -596,15 +629,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_UserId_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId build() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId result = buildPartial();
if (!result.isInitialized()) {
@@ -613,6 +649,7 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId build() {
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId buildPartial() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId result = new com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId(this);
if (userIdCase_ == 1) {
@@ -633,32 +670,39 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId buildPart
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId) {
return mergeFrom((com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId)other);
@@ -694,10 +738,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.NestedTestProtoOuterClas
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -733,6 +779,7 @@ public Builder clearUserId() {
/**
* string ba_com_user_id = 1;
+ * @return The baComUserId.
*/
public java.lang.String getBaComUserId() {
java.lang.Object ref = "";
@@ -753,6 +800,7 @@ public java.lang.String getBaComUserId() {
}
/**
* string ba_com_user_id = 1;
+ * @return The bytes for baComUserId.
*/
public com.google.protobuf.ByteString
getBaComUserIdBytes() {
@@ -774,6 +822,8 @@ public java.lang.String getBaComUserId() {
}
/**
* string ba_com_user_id = 1;
+ * @param value The baComUserId to set.
+ * @return This builder for chaining.
*/
public Builder setBaComUserId(
java.lang.String value) {
@@ -787,6 +837,7 @@ public Builder setBaComUserId(
}
/**
* string ba_com_user_id = 1;
+ * @return This builder for chaining.
*/
public Builder clearBaComUserId() {
if (userIdCase_ == 1) {
@@ -798,6 +849,8 @@ public Builder clearBaComUserId() {
}
/**
* string ba_com_user_id = 1;
+ * @param value The bytes for baComUserId to set.
+ * @return This builder for chaining.
*/
public Builder setBaComUserIdBytes(
com.google.protobuf.ByteString value) {
@@ -813,6 +866,7 @@ public Builder setBaComUserIdBytes(
/**
* int32 other_user_id = 2;
+ * @return The otherUserId.
*/
public int getOtherUserId() {
if (userIdCase_ == 2) {
@@ -822,6 +876,8 @@ public int getOtherUserId() {
}
/**
* int32 other_user_id = 2;
+ * @param value The otherUserId to set.
+ * @return This builder for chaining.
*/
public Builder setOtherUserId(int value) {
userIdCase_ = 2;
@@ -831,6 +887,7 @@ public Builder setOtherUserId(int value) {
}
/**
* int32 other_user_id = 2;
+ * @return This builder for chaining.
*/
public Builder clearOtherUserId() {
if (userIdCase_ == 2) {
@@ -845,12 +902,14 @@ public Builder clearOtherUserId() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId.Builder, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageIdOrBuilder> anotherIdBuilder_;
/**
* .blueapron.connect.protobuf.MessageId another_id = 3;
+ * @return Whether the anotherId field is set.
*/
public boolean hasAnotherId() {
return userIdCase_ == 3;
}
/**
* .blueapron.connect.protobuf.MessageId another_id = 3;
+ * @return The anotherId.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId getAnotherId() {
if (anotherIdBuilder_ == null) {
@@ -976,11 +1035,13 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageIdOrBuild
onChanged();;
return anotherIdBuilder_;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -1002,11 +1063,12 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId ge
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public UserId parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new UserId(input, extensionRegistry);
+ return new UserId(input, extensionRegistry);
}
};
@@ -1019,6 +1081,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -1031,10 +1094,12 @@ public interface MessageIdOrBuilder extends
/**
* string id = 1;
+ * @return The id.
*/
java.lang.String getId();
/**
* string id = 1;
+ * @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
@@ -1055,6 +1120,13 @@ private MessageId() {
id_ = "";
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new MessageId();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -1065,7 +1137,9 @@ private MessageId(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -1076,19 +1150,19 @@ private MessageId(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
java.lang.String s = input.readStringRequireUtf8();
id_ = s;
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1106,6 +1180,7 @@ private MessageId(
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_MessageId_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_MessageId_fieldAccessorTable
@@ -1117,6 +1192,7 @@ private MessageId(
private volatile java.lang.Object id_;
/**
* string id = 1;
+ * @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
@@ -1132,6 +1208,7 @@ public java.lang.String getId() {
}
/**
* string id = 1;
+ * @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
@@ -1148,6 +1225,7 @@ public java.lang.String getId() {
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -1157,6 +1235,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getIdBytes().isEmpty()) {
@@ -1165,6 +1244,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -1188,11 +1268,10 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId other = (com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId) obj;
- boolean result = true;
- result = result && getId()
- .equals(other.getId());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getId()
+ .equals(other.getId())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -1279,6 +1358,7 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -1286,6 +1366,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -1309,6 +1390,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_MessageId_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_MessageId_fieldAccessorTable
@@ -1331,6 +1413,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
id_ = "";
@@ -1338,15 +1421,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_MessageId_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId build() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId result = buildPartial();
if (!result.isInitialized()) {
@@ -1355,6 +1441,7 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId build(
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId buildPartial() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId result = new com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId(this);
result.id_ = id_;
@@ -1362,32 +1449,39 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId buildP
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId) {
return mergeFrom((com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId)other);
@@ -1408,10 +1502,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.NestedTestProtoOuterClas
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -1433,6 +1529,7 @@ public Builder mergeFrom(
private java.lang.Object id_ = "";
/**
* string id = 1;
+ * @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
@@ -1448,6 +1545,7 @@ public java.lang.String getId() {
}
/**
* string id = 1;
+ * @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
@@ -1464,6 +1562,8 @@ public java.lang.String getId() {
}
/**
* string id = 1;
+ * @param value The id to set.
+ * @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
@@ -1477,6 +1577,7 @@ public Builder setId(
}
/**
* string id = 1;
+ * @return This builder for chaining.
*/
public Builder clearId() {
@@ -1486,6 +1587,8 @@ public Builder clearId() {
}
/**
* string id = 1;
+ * @param value The bytes for id to set.
+ * @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
@@ -1498,11 +1601,13 @@ public Builder setIdBytes(
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -1524,11 +1629,12 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public MessageId parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new MessageId(input, extensionRegistry);
+ return new MessageId(input, extensionRegistry);
}
};
@@ -1541,6 +1647,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.MessageId getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -1553,21 +1660,25 @@ public interface ComplexTypeOrBuilder extends
/**
* string one_id = 1;
+ * @return The oneId.
*/
java.lang.String getOneId();
/**
* string one_id = 1;
+ * @return The bytes for oneId.
*/
com.google.protobuf.ByteString
getOneIdBytes();
/**
* int32 other_id = 2;
+ * @return The otherId.
*/
int getOtherId();
/**
* bool is_active = 3;
+ * @return The isActive.
*/
boolean getIsActive();
@@ -1586,7 +1697,13 @@ private ComplexType(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ComplexType() {
- isActive_ = false;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new ComplexType();
}
@java.lang.Override
@@ -1599,7 +1716,9 @@ private ComplexType(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -1610,13 +1729,6 @@ private ComplexType(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
java.lang.String s = input.readStringRequireUtf8();
someValCase_ = 1;
@@ -1633,6 +1745,13 @@ private ComplexType(
isActive_ = input.readBool();
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -1650,6 +1769,7 @@ private ComplexType(
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_ComplexType_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_ComplexType_fieldAccessorTable
@@ -1660,7 +1780,8 @@ private ComplexType(
private int someValCase_ = 0;
private java.lang.Object someVal_;
public enum SomeValCase
- implements com.google.protobuf.Internal.EnumLite {
+ implements com.google.protobuf.Internal.EnumLite,
+ com.google.protobuf.AbstractMessage.InternalOneOfEnum {
ONE_ID(1),
OTHER_ID(2),
SOMEVAL_NOT_SET(0);
@@ -1669,6 +1790,8 @@ private SomeValCase(int value) {
this.value = value;
}
/**
+ * @param value The number of the enum to look for.
+ * @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
@@ -1698,6 +1821,7 @@ public int getNumber() {
public static final int ONE_ID_FIELD_NUMBER = 1;
/**
* string one_id = 1;
+ * @return The oneId.
*/
public java.lang.String getOneId() {
java.lang.Object ref = "";
@@ -1718,6 +1842,7 @@ public java.lang.String getOneId() {
}
/**
* string one_id = 1;
+ * @return The bytes for oneId.
*/
public com.google.protobuf.ByteString
getOneIdBytes() {
@@ -1741,6 +1866,7 @@ public java.lang.String getOneId() {
public static final int OTHER_ID_FIELD_NUMBER = 2;
/**
* int32 other_id = 2;
+ * @return The otherId.
*/
public int getOtherId() {
if (someValCase_ == 2) {
@@ -1753,12 +1879,14 @@ public int getOtherId() {
private boolean isActive_;
/**
* bool is_active = 3;
+ * @return The isActive.
*/
public boolean getIsActive() {
return isActive_;
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -1768,6 +1896,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (someValCase_ == 1) {
@@ -1783,6 +1912,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -1815,26 +1945,23 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType other = (com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType) obj;
- boolean result = true;
- result = result && (getIsActive()
- == other.getIsActive());
- result = result && getSomeValCase().equals(
- other.getSomeValCase());
- if (!result) return false;
+ if (getIsActive()
+ != other.getIsActive()) return false;
+ if (!getSomeValCase().equals(other.getSomeValCase())) return false;
switch (someValCase_) {
case 1:
- result = result && getOneId()
- .equals(other.getOneId());
+ if (!getOneId()
+ .equals(other.getOneId())) return false;
break;
case 2:
- result = result && (getOtherId()
- == other.getOtherId());
+ if (getOtherId()
+ != other.getOtherId()) return false;
break;
case 0:
default:
}
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -1934,6 +2061,7 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexTy
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -1941,6 +2069,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -1964,6 +2093,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_ComplexType_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_ComplexType_fieldAccessorTable
@@ -1986,6 +2116,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
isActive_ = false;
@@ -1995,15 +2126,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_ComplexType_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType build() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType result = buildPartial();
if (!result.isInitialized()) {
@@ -2012,6 +2146,7 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType buil
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType buildPartial() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType result = new com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType(this);
if (someValCase_ == 1) {
@@ -2026,32 +2161,39 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType buil
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType) {
return mergeFrom((com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType)other);
@@ -2086,10 +2228,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.NestedTestProtoOuterClas
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -2125,6 +2269,7 @@ public Builder clearSomeVal() {
/**
* string one_id = 1;
+ * @return The oneId.
*/
public java.lang.String getOneId() {
java.lang.Object ref = "";
@@ -2145,6 +2290,7 @@ public java.lang.String getOneId() {
}
/**
* string one_id = 1;
+ * @return The bytes for oneId.
*/
public com.google.protobuf.ByteString
getOneIdBytes() {
@@ -2166,6 +2312,8 @@ public java.lang.String getOneId() {
}
/**
* string one_id = 1;
+ * @param value The oneId to set.
+ * @return This builder for chaining.
*/
public Builder setOneId(
java.lang.String value) {
@@ -2179,6 +2327,7 @@ public Builder setOneId(
}
/**
* string one_id = 1;
+ * @return This builder for chaining.
*/
public Builder clearOneId() {
if (someValCase_ == 1) {
@@ -2190,6 +2339,8 @@ public Builder clearOneId() {
}
/**
* string one_id = 1;
+ * @param value The bytes for oneId to set.
+ * @return This builder for chaining.
*/
public Builder setOneIdBytes(
com.google.protobuf.ByteString value) {
@@ -2205,6 +2356,7 @@ public Builder setOneIdBytes(
/**
* int32 other_id = 2;
+ * @return The otherId.
*/
public int getOtherId() {
if (someValCase_ == 2) {
@@ -2214,6 +2366,8 @@ public int getOtherId() {
}
/**
* int32 other_id = 2;
+ * @param value The otherId to set.
+ * @return This builder for chaining.
*/
public Builder setOtherId(int value) {
someValCase_ = 2;
@@ -2223,6 +2377,7 @@ public Builder setOtherId(int value) {
}
/**
* int32 other_id = 2;
+ * @return This builder for chaining.
*/
public Builder clearOtherId() {
if (someValCase_ == 2) {
@@ -2236,12 +2391,15 @@ public Builder clearOtherId() {
private boolean isActive_ ;
/**
* bool is_active = 3;
+ * @return The isActive.
*/
public boolean getIsActive() {
return isActive_;
}
/**
* bool is_active = 3;
+ * @param value The isActive to set.
+ * @return This builder for chaining.
*/
public Builder setIsActive(boolean value) {
@@ -2251,6 +2409,7 @@ public Builder setIsActive(boolean value) {
}
/**
* bool is_active = 3;
+ * @return This builder for chaining.
*/
public Builder clearIsActive() {
@@ -2258,11 +2417,13 @@ public Builder clearIsActive() {
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -2284,11 +2445,12 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexTy
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public ComplexType parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ComplexType(input, extensionRegistry);
+ return new ComplexType(input, extensionRegistry);
}
};
@@ -2301,6 +2463,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -2313,10 +2476,12 @@ public interface NestedTestProtoOrBuilder extends
/**
* .blueapron.connect.protobuf.UserId user_id = 1;
+ * @return Whether the userId field is set.
*/
boolean hasUserId();
/**
* .blueapron.connect.protobuf.UserId user_id = 1;
+ * @return The userId.
*/
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId getUserId();
/**
@@ -2326,34 +2491,43 @@ public interface NestedTestProtoOrBuilder extends
/**
* bool is_active = 2;
+ * @return The isActive.
*/
boolean getIsActive();
/**
* repeated string experiments_active = 3;
+ * @return A list containing the experimentsActive.
*/
java.util.List
getExperimentsActiveList();
/**
* repeated string experiments_active = 3;
+ * @return The count of experimentsActive.
*/
int getExperimentsActiveCount();
/**
* repeated string experiments_active = 3;
+ * @param index The index of the element to return.
+ * @return The experimentsActive at the given index.
*/
java.lang.String getExperimentsActive(int index);
/**
* repeated string experiments_active = 3;
+ * @param index The index of the value to return.
+ * @return The bytes of the experimentsActive at the given index.
*/
com.google.protobuf.ByteString
getExperimentsActiveBytes(int index);
/**
* .google.protobuf.Timestamp updated_at = 4;
+ * @return Whether the updatedAt field is set.
*/
boolean hasUpdatedAt();
/**
* .google.protobuf.Timestamp updated_at = 4;
+ * @return The updatedAt.
*/
com.google.protobuf.Timestamp getUpdatedAt();
/**
@@ -2363,19 +2537,23 @@ public interface NestedTestProtoOrBuilder extends
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return The status.
*/
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status getStatus();
/**
* .blueapron.connect.protobuf.ComplexType complex_type = 6;
+ * @return Whether the complexType field is set.
*/
boolean hasComplexType();
/**
* .blueapron.connect.protobuf.ComplexType complex_type = 6;
+ * @return The complexType.
*/
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType getComplexType();
/**
@@ -2434,11 +2612,17 @@ private NestedTestProto(com.google.protobuf.GeneratedMessageV3.Builder> builde
super(builder);
}
private NestedTestProto() {
- isActive_ = false;
experimentsActive_ = com.google.protobuf.LazyStringArrayList.EMPTY;
status_ = 0;
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new NestedTestProto();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -2449,6 +2633,9 @@ private NestedTestProto(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
@@ -2460,13 +2647,6 @@ private NestedTestProto(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId.Builder subBuilder = null;
if (userId_ != null) {
@@ -2487,9 +2667,9 @@ private NestedTestProto(
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
- if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ if (!((mutable_bitField0_ & 0x00000001) != 0)) {
experimentsActive_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000004;
+ mutable_bitField0_ |= 0x00000001;
}
experimentsActive_.add(s);
break;
@@ -2527,10 +2707,10 @@ private NestedTestProto(
break;
}
case 58: {
- if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
+ if (!((mutable_bitField0_ & 0x00000002) != 0)) {
mapType_ = com.google.protobuf.MapField.newMapField(
MapTypeDefaultEntryHolder.defaultEntry);
- mutable_bitField0_ |= 0x00000040;
+ mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
mapType__ = input.readMessage(
@@ -2539,6 +2719,13 @@ private NestedTestProto(
mapType__.getKey(), mapType__.getValue());
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -2547,7 +2734,7 @@ private NestedTestProto(
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
- if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+ if (((mutable_bitField0_ & 0x00000001) != 0)) {
experimentsActive_ = experimentsActive_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
@@ -2560,6 +2747,7 @@ private NestedTestProto(
}
@SuppressWarnings({"rawtypes"})
+ @java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
@@ -2570,6 +2758,7 @@ protected com.google.protobuf.MapField internalGetMapField(
"Invalid map field number: " + number);
}
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_NestedTestProto_fieldAccessorTable
@@ -2577,17 +2766,18 @@ protected com.google.protobuf.MapField internalGetMapField(
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto.class, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto.Builder.class);
}
- private int bitField0_;
public static final int USER_ID_FIELD_NUMBER = 1;
private com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId userId_;
/**
* .blueapron.connect.protobuf.UserId user_id = 1;
+ * @return Whether the userId field is set.
*/
public boolean hasUserId() {
return userId_ != null;
}
/**
* .blueapron.connect.protobuf.UserId user_id = 1;
+ * @return The userId.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId getUserId() {
return userId_ == null ? com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId.getDefaultInstance() : userId_;
@@ -2603,6 +2793,7 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserIdOrBuilder
private boolean isActive_;
/**
* bool is_active = 2;
+ * @return The isActive.
*/
public boolean getIsActive() {
return isActive_;
@@ -2612,6 +2803,7 @@ public boolean getIsActive() {
private com.google.protobuf.LazyStringList experimentsActive_;
/**
* repeated string experiments_active = 3;
+ * @return A list containing the experimentsActive.
*/
public com.google.protobuf.ProtocolStringList
getExperimentsActiveList() {
@@ -2619,18 +2811,23 @@ public boolean getIsActive() {
}
/**
* repeated string experiments_active = 3;
+ * @return The count of experimentsActive.
*/
public int getExperimentsActiveCount() {
return experimentsActive_.size();
}
/**
* repeated string experiments_active = 3;
+ * @param index The index of the element to return.
+ * @return The experimentsActive at the given index.
*/
public java.lang.String getExperimentsActive(int index) {
return experimentsActive_.get(index);
}
/**
* repeated string experiments_active = 3;
+ * @param index The index of the value to return.
+ * @return The bytes of the experimentsActive at the given index.
*/
public com.google.protobuf.ByteString
getExperimentsActiveBytes(int index) {
@@ -2641,12 +2838,14 @@ public java.lang.String getExperimentsActive(int index) {
private com.google.protobuf.Timestamp updatedAt_;
/**
* .google.protobuf.Timestamp updated_at = 4;
+ * @return Whether the updatedAt field is set.
*/
public boolean hasUpdatedAt() {
return updatedAt_ != null;
}
/**
* .google.protobuf.Timestamp updated_at = 4;
+ * @return The updatedAt.
*/
public com.google.protobuf.Timestamp getUpdatedAt() {
return updatedAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updatedAt_;
@@ -2662,14 +2861,17 @@ public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() {
private int status_;
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return The enum numeric value on the wire for status.
*/
public int getStatusValue() {
return status_;
}
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return The status.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status getStatus() {
+ @SuppressWarnings("deprecation")
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status result = com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status.valueOf(status_);
return result == null ? com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status.UNRECOGNIZED : result;
}
@@ -2678,12 +2880,14 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status getStatus
private com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType complexType_;
/**
* .blueapron.connect.protobuf.ComplexType complex_type = 6;
+ * @return Whether the complexType field is set.
*/
public boolean hasComplexType() {
return complexType_ != null;
}
/**
* .blueapron.connect.protobuf.ComplexType complex_type = 6;
+ * @return The complexType.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType getComplexType() {
return complexType_ == null ? com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType.getDefaultInstance() : complexType_;
@@ -2772,6 +2976,7 @@ public java.lang.String getMapTypeOrThrow(
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -2781,6 +2986,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (userId_ != null) {
@@ -2810,6 +3016,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -2868,31 +3075,30 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto other = (com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto) obj;
- boolean result = true;
- result = result && (hasUserId() == other.hasUserId());
+ if (hasUserId() != other.hasUserId()) return false;
if (hasUserId()) {
- result = result && getUserId()
- .equals(other.getUserId());
- }
- result = result && (getIsActive()
- == other.getIsActive());
- result = result && getExperimentsActiveList()
- .equals(other.getExperimentsActiveList());
- result = result && (hasUpdatedAt() == other.hasUpdatedAt());
+ if (!getUserId()
+ .equals(other.getUserId())) return false;
+ }
+ if (getIsActive()
+ != other.getIsActive()) return false;
+ if (!getExperimentsActiveList()
+ .equals(other.getExperimentsActiveList())) return false;
+ if (hasUpdatedAt() != other.hasUpdatedAt()) return false;
if (hasUpdatedAt()) {
- result = result && getUpdatedAt()
- .equals(other.getUpdatedAt());
+ if (!getUpdatedAt()
+ .equals(other.getUpdatedAt())) return false;
}
- result = result && status_ == other.status_;
- result = result && (hasComplexType() == other.hasComplexType());
+ if (status_ != other.status_) return false;
+ if (hasComplexType() != other.hasComplexType()) return false;
if (hasComplexType()) {
- result = result && getComplexType()
- .equals(other.getComplexType());
+ if (!getComplexType()
+ .equals(other.getComplexType())) return false;
}
- result = result && internalGetMapType().equals(
- other.internalGetMapType());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!internalGetMapType().equals(
+ other.internalGetMapType())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -3002,6 +3208,7 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTes
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -3009,6 +3216,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -3058,6 +3266,7 @@ protected com.google.protobuf.MapField internalGetMutableMapField(
"Invalid map field number: " + number);
}
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_NestedTestProto_fieldAccessorTable
@@ -3080,6 +3289,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
if (userIdBuilder_ == null) {
@@ -3091,7 +3301,7 @@ public Builder clear() {
isActive_ = false;
experimentsActive_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000001);
if (updatedAtBuilder_ == null) {
updatedAt_ = null;
} else {
@@ -3110,15 +3320,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.internal_static_blueapron_connect_protobuf_NestedTestProto_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto build() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto result = buildPartial();
if (!result.isInitialized()) {
@@ -3127,19 +3340,19 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto buildPartial() {
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto result = new com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto(this);
int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
if (userIdBuilder_ == null) {
result.userId_ = userId_;
} else {
result.userId_ = userIdBuilder_.build();
}
result.isActive_ = isActive_;
- if (((bitField0_ & 0x00000004) == 0x00000004)) {
+ if (((bitField0_ & 0x00000001) != 0)) {
experimentsActive_ = experimentsActive_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000001);
}
result.experimentsActive_ = experimentsActive_;
if (updatedAtBuilder_ == null) {
@@ -3155,37 +3368,43 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto
}
result.mapType_ = internalGetMapType();
result.mapType_.makeImmutable();
- result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto) {
return mergeFrom((com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto)other);
@@ -3206,7 +3425,7 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.NestedTestProtoOuterClas
if (!other.experimentsActive_.isEmpty()) {
if (experimentsActive_.isEmpty()) {
experimentsActive_ = other.experimentsActive_;
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureExperimentsActiveIsMutable();
experimentsActive_.addAll(other.experimentsActive_);
@@ -3229,10 +3448,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.NestedTestProtoOuterClas
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -3252,17 +3473,19 @@ public Builder mergeFrom(
}
private int bitField0_;
- private com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId userId_ = null;
+ private com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId userId_;
private com.google.protobuf.SingleFieldBuilderV3<
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId.Builder, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserIdOrBuilder> userIdBuilder_;
/**
* .blueapron.connect.protobuf.UserId user_id = 1;
+ * @return Whether the userId field is set.
*/
public boolean hasUserId() {
return userIdBuilder_ != null || userId_ != null;
}
/**
* .blueapron.connect.protobuf.UserId user_id = 1;
+ * @return The userId.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserId getUserId() {
if (userIdBuilder_ == null) {
@@ -3372,12 +3595,15 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.UserIdOrBuilder
private boolean isActive_ ;
/**
* bool is_active = 2;
+ * @return The isActive.
*/
public boolean getIsActive() {
return isActive_;
}
/**
* bool is_active = 2;
+ * @param value The isActive to set.
+ * @return This builder for chaining.
*/
public Builder setIsActive(boolean value) {
@@ -3387,6 +3613,7 @@ public Builder setIsActive(boolean value) {
}
/**
* bool is_active = 2;
+ * @return This builder for chaining.
*/
public Builder clearIsActive() {
@@ -3397,13 +3624,14 @@ public Builder clearIsActive() {
private com.google.protobuf.LazyStringList experimentsActive_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureExperimentsActiveIsMutable() {
- if (!((bitField0_ & 0x00000004) == 0x00000004)) {
+ if (!((bitField0_ & 0x00000001) != 0)) {
experimentsActive_ = new com.google.protobuf.LazyStringArrayList(experimentsActive_);
- bitField0_ |= 0x00000004;
+ bitField0_ |= 0x00000001;
}
}
/**
* repeated string experiments_active = 3;
+ * @return A list containing the experimentsActive.
*/
public com.google.protobuf.ProtocolStringList
getExperimentsActiveList() {
@@ -3411,18 +3639,23 @@ private void ensureExperimentsActiveIsMutable() {
}
/**
* repeated string experiments_active = 3;
+ * @return The count of experimentsActive.
*/
public int getExperimentsActiveCount() {
return experimentsActive_.size();
}
/**
* repeated string experiments_active = 3;
+ * @param index The index of the element to return.
+ * @return The experimentsActive at the given index.
*/
public java.lang.String getExperimentsActive(int index) {
return experimentsActive_.get(index);
}
/**
* repeated string experiments_active = 3;
+ * @param index The index of the value to return.
+ * @return The bytes of the experimentsActive at the given index.
*/
public com.google.protobuf.ByteString
getExperimentsActiveBytes(int index) {
@@ -3430,6 +3663,9 @@ public java.lang.String getExperimentsActive(int index) {
}
/**
* repeated string experiments_active = 3;
+ * @param index The index to set the value at.
+ * @param value The experimentsActive to set.
+ * @return This builder for chaining.
*/
public Builder setExperimentsActive(
int index, java.lang.String value) {
@@ -3443,6 +3679,8 @@ public Builder setExperimentsActive(
}
/**
* repeated string experiments_active = 3;
+ * @param value The experimentsActive to add.
+ * @return This builder for chaining.
*/
public Builder addExperimentsActive(
java.lang.String value) {
@@ -3456,6 +3694,8 @@ public Builder addExperimentsActive(
}
/**
* repeated string experiments_active = 3;
+ * @param values The experimentsActive to add.
+ * @return This builder for chaining.
*/
public Builder addAllExperimentsActive(
java.lang.Iterable values) {
@@ -3467,15 +3707,18 @@ public Builder addAllExperimentsActive(
}
/**
* repeated string experiments_active = 3;
+ * @return This builder for chaining.
*/
public Builder clearExperimentsActive() {
experimentsActive_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000004);
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
* repeated string experiments_active = 3;
+ * @param value The bytes of the experimentsActive to add.
+ * @return This builder for chaining.
*/
public Builder addExperimentsActiveBytes(
com.google.protobuf.ByteString value) {
@@ -3489,17 +3732,19 @@ public Builder addExperimentsActiveBytes(
return this;
}
- private com.google.protobuf.Timestamp updatedAt_ = null;
+ private com.google.protobuf.Timestamp updatedAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updatedAtBuilder_;
/**
* .google.protobuf.Timestamp updated_at = 4;
+ * @return Whether the updatedAt field is set.
*/
public boolean hasUpdatedAt() {
return updatedAtBuilder_ != null || updatedAt_ != null;
}
/**
* .google.protobuf.Timestamp updated_at = 4;
+ * @return The updatedAt.
*/
public com.google.protobuf.Timestamp getUpdatedAt() {
if (updatedAtBuilder_ == null) {
@@ -3609,12 +3854,15 @@ public com.google.protobuf.TimestampOrBuilder getUpdatedAtOrBuilder() {
private int status_ = 0;
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return The enum numeric value on the wire for status.
*/
public int getStatusValue() {
return status_;
}
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @param value The enum numeric value on the wire for status to set.
+ * @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
@@ -3623,13 +3871,17 @@ public Builder setStatusValue(int value) {
}
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return The status.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status getStatus() {
+ @SuppressWarnings("deprecation")
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status result = com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status.valueOf(status_);
return result == null ? com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status.UNRECOGNIZED : result;
}
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @param value The status to set.
+ * @return This builder for chaining.
*/
public Builder setStatus(com.blueapron.connect.protobuf.NestedTestProtoOuterClass.Status value) {
if (value == null) {
@@ -3642,6 +3894,7 @@ public Builder setStatus(com.blueapron.connect.protobuf.NestedTestProtoOuterClas
}
/**
* .blueapron.connect.protobuf.Status status = 5;
+ * @return This builder for chaining.
*/
public Builder clearStatus() {
@@ -3650,17 +3903,19 @@ public Builder clearStatus() {
return this;
}
- private com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType complexType_ = null;
+ private com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType complexType_;
private com.google.protobuf.SingleFieldBuilderV3<
com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType.Builder, com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexTypeOrBuilder> complexTypeBuilder_;
/**
* .blueapron.connect.protobuf.ComplexType complex_type = 6;
+ * @return Whether the complexType field is set.
*/
public boolean hasComplexType() {
return complexTypeBuilder_ != null || complexType_ != null;
}
/**
* .blueapron.connect.protobuf.ComplexType complex_type = 6;
+ * @return The complexType.
*/
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.ComplexType getComplexType() {
if (complexTypeBuilder_ == null) {
@@ -3889,11 +4144,13 @@ public Builder putAllMapType(
.putAll(values);
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -3915,11 +4172,12 @@ public static com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTes
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public NestedTestProto parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new NestedTestProto(input, extensionRegistry);
+ return new NestedTestProto(input, extensionRegistry);
}
};
@@ -3932,6 +4190,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -3981,7 +4240,7 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto
"\001(\t\"R\n\013ComplexType\022\020\n\006one_id\030\001 \001(\tH\000\022\022\n\010" +
"other_id\030\002 \001(\005H\000\022\021\n\tis_active\030\003 \001(\010B\n\n\010s" +
"ome_val\"\224\003\n\017NestedTestProto\0223\n\007user_id\030\001" +
- " \001(\0132\".blueapron.connect.protobuf.UserId",
+ " \001(\0132\".blueapron.connect.protobuf.UserId" +
"\022\021\n\tis_active\030\002 \001(\010\022\032\n\022experiments_activ" +
"e\030\003 \003(\t\022.\n\nupdated_at\030\004 \001(\0132\032.google.pro" +
"tobuf.Timestamp\0222\n\006status\030\005 \001(\0162\".blueap" +
@@ -3991,22 +4250,14 @@ public com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto
".connect.protobuf.NestedTestProto.MapTyp" +
"eEntry\032.\n\014MapTypeEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" +
"alue\030\002 \001(\t:\0028\001*\"\n\006Status\022\n\n\006ACTIVE\020\000\022\014\n\010" +
- "INACTIVE\020\001B \n\036com.blueapron.connect.prot",
+ "INACTIVE\020\001B \n\036com.blueapron.connect.prot" +
"obufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
- }, assigner);
+ });
internal_static_blueapron_connect_protobuf_UserId_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_blueapron_connect_protobuf_UserId_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/ProtobufConverterTest.java b/src/test/java/com/blueapron/connect/protobuf/ProtobufConverterTest.java
index 6627768..b6922bf 100644
--- a/src/test/java/com/blueapron/connect/protobuf/ProtobufConverterTest.java
+++ b/src/test/java/com/blueapron/connect/protobuf/ProtobufConverterTest.java
@@ -16,40 +16,53 @@
import java.util.Map;
public class ProtobufConverterTest {
-
+ private final String LEGACY_FIELD_NAME = "legacy_field_name";
+ private final String CUSTOM_LEGACY_NAME = "blueapron.connect.protobuf.legacy_name";
private final String TEST_MESSAGE_CLASS_NAME = "com.blueapron.connect.protobuf.TestMessageProtos$TestMessage";
private static final String TEST_MSG_STRING = "Hello World";
private static final String LEGACY_MSG_STRING = "Some renamed field";
private static final TestMessage HELLO_WORLD_MESSAGE = TestMessage.newBuilder().setTestString(TEST_MSG_STRING).setSomeField(LEGACY_MSG_STRING).build();
- private Schema getTestMessageSchema() {
+ private Schema getTestMessageSchema(String legacyFieldName) {
final SchemaBuilder builder = SchemaBuilder.struct().name("TestMessage");
final SchemaBuilder fieldBuilder = SchemaBuilder.string();
fieldBuilder.optional();
builder.field("test_string", fieldBuilder.build());
- builder.field("legacy_field_name", fieldBuilder.build());
+ builder.field(legacyFieldName, fieldBuilder.build());
return builder.build();
}
- private Struct getTestMessageResult(String messageText, String legacyFieldText) {
- Schema schema = getTestMessageSchema();
+ private Schema getTestMessageSchema() {
+ return getTestMessageSchema(LEGACY_FIELD_NAME);
+ }
+
+ private Struct getTestMessageResult(String messageText, String legacyFieldText, String legacyFieldName) {
+ Schema schema = getTestMessageSchema(legacyFieldName);
Struct result = new Struct(schema.schema());
result.put("test_string", messageText);
- result.put("legacy_field_name", legacyFieldText);
+ result.put(legacyFieldName, legacyFieldText);
return result;
}
+ private Struct getTestMessageResult(String messageText, String legacyFieldText) {
+ return getTestMessageResult(messageText, legacyFieldText, LEGACY_FIELD_NAME);
+ }
- private ProtobufConverter getConfiguredProtobufConverter(String protobufClassName, boolean isKey) {
+ private ProtobufConverter getConfiguredProtobufConverter(String protobufClassName, boolean isKey, String legacy_name) {
ProtobufConverter protobufConverter = new ProtobufConverter();
Map configs = new HashMap();
configs.put("protoClassName", protobufClassName);
+ configs.put("legacyName", legacy_name);
protobufConverter.configure(configs, isKey);
return protobufConverter;
}
+ private ProtobufConverter getConfiguredProtobufConverter(String protobufClassName, boolean isKey) {
+ return getConfiguredProtobufConverter(protobufClassName, isKey, CUSTOM_LEGACY_NAME);
+ }
+
@Test(expected = ConnectException.class)
public void testNullValueConverter() {
// When the value converter is null, we need to throw an exception and stop processing
@@ -133,4 +146,19 @@ public void testToConnectDataForValue() {
assertEquals(expected, result);
}
+
+ @Test
+ public void testToConnectDataForValueWithMismatchedDefaultLegacyName() {
+ ProtobufConverter testMessageConverter = getConfiguredProtobufConverter(TEST_MESSAGE_CLASS_NAME, false, "legacy_name");
+ SchemaAndValue result = testMessageConverter.toConnectData("my-topic", HELLO_WORLD_MESSAGE.toByteArray());
+
+ String unrenamedLegacyFieldName = "some_field";
+
+ SchemaAndValue expected = new SchemaAndValue(
+ getTestMessageSchema(unrenamedLegacyFieldName),
+ getTestMessageResult(TEST_MSG_STRING, LEGACY_MSG_STRING, unrenamedLegacyFieldName)
+ );
+
+ assertEquals(expected, result);
+ }
}
diff --git a/src/test/java/com/blueapron/connect/protobuf/ProtobufDataTest.java b/src/test/java/com/blueapron/connect/protobuf/ProtobufDataTest.java
index 53035da..a81da4d 100644
--- a/src/test/java/com/blueapron/connect/protobuf/ProtobufDataTest.java
+++ b/src/test/java/com/blueapron/connect/protobuf/ProtobufDataTest.java
@@ -1,6 +1,7 @@
package com.blueapron.connect.protobuf;
import com.blueapron.connect.protobuf.NestedTestProtoOuterClass.NestedTestProto;
+import com.blueapron.connect.protobuf.TestMessageProtos.TestMessage;
import com.blueapron.connect.protobuf.UInt64ValueOuterClass.UInt64Value;
import com.google.protobuf.BoolValue;
import com.google.protobuf.ByteString;
@@ -15,7 +16,7 @@
import com.google.protobuf.StringValue;
import com.google.protobuf.Timestamp;
import com.google.protobuf.util.Timestamps;
-import org.apache.kafka.connect.data.Date;
+import java.util.stream.Collectors;
import org.apache.kafka.connect.data.Decimal;
import org.apache.kafka.connect.data.Field;
import org.apache.kafka.connect.data.Schema;
@@ -41,7 +42,7 @@
public class ProtobufDataTest {
- private final String LEGACY_NAME = "legacy_name";
+ private final String LEGACY_NAME = "blueapron.connect.protobuf.legacy_name";
private final String VALUE_FIELD_NAME = "value";
public static final Schema OPTIONAL_DECIMAL_SCHEMA = Decimal.builder(0).parameter(CONNECT_DECIMAL_PRECISION_PROP, "20").optional().build();
@@ -84,6 +85,13 @@ private NestedTestProto createNestedTestProto(NestedTestProtoOuterClass.UserId i
return message.build();
}
+ private TestMessage createLegacyTestProto() throws ParseException {
+ return TestMessage.newBuilder()
+ .setTestString("hello")
+ .setSomeField("goodbye")
+ .build();
+ }
+
private Schema getExpectedNestedTestProtoSchemaStringUserId() {
return getExpectedNestedTestProtoSchema();
}
@@ -118,6 +126,13 @@ private Schema getExpectedNestedTestProtoSchema() {
return builder.build();
}
+ private Schema getLegacyTestSchema() {
+ final SchemaBuilder builder = SchemaBuilder.struct().name("TestMessage");
+ builder.field("test_string", SchemaBuilder.string().optional().build());
+ builder.field("legacy_field_name", SchemaBuilder.string().optional().build());
+ return builder.build();
+ }
+
private List getTestKeyValueList(Schema schema) {
Struct keyValue = new Struct(schema.field("map_type").schema().valueSchema());
keyValue.put("key", "Hello");
@@ -208,6 +223,26 @@ private void assertSchemasEqual(Schema expectedSchema, Schema actualSchema) {
}
}
+ private List getFieldNames(Schema schema) {
+ return schema
+ .fields()
+ .stream()
+ .map(field -> field.name())
+ .collect(Collectors.toList());
+ }
+
+ @Test
+ public void testToConnectDataWithLegacyName() throws ParseException {
+ TestMessage message = createLegacyTestProto();
+ ProtobufData protobufData = new ProtobufData(TestMessage.class, LEGACY_NAME);
+ SchemaAndValue result = protobufData.toConnectData(message.toByteArray());
+
+ List actualFieldNames = getFieldNames(result.schema());
+ List expectedFieldNames = getFieldNames(getLegacyTestSchema());
+
+ assertEquals(expectedFieldNames, actualFieldNames);
+ }
+
@Test
public void testToConnectDataWithNestedProtobufMessageAndStringUserId() throws ParseException {
NestedTestProto message = createNestedTestProtoStringUserId();
diff --git a/src/test/java/com/blueapron/connect/protobuf/SInt32ValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/SInt32ValueOuterClass.java
index 6fdcb5f..fcbc90d 100644
--- a/src/test/java/com/blueapron/connect/protobuf/SInt32ValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/SInt32ValueOuterClass.java
@@ -20,6 +20,7 @@ public interface SInt32ValueOrBuilder extends
/**
* sint32 value = 1;
+ * @return The value.
*/
int getValue();
}
@@ -40,7 +41,13 @@ private SInt32Value(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SInt32Value() {
- value_ = 0;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new SInt32Value();
}
@java.lang.Override
@@ -53,7 +60,9 @@ private SInt32Value(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -64,18 +73,18 @@ private SInt32Value(
case 0:
done = true;
break;
+ case 8: {
+
+ value_ = input.readSInt32();
+ break;
+ }
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
- case 8: {
-
- value_ = input.readSInt32();
- break;
- }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -93,6 +102,7 @@ private SInt32Value(
return com.blueapron.connect.protobuf.SInt32ValueOuterClass.internal_static_SInt32Value_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.SInt32ValueOuterClass.internal_static_SInt32Value_fieldAccessorTable
@@ -104,12 +114,14 @@ private SInt32Value(
private int value_;
/**
* sint32 value = 1;
+ * @return The value.
*/
public int getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -119,6 +131,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (value_ != 0) {
@@ -127,6 +140,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -151,11 +165,10 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value other = (com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value) obj;
- boolean result = true;
- result = result && (getValue()
- == other.getValue());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getValue()
+ != other.getValue()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -242,6 +255,7 @@ public static com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value p
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -249,6 +263,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -276,6 +291,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.SInt32ValueOuterClass.internal_static_SInt32Value_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.SInt32ValueOuterClass.internal_static_SInt32Value_fieldAccessorTable
@@ -298,6 +314,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
value_ = 0;
@@ -305,15 +322,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.SInt32ValueOuterClass.internal_static_SInt32Value_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value build() {
com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value result = buildPartial();
if (!result.isInitialized()) {
@@ -322,6 +342,7 @@ public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value build()
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value buildPartial() {
com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value result = new com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value(this);
result.value_ = value_;
@@ -329,32 +350,39 @@ public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value buildPar
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value) {
return mergeFrom((com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value)other);
@@ -374,10 +402,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.SInt32ValueOuterClass.SI
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -399,12 +429,15 @@ public Builder mergeFrom(
private int value_ ;
/**
* sint32 value = 1;
+ * @return The value.
*/
public int getValue() {
return value_;
}
/**
* sint32 value = 1;
+ * @param value The value to set.
+ * @return This builder for chaining.
*/
public Builder setValue(int value) {
@@ -414,6 +447,7 @@ public Builder setValue(int value) {
}
/**
* sint32 value = 1;
+ * @return This builder for chaining.
*/
public Builder clearValue() {
@@ -421,11 +455,13 @@ public Builder clearValue() {
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -447,11 +483,12 @@ public static com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value g
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public SInt32Value parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new SInt32Value(input, extensionRegistry);
+ return new SInt32Value(input, extensionRegistry);
}
};
@@ -464,6 +501,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -488,18 +526,10 @@ public com.blueapron.connect.protobuf.SInt32ValueOuterClass.SInt32Value getDefau
"lue\030\001 \001(\021B \n\036com.blueapron.connect.proto" +
"bufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
+ });
internal_static_SInt32Value_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_SInt32Value_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/SInt64ValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/SInt64ValueOuterClass.java
index c4451fd..f5dbd59 100644
--- a/src/test/java/com/blueapron/connect/protobuf/SInt64ValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/SInt64ValueOuterClass.java
@@ -20,6 +20,7 @@ public interface SInt64ValueOrBuilder extends
/**
* sint64 value = 1;
+ * @return The value.
*/
long getValue();
}
@@ -40,7 +41,13 @@ private SInt64Value(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SInt64Value() {
- value_ = 0L;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new SInt64Value();
}
@java.lang.Override
@@ -53,7 +60,9 @@ private SInt64Value(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -64,18 +73,18 @@ private SInt64Value(
case 0:
done = true;
break;
+ case 8: {
+
+ value_ = input.readSInt64();
+ break;
+ }
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
- case 8: {
-
- value_ = input.readSInt64();
- break;
- }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -93,6 +102,7 @@ private SInt64Value(
return com.blueapron.connect.protobuf.SInt64ValueOuterClass.internal_static_SInt64Value_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.SInt64ValueOuterClass.internal_static_SInt64Value_fieldAccessorTable
@@ -104,12 +114,14 @@ private SInt64Value(
private long value_;
/**
* sint64 value = 1;
+ * @return The value.
*/
public long getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -119,6 +131,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (value_ != 0L) {
@@ -127,6 +140,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -151,11 +165,10 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value other = (com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value) obj;
- boolean result = true;
- result = result && (getValue()
- == other.getValue());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getValue()
+ != other.getValue()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -243,6 +256,7 @@ public static com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value p
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -250,6 +264,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -277,6 +292,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.SInt64ValueOuterClass.internal_static_SInt64Value_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.SInt64ValueOuterClass.internal_static_SInt64Value_fieldAccessorTable
@@ -299,6 +315,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
value_ = 0L;
@@ -306,15 +323,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.SInt64ValueOuterClass.internal_static_SInt64Value_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value build() {
com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value result = buildPartial();
if (!result.isInitialized()) {
@@ -323,6 +343,7 @@ public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value build()
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value buildPartial() {
com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value result = new com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value(this);
result.value_ = value_;
@@ -330,32 +351,39 @@ public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value buildPar
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value) {
return mergeFrom((com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value)other);
@@ -375,10 +403,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.SInt64ValueOuterClass.SI
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -400,12 +430,15 @@ public Builder mergeFrom(
private long value_ ;
/**
* sint64 value = 1;
+ * @return The value.
*/
public long getValue() {
return value_;
}
/**
* sint64 value = 1;
+ * @param value The value to set.
+ * @return This builder for chaining.
*/
public Builder setValue(long value) {
@@ -415,6 +448,7 @@ public Builder setValue(long value) {
}
/**
* sint64 value = 1;
+ * @return This builder for chaining.
*/
public Builder clearValue() {
@@ -422,11 +456,13 @@ public Builder clearValue() {
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -448,11 +484,12 @@ public static com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value g
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public SInt64Value parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new SInt64Value(input, extensionRegistry);
+ return new SInt64Value(input, extensionRegistry);
}
};
@@ -465,6 +502,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -489,18 +527,10 @@ public com.blueapron.connect.protobuf.SInt64ValueOuterClass.SInt64Value getDefau
"lue\030\001 \001(\022B \n\036com.blueapron.connect.proto" +
"bufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
+ });
internal_static_SInt64Value_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_SInt64Value_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/TestMessageProtos.java b/src/test/java/com/blueapron/connect/protobuf/TestMessageProtos.java
index 4905e9d..7ffdf9f 100644
--- a/src/test/java/com/blueapron/connect/protobuf/TestMessageProtos.java
+++ b/src/test/java/com/blueapron/connect/protobuf/TestMessageProtos.java
@@ -7,7 +7,6 @@ public final class TestMessageProtos {
private TestMessageProtos() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
- registry.add(com.blueapron.connect.protobuf.TestMessageProtos.legacyName);
}
public static void registerAllExtensions(
@@ -21,20 +20,24 @@ public interface TestMessageOrBuilder extends
/**
* string test_string = 1;
+ * @return The testString.
*/
java.lang.String getTestString();
/**
* string test_string = 1;
+ * @return The bytes for testString.
*/
com.google.protobuf.ByteString
getTestStringBytes();
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return The someField.
*/
java.lang.String getSomeField();
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return The bytes for someField.
*/
com.google.protobuf.ByteString
getSomeFieldBytes();
@@ -56,6 +59,13 @@ private TestMessage() {
someField_ = "";
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new TestMessage();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -66,7 +76,9 @@ private TestMessage(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -77,13 +89,6 @@ private TestMessage(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
java.lang.String s = input.readStringRequireUtf8();
@@ -96,6 +101,13 @@ private TestMessage(
someField_ = s;
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -113,6 +125,7 @@ private TestMessage(
return com.blueapron.connect.protobuf.TestMessageProtos.internal_static_TestMessage_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.TestMessageProtos.internal_static_TestMessage_fieldAccessorTable
@@ -124,6 +137,7 @@ private TestMessage(
private volatile java.lang.Object testString_;
/**
* string test_string = 1;
+ * @return The testString.
*/
public java.lang.String getTestString() {
java.lang.Object ref = testString_;
@@ -139,6 +153,7 @@ public java.lang.String getTestString() {
}
/**
* string test_string = 1;
+ * @return The bytes for testString.
*/
public com.google.protobuf.ByteString
getTestStringBytes() {
@@ -157,7 +172,8 @@ public java.lang.String getTestString() {
public static final int SOME_FIELD_FIELD_NUMBER = 2;
private volatile java.lang.Object someField_;
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return The someField.
*/
public java.lang.String getSomeField() {
java.lang.Object ref = someField_;
@@ -172,7 +188,8 @@ public java.lang.String getSomeField() {
}
}
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return The bytes for someField.
*/
public com.google.protobuf.ByteString
getSomeFieldBytes() {
@@ -189,6 +206,7 @@ public java.lang.String getSomeField() {
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -198,6 +216,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getTestStringBytes().isEmpty()) {
@@ -209,6 +228,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -235,13 +255,12 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.TestMessageProtos.TestMessage other = (com.blueapron.connect.protobuf.TestMessageProtos.TestMessage) obj;
- boolean result = true;
- result = result && getTestString()
- .equals(other.getTestString());
- result = result && getSomeField()
- .equals(other.getSomeField());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!getTestString()
+ .equals(other.getTestString())) return false;
+ if (!getSomeField()
+ .equals(other.getSomeField())) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -330,6 +349,7 @@ public static com.blueapron.connect.protobuf.TestMessageProtos.TestMessage parse
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -337,6 +357,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.TestMessageProtos.TestMessage prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -360,6 +381,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.TestMessageProtos.internal_static_TestMessage_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.TestMessageProtos.internal_static_TestMessage_fieldAccessorTable
@@ -382,6 +404,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
testString_ = "";
@@ -391,15 +414,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.TestMessageProtos.internal_static_TestMessage_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.TestMessageProtos.TestMessage.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage build() {
com.blueapron.connect.protobuf.TestMessageProtos.TestMessage result = buildPartial();
if (!result.isInitialized()) {
@@ -408,6 +434,7 @@ public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage build() {
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage buildPartial() {
com.blueapron.connect.protobuf.TestMessageProtos.TestMessage result = new com.blueapron.connect.protobuf.TestMessageProtos.TestMessage(this);
result.testString_ = testString_;
@@ -416,32 +443,39 @@ public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage buildPartial
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.TestMessageProtos.TestMessage) {
return mergeFrom((com.blueapron.connect.protobuf.TestMessageProtos.TestMessage)other);
@@ -466,10 +500,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.TestMessageProtos.TestMe
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -491,6 +527,7 @@ public Builder mergeFrom(
private java.lang.Object testString_ = "";
/**
* string test_string = 1;
+ * @return The testString.
*/
public java.lang.String getTestString() {
java.lang.Object ref = testString_;
@@ -506,6 +543,7 @@ public java.lang.String getTestString() {
}
/**
* string test_string = 1;
+ * @return The bytes for testString.
*/
public com.google.protobuf.ByteString
getTestStringBytes() {
@@ -522,6 +560,8 @@ public java.lang.String getTestString() {
}
/**
* string test_string = 1;
+ * @param value The testString to set.
+ * @return This builder for chaining.
*/
public Builder setTestString(
java.lang.String value) {
@@ -535,6 +575,7 @@ public Builder setTestString(
}
/**
* string test_string = 1;
+ * @return This builder for chaining.
*/
public Builder clearTestString() {
@@ -544,6 +585,8 @@ public Builder clearTestString() {
}
/**
* string test_string = 1;
+ * @param value The bytes for testString to set.
+ * @return This builder for chaining.
*/
public Builder setTestStringBytes(
com.google.protobuf.ByteString value) {
@@ -559,7 +602,8 @@ public Builder setTestStringBytes(
private java.lang.Object someField_ = "";
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return The someField.
*/
public java.lang.String getSomeField() {
java.lang.Object ref = someField_;
@@ -574,7 +618,8 @@ public java.lang.String getSomeField() {
}
}
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return The bytes for someField.
*/
public com.google.protobuf.ByteString
getSomeFieldBytes() {
@@ -590,7 +635,9 @@ public java.lang.String getSomeField() {
}
}
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @param value The someField to set.
+ * @return This builder for chaining.
*/
public Builder setSomeField(
java.lang.String value) {
@@ -603,7 +650,8 @@ public Builder setSomeField(
return this;
}
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @return This builder for chaining.
*/
public Builder clearSomeField() {
@@ -612,7 +660,9 @@ public Builder clearSomeField() {
return this;
}
/**
- * string some_field = 2 [(.legacy_name) = "legacy_field_name"];
+ * string some_field = 2 [(.blueapron.connect.protobuf.legacy_name) = "legacy_field_name"];
+ * @param value The bytes for someField to set.
+ * @return This builder for chaining.
*/
public Builder setSomeFieldBytes(
com.google.protobuf.ByteString value) {
@@ -625,11 +675,13 @@ public Builder setSomeFieldBytes(
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -651,11 +703,12 @@ public static com.blueapron.connect.protobuf.TestMessageProtos.TestMessage getDe
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public TestMessage parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new TestMessage(input, extensionRegistry);
+ return new TestMessage(input, extensionRegistry);
}
};
@@ -668,23 +721,13 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
- public static final int LEGACY_NAME_FIELD_NUMBER = 51234;
- /**
- * extend .google.protobuf.FieldOptions { ... }
- */
- public static final
- com.google.protobuf.GeneratedMessage.GeneratedExtension<
- com.google.protobuf.DescriptorProtos.FieldOptions,
- java.lang.String> legacyName = com.google.protobuf.GeneratedMessage
- .newFileScopedGeneratedExtension(
- java.lang.String.class,
- null);
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_TestMessage_descriptor;
private static final
@@ -700,39 +743,31 @@ public com.blueapron.connect.protobuf.TestMessageProtos.TestMessage getDefaultIn
static {
java.lang.String[] descriptorData = {
"\n\017TestProto.proto\032 google/protobuf/descr" +
- "iptor.proto\"M\n\013TestMessage\022\023\n\013test_strin" +
- "g\030\001 \001(\t\022)\n\nsome_field\030\002 \001(\tB\025\222\202\031\021legacy_" +
- "field_name:4\n\013legacy_name\022\035.google.proto" +
- "buf.FieldOptions\030\242\220\003 \001(\tB3\n\036com.blueapro" +
- "n.connect.protobufB\021TestMessageProtosb\006p" +
- "roto3"
+ "iptor.proto\032\020LegacyName.proto\"M\n\013TestMes" +
+ "sage\022\023\n\013test_string\030\001 \001(\t\022)\n\nsome_field\030" +
+ "\002 \001(\tB\025\202\246\035\021legacy_field_nameB3\n\036com.blue" +
+ "apron.connect.protobufB\021TestMessageProto" +
+ "sb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.DescriptorProtos.getDescriptor(),
- }, assigner);
+ com.blueapron.connect.protobuf.LegacyName.getDescriptor(),
+ });
internal_static_TestMessage_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_TestMessage_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_TestMessage_descriptor,
new java.lang.String[] { "TestString", "SomeField", });
- legacyName.internalInit(descriptor.getExtensions().get(0));
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
- registry.add(com.blueapron.connect.protobuf.TestMessageProtos.legacyName);
+ registry.add(com.blueapron.connect.protobuf.LegacyName.legacyName);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
com.google.protobuf.DescriptorProtos.getDescriptor();
+ com.blueapron.connect.protobuf.LegacyName.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
diff --git a/src/test/java/com/blueapron/connect/protobuf/TimestampValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/TimestampValueOuterClass.java
index d15ad9b..adcb9b7 100644
--- a/src/test/java/com/blueapron/connect/protobuf/TimestampValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/TimestampValueOuterClass.java
@@ -24,6 +24,7 @@ public interface TimestampValueOrBuilder extends
*
*
* .google.protobuf.Timestamp value = 1;
+ * @return Whether the value field is set.
*/
boolean hasValue();
/**
@@ -32,6 +33,7 @@ public interface TimestampValueOrBuilder extends
*
*
* .google.protobuf.Timestamp value = 1;
+ * @return The value.
*/
com.google.protobuf.Timestamp getValue();
/**
@@ -62,6 +64,13 @@ private TimestampValue(com.google.protobuf.GeneratedMessageV3.Builder> builder
private TimestampValue() {
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new TimestampValue();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -72,7 +81,9 @@ private TimestampValue(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -83,13 +94,6 @@ private TimestampValue(
case 0:
done = true;
break;
- default: {
- if (!parseUnknownFieldProto3(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
case 10: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (value_ != null) {
@@ -103,6 +107,13 @@ private TimestampValue(
break;
}
+ default: {
+ if (!parseUnknownField(
+ input, unknownFields, extensionRegistry, tag)) {
+ done = true;
+ }
+ break;
+ }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -120,6 +131,7 @@ private TimestampValue(
return com.blueapron.connect.protobuf.TimestampValueOuterClass.internal_static_TimestampValue_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.TimestampValueOuterClass.internal_static_TimestampValue_fieldAccessorTable
@@ -135,6 +147,7 @@ private TimestampValue(
*
*
* .google.protobuf.Timestamp value = 1;
+ * @return Whether the value field is set.
*/
public boolean hasValue() {
return value_ != null;
@@ -145,6 +158,7 @@ public boolean hasValue() {
*
*
* .google.protobuf.Timestamp value = 1;
+ * @return The value.
*/
public com.google.protobuf.Timestamp getValue() {
return value_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : value_;
@@ -161,6 +175,7 @@ public com.google.protobuf.TimestampOrBuilder getValueOrBuilder() {
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -170,6 +185,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (value_ != null) {
@@ -178,6 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -202,14 +219,13 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue other = (com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue) obj;
- boolean result = true;
- result = result && (hasValue() == other.hasValue());
+ if (hasValue() != other.hasValue()) return false;
if (hasValue()) {
- result = result && getValue()
- .equals(other.getValue());
+ if (!getValue()
+ .equals(other.getValue())) return false;
}
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -298,6 +314,7 @@ public static com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampV
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -305,6 +322,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -332,6 +350,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.TimestampValueOuterClass.internal_static_TimestampValue_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.TimestampValueOuterClass.internal_static_TimestampValue_fieldAccessorTable
@@ -354,6 +373,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
if (valueBuilder_ == null) {
@@ -365,15 +385,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.TimestampValueOuterClass.internal_static_TimestampValue_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue build() {
com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue result = buildPartial();
if (!result.isInitialized()) {
@@ -382,6 +405,7 @@ public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue bu
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue buildPartial() {
com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue result = new com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue(this);
if (valueBuilder_ == null) {
@@ -393,32 +417,39 @@ public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue bu
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue) {
return mergeFrom((com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue)other);
@@ -438,10 +469,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.TimestampValueOuterClass
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -460,7 +493,7 @@ public Builder mergeFrom(
return this;
}
- private com.google.protobuf.Timestamp value_ = null;
+ private com.google.protobuf.Timestamp value_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> valueBuilder_;
/**
@@ -469,6 +502,7 @@ public Builder mergeFrom(
*
*
* .google.protobuf.Timestamp value = 1;
+ * @return Whether the value field is set.
*/
public boolean hasValue() {
return valueBuilder_ != null || value_ != null;
@@ -479,6 +513,7 @@ public boolean hasValue() {
*
*
* .google.protobuf.Timestamp value = 1;
+ * @return The value.
*/
public com.google.protobuf.Timestamp getValue() {
if (valueBuilder_ == null) {
@@ -612,11 +647,13 @@ public com.google.protobuf.TimestampOrBuilder getValueOrBuilder() {
}
return valueBuilder_;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -638,11 +675,12 @@ public static com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampV
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public TimestampValue parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new TimestampValue(input, extensionRegistry);
+ return new TimestampValue(input, extensionRegistry);
}
};
@@ -655,6 +693,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -680,19 +719,11 @@ public com.blueapron.connect.protobuf.TimestampValueOuterClass.TimestampValue ge
"ue\030\001 \001(\0132\032.google.protobuf.TimestampB \n\036" +
"com.blueapron.connect.protobufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
- }, assigner);
+ });
internal_static_TimestampValue_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_TimestampValue_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/UInt32ValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/UInt32ValueOuterClass.java
index 00d9bd2..ad56241 100644
--- a/src/test/java/com/blueapron/connect/protobuf/UInt32ValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/UInt32ValueOuterClass.java
@@ -20,6 +20,7 @@ public interface UInt32ValueOrBuilder extends
/**
* uint32 value = 1;
+ * @return The value.
*/
int getValue();
}
@@ -40,7 +41,13 @@ private UInt32Value(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UInt32Value() {
- value_ = 0;
+ }
+
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new UInt32Value();
}
@java.lang.Override
@@ -53,7 +60,9 @@ private UInt32Value(
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
- int mutable_bitField0_ = 0;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -64,18 +73,18 @@ private UInt32Value(
case 0:
done = true;
break;
+ case 8: {
+
+ value_ = input.readUInt32();
+ break;
+ }
default: {
- if (!parseUnknownFieldProto3(
+ if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
- case 8: {
-
- value_ = input.readUInt32();
- break;
- }
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -93,6 +102,7 @@ private UInt32Value(
return com.blueapron.connect.protobuf.UInt32ValueOuterClass.internal_static_UInt32Value_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.UInt32ValueOuterClass.internal_static_UInt32Value_fieldAccessorTable
@@ -104,12 +114,14 @@ private UInt32Value(
private int value_;
/**
* uint32 value = 1;
+ * @return The value.
*/
public int getValue() {
return value_;
}
private byte memoizedIsInitialized = -1;
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -119,6 +131,7 @@ public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (value_ != 0) {
@@ -127,6 +140,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output)
unknownFields.writeTo(output);
}
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -151,11 +165,10 @@ public boolean equals(final java.lang.Object obj) {
}
com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value other = (com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value) obj;
- boolean result = true;
- result = result && (getValue()
- == other.getValue());
- result = result && unknownFields.equals(other.unknownFields);
- return result;
+ if (getValue()
+ != other.getValue()) return false;
+ if (!unknownFields.equals(other.unknownFields)) return false;
+ return true;
}
@java.lang.Override
@@ -242,6 +255,7 @@ public static com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value p
.parseWithIOException(PARSER, input, extensionRegistry);
}
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -249,6 +263,7 @@ public static Builder newBuilder() {
public static Builder newBuilder(com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
@@ -276,6 +291,7 @@ public static final class Builder extends
return com.blueapron.connect.protobuf.UInt32ValueOuterClass.internal_static_UInt32Value_descriptor;
}
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.blueapron.connect.protobuf.UInt32ValueOuterClass.internal_static_UInt32Value_fieldAccessorTable
@@ -298,6 +314,7 @@ private void maybeForceBuilderInitialization() {
.alwaysUseFieldBuilders) {
}
}
+ @java.lang.Override
public Builder clear() {
super.clear();
value_ = 0;
@@ -305,15 +322,18 @@ public Builder clear() {
return this;
}
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.blueapron.connect.protobuf.UInt32ValueOuterClass.internal_static_UInt32Value_descriptor;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value getDefaultInstanceForType() {
return com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value.getDefaultInstance();
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value build() {
com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value result = buildPartial();
if (!result.isInitialized()) {
@@ -322,6 +342,7 @@ public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value build()
return result;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value buildPartial() {
com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value result = new com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value(this);
result.value_ = value_;
@@ -329,32 +350,39 @@ public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value buildPar
return result;
}
+ @java.lang.Override
public Builder clone() {
- return (Builder) super.clone();
+ return super.clone();
}
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.setField(field, value);
+ return super.setField(field, value);
}
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
- return (Builder) super.clearField(field);
+ return super.clearField(field);
}
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return (Builder) super.clearOneof(oneof);
+ return super.clearOneof(oneof);
}
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
- return (Builder) super.setRepeatedField(field, index, value);
+ return super.setRepeatedField(field, index, value);
}
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
- return (Builder) super.addRepeatedField(field, value);
+ return super.addRepeatedField(field, value);
}
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value) {
return mergeFrom((com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value)other);
@@ -374,10 +402,12 @@ public Builder mergeFrom(com.blueapron.connect.protobuf.UInt32ValueOuterClass.UI
return this;
}
+ @java.lang.Override
public final boolean isInitialized() {
return true;
}
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
@@ -399,12 +429,15 @@ public Builder mergeFrom(
private int value_ ;
/**
* uint32 value = 1;
+ * @return The value.
*/
public int getValue() {
return value_;
}
/**
* uint32 value = 1;
+ * @param value The value to set.
+ * @return This builder for chaining.
*/
public Builder setValue(int value) {
@@ -414,6 +447,7 @@ public Builder setValue(int value) {
}
/**
* uint32 value = 1;
+ * @return This builder for chaining.
*/
public Builder clearValue() {
@@ -421,11 +455,13 @@ public Builder clearValue() {
onChanged();
return this;
}
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFieldsProto3(unknownFields);
+ return super.setUnknownFields(unknownFields);
}
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -447,11 +483,12 @@ public static com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value g
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
+ @java.lang.Override
public UInt32Value parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new UInt32Value(input, extensionRegistry);
+ return new UInt32Value(input, extensionRegistry);
}
};
@@ -464,6 +501,7 @@ public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
+ @java.lang.Override
public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -488,18 +526,10 @@ public com.blueapron.connect.protobuf.UInt32ValueOuterClass.UInt32Value getDefau
"lue\030\001 \001(\rB \n\036com.blueapron.connect.proto" +
"bufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
+ });
internal_static_UInt32Value_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_UInt32Value_fieldAccessorTable = new
diff --git a/src/test/java/com/blueapron/connect/protobuf/UInt64ValueOuterClass.java b/src/test/java/com/blueapron/connect/protobuf/UInt64ValueOuterClass.java
index ab92b27..4824797 100644
--- a/src/test/java/com/blueapron/connect/protobuf/UInt64ValueOuterClass.java
+++ b/src/test/java/com/blueapron/connect/protobuf/UInt64ValueOuterClass.java
@@ -1,5 +1,5 @@
// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: protos/UInt64Value.proto
+// source: UInt64Value.proto
package com.blueapron.connect.protobuf;
@@ -20,6 +20,7 @@ public interface UInt64ValueOrBuilder extends
/**
* uint64 value = 1;
+ * @return The value.
*/
long getValue();
}
@@ -42,6 +43,13 @@ private UInt64Value(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
private UInt64Value() {
}
+ @java.lang.Override
+ @SuppressWarnings({"unused"})
+ protected java.lang.Object newInstance(
+ UnusedPrivateParameter unused) {
+ return new UInt64Value();
+ }
+
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
@@ -55,7 +63,6 @@ private UInt64Value(
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
- int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
@@ -107,6 +114,7 @@ private UInt64Value(
private long value_;
/**
* uint64 value = 1;
+ * @return The value.
*/
public long getValue() {
return value_;
@@ -422,12 +430,15 @@ public Builder mergeFrom(
private long value_ ;
/**
* uint64 value = 1;
+ * @return The value.
*/
public long getValue() {
return value_;
}
/**
* uint64 value = 1;
+ * @param value The value to set.
+ * @return This builder for chaining.
*/
public Builder setValue(long value) {
@@ -437,6 +448,7 @@ public Builder setValue(long value) {
}
/**
* uint64 value = 1;
+ * @return This builder for chaining.
*/
public Builder clearValue() {
@@ -511,22 +523,14 @@ public com.blueapron.connect.protobuf.UInt64ValueOuterClass.UInt64Value getDefau
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\030protos/UInt64Value.proto\"\034\n\013UInt64Valu" +
- "e\022\r\n\005value\030\001 \001(\004B \n\036com.blueapron.connec" +
- "t.protobufb\006proto3"
+ "\n\021UInt64Value.proto\"\034\n\013UInt64Value\022\r\n\005va" +
+ "lue\030\001 \001(\004B \n\036com.blueapron.connect.proto" +
+ "bufb\006proto3"
};
- com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
- new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
- public com.google.protobuf.ExtensionRegistry assignDescriptors(
- com.google.protobuf.Descriptors.FileDescriptor root) {
- descriptor = root;
- return null;
- }
- };
- com.google.protobuf.Descriptors.FileDescriptor
+ descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
- }, assigner);
+ });
internal_static_UInt64Value_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_UInt64Value_fieldAccessorTable = new