diff --git a/core/generated/swagger-ui/schema-registry-api-spec.yaml b/core/generated/swagger-ui/schema-registry-api-spec.yaml index a089ba1e96f..1d164d9f7d6 100644 --- a/core/generated/swagger-ui/schema-registry-api-spec.yaml +++ b/core/generated/swagger-ui/schema-registry-api-spec.yaml @@ -1906,7 +1906,7 @@ paths: summary: Get schema string by version description: Retrieves the schema for the specified version of this subject. Only the unescaped schema string is returned. - operationId: getSchemaOnly_2 + operationId: getSchemaOnly parameters: - name: subject in: path @@ -2071,6 +2071,56 @@ paths: "500": description: | Error code 50001 -- Error in the backend data store + /subjects/{subject}/metadata: + get: + summary: Retrieve the latest version with the given metadata. + description: Retrieve the latest version with the given metadata. + operationId: getLatestWithMetadata + parameters: + - name: subject + in: path + description: Subject under which the schema will be registered + required: true + schema: + type: string + - name: key + in: query + description: The metadata key + schema: + type: array + items: + type: string + - name: value + in: query + description: The metadata value + schema: + type: array + items: + type: string + - name: deleted + in: query + description: Whether to lookup deleted schemas + schema: + type: boolean + responses: + "200": + description: The schema + content: + application/vnd.schemaregistry.v1+json: + schema: + $ref: '#/components/schemas/Schema' + application/vnd.schemaregistry+json; qs=0.9: + schema: + $ref: '#/components/schemas/Schema' + application/json; qs=0.5: + schema: + $ref: '#/components/schemas/Schema' + "404": + description: |- + Error code 40401 -- Subject not found + Error code 40403 -- Schema not found + "500": + description: Internal server error components: schemas: CompatibilityCheckResponse: @@ -2107,6 +2157,10 @@ components: description: References to other schemas items: $ref: '#/components/schemas/SchemaReference' + metadata: + $ref: '#/components/schemas/Metadata' + ruleSet: + $ref: '#/components/schemas/RuleSet' schema: type: string description: Schema definition string @@ -2143,6 +2197,16 @@ components: - FULL - FULL_TRANSITIVE - NONE + compatibilityGroup: + type: string + defaultMetadata: + $ref: '#/components/schemas/Metadata' + overrideMetadata: + $ref: '#/components/schemas/Metadata' + defaultRuleSet: + $ref: '#/components/schemas/RuleSet' + overrideRuleSet: + $ref: '#/components/schemas/RuleSet' description: Config ConfigUpdateRequest: type: object @@ -2159,6 +2223,16 @@ components: - FULL - FULL_TRANSITIVE - NONE + compatibilityGroup: + type: string + defaultMetadata: + $ref: '#/components/schemas/Metadata' + overrideMetadata: + $ref: '#/components/schemas/Metadata' + defaultRuleSet: + $ref: '#/components/schemas/RuleSet' + overrideRuleSet: + $ref: '#/components/schemas/RuleSet' description: Config update request Mode: type: object @@ -2202,6 +2276,10 @@ components: description: References to other schemas items: $ref: '#/components/schemas/SchemaReference' + metadata: + $ref: '#/components/schemas/Metadata' + ruleSet: + $ref: '#/components/schemas/RuleSet' maxId: type: integer description: Maximum ID @@ -2238,6 +2316,12 @@ components: type: string description: Schema definition string example: "{\"schema\": \"{\"type\": \"string\"}\"}" + metadata: + $ref: '#/components/schemas/Metadata' + ruleset: + $ref: '#/components/schemas/RuleSet' + ruleSet: + $ref: '#/components/schemas/RuleSet' description: Schema SubjectVersion: type: object @@ -2288,3 +2372,89 @@ components: type: string commitId: type: string + Metadata: + type: object + properties: + tags: + type: object + additionalProperties: + uniqueItems: true + type: array + items: + type: string + properties: + type: object + additionalProperties: + type: string + sensitive: + uniqueItems: true + type: array + items: + type: string + description: User-defined metadata + Rule: + type: object + properties: + name: + type: string + description: Rule name + doc: + type: string + description: Rule doc + kind: + type: string + description: Rule kind + enum: + - TRANSFORM + - CONDITION + mode: + type: string + description: Rule mode + enum: + - UPGRADE + - DOWNGRADE + - UPDOWN + - WRITE + - READ + - WRITEREAD + type: + type: string + description: Rule type + tags: + uniqueItems: true + type: array + description: The tags to which this rule applies + items: + type: string + description: The tags to which this rule applies + params: + type: object + additionalProperties: + type: string + description: Optional params for the rule + description: Optional params for the rule + expr: + type: string + description: Rule expression + onSuccess: + type: string + description: Rule action on success + onFailure: + type: string + description: Rule action on failure + disabled: + type: boolean + description: Whether the rule is disabled + description: Rule + RuleSet: + type: object + properties: + migrationRules: + type: array + items: + $ref: '#/components/schemas/Rule' + domainRules: + type: array + items: + $ref: '#/components/schemas/Rule' + description: Schema rule set diff --git a/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Ref.java b/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Ref.java index 268eed615c8..1df8913c360 100644 --- a/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Ref.java +++ b/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Ref.java @@ -64,54 +64,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ReferencedMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - refId_ = s; - break; - } - case 16: { - - isActive_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.Ref.internal_static_io_confluent_kafka_serializers_protobuf_test_ReferencedMessage_descriptor; @@ -194,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (isActive_ != false) { output.writeBool(2, isActive_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -210,7 +162,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, isActive_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getRefId())) return false; if (getIsActive() != other.getIsActive()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -245,7 +197,7 @@ public int hashCode() { hash = (37 * hash) + IS_ACTIVE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsActive()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -362,18 +314,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.Ref.ReferencedMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -465,7 +412,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.Ref.Refere if (other.getIsActive() != false) { setIsActive(other.getIsActive()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -480,17 +427,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.Ref.ReferencedMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + refId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + isActive_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.Ref.ReferencedMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -633,7 +603,18 @@ public ReferencedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReferencedMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Root.java b/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Root.java index 958ae01f068..af3acdd52a4 100644 --- a/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Root.java +++ b/core/src/test/java/io/confluent/kafka/serializers/protobuf/test/Root.java @@ -73,62 +73,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ReferrerMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - rootId_ = s; - break; - } - case 18: { - io.confluent.kafka.serializers.protobuf.test.Ref.ReferencedMessage.Builder subBuilder = null; - if (ref_ != null) { - subBuilder = ref_.toBuilder(); - } - ref_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.Ref.ReferencedMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(ref_); - ref_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.Root.internal_static_io_confluent_kafka_serializers_protobuf_test_ReferrerMessage_descriptor; @@ -226,7 +170,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (ref_ != null) { output.writeMessage(2, getRef()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -242,7 +186,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getRef()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -264,7 +208,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRef() .equals(other.getRef())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -281,7 +225,7 @@ public int hashCode() { hash = (37 * hash) + REF_FIELD_NUMBER; hash = (53 * hash) + getRef().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -398,18 +342,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.Root.ReferrerMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -509,7 +448,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.Root.Refer if (other.hasRef()) { mergeRef(other.getRef()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -524,17 +463,42 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.Root.ReferrerMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + rootId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + input.readMessage( + getRefFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.Root.ReferrerMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -765,7 +729,18 @@ public ReferrerMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReferrerMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/Key.java b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/Key.java index 773258faf21..109bbd7bef8 100644 --- a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/Key.java +++ b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/Key.java @@ -51,48 +51,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KeyMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.Key.internal_static_KeyMessage_descriptor; @@ -134,7 +92,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (key_ != 0) { output.writeInt32(1, key_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -147,7 +105,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, key_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -164,7 +122,7 @@ public boolean equals(final java.lang.Object obj) { if (getKey() != other.getKey()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -177,7 +135,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -294,18 +252,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.Key.KeyMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -390,7 +343,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.Key.KeyMessage other if (other.getKey() != 0) { setKey(other.getKey()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -405,17 +358,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.Key.KeyMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.Key.KeyMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -482,7 +453,18 @@ public KeyMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValue.java b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValue.java index 35594258e85..0cd57dd225a 100644 --- a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValue.java +++ b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValue.java @@ -64,54 +64,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KeyValueMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.KeyValue.internal_static_KeyValueMessage_descriptor; @@ -194,7 +146,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -210,7 +162,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { != other.getKey()) return false; if (!getValue() .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +196,7 @@ public int hashCode() { hash = (53 * hash) + getKey(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,18 +313,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.KeyValue.KeyValueMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -464,7 +411,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.KeyValue.KeyValueMes value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,17 +426,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.KeyValue.KeyValueMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + case 18: { + value_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.KeyValue.KeyValueMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +602,18 @@ public KeyValueMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyValueMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueOptional.java b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueOptional.java index 44a8507b6eb..ead13bb2d53 100644 --- a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueOptional.java +++ b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueOptional.java @@ -69,55 +69,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KeyValueOptionalMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.KeyValueOptional.internal_static_KeyValueOptionalMessage_descriptor; @@ -209,7 +160,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -225,7 +176,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -247,7 +198,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -264,7 +215,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -381,18 +332,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.KeyValueOptional.KeyValueOptionalMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -491,7 +437,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.KeyValueOptional.Key value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -506,17 +452,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.KeyValueOptional.KeyValueOptionalMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + case 18: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.KeyValueOptional.KeyValueOptionalMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -667,7 +636,18 @@ public KeyValueOptionalMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyValueOptionalMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueWrapper.java b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueWrapper.java index 71224ba34e1..782291326ba 100644 --- a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueWrapper.java +++ b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/KeyValueWrapper.java @@ -81,74 +81,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KeyValueWrapperMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - case 18: { - com.google.protobuf.StringValue.Builder subBuilder = null; - if (wrappedValue_ != null) { - subBuilder = wrappedValue_.toBuilder(); - } - wrappedValue_ = input.readMessage(com.google.protobuf.StringValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(wrappedValue_); - wrappedValue_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.UInt32Value.Builder subBuilder = null; - if (wrappedValue2_ != null) { - subBuilder = wrappedValue2_.toBuilder(); - } - wrappedValue2_ = input.readMessage(com.google.protobuf.UInt32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(wrappedValue2_); - wrappedValue2_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.KeyValueWrapper.internal_static_KeyValueWrapperMessage_descriptor; @@ -248,7 +180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (wrappedValue2_ != null) { output.writeMessage(3, getWrappedValue2()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -269,7 +201,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getWrappedValue2()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -296,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (!getWrappedValue2() .equals(other.getWrappedValue2())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +249,7 @@ public int hashCode() { hash = (37 * hash) + WRAPPEDVALUE2_FIELD_NUMBER; hash = (53 * hash) + getWrappedValue2().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,18 +366,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.KeyValueWrapper.KeyValueWrapperMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -558,7 +485,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.KeyValueWrapper.KeyV if (other.hasWrappedValue2()) { mergeWrappedValue2(other.getWrappedValue2()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -573,17 +500,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.KeyValueWrapper.KeyValueWrapperMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + case 18: { + input.readMessage( + getWrappedValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + input.readMessage( + getWrappedValue2FieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.KeyValueWrapper.KeyValueWrapperMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -888,7 +847,18 @@ public KeyValueWrapperMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyValueWrapperMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/MapReferences.java b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/MapReferences.java index d37fc313832..441baa8e75e 100644 --- a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/MapReferences.java +++ b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/MapReferences.java @@ -125,94 +125,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private MapReferencesMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - map1_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - map1_.add( - input.readMessage(io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - map2_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - map2_.add( - input.readMessage(io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.parser(), extensionRegistry)); - break; - } - case 26: { - io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.Builder subBuilder = null; - if (notAMap1_ != null) { - subBuilder = notAMap1_.toBuilder(); - } - notAMap1_ = input.readMessage(io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(notAMap1_); - notAMap1_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.Builder subBuilder = null; - if (notAMap2_ != null) { - subBuilder = notAMap2_.toBuilder(); - } - notAMap2_ = input.readMessage(io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(notAMap2_); - notAMap2_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - map1_ = java.util.Collections.unmodifiableList(map1_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - map2_ = java.util.Collections.unmodifiableList(map2_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.MapReferences.internal_static_MapReferencesMessage_descriptor; @@ -384,7 +296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (notAMap2_ != null) { output.writeMessage(4, getNotAMap2()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -409,7 +321,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, getNotAMap2()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -438,7 +350,7 @@ public boolean equals(final java.lang.Object obj) { if (!getNotAMap2() .equals(other.getNotAMap2())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -465,7 +377,7 @@ public int hashCode() { hash = (37 * hash) + NOTAMAP2_FIELD_NUMBER; hash = (53 * hash) + getNotAMap2().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -582,36 +494,31 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.MapReferences.MapReferencesMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getMap1FieldBuilder(); - getMap2FieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); if (map1Builder_ == null) { map1_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + map1_ = null; map1Builder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (map2Builder_ == null) { map2_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + map2_ = null; map2Builder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (notAMap1Builder_ == null) { notAMap1_ = null; } else { @@ -785,7 +692,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.MapReferences.MapRef if (other.hasNotAMap2()) { mergeNotAMap2(other.getNotAMap2()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -800,17 +707,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.MapReferences.MapReferencesMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry m = + input.readMessage( + io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.parser(), + extensionRegistry); + if (map1Builder_ == null) { + ensureMap1IsMutable(); + map1_.add(m); + } else { + map1Builder_.addMessage(m); + } + break; + } // case 10 + case 18: { + io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry m = + input.readMessage( + io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.parser(), + extensionRegistry); + if (map2Builder_ == null) { + ensureMap2IsMutable(); + map2_.add(m); + } else { + map2Builder_.addMessage(m); + } + break; + } // case 18 + case 26: { + input.readMessage( + getNotAMap1FieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + case 34: { + input.readMessage( + getNotAMap2FieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.MapReferences.MapReferencesMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1565,7 +1525,18 @@ public MapReferencesMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MapReferencesMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1642,55 +1613,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private AttributeFieldEntry( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.MapReferences.internal_static_AttributeFieldEntry_descriptor; @@ -1800,7 +1722,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1815,7 +1737,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1834,7 +1756,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getKey())) return false; if (!getValue() .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1849,7 +1771,7 @@ public int hashCode() { hash = (53 * hash) + getKey().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1966,18 +1888,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -2070,7 +1987,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.MapReferences.Attrib value_ = other.value_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2085,17 +2002,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + value_ = input.readStringRequireUtf8(); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.MapReferences.AttributeFieldEntry) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2283,7 +2223,18 @@ public AttributeFieldEntry parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttributeFieldEntry(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/RecursiveKeyValue.java b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/RecursiveKeyValue.java index 8356ca146db..b200a408515 100644 --- a/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/RecursiveKeyValue.java +++ b/protobuf-converter/src/test/java/io/confluent/connect/protobuf/test/RecursiveKeyValue.java @@ -79,67 +79,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private RecursiveKeyValueMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 82: { - io.confluent.connect.protobuf.test.RecursiveKeyValue.RecursiveKeyValueMessage.Builder subBuilder = null; - if (keyValue_ != null) { - subBuilder = keyValue_.toBuilder(); - } - keyValue_ = input.readMessage(io.confluent.connect.protobuf.test.RecursiveKeyValue.RecursiveKeyValueMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(keyValue_); - keyValue_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.RecursiveKeyValue.internal_static_RecursiveKeyValueMessage_descriptor; @@ -251,7 +190,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (keyValue_ != null) { output.writeMessage(10, getKeyValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -271,7 +210,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, getKeyValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -295,7 +234,7 @@ public boolean equals(final java.lang.Object obj) { if (!getKeyValue() .equals(other.getKeyValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -314,7 +253,7 @@ public int hashCode() { hash = (37 * hash) + KEY_VALUE_FIELD_NUMBER; hash = (53 * hash) + getKeyValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -431,18 +370,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.RecursiveKeyValue.RecursiveKeyValueMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -548,7 +482,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.RecursiveKeyValue.Re if (other.hasKeyValue()) { mergeKeyValue(other.getKeyValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,17 +497,47 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.RecursiveKeyValue.RecursiveKeyValueMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + case 18: { + value_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 82: { + input.readMessage( + getKeyValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.RecursiveKeyValue.RecursiveKeyValueMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -835,7 +799,18 @@ public RecursiveKeyValueMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RecursiveKeyValueMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/com/acme/glup/CommonProto.java b/protobuf-serializer/src/test/java/com/acme/glup/CommonProto.java index 71bee32a1cf..083cb8eb46c 100644 --- a/protobuf-serializer/src/test/java/com/acme/glup/CommonProto.java +++ b/protobuf-serializer/src/test/java/com/acme/glup/CommonProto.java @@ -423,68 +423,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Consent( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - identificationForbidden_ = input.readBool(); - break; - } - case 16: { - int rawValue = input.readEnum(); - - reason_ = rawValue; - break; - } - case 400082: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - setFields_ = com.google.protobuf.MapField.newMapField( - SetFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - setFields__ = input.readMessage( - SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - setFields_.getMutableMap().put( - setFields__.getKey(), setFields__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.CommonProto.internal_static_Acme_Glup_Consent_descriptor; @@ -675,7 +613,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetSetFields(), SetFieldsDefaultEntryHolder.defaultEntry, 50010); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -702,7 +640,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(50010, setFields__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -722,7 +660,7 @@ public boolean equals(final java.lang.Object obj) { if (reason_ != other.reason_) return false; if (!internalGetSetFields().equals( other.internalGetSetFields())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -742,7 +680,7 @@ public int hashCode() { hash = (37 * hash) + SET_FIELDS_FIELD_NUMBER; hash = (53 * hash) + internalGetSetFields().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -886,18 +824,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.acme.glup.CommonProto.Consent.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -994,7 +927,7 @@ public Builder mergeFrom(com.acme.glup.CommonProto.Consent other) { } internalGetMutableSetFields().mergeFrom( other.internalGetSetFields()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1009,17 +942,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.CommonProto.Consent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + identificationForbidden_ = input.readBool(); + + break; + } // case 8 + case 16: { + reason_ = input.readEnum(); + + break; + } // case 16 + case 400082: { + com.google.protobuf.MapEntry + setFields__ = input.readMessage( + SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSetFields().getMutableMap().put( + setFields__.getKey(), setFields__.getValue()); + break; + } // case 400082 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.CommonProto.Consent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1329,7 +1293,18 @@ public Consent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Consent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/com/acme/glup/ExampleProtoAcme.java b/protobuf-serializer/src/test/java/com/acme/glup/ExampleProtoAcme.java index f651800cde3..714669d26c4 100644 --- a/protobuf-serializer/src/test/java/com/acme/glup/ExampleProtoAcme.java +++ b/protobuf-serializer/src/test/java/com/acme/glup/ExampleProtoAcme.java @@ -192,101 +192,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ClickCas( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.Origin.Builder subBuilder = null; - if (glupOrigin_ != null) { - subBuilder = glupOrigin_.toBuilder(); - } - glupOrigin_ = input.readMessage(com.acme.glup.MetadataProto.Origin.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(glupOrigin_); - glupOrigin_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.acme.glup.MetadataProto.Partition.Builder subBuilder = null; - if (partition_ != null) { - subBuilder = partition_.toBuilder(); - } - partition_ = input.readMessage(com.acme.glup.MetadataProto.Partition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partition_); - partition_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - uid_ = s; - break; - } - case 400082: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - setFields_ = com.google.protobuf.MapField.newMapField( - SetFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - setFields__ = input.readMessage( - SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - setFields_.getMutableMap().put( - setFields__.getKey(), setFields__.getValue()); - break; - } - case 16777210: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - controlMessage_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - controlMessage_.add( - input.readMessage(com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - controlMessage_ = java.util.Collections.unmodifiableList(controlMessage_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.ExampleProtoAcme.internal_static_Acme_Glup_ClickCas_descriptor; @@ -595,7 +500,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < controlMessage_.size(); i++) { output.writeMessage(2097151, controlMessage_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -629,7 +534,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2097151, controlMessage_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -660,7 +565,7 @@ public boolean equals(final java.lang.Object obj) { other.internalGetSetFields())) return false; if (!getControlMessageList() .equals(other.getControlMessageList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -689,7 +594,7 @@ public int hashCode() { hash = (37 * hash) + CONTROL_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getControlMessageList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -828,19 +733,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.acme.glup.ExampleProtoAcme.ClickCas.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getControlMessageFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -862,10 +761,11 @@ public Builder clear() { internalGetMutableSetFields().clear(); if (controlMessageBuilder_ == null) { controlMessage_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + controlMessage_ = null; controlMessageBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1001,7 +901,7 @@ public Builder mergeFrom(com.acme.glup.ExampleProtoAcme.ClickCas other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1016,17 +916,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.ExampleProtoAcme.ClickCas parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getGlupOriginFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getPartitionFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 42: { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 400082: { + com.google.protobuf.MapEntry + setFields__ = input.readMessage( + SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSetFields().getMutableMap().put( + setFields__.getKey(), setFields__.getValue()); + break; + } // case 400082 + case 16777210: { + com.acme.glup.MetadataProto.ControlMessage.Watermark m = + input.readMessage( + com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), + extensionRegistry); + if (controlMessageBuilder_ == null) { + ensureControlMessageIsMutable(); + controlMessage_.add(m); + } else { + controlMessageBuilder_.addMessage(m); + } + break; + } // case 16777210 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.ExampleProtoAcme.ClickCas) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1852,7 +1805,18 @@ public ClickCas parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ClickCas(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/com/acme/glup/MetadataProto.java b/protobuf-serializer/src/test/java/com/acme/glup/MetadataProto.java index 1ebe41d52c8..9395c8c1b48 100644 --- a/protobuf-serializer/src/test/java/com/acme/glup/MetadataProto.java +++ b/protobuf-serializer/src/test/java/com/acme/glup/MetadataProto.java @@ -1488,56 +1488,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KafkaMessageOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - topic_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - topic_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - topic_ = topic_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_KafkaMessageOptions_descriptor; @@ -1603,7 +1553,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < topic_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1620,7 +1570,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTopicList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1637,7 +1587,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTopicList() .equals(other.getTopicList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1652,7 +1602,7 @@ public int hashCode() { hash = (37 * hash) + TOPIC_FIELD_NUMBER; hash = (53 * hash) + getTopicList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1773,18 +1723,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.KafkaMessageOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -1881,7 +1826,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.KafkaMessageOptions other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1896,17 +1841,36 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.KafkaMessageOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTopicIsMutable(); + topic_.add(s); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.KafkaMessageOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -2053,7 +2017,18 @@ public KafkaMessageOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KafkaMessageOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2290,101 +2265,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DataSet( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - format_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - format_.add( - input.readMessage(com.acme.glup.MetadataProto.DataSetFormat.parser(), extensionRegistry)); - break; - } - case 24: { - int rawValue = input.readEnum(); - - partitionScheme_ = rawValue; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - javaClass_ = s; - break; - } - case 40: { - - forTests_ = input.readBool(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - owner_ = s; - break; - } - case 56: { - - private_ = input.readBool(); - break; - } - case 64: { - int rawValue = input.readEnum(); - - kind_ = rawValue; - break; - } - case 72: { - - retentionDays_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - format_ = java.util.Collections.unmodifiableList(format_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_DataSet_descriptor; @@ -2740,7 +2620,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (retentionDays_ != 0) { output.writeInt32(9, retentionDays_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2782,7 +2662,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(9, retentionDays_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2813,7 +2693,7 @@ public boolean equals(final java.lang.Object obj) { if (kind_ != other.kind_) return false; if (getRetentionDays() != other.getRetentionDays()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2846,7 +2726,7 @@ public int hashCode() { hash = (53 * hash) + kind_; hash = (37 * hash) + RETENTION_DAYS_FIELD_NUMBER; hash = (53 * hash) + getRetentionDays(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2967,19 +2847,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.DataSet.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getFormatFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -2988,10 +2862,11 @@ public Builder clear() { if (formatBuilder_ == null) { format_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + format_ = null; formatBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); partitionScheme_ = 0; javaClass_ = ""; @@ -3151,7 +3026,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.DataSet other) { if (other.getRetentionDays() != 0) { setRetentionDays(other.getRetentionDays()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3166,17 +3041,83 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.DataSet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + com.acme.glup.MetadataProto.DataSetFormat m = + input.readMessage( + com.acme.glup.MetadataProto.DataSetFormat.parser(), + extensionRegistry); + if (formatBuilder_ == null) { + ensureFormatIsMutable(); + format_.add(m); + } else { + formatBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: { + partitionScheme_ = input.readEnum(); + + break; + } // case 24 + case 34: { + javaClass_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: { + forTests_ = input.readBool(); + + break; + } // case 40 + case 50: { + owner_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: { + private_ = input.readBool(); + + break; + } // case 56 + case 64: { + kind_ = input.readEnum(); + + break; + } // case 64 + case 72: { + retentionDays_ = input.readInt32(); + + break; + } // case 72 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.DataSet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -4100,7 +4041,18 @@ public DataSet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DataSet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4208,75 +4160,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DataSetChunk( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - partition_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - partition_.add( - input.readMessage(com.acme.glup.MetadataProto.Partition.parser(), extensionRegistry)); - break; - } - case 18: { - com.acme.glup.MetadataProto.DataSetFormat.Builder subBuilder = null; - if (format_ != null) { - subBuilder = format_.toBuilder(); - } - format_ = input.readMessage(com.acme.glup.MetadataProto.DataSetFormat.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(format_); - format_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - partition_ = java.util.Collections.unmodifiableList(partition_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_DataSetChunk_descriptor; @@ -4417,7 +4300,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, datasetId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4437,7 +4320,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, datasetId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4461,7 +4344,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getDatasetId() .equals(other.getDatasetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4482,7 +4365,7 @@ public int hashCode() { } hash = (37 * hash) + DATASETID_FIELD_NUMBER; hash = (53 * hash) + getDatasetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4603,29 +4486,24 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.DataSetChunk.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getPartitionFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); if (partitionBuilder_ == null) { partition_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + partition_ = null; partitionBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (formatBuilder_ == null) { format_ = null; } else { @@ -4757,7 +4635,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.DataSetChunk other) { datasetId_ = other.datasetId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4772,17 +4650,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.DataSetChunk parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.acme.glup.MetadataProto.Partition m = + input.readMessage( + com.acme.glup.MetadataProto.Partition.parser(), + extensionRegistry); + if (partitionBuilder_ == null) { + ensurePartitionIsMutable(); + partition_.add(m); + } else { + partitionBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + input.readMessage( + getFormatFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.DataSetChunk) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -5254,7 +5170,18 @@ public DataSetChunk parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DataSetChunk(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5485,109 +5412,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DataSetFormat( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - path_ = s; - break; - } - case 16: { - int rawValue = input.readEnum(); - - fileFormat_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - partitionScheme_ = rawValue; - break; - } - case 34: { - com.acme.glup.MetadataProto.HDFSPartition.Builder subBuilder = null; - if (startPartition_ != null) { - subBuilder = startPartition_.toBuilder(); - } - startPartition_ = input.readMessage(com.acme.glup.MetadataProto.HDFSPartition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startPartition_); - startPartition_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.acme.glup.MetadataProto.HDFSPartition.Builder subBuilder = null; - if (endPartition_ != null) { - subBuilder = endPartition_.toBuilder(); - } - endPartition_ = input.readMessage(com.acme.glup.MetadataProto.HDFSPartition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endPartition_); - endPartition_ = subBuilder.buildPartial(); - } - - break; - } - case 56: { - - retentionDays_ = input.readInt32(); - break; - } - case 64: { - - priority_ = input.readInt32(); - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 80: { - int rawValue = input.readEnum(); - - monitoringLevel_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_DataSetFormat_descriptor; @@ -5921,7 +5745,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (monitoringLevel_ != com.acme.glup.MetadataProto.MonitoringLevel.DEFAULT.getNumber()) { output.writeEnum(10, monitoringLevel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5964,7 +5788,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(10, monitoringLevel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6000,7 +5824,7 @@ public boolean equals(final java.lang.Object obj) { if (!getLabel() .equals(other.getLabel())) return false; if (monitoringLevel_ != other.monitoringLevel_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6033,7 +5857,7 @@ public int hashCode() { hash = (53 * hash) + getLabel().hashCode(); hash = (37 * hash) + MONITORING_LEVEL_FIELD_NUMBER; hash = (53 * hash) + monitoringLevel_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6154,18 +5978,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.DataSetFormat.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -6316,7 +6135,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.DataSetFormat other) { if (other.monitoringLevel_ != 0) { setMonitoringLevelValue(other.getMonitoringLevelValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6331,17 +6150,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.DataSetFormat parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + path_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + fileFormat_ = input.readEnum(); + + break; + } // case 16 + case 24: { + partitionScheme_ = input.readEnum(); + + break; + } // case 24 + case 34: { + input.readMessage( + getStartPartitionFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 34 + case 42: { + input.readMessage( + getEndPartitionFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 42 + case 56: { + retentionDays_ = input.readInt32(); + + break; + } // case 56 + case 64: { + priority_ = input.readInt32(); + + break; + } // case 64 + case 74: { + label_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 80: { + monitoringLevel_ = input.readEnum(); + + break; + } // case 80 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.DataSetFormat) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7187,7 +7068,18 @@ public DataSetFormat parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DataSetFormat(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7263,56 +7155,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private HDFSOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 26: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - import_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - import_.add( - input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - import_ = java.util.Collections.unmodifiableList(import_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_descriptor; @@ -7476,97 +7318,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ImportOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - owner_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 32: { - int rawValue = input.readEnum(); - - partitioning_ = rawValue; - break; - } - case 40: { - int rawValue = input.readEnum(); - - format_ = rawValue; - break; - } - case 48: { - - private_ = input.readBool(); - break; - } - case 90: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - generator_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - generator_.add( - input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.parser(), extensionRegistry)); - break; - } - case 98: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - view_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - view_.add( - input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - generator_ = java.util.Collections.unmodifiableList(generator_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - view_ = java.util.Collections.unmodifiableList(view_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_descriptor; @@ -7638,56 +7389,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private View( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 82: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions.Builder subBuilder = null; - if (hive_ != null) { - subBuilder = hive_.toBuilder(); - } - hive_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hive_); - hive_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_View_descriptor; @@ -7758,49 +7459,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private HiveOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 24: { - int rawValue = input.readEnum(); - - partitioning_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_View_HiveOptions_descriptor; @@ -7858,7 +7516,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (partitioning_ != com.acme.glup.MetadataProto.PartitionScheme.UNSUPPORTED_PARTITION_SCHEME.getNumber()) { output.writeEnum(3, partitioning_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7871,7 +7529,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, partitioning_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7887,7 +7545,7 @@ public boolean equals(final java.lang.Object obj) { com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions other = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions) obj; if (partitioning_ != other.partitioning_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7900,7 +7558,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PARTITIONING_FIELD_NUMBER; hash = (53 * hash) + partitioning_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8023,18 +7681,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -8119,7 +7772,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.V if (other.partitioning_ != 0) { setPartitioningValue(other.getPartitioningValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8134,17 +7787,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 24: { + partitioning_ = input.readEnum(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.HiveOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8254,7 +7925,18 @@ public HiveOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HiveOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8329,7 +8011,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (hive_ != null) { output.writeMessage(10, getHive()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8342,7 +8024,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(10, getHive()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8362,7 +8044,7 @@ public boolean equals(final java.lang.Object obj) { if (!getHive() .equals(other.getHive())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8377,7 +8059,7 @@ public int hashCode() { hash = (37 * hash) + HIVE_FIELD_NUMBER; hash = (53 * hash) + getHive().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8494,18 +8176,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -8598,7 +8275,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.V if (other.hasHive()) { mergeHive(other.getHive()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8613,17 +8290,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 82: { + input.readMessage( + getHiveFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 82 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8814,7 +8511,18 @@ public View parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new View(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9149,209 +8857,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Generator( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions.Builder subBuilder = null; - if (dataloader_ != null) { - subBuilder = dataloader_.toBuilder(); - } - dataloader_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dataloader_); - dataloader_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.Kafka2HdfsOptions.Builder subBuilder = null; - if (kafka2Hdfs_ != null) { - subBuilder = kafka2Hdfs_.toBuilder(); - } - kafka2Hdfs_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.Kafka2HdfsOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kafka2Hdfs_); - kafka2Hdfs_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SyncOptions.Builder subBuilder = null; - if (sync_ != null) { - subBuilder = sync_.toBuilder(); - } - sync_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SyncOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sync_); - sync_ = subBuilder.buildPartial(); - } - - break; - } - case 34: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions.Builder subBuilder = null; - if (external_ != null) { - subBuilder = external_.toBuilder(); - } - external_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(external_); - external_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.BackupOptions.Builder subBuilder = null; - if (backup_ != null) { - subBuilder = backup_.toBuilder(); - } - backup_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.BackupOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(backup_); - backup_ = subBuilder.buildPartial(); - } - - break; - } - case 50: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.TranscodingOptions.Builder subBuilder = null; - if (transcoding_ != null) { - subBuilder = transcoding_.toBuilder(); - } - transcoding_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.TranscodingOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(transcoding_); - transcoding_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KaCoHaOptions.Builder subBuilder = null; - if (kacoha_ != null) { - subBuilder = kacoha_.toBuilder(); - } - kacoha_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KaCoHaOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kacoha_); - kacoha_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DedupOptions.Builder subBuilder = null; - if (deduplicate_ != null) { - subBuilder = deduplicate_.toBuilder(); - } - deduplicate_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DedupOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deduplicate_); - deduplicate_ = subBuilder.buildPartial(); - } - - break; - } - case 74: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SamplerOptions.Builder subBuilder = null; - if (sampler_ != null) { - subBuilder = sampler_.toBuilder(); - } - sampler_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SamplerOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(sampler_); - sampler_ = subBuilder.buildPartial(); - } - - break; - } - case 82: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ComparatorOptions.Builder subBuilder = null; - if (comparator_ != null) { - subBuilder = comparator_.toBuilder(); - } - comparator_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ComparatorOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(comparator_); - comparator_ = subBuilder.buildPartial(); - } - - break; - } - case 2002: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - to_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - to_.add( - input.readMessage(com.acme.glup.MetadataProto.Location.parser(), extensionRegistry)); - break; - } - case 2010: { - java.lang.String s = input.readStringRequireUtf8(); - - namespace_ = s; - break; - } - case 2026: { - java.lang.String s = input.readStringRequireUtf8(); - - startDate_ = s; - break; - } - case 2034: { - java.lang.String s = input.readStringRequireUtf8(); - - stopDate_ = s; - break; - } - case 2040: { - - ignoreCn_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - to_ = java.util.Collections.unmodifiableList(to_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_descriptor; @@ -9492,72 +8997,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DedupOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - inputDatasetId_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - inputFormatLabel_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - outputDatasetId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - outputFormatLabel_ = s; - break; - } - case 40: { - - useHippoCuttleJob_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_DedupOptions_descriptor; @@ -9801,7 +9240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (useHippoCuttleJob_ != false) { output.writeBool(5, useHippoCuttleJob_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9826,7 +9265,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(5, useHippoCuttleJob_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9851,7 +9290,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getOutputFormatLabel())) return false; if (getUseHippoCuttleJob() != other.getUseHippoCuttleJob()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9873,7 +9312,7 @@ public int hashCode() { hash = (37 * hash) + USE_HIPPO_CUTTLE_JOB_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getUseHippoCuttleJob()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9990,18 +9429,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DedupOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -10114,7 +9548,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.getUseHippoCuttleJob() != false) { setUseHippoCuttleJob(other.getUseHippoCuttleJob()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10129,17 +9563,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DedupOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + inputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + inputFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + outputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + outputFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: { + useHippoCuttleJob_ = input.readBool(); + + break; + } // case 40 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DedupOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10608,7 +10080,18 @@ public DedupOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DedupOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10732,66 +10215,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Kafka2HdfsOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - case 24: { - - deduplicate_ = input.readBool(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - outputDatasetId_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - outputFormatLabel_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_Kafka2HdfsOptions_descriptor; @@ -10984,7 +10407,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputFormatLabel_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, outputFormatLabel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11006,7 +10429,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(outputFormatLabel_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, outputFormatLabel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11029,7 +10452,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getOutputDatasetId())) return false; if (!getOutputFormatLabel() .equals(other.getOutputFormatLabel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11049,7 +10472,7 @@ public int hashCode() { hash = (53 * hash) + getOutputDatasetId().hashCode(); hash = (37 * hash) + OUTPUT_FORMAT_LABEL_FIELD_NUMBER; hash = (53 * hash) + getOutputFormatLabel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11166,18 +10589,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.Kafka2HdfsOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -11283,7 +10701,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G outputFormatLabel_ = other.outputFormatLabel_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11298,17 +10716,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.Kafka2HdfsOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + topic_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 24: { + deduplicate_ = input.readBool(); + + break; + } // case 24 + case 34: { + outputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + outputFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.Kafka2HdfsOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11675,7 +11126,18 @@ public Kafka2HdfsOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Kafka2HdfsOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11746,53 +11208,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KacohaConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - partitionsPerTask_ = input.readInt32(); - break; - } - case 16: { - - pollBufferSizeBytes_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_KacohaConfig_descriptor; @@ -11856,7 +11271,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (pollBufferSizeBytes_ != 0) { output.writeInt32(2, pollBufferSizeBytes_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11873,7 +11288,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, pollBufferSizeBytes_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11892,7 +11307,7 @@ public boolean equals(final java.lang.Object obj) { != other.getPartitionsPerTask()) return false; if (getPollBufferSizeBytes() != other.getPollBufferSizeBytes()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11907,7 +11322,7 @@ public int hashCode() { hash = (53 * hash) + getPartitionsPerTask(); hash = (37 * hash) + POLL_BUFFER_SIZE_BYTES_FIELD_NUMBER; hash = (53 * hash) + getPollBufferSizeBytes(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12024,18 +11439,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -12126,7 +11536,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.getPollBufferSizeBytes() != 0) { setPollBufferSizeBytes(other.getPollBufferSizeBytes()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12141,17 +11551,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + partitionsPerTask_ = input.readInt32(); + + break; + } // case 8 + case 16: { + pollBufferSizeBytes_ = input.readInt32(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -12273,7 +11706,18 @@ public KacohaConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KacohaConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12371,62 +11815,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KacohaConfigPerDc( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - dc_ = rawValue; - break; - } - case 18: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_KacohaConfigPerDc_descriptor; @@ -12525,7 +11913,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (config_ != null) { output.writeMessage(2, getConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -12542,7 +11930,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -12563,7 +11951,7 @@ public boolean equals(final java.lang.Object obj) { if (!getConfig() .equals(other.getConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -12580,7 +11968,7 @@ public int hashCode() { hash = (37 * hash) + CONFIG_FIELD_NUMBER; hash = (53 * hash) + getConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -12697,18 +12085,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfigPerDc.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -12807,7 +12190,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.hasConfig()) { mergeConfig(other.getConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12822,17 +12205,42 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfigPerDc parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + dc_ = input.readEnum(); + + break; + } // case 8 + case 18: { + input.readMessage( + getConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfigPerDc) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -13097,7 +12505,18 @@ public KacohaConfigPerDc parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KacohaConfigPerDc(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -13293,92 +12712,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KaCoHaOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - topic_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - outputDatasetId_ = s; - break; - } - case 24: { - - deduplicate_ = input.readBool(); - break; - } - case 34: { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig.Builder subBuilder = null; - if (config_ != null) { - subBuilder = config_.toBuilder(); - } - config_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(config_); - config_ = subBuilder.buildPartial(); - } - - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - outputFormatLabel_ = s; - break; - } - case 50: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - configPerDc_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - configPerDc_.add( - input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfigPerDc.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - configPerDc_ = java.util.Collections.unmodifiableList(configPerDc_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_KaCoHaOptions_descriptor; @@ -13675,7 +13008,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < configPerDc_.size(); i++) { output.writeMessage(6, configPerDc_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13705,7 +13038,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, configPerDc_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13735,7 +13068,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getOutputFormatLabel())) return false; if (!getConfigPerDcList() .equals(other.getConfigPerDcList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13763,7 +13096,7 @@ public int hashCode() { hash = (37 * hash) + CONFIG_PER_DC_FIELD_NUMBER; hash = (53 * hash) + getConfigPerDcList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -13880,19 +13213,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KaCoHaOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getConfigPerDcFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -13913,10 +13240,11 @@ public Builder clear() { if (configPerDcBuilder_ == null) { configPerDc_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + configPerDc_ = null; configPerDcBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -14054,7 +13382,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14069,17 +13397,70 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KaCoHaOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + topic_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + outputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + deduplicate_ = input.readBool(); + + break; + } // case 24 + case 34: { + input.readMessage( + getConfigFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 34 + case 42: { + outputFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: { + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfigPerDc m = + input.readMessage( + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KacohaConfigPerDc.parser(), + extensionRegistry); + if (configPerDcBuilder_ == null) { + ensureConfigPerDcIsMutable(); + configPerDc_.add(m); + } else { + configPerDcBuilder_.addMessage(m); + } + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.KaCoHaOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -14914,7 +14295,18 @@ public KaCoHaOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KaCoHaOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -15020,70 +14412,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DataloaderOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - platform_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - platform_.add(rawValue); - break; - } - case 10: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - platform_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - platform_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - platform_ = java.util.Collections.unmodifiableList(platform_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_DataloaderOptions_descriptor; @@ -15202,7 +14530,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < platform_.size(); i++) { output.writeEnumNoTag(platform_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -15223,7 +14551,7 @@ public int getSerializedSize() { .computeUInt32SizeNoTag(dataSize); }platformMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -15239,7 +14567,7 @@ public boolean equals(final java.lang.Object obj) { com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions other = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions) obj; if (!platform_.equals(other.platform_)) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -15254,7 +14582,7 @@ public int hashCode() { hash = (37 * hash) + PLATFORM_FIELD_NUMBER; hash = (53 * hash) + platform_.hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -15371,18 +14699,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -15479,7 +14802,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -15494,17 +14817,47 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int tmpRaw = input.readEnum(); + ensurePlatformIsMutable(); + platform_.add(tmpRaw); + break; + } // case 8 + case 10: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensurePlatformIsMutable(); + platform_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.DataloaderOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -15741,7 +15094,18 @@ public DataloaderOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DataloaderOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -15972,116 +15336,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private SyncOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.Location.Builder subBuilder = null; - if (from_ != null) { - subBuilder = from_.toBuilder(); - } - from_ = input.readMessage(com.acme.glup.MetadataProto.Location.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(from_); - from_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceNamespace_ = s; - break; - } - case 48: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - platforms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - platforms_.add(rawValue); - break; - } - case 50: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - platforms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - platforms_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 64: { - - isBackfilling_ = input.readBool(); - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - toLabel_ = s; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - toDatasetId_ = s; - break; - } - case 88: { - - withBackfilling_ = input.readBool(); - break; - } - case 96: { - - isScheduledOnSource_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - platforms_ = java.util.Collections.unmodifiableList(platforms_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_SyncOptions_descriptor; @@ -16447,7 +15701,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (isScheduledOnSource_ != false) { output.writeBool(12, isScheduledOnSource_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -16493,7 +15747,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(12, isScheduledOnSource_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -16526,7 +15780,7 @@ public boolean equals(final java.lang.Object obj) { != other.getWithBackfilling()) return false; if (getIsScheduledOnSource() != other.getIsScheduledOnSource()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -16560,7 +15814,7 @@ public int hashCode() { hash = (37 * hash) + IS_SCHEDULED_ON_SOURCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsScheduledOnSource()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -16677,18 +15931,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SyncOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -16838,7 +16087,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.getIsScheduledOnSource() != false) { setIsScheduledOnSource(other.getIsScheduledOnSource()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -16853,17 +16102,84 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SyncOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getFromFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 26: { + sourceNamespace_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 48: { + int tmpRaw = input.readEnum(); + ensurePlatformsIsMutable(); + platforms_.add(tmpRaw); + break; + } // case 48 + case 50: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensurePlatformsIsMutable(); + platforms_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 50 + case 64: { + isBackfilling_ = input.readBool(); + + break; + } // case 64 + case 74: { + toLabel_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: { + toDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 88: { + withBackfilling_ = input.readBool(); + + break; + } // case 88 + case 96: { + isScheduledOnSource_ = input.readBool(); + + break; + } // case 96 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SyncOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -17684,7 +17000,18 @@ public SyncOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SyncOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -17833,89 +17160,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private BackupOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.Location.Builder subBuilder = null; - if (from_ != null) { - subBuilder = from_.toBuilder(); - } - from_ = input.readMessage(com.acme.glup.MetadataProto.Location.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(from_); - from_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - sourceNamespace_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - platforms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - platforms_.add(rawValue); - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - platforms_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - platforms_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - platforms_ = java.util.Collections.unmodifiableList(platforms_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_BackupOptions_descriptor; @@ -18119,7 +17363,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < platforms_.size(); i++) { output.writeEnumNoTag(platforms_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -18147,7 +17391,7 @@ public int getSerializedSize() { .computeUInt32SizeNoTag(dataSize); }platformsMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -18170,7 +17414,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSourceNamespace() .equals(other.getSourceNamespace())) return false; if (!platforms_.equals(other.platforms_)) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -18191,7 +17435,7 @@ public int hashCode() { hash = (37 * hash) + PLATFORMS_FIELD_NUMBER; hash = (53 * hash) + platforms_.hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -18308,18 +17552,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.BackupOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -18437,7 +17676,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -18452,17 +17691,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.BackupOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getFromFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + sourceNamespace_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + int tmpRaw = input.readEnum(); + ensurePlatformsIsMutable(); + platforms_.add(tmpRaw); + break; + } // case 24 + case 26: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensurePlatformsIsMutable(); + platforms_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.BackupOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -18938,7 +18219,18 @@ public BackupOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BackupOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -19127,84 +18419,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private TranscodingOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - inputDatasetId_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - outputDatasetId_ = s; - break; - } - case 24: { - int rawValue = input.readEnum(); - - inputFormat_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - outputFormat_ = rawValue; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - inputDatasetLabel_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - outputDatasetLabel_ = s; - break; - } - case 56: { - - isByPlatform_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_TranscodingOptions_descriptor; @@ -19506,7 +18720,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (isByPlatform_ != false) { output.writeBool(7, isByPlatform_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -19539,7 +18753,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(7, isByPlatform_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -19566,7 +18780,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getOutputDatasetLabel())) return false; if (getIsByPlatform() != other.getIsByPlatform()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -19592,7 +18806,7 @@ public int hashCode() { hash = (37 * hash) + IS_BY_PLATFORM_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsByPlatform()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -19713,18 +18927,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.TranscodingOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -19849,7 +19058,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.getIsByPlatform() != false) { setIsByPlatform(other.getIsByPlatform()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -19864,17 +19073,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.TranscodingOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + inputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + outputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: { + inputFormat_ = input.readEnum(); + + break; + } // case 24 + case 32: { + outputFormat_ = input.readEnum(); + + break; + } // case 32 + case 42: { + inputDatasetLabel_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: { + outputDatasetLabel_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 56: { + isByPlatform_ = input.readBool(); + + break; + } // case 56 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.TranscodingOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -20485,7 +19742,18 @@ public TranscodingOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TranscodingOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -20630,72 +19898,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private SamplerOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - inputDatasetId_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - inputFormatLabel_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - outputDatasetId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - outputFormatLabel_ = s; - break; - } - case 45: { - - samplingRate_ = input.readFloat(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_SamplerOptions_descriptor; @@ -20937,7 +20139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (java.lang.Float.floatToRawIntBits(samplingRate_) != 0) { output.writeFloat(5, samplingRate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -20962,7 +20164,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeFloatSize(5, samplingRate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -20988,7 +20190,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getSamplingRate()) != java.lang.Float.floatToIntBits( other.getSamplingRate())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -21010,7 +20212,7 @@ public int hashCode() { hash = (37 * hash) + SAMPLING_RATE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits( getSamplingRate()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -21127,18 +20329,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SamplerOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -21251,7 +20448,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.getSamplingRate() != 0F) { setSamplingRate(other.getSamplingRate()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -21266,17 +20463,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SamplerOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + inputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + inputFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + outputDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + outputFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 45: { + samplingRate_ = input.readFloat(); + + break; + } // case 45 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.SamplerOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -21739,7 +20974,18 @@ public SamplerOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SamplerOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -21922,79 +21168,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ComparatorOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - leftDatasetId_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - leftFormatLabel_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - rightDatasetId_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - rightFormatLabel_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - hostname_ = s; - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - ignoredFields_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_ComparatorOptions_descriptor; @@ -22316,7 +21489,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ignoredFields_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, ignoredFields_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -22343,7 +21516,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ignoredFields_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, ignoredFields_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -22370,7 +21543,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getHostname())) return false; if (!getIgnoredFields() .equals(other.getIgnoredFields())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -22393,7 +21566,7 @@ public int hashCode() { hash = (53 * hash) + getHostname().hashCode(); hash = (37 * hash) + IGNORED_FIELDS_FIELD_NUMBER; hash = (53 * hash) + getIgnoredFields().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -22516,18 +21689,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ComparatorOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -22648,7 +21816,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G ignoredFields_ = other.ignoredFields_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -22663,17 +21831,60 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ComparatorOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + leftDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + leftFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + rightDatasetId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + rightFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + hostname_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: { + ignoredFields_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ComparatorOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -23285,7 +22496,18 @@ public ComparatorOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ComparatorOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -23336,43 +22558,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ExternalOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSOptions_ImportOptions_Generator_ExternalOptions_descriptor; @@ -23400,7 +22585,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -23409,7 +22594,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -23424,7 +22609,7 @@ public boolean equals(final java.lang.Object obj) { } com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions other = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -23435,7 +22620,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -23552,18 +22737,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -23642,7 +22822,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions other) { if (other == com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -23657,17 +22837,30 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.ExternalOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @java.lang.Override @@ -23703,7 +22896,18 @@ public ExternalOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExternalOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -24271,7 +23475,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (ignoreCn_ != false) { output.writeBool(255, ignoreCn_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -24337,7 +23541,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(255, ignoreCn_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -24412,7 +23616,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getStopDate())) return false; if (getIgnoreCn() != other.getIgnoreCn()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -24476,7 +23680,7 @@ public int hashCode() { hash = (37 * hash) + IGNORE_CN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIgnoreCn()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -24593,19 +23797,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getToFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -24672,10 +23870,11 @@ public Builder clear() { } if (toBuilder_ == null) { to_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + to_ = null; toBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); namespace_ = ""; startDate_ = ""; @@ -24893,7 +24092,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.G if (other.getIgnoreCn() != false) { setIgnoreCn(other.getIgnoreCn()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -24908,17 +24107,133 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getDataloaderFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getKafka2HdfsFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + input.readMessage( + getSyncFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + case 34: { + input.readMessage( + getExternalFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 34 + case 42: { + input.readMessage( + getBackupFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 42 + case 50: { + input.readMessage( + getTranscodingFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 50 + case 58: { + input.readMessage( + getKacohaFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 58 + case 66: { + input.readMessage( + getDeduplicateFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 66 + case 74: { + input.readMessage( + getSamplerFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 74 + case 82: { + input.readMessage( + getComparatorFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 82 + case 2002: { + com.acme.glup.MetadataProto.Location m = + input.readMessage( + com.acme.glup.MetadataProto.Location.parser(), + extensionRegistry); + if (toBuilder_ == null) { + ensureToIsMutable(); + to_.add(m); + } else { + toBuilder_.addMessage(m); + } + break; + } // case 2002 + case 2010: { + namespace_ = input.readStringRequireUtf8(); + + break; + } // case 2010 + case 2026: { + startDate_ = input.readStringRequireUtf8(); + + break; + } // case 2026 + case 2034: { + stopDate_ = input.readStringRequireUtf8(); + + break; + } // case 2034 + case 2040: { + ignoreCn_ = input.readBool(); + + break; + } // case 2040 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -26840,7 +26155,18 @@ public Generator parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Generator(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -27113,7 +26439,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < view_.size(); i++) { output.writeMessage(12, view_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -27148,7 +26474,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(12, view_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -27175,7 +26501,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getGeneratorList())) return false; if (!getViewList() .equals(other.getViewList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -27205,7 +26531,7 @@ public int hashCode() { hash = (37 * hash) + VIEW_FIELD_NUMBER; hash = (53 * hash) + getViewList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -27322,20 +26648,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getGeneratorFieldBuilder(); - getViewFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -27352,16 +26671,18 @@ public Builder clear() { if (generatorBuilder_ == null) { generator_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + generator_ = null; generatorBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (viewBuilder_ == null) { view_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + view_ = null; viewBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -27529,7 +26850,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions.ImportOptions o } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -27544,17 +26865,81 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions.ImportOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + owner_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 32: { + partitioning_ = input.readEnum(); + + break; + } // case 32 + case 40: { + format_ = input.readEnum(); + + break; + } // case 40 + case 48: { + private_ = input.readBool(); + + break; + } // case 48 + case 90: { + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator m = + input.readMessage( + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.Generator.parser(), + extensionRegistry); + if (generatorBuilder_ == null) { + ensureGeneratorIsMutable(); + generator_.add(m); + } else { + generatorBuilder_.addMessage(m); + } + break; + } // case 90 + case 98: { + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View m = + input.readMessage( + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.View.parser(), + extensionRegistry); + if (viewBuilder_ == null) { + ensureViewIsMutable(); + view_.add(m); + } else { + viewBuilder_.addMessage(m); + } + break; + } // case 98 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions.ImportOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -28397,7 +27782,18 @@ public ImportOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -28474,7 +27870,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < import_.size(); i++) { output.writeMessage(3, import_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -28487,7 +27883,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, import_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -28504,7 +27900,7 @@ public boolean equals(final java.lang.Object obj) { if (!getImportList() .equals(other.getImportList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -28519,7 +27915,7 @@ public int hashCode() { hash = (37 * hash) + IMPORT_FIELD_NUMBER; hash = (53 * hash) + getImportList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -28636,29 +28032,24 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getImportFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); if (importBuilder_ == null) { import_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + import_ = null; importBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -28769,7 +28160,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSOptions other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -28784,17 +28175,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 26: { + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions m = + input.readMessage( + com.acme.glup.MetadataProto.HDFSOptions.ImportOptions.parser(), + extensionRegistry); + if (importBuilder_ == null) { + ensureImportIsMutable(); + import_.add(m); + } else { + importBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -29071,7 +28488,18 @@ public HDFSOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HDFSOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -29147,53 +28575,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ProducerTransportOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - syslog_ = input.readBool(); - break; - } - case 16: { - - kafka_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_ProducerTransportOptions_descriptor; @@ -29257,7 +28638,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (kafka_ != false) { output.writeBool(2, kafka_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -29274,7 +28655,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, kafka_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -29293,7 +28674,7 @@ public boolean equals(final java.lang.Object obj) { != other.getSyslog()) return false; if (getKafka() != other.getKafka()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -29310,7 +28691,7 @@ public int hashCode() { hash = (37 * hash) + KAFKA_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getKafka()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -29432,18 +28813,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.ProducerTransportOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -29534,7 +28910,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.ProducerTransportOptions ot if (other.getKafka() != false) { setKafka(other.getKafka()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -29549,17 +28925,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.ProducerTransportOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + syslog_ = input.readBool(); + + break; + } // case 8 + case 16: { + kafka_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.ProducerTransportOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -29681,7 +29080,18 @@ public ProducerTransportOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProducerTransportOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -29757,53 +29167,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private PropertyOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - valuable_ = input.readBool(); - break; - } - case 16: { - - highVolume_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_PropertyOptions_descriptor; @@ -29867,7 +29230,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (highVolume_ != false) { output.writeBool(2, highVolume_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -29884,7 +29247,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, highVolume_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -29903,7 +29266,7 @@ public boolean equals(final java.lang.Object obj) { != other.getValuable()) return false; if (getHighVolume() != other.getHighVolume()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -29920,7 +29283,7 @@ public int hashCode() { hash = (37 * hash) + HIGH_VOLUME_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getHighVolume()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -30042,18 +29405,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.PropertyOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -30144,7 +29502,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.PropertyOptions other) { if (other.getHighVolume() != false) { setHighVolume(other.getHighVolume()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -30159,17 +29517,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.PropertyOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + valuable_ = input.readBool(); + + break; + } // case 8 + case 16: { + highVolume_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.PropertyOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -30291,7 +29672,18 @@ public PropertyOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PropertyOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -30525,123 +29917,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private GlupOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.KafkaMessageOptions.Builder subBuilder = null; - if (kafka_ != null) { - subBuilder = kafka_.toBuilder(); - } - kafka_ = input.readMessage(com.acme.glup.MetadataProto.KafkaMessageOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(kafka_); - kafka_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.acme.glup.MetadataProto.HDFSOptions.Builder subBuilder = null; - if (hdfs_ != null) { - subBuilder = hdfs_.toBuilder(); - } - hdfs_ = input.readMessage(com.acme.glup.MetadataProto.HDFSOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(hdfs_); - hdfs_ = subBuilder.buildPartial(); - } - - break; - } - case 24: { - - samplingPct_ = input.readUInt32(); - break; - } - case 32: { - - preprodSamplingPct_ = input.readUInt32(); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - dataset_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - dataset_.add( - input.readMessage(com.acme.glup.MetadataProto.DataSet.parser(), extensionRegistry)); - break; - } - case 48: { - - messageSamplingPct_ = input.readUInt32(); - break; - } - case 58: { - com.acme.glup.MetadataProto.ProducerTransportOptions.Builder subBuilder = null; - if (producers_ != null) { - subBuilder = producers_.toBuilder(); - } - producers_ = input.readMessage(com.acme.glup.MetadataProto.ProducerTransportOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(producers_); - producers_ = subBuilder.buildPartial(); - } - - break; - } - case 66: { - com.acme.glup.MetadataProto.PropertyOptions.Builder subBuilder = null; - if (properties_ != null) { - subBuilder = properties_.toBuilder(); - } - properties_ = input.readMessage(com.acme.glup.MetadataProto.PropertyOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(properties_); - properties_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - dataset_ = java.util.Collections.unmodifiableList(dataset_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_GlupOptions_descriptor; @@ -30950,7 +30225,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (properties_ != null) { output.writeMessage(8, getProperties()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -30991,7 +30266,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getProperties()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -31034,7 +30309,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProperties() .equals(other.getProperties())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -31071,7 +30346,7 @@ public int hashCode() { hash = (37 * hash) + PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getProperties().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -31188,19 +30463,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.GlupOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getDatasetFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -31223,10 +30492,11 @@ public Builder clear() { if (datasetBuilder_ == null) { dataset_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + dataset_ = null; datasetBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); messageSamplingPct_ = 0; if (producersBuilder_ == null) { @@ -31395,7 +30665,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.GlupOptions other) { if (other.hasProperties()) { mergeProperties(other.getProperties()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -31410,17 +30680,86 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.GlupOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getKafkaFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getHdfsFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 24: { + samplingPct_ = input.readUInt32(); + + break; + } // case 24 + case 32: { + preprodSamplingPct_ = input.readUInt32(); + + break; + } // case 32 + case 42: { + com.acme.glup.MetadataProto.DataSet m = + input.readMessage( + com.acme.glup.MetadataProto.DataSet.parser(), + extensionRegistry); + if (datasetBuilder_ == null) { + ensureDatasetIsMutable(); + dataset_.add(m); + } else { + datasetBuilder_.addMessage(m); + } + break; + } // case 42 + case 48: { + messageSamplingPct_ = input.readUInt32(); + + break; + } // case 48 + case 58: { + input.readMessage( + getProducersFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 58 + case 66: { + input.readMessage( + getPropertiesFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.GlupOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -32518,7 +31857,18 @@ public GlupOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlupOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -32654,96 +32004,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private GlupFieldOptions( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - sampled_ = input.readBool(); - break; - } - case 16: { - - samplingKey_ = input.readBool(); - break; - } - case 24: { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - disabledPlatform_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - disabledPlatform_.add(rawValue); - break; - } - case 26: { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while(input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - disabledPlatform_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - disabledPlatform_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 32: { - - shouldCleanPii_ = input.readBool(); - break; - } - case 40: { - - pendingDeletion_ = input.readBool(); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - - addedAt_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - disabledPlatform_ = java.util.Collections.unmodifiableList(disabledPlatform_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_GlupFieldOptions_descriptor; @@ -32947,7 +32207,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(addedAt_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, addedAt_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -32987,7 +32247,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(addedAt_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, addedAt_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -33013,7 +32273,7 @@ public boolean equals(final java.lang.Object obj) { != other.getPendingDeletion()) return false; if (!getAddedAt() .equals(other.getAddedAt())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -33042,7 +32302,7 @@ public int hashCode() { getPendingDeletion()); hash = (37 * hash) + ADDED_AT_FIELD_NUMBER; hash = (53 * hash) + getAddedAt().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -33164,18 +32424,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.GlupFieldOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -33303,7 +32558,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.GlupFieldOptions other) { addedAt_ = other.addedAt_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -33318,17 +32573,72 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.GlupFieldOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + sampled_ = input.readBool(); + + break; + } // case 8 + case 16: { + samplingKey_ = input.readBool(); + + break; + } // case 16 + case 24: { + int tmpRaw = input.readEnum(); + ensureDisabledPlatformIsMutable(); + disabledPlatform_.add(tmpRaw); + break; + } // case 24 + case 26: { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while(input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureDisabledPlatformIsMutable(); + disabledPlatform_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 26 + case 32: { + shouldCleanPii_ = input.readBool(); + + break; + } // case 32 + case 40: { + pendingDeletion_ = input.readBool(); + + break; + } // case 40 + case 50: { + addedAt_ = input.readStringRequireUtf8(); + + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.GlupFieldOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -33740,7 +33050,18 @@ public GlupFieldOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GlupFieldOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -33826,54 +33147,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private JsonMapping( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 16: { - - skip_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_JsonMapping_descriptor; @@ -33968,7 +33241,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (skip_ != false) { output.writeBool(2, skip_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -33984,7 +33257,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(2, skip_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -34003,7 +33276,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName())) return false; if (getSkip() != other.getSkip()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -34019,7 +33292,7 @@ public int hashCode() { hash = (37 * hash) + SKIP_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getSkip()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -34140,18 +33413,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.JsonMapping.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -34243,7 +33511,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.JsonMapping other) { if (other.getSkip() != false) { setSkip(other.getSkip()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -34258,17 +33526,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.JsonMapping parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + skip_ = input.readBool(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.JsonMapping) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -34443,7 +33734,18 @@ public JsonMapping parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonMapping(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -34532,54 +33834,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private JsonAlias( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 24: { - - useEnumFieldId_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_JsonAlias_descriptor; @@ -34676,7 +33930,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (useEnumFieldId_ != false) { output.writeBool(3, useEnumFieldId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -34692,7 +33946,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, useEnumFieldId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -34711,7 +33965,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName())) return false; if (getUseEnumFieldId() != other.getUseEnumFieldId()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -34727,7 +33981,7 @@ public int hashCode() { hash = (37 * hash) + USE_ENUM_FIELD_ID_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getUseEnumFieldId()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -34849,18 +34103,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.JsonAlias.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -34952,7 +34201,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.JsonAlias other) { if (other.getUseEnumFieldId() != false) { setUseEnumFieldId(other.getUseEnumFieldId()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -34967,17 +34216,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.JsonAlias parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 24: { + useEnumFieldId_ = input.readBool(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.JsonAlias) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -35158,7 +34430,18 @@ public JsonAlias parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new JsonAlias(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -35347,95 +34630,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private BaseGlupMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.Origin.Builder subBuilder = null; - if (glupOrigin_ != null) { - subBuilder = glupOrigin_.toBuilder(); - } - glupOrigin_ = input.readMessage(com.acme.glup.MetadataProto.Origin.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(glupOrigin_); - glupOrigin_ = subBuilder.buildPartial(); - } - - break; - } - case 18: { - com.acme.glup.MetadataProto.Partition.Builder subBuilder = null; - if (partition_ != null) { - subBuilder = partition_.toBuilder(); - } - partition_ = input.readMessage(com.acme.glup.MetadataProto.Partition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(partition_); - partition_ = subBuilder.buildPartial(); - } - - break; - } - case 400082: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - setFields_ = com.google.protobuf.MapField.newMapField( - SetFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - setFields__ = input.readMessage( - SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - setFields_.getMutableMap().put( - setFields__.getKey(), setFields__.getValue()); - break; - } - case 16777210: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - controlMessage_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - controlMessage_.add( - input.readMessage(com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - controlMessage_ = java.util.Collections.unmodifiableList(controlMessage_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_BaseGlupMessage_descriptor; @@ -35703,7 +34897,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < controlMessage_.size(); i++) { output.writeMessage(2097151, controlMessage_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -35734,7 +34928,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2097151, controlMessage_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -35763,7 +34957,7 @@ public boolean equals(final java.lang.Object obj) { other.internalGetSetFields())) return false; if (!getControlMessageList() .equals(other.getControlMessageList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -35790,7 +34984,7 @@ public int hashCode() { hash = (37 * hash) + CONTROL_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getControlMessageList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -35933,19 +35127,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.acme.glup.MetadataProto.BaseGlupMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getControlMessageFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -35965,10 +35153,11 @@ public Builder clear() { internalGetMutableSetFields().clear(); if (controlMessageBuilder_ == null) { controlMessage_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + controlMessage_ = null; controlMessageBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -36099,7 +35288,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.BaseGlupMessage other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -36114,17 +35303,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.BaseGlupMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getGlupOriginFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 18: { + input.readMessage( + getPartitionFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 400082: { + com.google.protobuf.MapEntry + setFields__ = input.readMessage( + SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSetFields().getMutableMap().put( + setFields__.getKey(), setFields__.getValue()); + break; + } // case 400082 + case 16777210: { + com.acme.glup.MetadataProto.ControlMessage.Watermark m = + input.readMessage( + com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), + extensionRegistry); + if (controlMessageBuilder_ == null) { + ensureControlMessageIsMutable(); + controlMessage_.add(m); + } else { + controlMessageBuilder_.addMessage(m); + } + break; + } // case 16777210 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.BaseGlupMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -36874,7 +36111,18 @@ public BaseGlupMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BaseGlupMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -37046,83 +36294,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ForwardedWatermarkMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 40: { - - originalKafkaOffset_ = input.readInt64(); - break; - } - case 48: { - - timestamp_ = input.readInt64(); - break; - } - case 56: { - - consolidationEnabled_ = input.readBool(); - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetId_ = s; - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetFormatLabel_ = s; - break; - } - case 16777210: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - controlMessage_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - controlMessage_.add( - input.readMessage(com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - controlMessage_ = java.util.Collections.unmodifiableList(controlMessage_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_ForwardedWatermarkMessage_descriptor; @@ -37365,7 +36536,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < controlMessage_.size(); i++) { output.writeMessage(2097151, controlMessage_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -37396,7 +36567,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2097151, controlMessage_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -37423,7 +36594,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getDatasetFormatLabel())) return false; if (!getControlMessageList() .equals(other.getControlMessageList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -37451,7 +36622,7 @@ public int hashCode() { hash = (37 * hash) + CONTROL_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getControlMessageList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -37572,19 +36743,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.ForwardedWatermarkMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getControlMessageFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -37601,10 +36766,11 @@ public Builder clear() { if (controlMessageBuilder_ == null) { controlMessage_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + controlMessage_ = null; controlMessageBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -37737,7 +36903,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.ForwardedWatermarkMessage o } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -37752,17 +36918,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.ForwardedWatermarkMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 40: { + originalKafkaOffset_ = input.readInt64(); + + break; + } // case 40 + case 48: { + timestamp_ = input.readInt64(); + + break; + } // case 48 + case 56: { + consolidationEnabled_ = input.readBool(); + + break; + } // case 56 + case 82: { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: { + datasetFormatLabel_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 16777210: { + com.acme.glup.MetadataProto.ControlMessage.Watermark m = + input.readMessage( + com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), + extensionRegistry); + if (controlMessageBuilder_ == null) { + ensureControlMessageIsMutable(); + controlMessage_.add(m); + } else { + controlMessageBuilder_.addMessage(m); + } + break; + } // case 16777210 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.ForwardedWatermarkMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -38432,7 +37649,18 @@ public ForwardedWatermarkMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ForwardedWatermarkMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -38549,67 +37777,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Location( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - env_ = rawValue; - break; - } - case 16: { - int rawValue = input.readEnum(); - - dc_ = rawValue; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - label_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - datasetId_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_Location_descriptor; @@ -38779,7 +37946,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, datasetId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -38802,7 +37969,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(datasetId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, datasetId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -38823,7 +37990,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getLabel())) return false; if (!getDatasetId() .equals(other.getDatasetId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -38842,7 +38009,7 @@ public int hashCode() { hash = (53 * hash) + getLabel().hashCode(); hash = (37 * hash) + DATASET_ID_FIELD_NUMBER; hash = (53 * hash) + getDatasetId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -38959,18 +38126,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.Location.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -39075,7 +38237,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.Location other) { datasetId_ = other.datasetId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -39090,17 +38252,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.Location parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + env_ = input.readEnum(); + + break; + } // case 8 + case 16: { + dc_ = input.readEnum(); + + break; + } // case 16 + case 26: { + label_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.Location) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -39436,7 +38631,18 @@ public Location parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Location(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -39577,72 +38783,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Origin( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - datacenter_ = rawValue; - break; - } - case 21: { - - ip4_ = input.readFixed32(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - hostname_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - containerTask_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - containerApp_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_Origin_descriptor; @@ -39858,7 +38998,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerApp_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, containerApp_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -39884,7 +39024,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(containerApp_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, containerApp_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -39908,7 +39048,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getContainerTask())) return false; if (!getContainerApp() .equals(other.getContainerApp())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -39929,7 +39069,7 @@ public int hashCode() { hash = (53 * hash) + getContainerTask().hashCode(); hash = (37 * hash) + CONTAINER_APP_FIELD_NUMBER; hash = (53 * hash) + getContainerApp().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -40050,18 +39190,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.Origin.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -40173,7 +39308,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.Origin other) { containerApp_ = other.containerApp_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -40188,17 +39323,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.Origin parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + datacenter_ = input.readEnum(); + + break; + } // case 8 + case 21: { + ip4_ = input.readFixed32(); + + break; + } // case 21 + case 26: { + hostname_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: { + containerTask_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + containerApp_ = input.readStringRequireUtf8(); + + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.Origin) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -40622,7 +39795,18 @@ public Origin parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Origin(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -40692,56 +39876,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ControlMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.acme.glup.MetadataProto.ControlMessage.Watermark.Builder subBuilder = null; - if (watermark_ != null) { - subBuilder = watermark_.toBuilder(); - } - watermark_ = input.readMessage(com.acme.glup.MetadataProto.ControlMessage.Watermark.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(watermark_); - watermark_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_ControlMessage_descriptor; @@ -40949,61 +40083,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private WatermarkOrigin( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - kafkaTopic_ = s; - break; - } - case 16: { - int rawValue = input.readEnum(); - - datacenter_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - cluster_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_ControlMessage_WatermarkOrigin_descriptor; @@ -41116,7 +40195,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (cluster_ != com.acme.glup.MetadataProto.ControlMessage.Cluster.UNSUPPORTED_CLUSTER.getNumber()) { output.writeEnum(3, cluster_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -41136,7 +40215,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, cluster_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -41155,7 +40234,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getKafkaTopic())) return false; if (datacenter_ != other.datacenter_) return false; if (cluster_ != other.cluster_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -41172,7 +40251,7 @@ public int hashCode() { hash = (53 * hash) + datacenter_; hash = (37 * hash) + CLUSTER_FIELD_NUMBER; hash = (53 * hash) + cluster_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -41289,18 +40368,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.ControlMessage.WatermarkOrigin.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -41398,7 +40472,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.ControlMessage.WatermarkOri if (other.cluster_ != 0) { setClusterValue(other.getClusterValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -41413,17 +40487,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.ControlMessage.WatermarkOrigin parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + kafkaTopic_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + datacenter_ = input.readEnum(); + + break; + } // case 16 + case 24: { + cluster_ = input.readEnum(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.ControlMessage.WatermarkOrigin) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -41643,7 +40745,18 @@ public WatermarkOrigin parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WatermarkOrigin(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -41915,113 +41028,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Watermark( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - hostname_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - kafkaTopic_ = s; - break; - } - case 32: { - - partition_ = input.readInt32(); - break; - } - case 40: { - - partitionCount_ = input.readInt32(); - break; - } - case 50: { - - processUuid_ = input.readBytes(); - break; - } - case 58: { - java.lang.String s = input.readStringRequireUtf8(); - - region_ = s; - break; - } - case 64: { - - timestampSeconds_ = input.readInt32(); - break; - } - case 74: { - java.lang.String s = input.readStringRequireUtf8(); - - cluster_ = s; - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - - environment_ = s; - break; - } - case 400082: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - setFields_ = com.google.protobuf.MapField.newMapField( - SetFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - setFields__ = input.readMessage( - SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - setFields_.getMutableMap().put( - setFields__.getKey(), setFields__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_ControlMessage_Watermark_descriptor; @@ -42530,7 +41536,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetSetFields(), SetFieldsDefaultEntryHolder.defaultEntry, 50010); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -42583,7 +41589,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(50010, setFields__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -42620,7 +41626,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getEnvironment())) return false; if (!internalGetSetFields().equals( other.internalGetSetFields())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -42655,7 +41661,7 @@ public int hashCode() { hash = (37 * hash) + SET_FIELDS_FIELD_NUMBER; hash = (53 * hash) + internalGetSetFields().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -42794,18 +41800,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.acme.glup.MetadataProto.ControlMessage.Watermark.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -42956,7 +41957,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.ControlMessage.Watermark ot } internalGetMutableSetFields().mergeFrom( other.internalGetSetFields()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -42971,17 +41972,88 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.ControlMessage.Watermark parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + type_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + hostname_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: { + kafkaTopic_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: { + partition_ = input.readInt32(); + + break; + } // case 32 + case 40: { + partitionCount_ = input.readInt32(); + + break; + } // case 40 + case 50: { + processUuid_ = input.readBytes(); + + break; + } // case 50 + case 58: { + region_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 64: { + timestampSeconds_ = input.readInt32(); + + break; + } // case 64 + case 74: { + cluster_ = input.readStringRequireUtf8(); + + break; + } // case 74 + case 82: { + environment_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 400082: { + com.google.protobuf.MapEntry + setFields__ = input.readMessage( + SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSetFields().getMutableMap().put( + setFields__.getKey(), setFields__.getValue()); + break; + } // case 400082 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.ControlMessage.Watermark) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -43925,7 +42997,18 @@ public Watermark parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Watermark(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -43988,7 +43071,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (watermark_ != null) { output.writeMessage(1, getWatermark()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -44001,7 +43084,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getWatermark()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -44021,7 +43104,7 @@ public boolean equals(final java.lang.Object obj) { if (!getWatermark() .equals(other.getWatermark())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -44036,7 +43119,7 @@ public int hashCode() { hash = (37 * hash) + WATERMARK_FIELD_NUMBER; hash = (53 * hash) + getWatermark().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -44157,18 +43240,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.ControlMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -44261,7 +43339,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.ControlMessage other) { if (other.hasWatermark()) { mergeWatermark(other.getWatermark()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -44276,17 +43354,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.ControlMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getWatermarkFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.ControlMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -44441,7 +43539,18 @@ public ControlMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ControlMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -44539,60 +43648,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Partition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - timestampSeconds_ = input.readUInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - - hostPlatform_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - eventType_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_Partition_descriptor; @@ -44690,7 +43745,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (eventType_ != com.acme.glup.MetadataProto.EventType.UNSUPPORTED_EVENT_TYPE.getNumber()) { output.writeEnum(3, eventType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -44711,7 +43766,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, eventType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -44730,7 +43785,7 @@ public boolean equals(final java.lang.Object obj) { != other.getTimestampSeconds()) return false; if (hostPlatform_ != other.hostPlatform_) return false; if (eventType_ != other.eventType_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -44748,7 +43803,7 @@ public int hashCode() { hash = (53 * hash) + hostPlatform_; hash = (37 * hash) + EVENT_TYPE_FIELD_NUMBER; hash = (53 * hash) + eventType_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -44870,18 +43925,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.Partition.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -44978,7 +44028,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.Partition other) { if (other.eventType_ != 0) { setEventTypeValue(other.getEventTypeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -44993,17 +44043,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.Partition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestampSeconds_ = input.readUInt64(); + + break; + } // case 8 + case 16: { + hostPlatform_ = input.readEnum(); + + break; + } // case 16 + case 24: { + eventType_ = input.readEnum(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.Partition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -45210,7 +44288,18 @@ public Partition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Partition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -45312,65 +44401,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private HDFSPartition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - timestampSeconds_ = input.readUInt64(); - break; - } - case 16: { - int rawValue = input.readEnum(); - - hostPlatform_ = rawValue; - break; - } - case 24: { - int rawValue = input.readEnum(); - - eventType_ = rawValue; - break; - } - case 32: { - - depth_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_HDFSPartition_descriptor; @@ -45480,7 +44510,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (depth_ != 0) { output.writeInt32(4, depth_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -45505,7 +44535,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, depth_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -45526,7 +44556,7 @@ public boolean equals(final java.lang.Object obj) { if (eventType_ != other.eventType_) return false; if (getDepth() != other.getDepth()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -45546,7 +44576,7 @@ public int hashCode() { hash = (53 * hash) + eventType_; hash = (37 * hash) + DEPTH_FIELD_NUMBER; hash = (53 * hash) + getDepth(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -45668,18 +44698,13 @@ public static final class Builder extends // Construct using com.acme.glup.MetadataProto.HDFSPartition.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -45782,7 +44807,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.HDFSPartition other) { if (other.getDepth() != 0) { setDepth(other.getDepth()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -45797,17 +44822,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.HDFSPartition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + timestampSeconds_ = input.readUInt64(); + + break; + } // case 8 + case 16: { + hostPlatform_ = input.readEnum(); + + break; + } // case 16 + case 24: { + eventType_ = input.readEnum(); + + break; + } // case 24 + case 32: { + depth_ = input.readInt32(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.HDFSPartition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -46043,7 +45101,18 @@ public HDFSPartition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new HDFSPartition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -46172,67 +45241,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Hash128( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: { - - mostSigBits_ = input.readFixed64(); - break; - } - case 17: { - - leastSigBits_ = input.readFixed64(); - break; - } - case 400082: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - setFields_ = com.google.protobuf.MapField.newMapField( - SetFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - setFields__ = input.readMessage( - SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - setFields_.getMutableMap().put( - setFields__.getKey(), setFields__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.acme.glup.MetadataProto.internal_static_Acme_Glup_Hash128_descriptor; @@ -46411,7 +45419,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetSetFields(), SetFieldsDefaultEntryHolder.defaultEntry, 50010); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -46438,7 +45446,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(50010, setFields__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -46459,7 +45467,7 @@ public boolean equals(final java.lang.Object obj) { != other.getLeastSigBits()) return false; if (!internalGetSetFields().equals( other.internalGetSetFields())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -46480,7 +45488,7 @@ public int hashCode() { hash = (37 * hash) + SET_FIELDS_FIELD_NUMBER; hash = (53 * hash) + internalGetSetFields().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -46623,18 +45631,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.acme.glup.MetadataProto.Hash128.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -46731,7 +45734,7 @@ public Builder mergeFrom(com.acme.glup.MetadataProto.Hash128 other) { } internalGetMutableSetFields().mergeFrom( other.internalGetSetFields()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -46746,17 +45749,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.acme.glup.MetadataProto.Hash128 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: { + mostSigBits_ = input.readFixed64(); + + break; + } // case 9 + case 17: { + leastSigBits_ = input.readFixed64(); + + break; + } // case 17 + case 400082: { + com.google.protobuf.MapEntry + setFields__ = input.readMessage( + SetFieldsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableSetFields().getMutableMap().put( + setFields__.getKey(), setFields__.getValue()); + break; + } // case 400082 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.acme.glup.MetadataProto.Hash128) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -47035,7 +46069,18 @@ public Hash128 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Hash128(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/connect/protobuf/test/DescriptorRef.java b/protobuf-serializer/src/test/java/io/confluent/connect/protobuf/test/DescriptorRef.java index 72ac092c815..7f69cb0328e 100644 --- a/protobuf-serializer/src/test/java/io/confluent/connect/protobuf/test/DescriptorRef.java +++ b/protobuf-serializer/src/test/java/io/confluent/connect/protobuf/test/DescriptorRef.java @@ -66,61 +66,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DescriptorMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - case 18: { - com.google.protobuf.DescriptorProtos.DescriptorProto.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.protobuf.DescriptorProtos.DescriptorProto.PARSER, extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.connect.protobuf.test.DescriptorRef.internal_static_DescriptorMessage_descriptor; @@ -197,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != null) { output.writeMessage(2, getValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -214,7 +159,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, getValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +181,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -253,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -370,18 +315,13 @@ public static final class Builder extends // Construct using io.confluent.connect.protobuf.test.DescriptorRef.DescriptorMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -480,7 +420,7 @@ public Builder mergeFrom(io.confluent.connect.protobuf.test.DescriptorRef.Descri if (other.hasValue()) { mergeValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -500,17 +440,42 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.connect.protobuf.test.DescriptorRef.DescriptorMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + case 18: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.connect.protobuf.test.DescriptorRef.DescriptorMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -696,7 +661,18 @@ public DescriptorMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DescriptorMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions.java index fa9ee128861..aa43457d00d 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions.java @@ -308,54 +308,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private CustomMessageOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - testString_ = s; - break; - } - case 16: { - - testInt_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.CustomOptions.internal_static_io_confluent_kafka_serializers_protobuf_test_CustomMessageOptions_descriptor; @@ -438,7 +390,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (testInt_ != 0) { output.writeInt32(2, testInt_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -454,7 +406,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(2, testInt_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -473,7 +425,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getTestString())) return false; if (getTestInt() != other.getTestInt()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -488,7 +440,7 @@ public int hashCode() { hash = (53 * hash) + getTestString().hashCode(); hash = (37 * hash) + TEST_INT_FIELD_NUMBER; hash = (53 * hash) + getTestInt(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -605,18 +557,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.CustomOptions.CustomMessageOptions.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -708,7 +655,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOpti if (other.getTestInt() != 0) { setTestInt(other.getTestInt()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,17 +670,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.CustomOptions.CustomMessageOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + testString_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + testInt_ = input.readInt32(); + + break; + } // case 16 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.CustomOptions.CustomMessageOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -876,7 +846,18 @@ public CustomMessageOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomMessageOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1010,102 +991,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private MyMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - id_ = input.readInt32(); - break; - } - case 21: { - - f_ = input.readFloat(); - break; - } - case 25: { - - d_ = input.readDouble(); - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - doc_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = com.google.protobuf.MapField.newMapField( - ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - params__ = input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put( - params__.getKey(), params__.getValue()); - break; - } - case 48: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - list_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - list_.addInt(input.readInt32()); - break; - } - case 50: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - list_ = newIntList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - list_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - list_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.CustomOptions.internal_static_io_confluent_kafka_serializers_protobuf_test_MyMessage_descriptor; @@ -1351,7 +1236,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < list_.size(); i++) { output.writeInt32NoTag(list_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1399,7 +1284,7 @@ public int getSerializedSize() { } listMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1428,7 +1313,7 @@ public boolean equals(final java.lang.Object obj) { other.internalGetParams())) return false; if (!getListList() .equals(other.getListList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1457,7 +1342,7 @@ public int hashCode() { hash = (37 * hash) + LIST_FIELD_NUMBER; hash = (53 * hash) + getListList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1596,18 +1481,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using io.confluent.kafka.serializers.protobuf.test.CustomOptions.MyMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -1734,7 +1614,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOpti } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1749,17 +1629,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.CustomOptions.MyMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + id_ = input.readInt32(); + + break; + } // case 8 + case 21: { + f_ = input.readFloat(); + + break; + } // case 21 + case 25: { + d_ = input.readDouble(); + + break; + } // case 25 + case 34: { + doc_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: { + com.google.protobuf.MapEntry + params__ = input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableParams().getMutableMap().put( + params__.getKey(), params__.getValue()); + break; + } // case 42 + case 48: { + int v = input.readInt32(); + ensureListIsMutable(); + list_.addInt(v); + break; + } // case 48 + case 50: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureListIsMutable(); + while (input.getBytesUntilLimit() > 0) { + list_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 50 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.CustomOptions.MyMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -2175,7 +2112,18 @@ public MyMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MyMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions2.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions2.java index 04e9b258996..de099c2fd48 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions2.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/CustomOptions2.java @@ -12,6 +12,7 @@ public static void registerAllExtensions( registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.rep); registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.foobarString); registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.moreString); + registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.more2String); } public static void registerAllExtensions( @@ -106,67 +107,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private FooBar( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - bitField0_ |= 0x00000001; - foo_ = input.readInt32(); - break; - } - case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); - bitField0_ |= 0x00000002; - bar_ = bs; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - nested_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - nested_.add( - input.readMessage(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.PARSER, extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - nested_ = java.util.Collections.unmodifiableList(nested_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_descriptor; @@ -213,80 +153,670 @@ public enum FooBarBazEnum public static final int BAZ_VALUE = 3; - public final int getNumber() { - return value; - } + public final int getNumber() { + return value; + } + + /** + * @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 + public static FooBarBazEnum 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 FooBarBazEnum forNumber(int value) { + switch (value) { + case 1: return FOO; + case 2: return BAR; + case 3: return BAZ; + default: return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + private static final com.google.protobuf.Internal.EnumLiteMap< + FooBarBazEnum> internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public FooBarBazEnum findValueByNumber(int number) { + return FooBarBazEnum.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor + getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + public final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptorForType() { + return getDescriptor(); + } + public static final com.google.protobuf.Descriptors.EnumDescriptor + getDescriptor() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.getDescriptor().getEnumTypes().get(0); + } + + private static final FooBarBazEnum[] VALUES = values(); + + public static FooBarBazEnum valueOf( + com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException( + "EnumValueDescriptor is not for this type."); + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private FooBarBazEnum(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.FooBarBazEnum) + } + + public interface MoreOrBuilder extends + // @@protoc_insertion_point(interface_extends:io.confluent.kafka.serializers.protobuf.test.FooBar.More) + com.google.protobuf.MessageOrBuilder { + + /** + * repeated int32 serial = 1; + * @return A list containing the serial. + */ + java.util.List getSerialList(); + /** + * repeated int32 serial = 1; + * @return The count of serial. + */ + int getSerialCount(); + /** + * repeated int32 serial = 1; + * @param index The index of the element to return. + * @return The serial at the given index. + */ + int getSerial(int index); + } + /** + * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.FooBar.More} + */ + public static final class More extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:io.confluent.kafka.serializers.protobuf.test.FooBar.More) + MoreOrBuilder { + private static final long serialVersionUID = 0L; + // Use More.newBuilder() to construct. + private More(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + private More() { + serial_ = emptyIntList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance( + UnusedPrivateParameter unused) { + return new More(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.class, io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.Builder.class); + } + + public static final int SERIAL_FIELD_NUMBER = 1; + private com.google.protobuf.Internal.IntList serial_; + /** + * repeated int32 serial = 1; + * @return A list containing the serial. + */ + @java.lang.Override + public java.util.List + getSerialList() { + return serial_; + } + /** + * repeated int32 serial = 1; + * @return The count of serial. + */ + public int getSerialCount() { + return serial_.size(); + } + /** + * repeated int32 serial = 1; + * @param index The index of the element to return. + * @return The serial at the given index. + */ + public int getSerial(int index) { + return serial_.getInt(index); + } + + private byte memoizedIsInitialized = -1; + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + for (int i = 0; i < serial_.size(); i++) { + output.writeInt32(1, serial_.getInt(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < serial_.size(); i++) { + dataSize += com.google.protobuf.CodedOutputStream + .computeInt32SizeNoTag(serial_.getInt(i)); + } + size += dataSize; + size += 1 * getSerialList().size(); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More)) { + return super.equals(obj); + } + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More other = (io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More) obj; + + if (!getSerialList() + .equals(other.getSerialList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getSerialCount() > 0) { + hash = (37 * hash) + SERIAL_FIELD_NUMBER; + hash = (53 * hash) + getSerialList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.FooBar.More} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder implements + // @@protoc_insertion_point(builder_implements:io.confluent.kafka.serializers.protobuf.test.FooBar.More) + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.MoreOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_fieldAccessorTable + .ensureFieldAccessorsInitialized( + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.class, io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.Builder.class); + } + + // Construct using io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.newBuilder() + private Builder() { + + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + + } + @java.lang.Override + public Builder clear() { + super.clear(); + serial_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor; + } + + @java.lang.Override + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More getDefaultInstanceForType() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.getDefaultInstance(); + } + + @java.lang.Override + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More build() { + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More buildPartial() { + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More result = new io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + serial_.makeImmutable(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serial_ = serial_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.setField(field, value); + } + @java.lang.Override + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + @java.lang.Override + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return super.addRepeatedField(field, value); + } + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More) { + return mergeFrom((io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More other) { + if (other == io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.getDefaultInstance()) return this; + if (!other.serial_.isEmpty()) { + if (serial_.isEmpty()) { + serial_ = other.serial_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSerialIsMutable(); + serial_.addAll(other.serial_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + 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) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int v = input.readInt32(); + ensureSerialIsMutable(); + serial_.addInt(v); + break; + } // case 8 + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSerialIsMutable(); + while (input.getBytesUntilLimit() > 0) { + serial_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + private int bitField0_; + + private com.google.protobuf.Internal.IntList serial_ = emptyIntList(); + private void ensureSerialIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serial_ = mutableCopy(serial_); + bitField0_ |= 0x00000001; + } + } + /** + * repeated int32 serial = 1; + * @return A list containing the serial. + */ + public java.util.List + getSerialList() { + return ((bitField0_ & 0x00000001) != 0) ? + java.util.Collections.unmodifiableList(serial_) : serial_; + } + /** + * repeated int32 serial = 1; + * @return The count of serial. + */ + public int getSerialCount() { + return serial_.size(); + } + /** + * repeated int32 serial = 1; + * @param index The index of the element to return. + * @return The serial at the given index. + */ + public int getSerial(int index) { + return serial_.getInt(index); + } + /** + * repeated int32 serial = 1; + * @param index The index to set the value at. + * @param value The serial to set. + * @return This builder for chaining. + */ + public Builder setSerial( + int index, int value) { + ensureSerialIsMutable(); + serial_.setInt(index, value); + onChanged(); + return this; + } + /** + * repeated int32 serial = 1; + * @param value The serial to add. + * @return This builder for chaining. + */ + public Builder addSerial(int value) { + ensureSerialIsMutable(); + serial_.addInt(value); + onChanged(); + return this; + } + /** + * repeated int32 serial = 1; + * @param values The serial to add. + * @return This builder for chaining. + */ + public Builder addAllSerial( + java.lang.Iterable values) { + ensureSerialIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll( + values, serial_); + onChanged(); + return this; + } + /** + * repeated int32 serial = 1; + * @return This builder for chaining. + */ + public Builder clearSerial() { + serial_ = emptyIntList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } - /** - * @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 - public static FooBarBazEnum 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 FooBarBazEnum forNumber(int value) { - switch (value) { - case 1: return FOO; - case 2: return BAR; - case 3: return BAZ; - default: return null; - } + // @@protoc_insertion_point(builder_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.More) } - public static com.google.protobuf.Internal.EnumLiteMap - internalGetValueMap() { - return internalValueMap; + // @@protoc_insertion_point(class_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.More) + private static final io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More(); } - private static final com.google.protobuf.Internal.EnumLiteMap< - FooBarBazEnum> internalValueMap = - new com.google.protobuf.Internal.EnumLiteMap() { - public FooBarBazEnum findValueByNumber(int number) { - return FooBarBazEnum.forNumber(number); - } - }; - public final com.google.protobuf.Descriptors.EnumValueDescriptor - getValueDescriptor() { - return getDescriptor().getValues().get(ordinal()); - } - public final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptorForType() { - return getDescriptor(); - } - public static final com.google.protobuf.Descriptors.EnumDescriptor - getDescriptor() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.getDescriptor().getEnumTypes().get(0); + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More getDefaultInstance() { + return DEFAULT_INSTANCE; } - private static final FooBarBazEnum[] VALUES = values(); - - public static FooBarBazEnum valueOf( - com.google.protobuf.Descriptors.EnumValueDescriptor desc) { - if (desc.getType() != getDescriptor()) { - throw new java.lang.IllegalArgumentException( - "EnumValueDescriptor is not for this type."); + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Override + public More parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } - return VALUES[desc.getIndex()]; + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; } - private final int value; + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } - private FooBarBazEnum(int value) { - this.value = value; + @java.lang.Override + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More getDefaultInstanceForType() { + return DEFAULT_INSTANCE; } - // @@protoc_insertion_point(enum_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.FooBarBazEnum) + public static final int MORE_STRING_FIELD_NUMBER = 150; + /** + * extend .io.confluent.kafka.serializers.protobuf.test.FooBar { ... } + */ + public static final + com.google.protobuf.GeneratedMessage.GeneratedExtension< + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar, + java.lang.String> moreString = com.google.protobuf.GeneratedMessage + .newMessageScopedGeneratedExtension( + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.getDefaultInstance(), + 0, + java.lang.String.class, + null); } - public interface MoreOrBuilder extends - // @@protoc_insertion_point(interface_extends:io.confluent.kafka.serializers.protobuf.test.FooBar.More) + public interface More2OrBuilder extends + // @@protoc_insertion_point(interface_extends:io.confluent.kafka.serializers.protobuf.test.FooBar.More2) com.google.protobuf.MessageOrBuilder { /** @@ -307,18 +837,18 @@ public interface MoreOrBuilder extends int getSerial(int index); } /** - * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.FooBar.More} + * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.FooBar.More2} */ - public static final class More extends + public static final class More2 extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:io.confluent.kafka.serializers.protobuf.test.FooBar.More) - MoreOrBuilder { + // @@protoc_insertion_point(message_implements:io.confluent.kafka.serializers.protobuf.test.FooBar.More2) + More2OrBuilder { private static final long serialVersionUID = 0L; - // Use More.newBuilder() to construct. - private More(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use More2.newBuilder() to construct. + private More2(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private More() { + private More2() { serial_ = emptyIntList(); } @@ -326,7 +856,7 @@ private More() { @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { - return new More(); + return new More2(); } @java.lang.Override @@ -334,79 +864,17 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private More( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - serial_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - serial_.addInt(input.readInt32()); - break; - } - case 10: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - serial_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - serial_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - serial_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor; + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_fieldAccessorTable + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.class, io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.Builder.class); + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.class, io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.Builder.class); } public static final int SERIAL_FIELD_NUMBER = 1; @@ -453,7 +921,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < serial_.size(); i++) { output.writeInt32(1, serial_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -471,7 +939,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSerialList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -481,14 +949,14 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More)) { + if (!(obj instanceof io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2)) { return super.equals(obj); } - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More other = (io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More) obj; + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 other = (io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2) obj; if (!getSerialList() .equals(other.getSerialList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -503,74 +971,74 @@ public int hashCode() { hash = (37 * hash) + SERIAL_FIELD_NUMBER; hash = (53 * hash) + getSerialList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom(byte[] data) + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom(java.io.InputStream input) + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseDelimitedFrom(java.io.InputStream input) + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseDelimitedFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input, extensionRegistry); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parseFrom( + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -583,7 +1051,7 @@ public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } - public static Builder newBuilder(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More prototype) { + public static Builder newBuilder(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override @@ -599,39 +1067,34 @@ protected Builder newBuilderForType( return builder; } /** - * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.FooBar.More} + * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.FooBar.More2} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:io.confluent.kafka.serializers.protobuf.test.FooBar.More) - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.MoreOrBuilder { + // @@protoc_insertion_point(builder_implements:io.confluent.kafka.serializers.protobuf.test.FooBar.More2) + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2OrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor; + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_fieldAccessorTable + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_fieldAccessorTable .ensureFieldAccessorsInitialized( - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.class, io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.Builder.class); + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.class, io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.Builder.class); } - // Construct using io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.newBuilder() + // Construct using io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -644,17 +1107,17 @@ public Builder clear() { @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor; + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_descriptor; } @java.lang.Override - public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More getDefaultInstanceForType() { - return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.getDefaultInstance(); + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 getDefaultInstanceForType() { + return io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.getDefaultInstance(); } @java.lang.Override - public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More build() { - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More result = buildPartial(); + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 build() { + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -662,8 +1125,8 @@ public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More b } @java.lang.Override - public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More buildPartial() { - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More result = new io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More(this); + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 buildPartial() { + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 result = new io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2(this); int from_bitField0_ = bitField0_; if (((bitField0_ & 0x00000001) != 0)) { serial_.makeImmutable(); @@ -708,16 +1171,16 @@ public Builder addRepeatedField( } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More) { - return mergeFrom((io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More)other); + if (other instanceof io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2) { + return mergeFrom((io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2)other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More other) { - if (other == io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.getDefaultInstance()) return this; + public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 other) { + if (other == io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.getDefaultInstance()) return this; if (!other.serial_.isEmpty()) { if (serial_.isEmpty()) { serial_ = other.serial_; @@ -728,7 +1191,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOpti } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -743,17 +1206,46 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + int v = input.readInt32(); + ensureSerialIsMutable(); + serial_.addInt(v); + break; + } // case 8 + case 10: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureSerialIsMutable(); + while (input.getBytesUntilLimit() > 0) { + serial_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -849,54 +1341,65 @@ public final Builder mergeUnknownFields( } - // @@protoc_insertion_point(builder_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.More) + // @@protoc_insertion_point(builder_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.More2) } - // @@protoc_insertion_point(class_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.More) - private static final io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More DEFAULT_INSTANCE; + // @@protoc_insertion_point(class_scope:io.confluent.kafka.serializers.protobuf.test.FooBar.More2) + private static final io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 DEFAULT_INSTANCE; static { - DEFAULT_INSTANCE = new io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More(); + DEFAULT_INSTANCE = new io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2(); } - public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More getDefaultInstance() { + public static io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 getDefaultInstance() { return DEFAULT_INSTANCE; } - @java.lang.Deprecated public static final com.google.protobuf.Parser - PARSER = new com.google.protobuf.AbstractParser() { + @java.lang.Deprecated public static final com.google.protobuf.Parser + PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override - public More parsePartialFrom( + public More2 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new More(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; - public static com.google.protobuf.Parser parser() { + public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override - public com.google.protobuf.Parser getParserForType() { + public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override - public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More getDefaultInstanceForType() { + public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2 getDefaultInstanceForType() { return DEFAULT_INSTANCE; } - public static final int MORE_STRING_FIELD_NUMBER = 150; + public static final int MORE2_STRING_FIELD_NUMBER = 151; /** * extend .io.confluent.kafka.serializers.protobuf.test.FooBar { ... } */ public static final com.google.protobuf.GeneratedMessage.GeneratedExtension< io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar, - java.lang.String> moreString = com.google.protobuf.GeneratedMessage + java.lang.String> more2String = com.google.protobuf.GeneratedMessage .newMessageScopedGeneratedExtension( - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.getDefaultInstance(), + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.getDefaultInstance(), 0, java.lang.String.class, null); @@ -1047,7 +1550,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) output.writeMessage(3, nested_.get(i)); } extensionWriter.writeUntil(201, output); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1068,7 +1571,7 @@ public int getSerializedSize() { .computeMessageSize(3, nested_.get(i)); } size += extensionsSerializedSize(); - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1095,7 +1598,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getNestedList() .equals(other.getNestedList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; if (!getExtensionFields().equals(other.getExtensionFields())) return false; return true; @@ -1121,7 +1624,7 @@ public int hashCode() { hash = (53 * hash) + getNestedList().hashCode(); } hash = hashFields(hash, getExtensionFields()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1239,19 +1742,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getNestedFieldBuilder(); - } + } @java.lang.Override public Builder clear() { @@ -1262,10 +1759,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000002); if (nestedBuilder_ == null) { nested_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + nested_ = null; nestedBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -1422,7 +1920,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.CustomOpti } } this.mergeExtensionFields(other); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1445,17 +1943,53 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + foo_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + bar_ = input.readBytes(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar m = + input.readMessage( + io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.PARSER, + extensionRegistry); + if (nestedBuilder_ == null) { + ensureNestedIsMutable(); + nested_.add(m); + } else { + nestedBuilder_.addMessage(m); + } + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1855,7 +2389,18 @@ public FooBar parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FooBar(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1931,6 +2476,11 @@ public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar getDef private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_fieldAccessorTable; public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { @@ -1942,26 +2492,30 @@ public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar getDef java.lang.String[] descriptorData = { "\n\024CustomOptions2.proto\022,io.confluent.kaf" + "ka.serializers.protobuf.test\032 google/pro" + - "tobuf/descriptor.proto\"\321\002\n\006FooBar\022\013\n\003foo" + + "tobuf/descriptor.proto\"\326\003\n\006FooBar\022\013\n\003foo" + "\030\001 \001(\005\022\013\n\003bar\030\002 \001(\t\022D\n\006nested\030\003 \003(\01324.io" + ".confluent.kafka.serializers.protobuf.te" + - "st.FooBar\032q\n\004More\022\016\n\006serial\030\001 \003(\0052J\n\013mor" + + "st.FooBar\032\177\n\004More\022\016\n\006serial\030\001 \003(\0052J\n\013mor" + "e_string\0224.io.confluent.kafka.serializer" + - "s.protobuf.test.FooBar\030\226\001 \001(\t:\r\212\265\030\t\262\t\006fo" + - "obar\"6\n\rFooBarBazEnum\022\007\n\003FOO\020\001\022\007\n\003BAR\020\002\022" + - "\007\n\003BAZ\020\003\032\n\312\325\"\006foobar*\005\010d\020\311\00125\n\rfoobar_st" + - "ring\022\034.google.protobuf.EnumOptions\030\331\252\004 \001" + - "(\t:r\n\021my_message_option\022\037.google.protobu" + - "f.MessageOptions\030\321\206\003 \001(\01324.io.confluent." + - "kafka.serializers.protobuf.test.FooBar:\205" + - "\001\n\003ext\0224.io.confluent.kafka.serializers." + - "protobuf.test.FooBar\030e \001(\0162B.io.confluen" + - "t.kafka.serializers.protobuf.test.FooBar" + - ".FooBarBazEnum:\205\001\n\003rep\0224.io.confluent.ka" + - "fka.serializers.protobuf.test.FooBar\030f \003" + - "(\0162B.io.confluent.kafka.serializers.prot" + - "obuf.test.FooBar.FooBarBazEnumB.\n,io.con" + - "fluent.kafka.serializers.protobuf.test" + "s.protobuf.test.FooBar\030\226\001 \001(\t:\033\212\265\030\t\262\t\006fo" + + "obar\212\265\030\003\260\006\001\212\265\030\003\260\006\002\032u\n\005More2\022\016\n\006serial\030\001 " + + "\003(\0052K\n\014more2_string\0224.io.confluent.kafka" + + ".serializers.protobuf.test.FooBar\030\227\001 \001(\t" + + ":\017\212\265\030\013\010{\272\t\006foobar\"6\n\rFooBarBazEnum\022\007\n\003FO" + + "O\020\001\022\007\n\003BAR\020\002\022\007\n\003BAZ\020\003\032\n\312\325\"\006foobar*\005\010d\020\311\001" + + "25\n\rfoobar_string\022\034.google.protobuf.Enum" + + "Options\030\331\252\004 \001(\t:r\n\021my_message_option\022\037.g" + + "oogle.protobuf.MessageOptions\030\321\206\003 \001(\01324." + + "io.confluent.kafka.serializers.protobuf." + + "test.FooBar:\205\001\n\003ext\0224.io.confluent.kafka" + + ".serializers.protobuf.test.FooBar\030e \001(\0162" + + "B.io.confluent.kafka.serializers.protobu" + + "f.test.FooBar.FooBarBazEnum:\205\001\n\003rep\0224.io" + + ".confluent.kafka.serializers.protobuf.te" + + "st.FooBar\030f \003(\0162B.io.confluent.kafka.ser" + + "ializers.protobuf.test.FooBar.FooBarBazE" + + "numB.\n,io.confluent.kafka.serializers.pr" + + "otobuf.test" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, @@ -1980,14 +2534,22 @@ public io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar getDef com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More_descriptor, new java.lang.String[] { "Serial", }); + internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_descriptor = + internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_descriptor.getNestedTypes().get(1); + internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_io_confluent_kafka_serializers_protobuf_test_FooBar_More2_descriptor, + new java.lang.String[] { "Serial", }); myMessageOption.internalInit(descriptor.getExtensions().get(0)); ext.internalInit(descriptor.getExtensions().get(1)); rep.internalInit(descriptor.getExtensions().get(2)); com.google.protobuf.ExtensionRegistry registry = com.google.protobuf.ExtensionRegistry.newInstance(); registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More.moreString); + registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.More2.more2String); registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.FooBar.foobarString); registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.myMessageOption); + registry.add(io.confluent.kafka.serializers.protobuf.test.CustomOptions2.rep); com.google.protobuf.Descriptors.FileDescriptor .internalUpdateFileDescriptor(descriptor, registry); com.google.protobuf.DescriptorProtos.getDescriptor(); diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DateValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DateValueOuterClass.java index 9f61b84fbd7..ffd4b649381 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DateValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DateValueOuterClass.java @@ -76,56 +76,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DateValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.Date.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.DateValueOuterClass.internal_static_DateValue_descriptor; @@ -194,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != null) { output.writeMessage(1, getValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +157,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +177,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +192,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -363,18 +313,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.DateValueOuterClass.DateValue.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -467,7 +412,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.DateValueO if (other.hasValue()) { mergeValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -482,17 +427,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.DateValueOuterClass.DateValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.DateValueOuterClass.DateValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -683,7 +648,18 @@ public DateValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DateValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValueOuterClass.java index 6ca4212f962..3aed1166247 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValueOuterClass.java @@ -76,56 +76,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DecimalValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.confluent.protobuf.type.Decimal.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(io.confluent.protobuf.type.Decimal.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.DecimalValueOuterClass.internal_static_DecimalValue_descriptor; @@ -194,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != null) { output.writeMessage(1, getValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +157,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +177,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +192,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -363,18 +313,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.DecimalValueOuterClass.DecimalValue.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -467,7 +412,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.DecimalVal if (other.hasValue()) { mergeValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -482,17 +427,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.DecimalValueOuterClass.DecimalValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.DecimalValueOuterClass.DecimalValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -683,7 +648,18 @@ public DecimalValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DecimalValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValuePb2OuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValuePb2OuterClass.java index 3e61db2d74f..61525eb784d 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValuePb2OuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DecimalValuePb2OuterClass.java @@ -76,57 +76,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DecimalValuePb2( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.confluent.protobuf.type.Decimal.Builder subBuilder = null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(io.confluent.protobuf.type.Decimal.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.DecimalValuePb2OuterClass.internal_static_DecimalValuePb2_descriptor; @@ -196,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(1, getValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -209,7 +158,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -229,7 +178,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -244,7 +193,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -476,7 +425,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.DecimalVal if (other.hasValue()) { mergeValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -491,17 +440,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.DecimalValuePb2OuterClass.DecimalValuePb2 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + bitField0_ |= 0x00000001; + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.DecimalValuePb2OuterClass.DecimalValuePb2) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -694,7 +663,18 @@ public DecimalValuePb2 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DecimalValuePb2(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DependencyTestProto.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DependencyTestProto.java index 15cf714ef27..06ad0148c87 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DependencyTestProto.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/DependencyTestProto.java @@ -81,74 +81,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private DependencyMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.Builder subBuilder = null; - if (nestedMessage_ != null) { - subBuilder = nestedMessage_.toBuilder(); - } - nestedMessage_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(nestedMessage_); - nestedMessage_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - isActive_ = input.readBool(); - break; - } - case 26: { - io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.Builder subBuilder = null; - if (testMesssage_ != null) { - subBuilder = testMesssage_.toBuilder(); - } - testMesssage_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testMesssage_); - testMesssage_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_DependencyMessage_descriptor; @@ -248,7 +180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (testMesssage_ != null) { output.writeMessage(3, getTestMesssage()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -269,7 +201,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getTestMesssage()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -296,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestMesssage() .equals(other.getTestMesssage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +250,7 @@ public int hashCode() { hash = (37 * hash) + TEST_MESSSAGE_FIELD_NUMBER; hash = (53 * hash) + getTestMesssage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,18 +367,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.DependencyMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -559,7 +486,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.Dependency if (other.hasTestMesssage()) { mergeTestMesssage(other.getTestMesssage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -574,17 +501,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.DependencyMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getNestedMessageFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 16: { + isActive_ = input.readBool(); + + break; + } // case 16 + case 26: { + input.readMessage( + getTestMesssageFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.DependencyTestProto.DependencyMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -889,7 +848,18 @@ public DependencyMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DependencyMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumReferenceOuter.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumReferenceOuter.java index 0178dba38bb..88ee16a398f 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumReferenceOuter.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumReferenceOuter.java @@ -57,49 +57,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private EnumReference( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - int rawValue = input.readEnum(); - - enumRoot_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.EnumReferenceOuter.internal_static_EnumReference_descriptor; @@ -149,7 +106,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (enumRoot_ != io.confluent.kafka.serializers.protobuf.test.EnumRootOuter.EnumRoot.HELLO.getNumber()) { output.writeEnum(1, enumRoot_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -162,7 +119,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(1, enumRoot_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -178,7 +135,7 @@ public boolean equals(final java.lang.Object obj) { io.confluent.kafka.serializers.protobuf.test.EnumReferenceOuter.EnumReference other = (io.confluent.kafka.serializers.protobuf.test.EnumReferenceOuter.EnumReference) obj; if (enumRoot_ != other.enumRoot_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -191,7 +148,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENUM_ROOT_FIELD_NUMBER; hash = (53 * hash) + enumRoot_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -308,18 +265,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.EnumReferenceOuter.EnumReference.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -404,7 +356,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.EnumRefere if (other.enumRoot_ != 0) { setEnumRootValue(other.getEnumRootValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -419,17 +371,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.EnumReferenceOuter.EnumReference parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + enumRoot_ = input.readEnum(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.EnumReferenceOuter.EnumReference) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -519,7 +489,18 @@ public EnumReference parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EnumReference(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumUnionOuter.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumUnionOuter.java index d712b61efa1..6b77fa885a5 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumUnionOuter.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/EnumUnionOuter.java @@ -211,66 +211,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private EnumUnion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - someValCase_ = 1; - someVal_ = s; - break; - } - case 16: { - someVal_ = input.readInt32(); - someValCase_ = 2; - break; - } - case 24: { - int rawValue = input.readEnum(); - someValCase_ = 3; - someVal_ = rawValue; - break; - } - case 32: { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_descriptor; @@ -478,7 +418,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (status_ != io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.ACTIVE.getNumber()) { output.writeEnum(4, status_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -503,7 +443,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeEnumSize(4, status_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -536,7 +476,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -565,7 +505,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -682,18 +622,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -809,7 +744,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.EnumUnionO break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -824,17 +759,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + someValCase_ = 1; + someVal_ = s; + break; + } // case 10 + case 16: { + someVal_ = input.readInt32(); + someValCase_ = 2; + break; + } // case 16 + case 24: { + int rawValue = input.readEnum(); + someValCase_ = 3; + someVal_ = rawValue; + break; + } // case 24 + case 32: { + status_ = input.readEnum(); + + break; + } // case 32 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int someValCase_ = 0; @@ -1148,7 +1118,18 @@ public EnumUnion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new EnumUnion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int16ValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int16ValueOuterClass.java index 5b1bd48a5e9..a9d1ab9b0d1 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int16ValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int16ValueOuterClass.java @@ -55,48 +55,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Int16Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - value_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.Int16ValueOuterClass.internal_static_Int16Value_descriptor; @@ -138,7 +96,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != 0) { output.writeInt32(1, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -151,7 +109,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -168,7 +126,7 @@ public boolean equals(final java.lang.Object obj) { if (getValue() != other.getValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -181,7 +139,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -302,18 +260,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.Int16ValueOuterClass.Int16Value.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -398,7 +351,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.Int16Value if (other.getValue() != 0) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -413,17 +366,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.Int16ValueOuterClass.Int16Value parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.Int16ValueOuterClass.Int16Value) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -490,7 +461,18 @@ public Int16Value parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Int16Value(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int8ValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int8ValueOuterClass.java index 12746f45098..69007d39f2c 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int8ValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/Int8ValueOuterClass.java @@ -55,48 +55,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Int8Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - value_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.Int8ValueOuterClass.internal_static_Int8Value_descriptor; @@ -138,7 +96,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != 0) { output.writeInt32(1, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -151,7 +109,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -168,7 +126,7 @@ public boolean equals(final java.lang.Object obj) { if (getValue() != other.getValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -181,7 +139,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -302,18 +260,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.Int8ValueOuterClass.Int8Value.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -398,7 +351,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.Int8ValueO if (other.getValue() != 0) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -413,17 +366,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.Int8ValueOuterClass.Int8Value parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.Int8ValueOuterClass.Int8Value) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -490,7 +461,18 @@ public Int8Value parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Int8Value(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/KeyTimestampValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/KeyTimestampValueOuterClass.java index 4f1f8bb96ff..87dd0172c39 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/KeyTimestampValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/KeyTimestampValueOuterClass.java @@ -85,74 +85,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private KeyTimestampValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - key_ = input.readInt32(); - break; - } - case 18: { - io.confluent.kafka.serializers.protobuf.test.TimestampValueOuterClass.TimestampValue.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.TimestampValueOuterClass.TimestampValue.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - case 26: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (value2_ != null) { - subBuilder = value2_.toBuilder(); - } - value2_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value2_); - value2_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.KeyTimestampValueOuterClass.internal_static_KeyTimestampValue_descriptor; @@ -252,7 +184,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value2_ != null) { output.writeMessage(3, getValue2()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -273,7 +205,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getValue2()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +232,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue2() .equals(other.getValue2())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -321,7 +253,7 @@ public int hashCode() { hash = (37 * hash) + VALUE2_FIELD_NUMBER; hash = (53 * hash) + getValue2().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -442,18 +374,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.KeyTimestampValueOuterClass.KeyTimestampValue.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -566,7 +493,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.KeyTimesta if (other.hasValue2()) { mergeValue2(other.getValue2()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -581,17 +508,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.KeyTimestampValueOuterClass.KeyTimestampValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + key_ = input.readInt32(); + + break; + } // case 8 + case 18: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 18 + case 26: { + input.readMessage( + getValue2FieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.KeyTimestampValueOuterClass.KeyTimestampValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -896,7 +855,18 @@ public KeyTimestampValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new KeyTimestampValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/NestedTestProto.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/NestedTestProto.java index c90ad498263..1ef97503977 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/NestedTestProto.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/NestedTestProto.java @@ -198,68 +198,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private UserId( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - userIdCase_ = 1; - userId_ = s; - break; - } - case 16: { - userId_ = input.readInt32(); - userIdCase_ = 2; - break; - } - case 26: { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId.Builder subBuilder = null; - if (userIdCase_ == 3) { - subBuilder = ((io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId) userId_).toBuilder(); - } - userId_ = - input.readMessage(io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId) userId_); - userId_ = subBuilder.buildPartial(); - } - userIdCase_ = 3; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.NestedTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_UserId_descriptor; @@ -444,7 +382,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (userIdCase_ == 3) { output.writeMessage(3, (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId) userId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -465,7 +403,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId) userId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -497,7 +435,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -524,7 +462,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -641,22 +579,20 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.NestedTestProto.UserId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + if (anotherIdBuilder_ != null) { + anotherIdBuilder_.clear(); + } userIdCase_ = 0; userId_ = null; return this; @@ -766,7 +702,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.NestedTest break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -781,17 +717,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.UserId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + userIdCase_ = 1; + userId_ = s; + break; + } // case 10 + case 16: { + userId_ = input.readInt32(); + userIdCase_ = 2; + break; + } // case 16 + case 26: { + input.readMessage( + getAnotherIdFieldBuilder().getBuilder(), + extensionRegistry); + userIdCase_ = 3; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.UserId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int userIdCase_ = 0; @@ -1121,7 +1088,18 @@ public UserId parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1185,49 +1163,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private MessageId( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - 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) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.NestedTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_MessageId_descriptor; @@ -1296,7 +1231,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1308,7 +1243,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1325,7 +1260,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId() .equals(other.getId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1338,7 +1273,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ID_FIELD_NUMBER; hash = (53 * hash) + getId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1455,18 +1390,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -1552,7 +1482,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.NestedTest id_ = other.id_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1567,17 +1497,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.MessageId) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1689,7 +1637,18 @@ public MessageId parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MessageId(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1776,59 +1735,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private ComplexType( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - someValCase_ = 1; - someVal_ = s; - break; - } - case 16: { - someVal_ = input.readInt32(); - someValCase_ = 2; - break; - } - case 24: { - - isActive_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.NestedTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_ComplexType_descriptor; @@ -1991,7 +1897,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (isActive_ != false) { output.writeBool(3, isActive_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2012,7 +1918,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeBoolSize(3, isActive_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2042,7 +1948,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2068,7 +1974,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2185,18 +2091,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.NestedTestProto.ComplexType.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -2305,7 +2206,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.NestedTest break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2320,17 +2221,46 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.ComplexType parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + someValCase_ = 1; + someVal_ = s; + break; + } // case 10 + case 16: { + someVal_ = input.readInt32(); + someValCase_ = 2; + break; + } // case 16 + case 24: { + isActive_ = input.readBool(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.ComplexType) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int someValCase_ = 0; @@ -2550,7 +2480,18 @@ public ComplexType parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ComplexType(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2743,132 +2684,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private NestedMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.UserId.Builder subBuilder = null; - if (userId_ != null) { - subBuilder = userId_.toBuilder(); - } - userId_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.NestedTestProto.UserId.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userId_); - userId_ = subBuilder.buildPartial(); - } - - break; - } - case 16: { - - isActive_ = input.readBool(); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - experimentsActive_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - experimentsActive_.add(s); - break; - } - case 34: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updatedAt_ != null) { - subBuilder = updatedAt_.toBuilder(); - } - updatedAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updatedAt_); - updatedAt_ = subBuilder.buildPartial(); - } - - break; - } - case 40: { - int rawValue = input.readEnum(); - - status_ = rawValue; - break; - } - case 50: { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.ComplexType.Builder subBuilder = null; - if (complexType_ != null) { - subBuilder = complexType_.toBuilder(); - } - complexType_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.NestedTestProto.ComplexType.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(complexType_); - complexType_ = subBuilder.buildPartial(); - } - - break; - } - case 58: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - mapType_ = com.google.protobuf.MapField.newMapField( - MapTypeDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - mapType__ = input.readMessage( - MapTypeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - mapType_.getMutableMap().put( - mapType__.getKey(), mapType__.getValue()); - break; - } - case 66: { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.InnerMessage.Builder subBuilder = null; - if (inner_ != null) { - subBuilder = inner_.toBuilder(); - } - inner_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.InnerMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inner_); - inner_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - experimentsActive_ = experimentsActive_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.NestedTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_NestedMessage_descriptor; @@ -3067,74 +2882,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private InnerMessage( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ids_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - ids_.addInt(input.readInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - ids_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - ids_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ids_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.NestedTestProto.internal_static_io_confluent_kafka_serializers_protobuf_test_NestedMessage_InnerMessage_descriptor; @@ -3239,7 +2986,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < ids_.size(); i++) { output.writeInt32NoTag(ids_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3265,7 +3012,7 @@ public int getSerializedSize() { } idsMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3284,7 +3031,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getId())) return false; if (!getIdsList() .equals(other.getIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3301,7 +3048,7 @@ public int hashCode() { hash = (37 * hash) + IDS_FIELD_NUMBER; hash = (53 * hash) + getIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3418,18 +3165,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.InnerMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -3533,7 +3275,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.NestedTest } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3548,17 +3290,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.InnerMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + int v = input.readInt32(); + ensureIdsIsMutable(); + ids_.addInt(v); + break; + } // case 16 + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureIdsIsMutable(); + while (input.getBytesUntilLimit() > 0) { + ids_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.InnerMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -3750,7 +3526,18 @@ public InnerMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new InnerMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4061,7 +3848,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (inner_ != null) { output.writeMessage(8, getInner()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4112,7 +3899,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(8, getInner()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4154,7 +3941,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInner() .equals(other.getInner())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4194,7 +3981,7 @@ public int hashCode() { hash = (37 * hash) + INNER_FIELD_NUMBER; hash = (53 * hash) + getInner().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4337,18 +4124,13 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -4518,7 +4300,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.NestedTest if (other.hasInner()) { mergeInner(other.getInner()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4533,17 +4315,82 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getUserIdFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + case 16: { + isActive_ = input.readBool(); + + break; + } // case 16 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureExperimentsActiveIsMutable(); + experimentsActive_.add(s); + break; + } // case 26 + case 34: { + input.readMessage( + getUpdatedAtFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 34 + case 40: { + status_ = input.readEnum(); + + break; + } // case 40 + case 50: { + input.readMessage( + getComplexTypeFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 50 + case 58: { + com.google.protobuf.MapEntry + mapType__ = input.readMessage( + MapTypeDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableMapType().getMutableMap().put( + mapType__.getKey(), mapType__.getValue()); + break; + } // case 58 + case 66: { + input.readMessage( + getInnerFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 66 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.NestedTestProto.NestedMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -5382,7 +5229,18 @@ public NestedMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new NestedMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt32ValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt32ValueOuterClass.java index 14def1955fe..68190c0e3e0 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt32ValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt32ValueOuterClass.java @@ -55,48 +55,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private SInt32Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - value_ = input.readSInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.SInt32ValueOuterClass.internal_static_SInt32Value_descriptor; @@ -138,7 +96,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != 0) { output.writeSInt32(1, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -151,7 +109,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeSInt32Size(1, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -168,7 +126,7 @@ public boolean equals(final java.lang.Object obj) { if (getValue() != other.getValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -181,7 +139,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -302,18 +260,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.SInt32ValueOuterClass.SInt32Value.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -398,7 +351,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.SInt32Valu if (other.getValue() != 0) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -413,17 +366,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.SInt32ValueOuterClass.SInt32Value parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readSInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.SInt32ValueOuterClass.SInt32Value) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -490,7 +461,18 @@ public SInt32Value parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SInt32Value(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt64ValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt64ValueOuterClass.java index 78f92e2e1ce..47e914330f4 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt64ValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/SInt64ValueOuterClass.java @@ -55,48 +55,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private SInt64Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - value_ = input.readSInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.SInt64ValueOuterClass.internal_static_SInt64Value_descriptor; @@ -138,7 +96,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != 0L) { output.writeSInt64(1, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -151,7 +109,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeSInt64Size(1, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -168,7 +126,7 @@ public boolean equals(final java.lang.Object obj) { if (getValue() != other.getValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -182,7 +140,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getValue()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -303,18 +261,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.SInt64ValueOuterClass.SInt64Value.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -399,7 +352,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.SInt64Valu if (other.getValue() != 0L) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -414,17 +367,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.SInt64ValueOuterClass.SInt64Value parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readSInt64(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.SInt64ValueOuterClass.SInt64Value) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -491,7 +462,18 @@ public SInt64Value parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SInt64Value(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageOptionalProtos.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageOptionalProtos.java index 2cfce29e32d..d399089a089 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageOptionalProtos.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageOptionalProtos.java @@ -76,56 +76,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private TestMessageOptional( - com.google.protobuf.CodedInputStream input, - 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(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - testString_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - testOptionalString_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.TestMessageOptionalProtos.internal_static_io_confluent_kafka_serializers_protobuf_test_TestMessageOptional_descriptor; @@ -244,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000001) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, testOptionalString_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -259,7 +209,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, testOptionalString_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -281,7 +231,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestOptionalString() .equals(other.getTestOptionalString())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -298,7 +248,7 @@ public int hashCode() { hash = (37 * hash) + TEST_OPTIONAL_STRING_FIELD_NUMBER; hash = (53 * hash) + getTestOptionalString().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -415,18 +365,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.TestMessageOptionalProtos.TestMessageOptional.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -526,7 +471,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.TestMessag testOptionalString_ = other.testOptionalString_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -541,17 +486,40 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.TestMessageOptionalProtos.TestMessageOptional parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + testString_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: { + testOptionalString_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.TestMessageOptionalProtos.TestMessageOptional) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -747,7 +715,18 @@ public TestMessageOptional parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestMessageOptional(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageProtos.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageProtos.java index 2432b6a2d5e..2cd604ef9a3 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageProtos.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TestMessageProtos.java @@ -143,119 +143,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private TestMessage( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - testString_ = s; - break; - } - case 16: { - - testBool_ = input.readBool(); - break; - } - case 26: { - - testBytes_ = input.readBytes(); - break; - } - case 33: { - - testDouble_ = input.readDouble(); - break; - } - case 45: { - - testFloat_ = input.readFloat(); - break; - } - case 53: { - - testFixed32_ = input.readFixed32(); - break; - } - case 57: { - - testFixed64_ = input.readFixed64(); - break; - } - case 64: { - - testInt32_ = input.readInt32(); - break; - } - case 72: { - - testInt64_ = input.readInt64(); - break; - } - case 85: { - - testSfixed32_ = input.readSFixed32(); - break; - } - case 89: { - - testSfixed64_ = input.readSFixed64(); - break; - } - case 96: { - - testSint32_ = input.readSInt32(); - break; - } - case 104: { - - testSint64_ = input.readSInt64(); - break; - } - case 112: { - - testUint32_ = input.readUInt32(); - break; - } - case 120: { - - testUint64_ = input.readUInt64(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.internal_static_io_confluent_kafka_serializers_protobuf_test_TestMessage_descriptor; @@ -520,7 +407,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (testUint64_ != 0L) { output.writeUInt64(15, testUint64_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -588,7 +475,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt64Size(15, testUint64_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -635,7 +522,7 @@ public boolean equals(final java.lang.Object obj) { != other.getTestUint32()) return false; if (getTestUint64() != other.getTestUint64()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -684,7 +571,7 @@ public int hashCode() { hash = (37 * hash) + TEST_UINT64_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong( getTestUint64()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -801,18 +688,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -982,7 +864,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.TestMessag if (other.getTestUint64() != 0L) { setTestUint64(other.getTestUint64()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -997,17 +879,105 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + testString_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + testBool_ = input.readBool(); + + break; + } // case 16 + case 26: { + testBytes_ = input.readBytes(); + + break; + } // case 26 + case 33: { + testDouble_ = input.readDouble(); + + break; + } // case 33 + case 45: { + testFloat_ = input.readFloat(); + + break; + } // case 45 + case 53: { + testFixed32_ = input.readFixed32(); + + break; + } // case 53 + case 57: { + testFixed64_ = input.readFixed64(); + + break; + } // case 57 + case 64: { + testInt32_ = input.readInt32(); + + break; + } // case 64 + case 72: { + testInt64_ = input.readInt64(); + + break; + } // case 72 + case 85: { + testSfixed32_ = input.readSFixed32(); + + break; + } // case 85 + case 89: { + testSfixed64_ = input.readSFixed64(); + + break; + } // case 89 + case 96: { + testSint32_ = input.readSInt32(); + + break; + } // case 96 + case 104: { + testSint64_ = input.readSInt64(); + + break; + } // case 104 + case 112: { + testUint32_ = input.readUInt32(); + + break; + } // case 112 + case 120: { + testUint64_ = input.readUInt64(); + + break; + } // case 120 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1556,7 +1526,18 @@ public TestMessage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestMessage(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1720,132 +1701,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private TestMessage2( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - testString_ = s; - break; - } - case 16: { - - testBool_ = input.readBool(); - break; - } - case 26: { - - testBytes_ = input.readBytes(); - break; - } - case 33: { - - testDouble_ = input.readDouble(); - break; - } - case 45: { - - testFloat_ = input.readFloat(); - break; - } - case 53: { - - testFixed32_ = input.readFixed32(); - break; - } - case 57: { - - testFixed64_ = input.readFixed64(); - break; - } - case 64: { - - testInt32_ = input.readInt32(); - break; - } - case 72: { - - testInt64_ = input.readInt64(); - break; - } - case 85: { - - testSfixed32_ = input.readSFixed32(); - break; - } - case 89: { - - testSfixed64_ = input.readSFixed64(); - break; - } - case 96: { - - testSint32_ = input.readSInt32(); - break; - } - case 104: { - - testSint64_ = input.readSInt64(); - break; - } - case 112: { - - testUint32_ = input.readUInt32(); - break; - } - case 120: { - - testUint64_ = input.readUInt64(); - break; - } - case 130: { - io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.Builder subBuilder = null; - if (testMessage_ != null) { - subBuilder = testMessage_.toBuilder(); - } - testMessage_ = input.readMessage(io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(testMessage_); - testMessage_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.internal_static_io_confluent_kafka_serializers_protobuf_test_TestMessage2_descriptor; @@ -2139,7 +1994,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (testMessage_ != null) { output.writeMessage(16, getTestMessage()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2211,7 +2066,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(16, getTestMessage()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2263,7 +2118,7 @@ public boolean equals(final java.lang.Object obj) { if (!getTestMessage() .equals(other.getTestMessage())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2316,7 +2171,7 @@ public int hashCode() { hash = (37 * hash) + TEST_MESSAGE_FIELD_NUMBER; hash = (53 * hash) + getTestMessage().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2433,18 +2288,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage2.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -2628,7 +2478,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.TestMessag if (other.hasTestMessage()) { mergeTestMessage(other.getTestMessage()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2643,17 +2493,112 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage2 parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + testString_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: { + testBool_ = input.readBool(); + + break; + } // case 16 + case 26: { + testBytes_ = input.readBytes(); + + break; + } // case 26 + case 33: { + testDouble_ = input.readDouble(); + + break; + } // case 33 + case 45: { + testFloat_ = input.readFloat(); + + break; + } // case 45 + case 53: { + testFixed32_ = input.readFixed32(); + + break; + } // case 53 + case 57: { + testFixed64_ = input.readFixed64(); + + break; + } // case 57 + case 64: { + testInt32_ = input.readInt32(); + + break; + } // case 64 + case 72: { + testInt64_ = input.readInt64(); + + break; + } // case 72 + case 85: { + testSfixed32_ = input.readSFixed32(); + + break; + } // case 85 + case 89: { + testSfixed64_ = input.readSFixed64(); + + break; + } // case 89 + case 96: { + testSint32_ = input.readSInt32(); + + break; + } // case 96 + case 104: { + testSint64_ = input.readSInt64(); + + break; + } // case 104 + case 112: { + testUint32_ = input.readUInt32(); + + break; + } // case 112 + case 120: { + testUint64_ = input.readUInt64(); + + break; + } // case 120 + case 130: { + input.readMessage( + getTestMessageFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 130 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.TestMessageProtos.TestMessage2) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3321,7 +3266,18 @@ public TestMessage2 parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestMessage2(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimeOfDayValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimeOfDayValueOuterClass.java index bfe0b979140..476e76a063b 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimeOfDayValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimeOfDayValueOuterClass.java @@ -76,56 +76,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private TimeOfDayValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.type.TimeOfDay.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.type.TimeOfDay.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.TimeOfDayValueOuterClass.internal_static_TimeOfDayValue_descriptor; @@ -194,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != null) { output.writeMessage(1, getValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +157,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +177,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +192,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -363,18 +313,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.TimeOfDayValueOuterClass.TimeOfDayValue.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -467,7 +412,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.TimeOfDayV if (other.hasValue()) { mergeValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -482,17 +427,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.TimeOfDayValueOuterClass.TimeOfDayValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.TimeOfDayValueOuterClass.TimeOfDayValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -683,7 +648,18 @@ public TimeOfDayValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeOfDayValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimestampValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimestampValueOuterClass.java index bb99437e5e3..d4c52e7e74f 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimestampValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/TimestampValueOuterClass.java @@ -76,56 +76,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private TimestampValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (value_ != null) { - subBuilder = value_.toBuilder(); - } - value_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(value_); - value_ = subBuilder.buildPartial(); - } - - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.TimestampValueOuterClass.internal_static_TimestampValue_descriptor; @@ -194,7 +144,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != null) { output.writeMessage(1, getValue()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -207,7 +157,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(1, getValue()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -227,7 +177,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue() .equals(other.getValue())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +192,7 @@ public int hashCode() { hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -363,18 +313,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.TimestampValueOuterClass.TimestampValue.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -467,7 +412,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.TimestampV if (other.hasValue()) { mergeValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -482,17 +427,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.TimestampValueOuterClass.TimestampValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + input.readMessage( + getValueFieldBuilder().getBuilder(), + extensionRegistry); + + break; + } // case 10 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.TimestampValueOuterClass.TimestampValue) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -683,7 +648,18 @@ public TimestampValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimestampValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/UInt32ValueOuterClass.java b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/UInt32ValueOuterClass.java index d6119a0e36f..dc88e23cf96 100644 --- a/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/UInt32ValueOuterClass.java +++ b/protobuf-serializer/src/test/java/io/confluent/kafka/serializers/protobuf/test/UInt32ValueOuterClass.java @@ -55,48 +55,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private UInt32Value( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - value_ = input.readUInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.kafka.serializers.protobuf.test.UInt32ValueOuterClass.internal_static_UInt32Value_descriptor; @@ -138,7 +96,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (value_ != 0) { output.writeUInt32(1, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -151,7 +109,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeUInt32Size(1, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -168,7 +126,7 @@ public boolean equals(final java.lang.Object obj) { if (getValue() != other.getValue()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -181,7 +139,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -302,18 +260,13 @@ public static final class Builder extends // Construct using io.confluent.kafka.serializers.protobuf.test.UInt32ValueOuterClass.UInt32Value.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -398,7 +351,7 @@ public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.UInt32Valu if (other.getValue() != 0) { setValue(other.getValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -413,17 +366,35 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.kafka.serializers.protobuf.test.UInt32ValueOuterClass.UInt32Value parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + value_ = input.readUInt32(); + + break; + } // case 8 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.kafka.serializers.protobuf.test.UInt32ValueOuterClass.UInt32Value) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -490,7 +461,18 @@ public UInt32Value parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UInt32Value(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/protobuf-types/src/main/java/io/confluent/protobuf/type/Decimal.java b/protobuf-types/src/main/java/io/confluent/protobuf/type/Decimal.java index a1d90a603b4..98bf6a172f0 100644 --- a/protobuf-types/src/main/java/io/confluent/protobuf/type/Decimal.java +++ b/protobuf-types/src/main/java/io/confluent/protobuf/type/Decimal.java @@ -31,58 +31,6 @@ protected java.lang.Object newInstance( getUnknownFields() { return this.unknownFields; } - private Decimal( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - - value_ = input.readBytes(); - break; - } - case 16: { - - precision_ = input.readUInt32(); - break; - } - case 24: { - - scale_ = input.readInt32(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return io.confluent.protobuf.type.DecimalProto.internal_static_confluent_type_Decimal_descriptor; @@ -164,7 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (scale_ != 0) { output.writeInt32(3, scale_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -185,7 +133,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(3, scale_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -206,7 +154,7 @@ public boolean equals(final java.lang.Object obj) { != other.getPrecision()) return false; if (getScale() != other.getScale()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +171,7 @@ public int hashCode() { hash = (53 * hash) + getPrecision(); hash = (37 * hash) + SCALE_FIELD_NUMBER; hash = (53 * hash) + getScale(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -340,18 +288,13 @@ public static final class Builder extends // Construct using io.confluent.protobuf.type.Decimal.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { @@ -448,7 +391,7 @@ public Builder mergeFrom(io.confluent.protobuf.type.Decimal other) { if (other.getScale() != 0) { setScale(other.getScale()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -463,17 +406,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - io.confluent.protobuf.type.Decimal parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + value_ = input.readBytes(); + + break; + } // case 10 + case 16: { + precision_ = input.readUInt32(); + + break; + } // case 16 + case 24: { + scale_ = input.readInt32(); + + break; + } // case 24 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (io.confluent.protobuf.type.Decimal) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -641,7 +612,18 @@ public Decimal parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Decimal(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } };