// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: EnumUnion.proto

package io.confluent.kafka.serializers.protobuf.test;

public final class EnumUnionOuter {
  private EnumUnionOuter() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }

  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
    registerAllExtensions(
        (com.google.protobuf.ExtensionRegistryLite) registry);
  }
  /**
   * Protobuf enum {@code io.confluent.kafka.serializers.protobuf.test.Status}
   */
  public enum Status
      implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <code>ACTIVE = 0;</code>
     */
    ACTIVE(0),
    /**
     * <code>INACTIVE = 1;</code>
     */
    INACTIVE(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * <code>ACTIVE = 0;</code>
     */
    public static final int ACTIVE_VALUE = 0;
    /**
     * <code>INACTIVE = 1;</code>
     */
    public static final int INACTIVE_VALUE = 1;


    public final int getNumber() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalArgumentException(
            "Can't get the number of an unknown enum value.");
      }
      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 Status valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static Status forNumber(int value) {
      switch (value) {
        case 0: return ACTIVE;
        case 1: return INACTIVE;
        default: return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Status>
        internalGetValueMap() {
      return internalValueMap;
    }
    private static final com.google.protobuf.Internal.EnumLiteMap<
        Status> internalValueMap =
          new com.google.protobuf.Internal.EnumLiteMap<Status>() {
            public Status findValueByNumber(int number) {
              return Status.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.EnumUnionOuter.getDescriptor().getEnumTypes().get(0);
    }

    private static final Status[] VALUES = values();

    public static Status valueOf(
        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException(
          "EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private Status(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:io.confluent.kafka.serializers.protobuf.test.Status)
  }

  public interface EnumUnionOrBuilder extends
      // @@protoc_insertion_point(interface_extends:io.confluent.kafka.serializers.protobuf.test.EnumUnion)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string one_id = 1;</code>
     * @return The oneId.
     */
    java.lang.String getOneId();
    /**
     * <code>string one_id = 1;</code>
     * @return The bytes for oneId.
     */
    com.google.protobuf.ByteString
        getOneIdBytes();

    /**
     * <code>int32 other_id = 2;</code>
     * @return The otherId.
     */
    int getOtherId();

    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
     * @return The enum numeric value on the wire for someStatus.
     */
    int getSomeStatusValue();
    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
     * @return The someStatus.
     */
    io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status getSomeStatus();

    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
     * @return The enum numeric value on the wire for status.
     */
    int getStatusValue();
    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
     * @return The status.
     */
    io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status getStatus();

    public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.SomeValCase getSomeValCase();
  }
  /**
   * Protobuf type {@code io.confluent.kafka.serializers.protobuf.test.EnumUnion}
   */
  public  static final class EnumUnion extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:io.confluent.kafka.serializers.protobuf.test.EnumUnion)
      EnumUnionOrBuilder {
  private static final long serialVersionUID = 0L;
    // Use EnumUnion.newBuilder() to construct.
    private EnumUnion(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private EnumUnion() {
      status_ = 0;
    }

    @java.lang.Override
    @SuppressWarnings({"unused"})
    protected java.lang.Object newInstance(
        UnusedPrivateParameter unused) {
      return new EnumUnion();
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    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: {
              someValCase_ = 2;
              someVal_ = input.readInt32();
              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;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.class, io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.Builder.class);
    }

    private int someValCase_ = 0;
    private java.lang.Object someVal_;
    public enum SomeValCase
        implements com.google.protobuf.Internal.EnumLite,
            com.google.protobuf.AbstractMessage.InternalOneOfEnum {
      ONE_ID(1),
      OTHER_ID(2),
      SOME_STATUS(3),
      SOMEVAL_NOT_SET(0);
      private final int value;
      private SomeValCase(int value) {
        this.value = value;
      }
      /**
       * @param value The number of the enum to look for.
       * @return The enum associated with the given number.
       * @deprecated Use {@link #forNumber(int)} instead.
       */
      @java.lang.Deprecated
      public static SomeValCase valueOf(int value) {
        return forNumber(value);
      }

      public static SomeValCase forNumber(int value) {
        switch (value) {
          case 1: return ONE_ID;
          case 2: return OTHER_ID;
          case 3: return SOME_STATUS;
          case 0: return SOMEVAL_NOT_SET;
          default: return null;
        }
      }
      public int getNumber() {
        return this.value;
      }
    };

    public SomeValCase
    getSomeValCase() {
      return SomeValCase.forNumber(
          someValCase_);
    }

    public static final int ONE_ID_FIELD_NUMBER = 1;
    /**
     * <code>string one_id = 1;</code>
     * @return The oneId.
     */
    public java.lang.String getOneId() {
      java.lang.Object ref = "";
      if (someValCase_ == 1) {
        ref = someVal_;
      }
      if (ref instanceof java.lang.String) {
        return (java.lang.String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        if (someValCase_ == 1) {
          someVal_ = s;
        }
        return s;
      }
    }
    /**
     * <code>string one_id = 1;</code>
     * @return The bytes for oneId.
     */
    public com.google.protobuf.ByteString
        getOneIdBytes() {
      java.lang.Object ref = "";
      if (someValCase_ == 1) {
        ref = someVal_;
      }
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        if (someValCase_ == 1) {
          someVal_ = b;
        }
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int OTHER_ID_FIELD_NUMBER = 2;
    /**
     * <code>int32 other_id = 2;</code>
     * @return The otherId.
     */
    public int getOtherId() {
      if (someValCase_ == 2) {
        return (java.lang.Integer) someVal_;
      }
      return 0;
    }

    public static final int SOME_STATUS_FIELD_NUMBER = 3;
    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
     * @return The enum numeric value on the wire for someStatus.
     */
    public int getSomeStatusValue() {
      if (someValCase_ == 3) {
        return (java.lang.Integer) someVal_;
      }
      return 0;
    }
    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
     * @return The someStatus.
     */
    public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status getSomeStatus() {
      if (someValCase_ == 3) {
        @SuppressWarnings("deprecation")
        io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status result = io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.valueOf(
            (java.lang.Integer) someVal_);
        return result == null ? io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.UNRECOGNIZED : result;
      }
      return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.ACTIVE;
    }

    public static final int STATUS_FIELD_NUMBER = 4;
    private int status_;
    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
     * @return The enum numeric value on the wire for status.
     */
    public int getStatusValue() {
      return status_;
    }
    /**
     * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
     * @return The status.
     */
    public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status getStatus() {
      @SuppressWarnings("deprecation")
      io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status result = io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.valueOf(status_);
      return result == null ? io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.UNRECOGNIZED : result;
    }

    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 {
      if (someValCase_ == 1) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, someVal_);
      }
      if (someValCase_ == 2) {
        output.writeInt32(
            2, (int)((java.lang.Integer) someVal_));
      }
      if (someValCase_ == 3) {
        output.writeEnum(3, ((java.lang.Integer) someVal_));
      }
      if (status_ != io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.ACTIVE.getNumber()) {
        output.writeEnum(4, status_);
      }
      unknownFields.writeTo(output);
    }

    @java.lang.Override
    public int getSerializedSize() {
      int size = memoizedSize;
      if (size != -1) return size;

      size = 0;
      if (someValCase_ == 1) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, someVal_);
      }
      if (someValCase_ == 2) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(
              2, (int)((java.lang.Integer) someVal_));
      }
      if (someValCase_ == 3) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(3, ((java.lang.Integer) someVal_));
      }
      if (status_ != io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.ACTIVE.getNumber()) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(4, status_);
      }
      size += unknownFields.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.EnumUnionOuter.EnumUnion)) {
        return super.equals(obj);
      }
      io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion other = (io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion) obj;

      if (status_ != other.status_) return false;
      if (!getSomeValCase().equals(other.getSomeValCase())) return false;
      switch (someValCase_) {
        case 1:
          if (!getOneId()
              .equals(other.getOneId())) return false;
          break;
        case 2:
          if (getOtherId()
              != other.getOtherId()) return false;
          break;
        case 3:
          if (getSomeStatusValue()
              != other.getSomeStatusValue()) return false;
          break;
        case 0:
        default:
      }
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + STATUS_FIELD_NUMBER;
      hash = (53 * hash) + status_;
      switch (someValCase_) {
        case 1:
          hash = (37 * hash) + ONE_ID_FIELD_NUMBER;
          hash = (53 * hash) + getOneId().hashCode();
          break;
        case 2:
          hash = (37 * hash) + OTHER_ID_FIELD_NUMBER;
          hash = (53 * hash) + getOtherId();
          break;
        case 3:
          hash = (37 * hash) + SOME_STATUS_FIELD_NUMBER;
          hash = (53 * hash) + getSomeStatusValue();
          break;
        case 0:
        default:
      }
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

    public static io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnionOuter.EnumUnion 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.EnumUnion}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:io.confluent.kafka.serializers.protobuf.test.EnumUnion)
        io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnionOrBuilder {
      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;
      }

      @java.lang.Override
      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.class, io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.Builder.class);
      }

      // 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() {
        super.clear();
        status_ = 0;

        someValCase_ = 0;
        someVal_ = null;
        return this;
      }

      @java.lang.Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_descriptor;
      }

      @java.lang.Override
      public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion getDefaultInstanceForType() {
        return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.getDefaultInstance();
      }

      @java.lang.Override
      public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion build() {
        io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @java.lang.Override
      public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion buildPartial() {
        io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion result = new io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion(this);
        if (someValCase_ == 1) {
          result.someVal_ = someVal_;
        }
        if (someValCase_ == 2) {
          result.someVal_ = someVal_;
        }
        if (someValCase_ == 3) {
          result.someVal_ = someVal_;
        }
        result.status_ = status_;
        result.someValCase_ = someValCase_;
        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.EnumUnionOuter.EnumUnion) {
          return mergeFrom((io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion other) {
        if (other == io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion.getDefaultInstance()) return this;
        if (other.status_ != 0) {
          setStatusValue(other.getStatusValue());
        }
        switch (other.getSomeValCase()) {
          case ONE_ID: {
            someValCase_ = 1;
            someVal_ = other.someVal_;
            onChanged();
            break;
          }
          case OTHER_ID: {
            setOtherId(other.getOtherId());
            break;
          }
          case SOME_STATUS: {
            setSomeStatusValue(other.getSomeStatusValue());
            break;
          }
          case SOMEVAL_NOT_SET: {
            break;
          }
        }
        this.mergeUnknownFields(other.unknownFields);
        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 {
        io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } 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);
          }
        }
        return this;
      }
      private int someValCase_ = 0;
      private java.lang.Object someVal_;
      public SomeValCase
          getSomeValCase() {
        return SomeValCase.forNumber(
            someValCase_);
      }

      public Builder clearSomeVal() {
        someValCase_ = 0;
        someVal_ = null;
        onChanged();
        return this;
      }


      /**
       * <code>string one_id = 1;</code>
       * @return The oneId.
       */
      public java.lang.String getOneId() {
        java.lang.Object ref = "";
        if (someValCase_ == 1) {
          ref = someVal_;
        }
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          if (someValCase_ == 1) {
            someVal_ = s;
          }
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string one_id = 1;</code>
       * @return The bytes for oneId.
       */
      public com.google.protobuf.ByteString
          getOneIdBytes() {
        java.lang.Object ref = "";
        if (someValCase_ == 1) {
          ref = someVal_;
        }
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          if (someValCase_ == 1) {
            someVal_ = b;
          }
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string one_id = 1;</code>
       * @param value The oneId to set.
       * @return This builder for chaining.
       */
      public Builder setOneId(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  someValCase_ = 1;
        someVal_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string one_id = 1;</code>
       * @return This builder for chaining.
       */
      public Builder clearOneId() {
        if (someValCase_ == 1) {
          someValCase_ = 0;
          someVal_ = null;
          onChanged();
        }
        return this;
      }
      /**
       * <code>string one_id = 1;</code>
       * @param value The bytes for oneId to set.
       * @return This builder for chaining.
       */
      public Builder setOneIdBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        someValCase_ = 1;
        someVal_ = value;
        onChanged();
        return this;
      }

      /**
       * <code>int32 other_id = 2;</code>
       * @return The otherId.
       */
      public int getOtherId() {
        if (someValCase_ == 2) {
          return (java.lang.Integer) someVal_;
        }
        return 0;
      }
      /**
       * <code>int32 other_id = 2;</code>
       * @param value The otherId to set.
       * @return This builder for chaining.
       */
      public Builder setOtherId(int value) {
        someValCase_ = 2;
        someVal_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 other_id = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearOtherId() {
        if (someValCase_ == 2) {
          someValCase_ = 0;
          someVal_ = null;
          onChanged();
        }
        return this;
      }

      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
       * @return The enum numeric value on the wire for someStatus.
       */
      public int getSomeStatusValue() {
        if (someValCase_ == 3) {
          return ((java.lang.Integer) someVal_).intValue();
        }
        return 0;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
       * @param value The enum numeric value on the wire for someStatus to set.
       * @return This builder for chaining.
       */
      public Builder setSomeStatusValue(int value) {
        someValCase_ = 3;
        someVal_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
       * @return The someStatus.
       */
      public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status getSomeStatus() {
        if (someValCase_ == 3) {
          @SuppressWarnings("deprecation")
          io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status result = io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.valueOf(
              (java.lang.Integer) someVal_);
          return result == null ? io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.UNRECOGNIZED : result;
        }
        return io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.ACTIVE;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
       * @param value The someStatus to set.
       * @return This builder for chaining.
       */
      public Builder setSomeStatus(io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status value) {
        if (value == null) {
          throw new NullPointerException();
        }
        someValCase_ = 3;
        someVal_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status some_status = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearSomeStatus() {
        if (someValCase_ == 3) {
          someValCase_ = 0;
          someVal_ = null;
          onChanged();
        }
        return this;
      }

      private int status_ = 0;
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
       * @return The enum numeric value on the wire for status.
       */
      public int getStatusValue() {
        return status_;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
       * @param value The enum numeric value on the wire for status to set.
       * @return This builder for chaining.
       */
      public Builder setStatusValue(int value) {
        status_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
       * @return The status.
       */
      public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status getStatus() {
        @SuppressWarnings("deprecation")
        io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status result = io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.valueOf(status_);
        return result == null ? io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status.UNRECOGNIZED : result;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
       * @param value The status to set.
       * @return This builder for chaining.
       */
      public Builder setStatus(io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.Status value) {
        if (value == null) {
          throw new NullPointerException();
        }
        
        status_ = value.getNumber();
        onChanged();
        return this;
      }
      /**
       * <code>.io.confluent.kafka.serializers.protobuf.test.Status status = 4;</code>
       * @return This builder for chaining.
       */
      public Builder clearStatus() {
        
        status_ = 0;
        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);
      }


      // @@protoc_insertion_point(builder_scope:io.confluent.kafka.serializers.protobuf.test.EnumUnion)
    }

    // @@protoc_insertion_point(class_scope:io.confluent.kafka.serializers.protobuf.test.EnumUnion)
    private static final io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion();
    }

    public static io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<EnumUnion>
        PARSER = new com.google.protobuf.AbstractParser<EnumUnion>() {
      @java.lang.Override
      public EnumUnion parsePartialFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return new EnumUnion(input, extensionRegistry);
      }
    };

    public static com.google.protobuf.Parser<EnumUnion> parser() {
      return PARSER;
    }

    @java.lang.Override
    public com.google.protobuf.Parser<EnumUnion> getParserForType() {
      return PARSER;
    }

    @java.lang.Override
    public io.confluent.kafka.serializers.protobuf.test.EnumUnionOuter.EnumUnion getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private static final com.google.protobuf.Descriptors.Descriptor
    internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_descriptor;
  private static final 
    com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_fieldAccessorTable;

  public static com.google.protobuf.Descriptors.FileDescriptor
      getDescriptor() {
    return descriptor;
  }
  private static  com.google.protobuf.Descriptors.FileDescriptor
      descriptor;
  static {
    java.lang.String[] descriptorData = {
      "\n\017EnumUnion.proto\022,io.confluent.kafka.se" +
      "rializers.protobuf.test\"\320\001\n\tEnumUnion\022\020\n" +
      "\006one_id\030\001 \001(\tH\000\022\022\n\010other_id\030\002 \001(\005H\000\022K\n\013s" +
      "ome_status\030\003 \001(\01624.io.confluent.kafka.se" +
      "rializers.protobuf.test.StatusH\000\022D\n\006stat" +
      "us\030\004 \001(\01624.io.confluent.kafka.serializer" +
      "s.protobuf.test.StatusB\n\n\010some_val*\"\n\006St" +
      "atus\022\n\n\006ACTIVE\020\000\022\014\n\010INACTIVE\020\001B@\n,io.con" +
      "fluent.kafka.serializers.protobuf.testB\016" +
      "EnumUnionOuterP\000b\006proto3"
    };
    descriptor = com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        });
    internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_descriptor =
      getDescriptor().getMessageTypes().get(0);
    internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_fieldAccessorTable = new
      com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
        internal_static_io_confluent_kafka_serializers_protobuf_test_EnumUnion_descriptor,
        new java.lang.String[] { "OneId", "OtherId", "SomeStatus", "Status", "SomeVal", });
  }

  // @@protoc_insertion_point(outer_class_scope)
}
