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

package kafdrop.protos;

/**
 * Protobuf type {@code kafdrop.Person}
 */
public final class Person extends
  com.google.protobuf.GeneratedMessageV3 implements
  // @@protoc_insertion_point(message_implements:kafdrop.Person)
  PersonOrBuilder {
  private static final long serialVersionUID = 0L;

  // Use Person.newBuilder() to construct.
  private Person(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Person() {
    name_ = "";
    email_ = "";
    contact_ = 0;
    data_ = com.google.protobuf.LazyStringArrayList.EMPTY;
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }

  private Person(
    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();

            name_ = s;
            break;
          }
          case 16: {

            id_ = input.readInt32();
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            email_ = s;
            break;
          }
          case 32: {
            int rawValue = input.readEnum();

            contact_ = rawValue;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              data_ = new com.google.protobuf.LazyStringArrayList();
              mutable_bitField0_ |= 0x00000001;
            }
            data_.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)) {
        data_ = data_.getUnmodifiableView();
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }

  public static final com.google.protobuf.Descriptors.Descriptor
  getDescriptor() {
    return kafdrop.protos.PersonProto.internal_static_kafdrop_Person_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
  internalGetFieldAccessorTable() {
    return kafdrop.protos.PersonProto.internal_static_kafdrop_Person_fieldAccessorTable
      .ensureFieldAccessorsInitialized(
        kafdrop.protos.Person.class, kafdrop.protos.Person.Builder.class);
  }

  /**
   * Protobuf enum {@code kafdrop.Person.Contact}
   */
  public enum Contact
    implements com.google.protobuf.ProtocolMessageEnum {
    /**
     * <code>TELEPHONE = 0;</code>
     */
    TELEPHONE(0),
    /**
     * <code>MOBILE = 1;</code>
     */
    MOBILE(1),
    UNRECOGNIZED(-1),
    ;

    /**
     * <code>TELEPHONE = 0;</code>
     */
    public static final int TELEPHONE_VALUE = 0;
    /**
     * <code>MOBILE = 1;</code>
     */
    public static final int MOBILE_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 Contact 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 Contact forNumber(int value) {
      switch (value) {
        case 0:
          return TELEPHONE;
        case 1:
          return MOBILE;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Contact>
    internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<
      Contact> internalValueMap =
      new com.google.protobuf.Internal.EnumLiteMap<Contact>() {
        public Contact findValueByNumber(int number) {
          return Contact.forNumber(number);
        }
      };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor
    getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
          "Can't get the descriptor of an unrecognized enum value.");
      }
      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 kafdrop.protos.Person.getDescriptor().getEnumTypes().get(0);
    }

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

    public static Contact 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 Contact(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:kafdrop.Person.Contact)
  }

  public static final int NAME_FIELD_NUMBER = 1;
  private volatile java.lang.Object name_;

  /**
   * <code>string name = 1;</code>
   *
   * @return The name.
   */
  @java.lang.Override
  public java.lang.String getName() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs =
        (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      name_ = s;
      return s;
    }
  }

  /**
   * <code>string name = 1;</code>
   *
   * @return The bytes for name.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
  getNameBytes() {
    java.lang.Object ref = name_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
        com.google.protobuf.ByteString.copyFromUtf8(
          (java.lang.String) ref);
      name_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ID_FIELD_NUMBER = 2;
  private int id_;

  /**
   * <code>int32 id = 2;</code>
   *
   * @return The id.
   */
  @java.lang.Override
  public int getId() {
    return id_;
  }

  public static final int EMAIL_FIELD_NUMBER = 3;
  private volatile java.lang.Object email_;

  /**
   * <code>string email = 3;</code>
   *
   * @return The email.
   */
  @java.lang.Override
  public java.lang.String getEmail() {
    java.lang.Object ref = email_;
    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();
      email_ = s;
      return s;
    }
  }

  /**
   * <code>string email = 3;</code>
   *
   * @return The bytes for email.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
  getEmailBytes() {
    java.lang.Object ref = email_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
        com.google.protobuf.ByteString.copyFromUtf8(
          (java.lang.String) ref);
      email_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CONTACT_FIELD_NUMBER = 4;
  private int contact_;

  /**
   * <code>.kafdrop.Person.Contact contact = 4;</code>
   *
   * @return The enum numeric value on the wire for contact.
   */
  @java.lang.Override
  public int getContactValue() {
    return contact_;
  }

  /**
   * <code>.kafdrop.Person.Contact contact = 4;</code>
   *
   * @return The contact.
   */
  @java.lang.Override
  public kafdrop.protos.Person.Contact getContact() {
    @SuppressWarnings("deprecation")
    kafdrop.protos.Person.Contact result = kafdrop.protos.Person.Contact.valueOf(contact_);
    return result == null ? kafdrop.protos.Person.Contact.UNRECOGNIZED : result;
  }

  public static final int DATA_FIELD_NUMBER = 5;
  private com.google.protobuf.LazyStringList data_;

  /**
   * <code>repeated string data = 5;</code>
   *
   * @return A list containing the data.
   */
  public com.google.protobuf.ProtocolStringList
  getDataList() {
    return data_;
  }

  /**
   * <code>repeated string data = 5;</code>
   *
   * @return The count of data.
   */
  public int getDataCount() {
    return data_.size();
  }

  /**
   * <code>repeated string data = 5;</code>
   *
   * @param index The index of the element to return.
   * @return The data at the given index.
   */
  public java.lang.String getData(int index) {
    return data_.get(index);
  }

  /**
   * <code>repeated string data = 5;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the data at the given index.
   */
  public com.google.protobuf.ByteString
  getDataBytes(int index) {
    return data_.getByteString(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 {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
    }
    if (id_ != 0) {
      output.writeInt32(2, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_);
    }
    if (contact_ != kafdrop.protos.Person.Contact.TELEPHONE.getNumber()) {
      output.writeEnum(4, contact_);
    }
    for (int i = 0; i < data_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, data_.getRaw(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
    }
    if (id_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(email_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_);
    }
    if (contact_ != kafdrop.protos.Person.Contact.TELEPHONE.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, contact_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < data_.size(); i++) {
        dataSize += computeStringSizeNoTag(data_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getDataList().size();
    }
    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 kafdrop.protos.Person)) {
      return super.equals(obj);
    }
    kafdrop.protos.Person other = (kafdrop.protos.Person) obj;

    if (!getName()
      .equals(other.getName())) return false;
    if (getId()
      != other.getId()) return false;
    if (!getEmail()
      .equals(other.getEmail())) return false;
    if (contact_ != other.contact_) return false;
    if (!getDataList()
      .equals(other.getDataList())) return false;
    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) + NAME_FIELD_NUMBER;
    hash = (53 * hash) + getName().hashCode();
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId();
    hash = (37 * hash) + EMAIL_FIELD_NUMBER;
    hash = (53 * hash) + getEmail().hashCode();
    hash = (37 * hash) + CONTACT_FIELD_NUMBER;
    hash = (53 * hash) + contact_;
    if (getDataCount() > 0) {
      hash = (37 * hash) + DATA_FIELD_NUMBER;
      hash = (53 * hash) + getDataList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static kafdrop.protos.Person parseFrom(
    java.nio.ByteBuffer data)
    throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static kafdrop.protos.Person parseFrom(
    java.nio.ByteBuffer data,
    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static kafdrop.protos.Person parseFrom(
    com.google.protobuf.ByteString data)
    throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static kafdrop.protos.Person parseFrom(
    com.google.protobuf.ByteString data,
    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static kafdrop.protos.Person parseFrom(byte[] data)
    throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static kafdrop.protos.Person parseFrom(
    byte[] data,
    com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static kafdrop.protos.Person parseFrom(java.io.InputStream input)
    throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
      .parseWithIOException(PARSER, input);
  }

  public static kafdrop.protos.Person 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 kafdrop.protos.Person parseDelimitedFrom(java.io.InputStream input)
    throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
      .parseDelimitedWithIOException(PARSER, input);
  }

  public static kafdrop.protos.Person 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 kafdrop.protos.Person parseFrom(
    com.google.protobuf.CodedInputStream input)
    throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
      .parseWithIOException(PARSER, input);
  }

  public static kafdrop.protos.Person 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(kafdrop.protos.Person 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 kafdrop.Person}
   */
  public static final class Builder extends
    com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
    // @@protoc_insertion_point(builder_implements:kafdrop.Person)
    kafdrop.protos.PersonOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
    getDescriptor() {
      return kafdrop.protos.PersonProto.internal_static_kafdrop_Person_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
    internalGetFieldAccessorTable() {
      return kafdrop.protos.PersonProto.internal_static_kafdrop_Person_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
          kafdrop.protos.Person.class, kafdrop.protos.Person.Builder.class);
    }

    // Construct using kafdrop.protos.Person.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();
      name_ = "";

      id_ = 0;

      email_ = "";

      contact_ = 0;

      data_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
    getDescriptorForType() {
      return kafdrop.protos.PersonProto.internal_static_kafdrop_Person_descriptor;
    }

    @java.lang.Override
    public kafdrop.protos.Person getDefaultInstanceForType() {
      return kafdrop.protos.Person.getDefaultInstance();
    }

    @java.lang.Override
    public kafdrop.protos.Person build() {
      kafdrop.protos.Person result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public kafdrop.protos.Person buildPartial() {
      kafdrop.protos.Person result = new kafdrop.protos.Person(this);
      int from_bitField0_ = bitField0_;
      result.name_ = name_;
      result.id_ = id_;
      result.email_ = email_;
      result.contact_ = contact_;
      if (((bitField0_ & 0x00000001) != 0)) {
        data_ = data_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000001);
      }
      result.data_ = data_;
      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 kafdrop.protos.Person) {
        return mergeFrom((kafdrop.protos.Person) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(kafdrop.protos.Person other) {
      if (other == kafdrop.protos.Person.getDefaultInstance()) return this;
      if (!other.getName().isEmpty()) {
        name_ = other.name_;
        onChanged();
      }
      if (other.getId() != 0) {
        setId(other.getId());
      }
      if (!other.getEmail().isEmpty()) {
        email_ = other.email_;
        onChanged();
      }
      if (other.contact_ != 0) {
        setContactValue(other.getContactValue());
      }
      if (!other.data_.isEmpty()) {
        if (data_.isEmpty()) {
          data_ = other.data_;
          bitField0_ = (bitField0_ & ~0x00000001);
        } else {
          ensureDataIsMutable();
          data_.addAll(other.data_);
        }
        onChanged();
      }
      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 {
      kafdrop.protos.Person parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (kafdrop.protos.Person) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int bitField0_;

    private java.lang.Object name_ = "";

    /**
     * <code>string name = 1;</code>
     *
     * @return The name.
     */
    public java.lang.String getName() {
      java.lang.Object ref = name_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        name_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * <code>string name = 1;</code>
     *
     * @return The bytes for name.
     */
    public com.google.protobuf.ByteString
    getNameBytes() {
      java.lang.Object ref = name_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
            (java.lang.String) ref);
        name_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <code>string name = 1;</code>
     *
     * @param value The name to set.
     * @return This builder for chaining.
     */
    public Builder setName(
      java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      name_ = value;
      onChanged();
      return this;
    }

    /**
     * <code>string name = 1;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {

      name_ = getDefaultInstance().getName();
      onChanged();
      return this;
    }

    /**
     * <code>string name = 1;</code>
     *
     * @param value The bytes for name to set.
     * @return This builder for chaining.
     */
    public Builder setNameBytes(
      com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      name_ = value;
      onChanged();
      return this;
    }

    private int id_;

    /**
     * <code>int32 id = 2;</code>
     *
     * @return The id.
     */
    @java.lang.Override
    public int getId() {
      return id_;
    }

    /**
     * <code>int32 id = 2;</code>
     *
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(int value) {

      id_ = value;
      onChanged();
      return this;
    }

    /**
     * <code>int32 id = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearId() {

      id_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object email_ = "";

    /**
     * <code>string email = 3;</code>
     *
     * @return The email.
     */
    public java.lang.String getEmail() {
      java.lang.Object ref = email_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
          (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        email_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }

    /**
     * <code>string email = 3;</code>
     *
     * @return The bytes for email.
     */
    public com.google.protobuf.ByteString
    getEmailBytes() {
      java.lang.Object ref = email_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8(
            (java.lang.String) ref);
        email_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    /**
     * <code>string email = 3;</code>
     *
     * @param value The email to set.
     * @return This builder for chaining.
     */
    public Builder setEmail(
      java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }

      email_ = value;
      onChanged();
      return this;
    }

    /**
     * <code>string email = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearEmail() {

      email_ = getDefaultInstance().getEmail();
      onChanged();
      return this;
    }

    /**
     * <code>string email = 3;</code>
     *
     * @param value The bytes for email to set.
     * @return This builder for chaining.
     */
    public Builder setEmailBytes(
      com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);

      email_ = value;
      onChanged();
      return this;
    }

    private int contact_ = 0;

    /**
     * <code>.kafdrop.Person.Contact contact = 4;</code>
     *
     * @return The enum numeric value on the wire for contact.
     */
    @java.lang.Override
    public int getContactValue() {
      return contact_;
    }

    /**
     * <code>.kafdrop.Person.Contact contact = 4;</code>
     *
     * @param value The enum numeric value on the wire for contact to set.
     * @return This builder for chaining.
     */
    public Builder setContactValue(int value) {

      contact_ = value;
      onChanged();
      return this;
    }

    /**
     * <code>.kafdrop.Person.Contact contact = 4;</code>
     *
     * @return The contact.
     */
    @java.lang.Override
    public kafdrop.protos.Person.Contact getContact() {
      @SuppressWarnings("deprecation")
      kafdrop.protos.Person.Contact result = kafdrop.protos.Person.Contact.valueOf(contact_);
      return result == null ? kafdrop.protos.Person.Contact.UNRECOGNIZED : result;
    }

    /**
     * <code>.kafdrop.Person.Contact contact = 4;</code>
     *
     * @param value The contact to set.
     * @return This builder for chaining.
     */
    public Builder setContact(kafdrop.protos.Person.Contact value) {
      if (value == null) {
        throw new NullPointerException();
      }

      contact_ = value.getNumber();
      onChanged();
      return this;
    }

    /**
     * <code>.kafdrop.Person.Contact contact = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearContact() {

      contact_ = 0;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList data_ = com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureDataIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        data_ = new com.google.protobuf.LazyStringArrayList(data_);
        bitField0_ |= 0x00000001;
      }
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @return A list containing the data.
     */
    public com.google.protobuf.ProtocolStringList
    getDataList() {
      return data_.getUnmodifiableView();
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @return The count of data.
     */
    public int getDataCount() {
      return data_.size();
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @param index The index of the element to return.
     * @return The data at the given index.
     */
    public java.lang.String getData(int index) {
      return data_.get(index);
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the data at the given index.
     */
    public com.google.protobuf.ByteString
    getDataBytes(int index) {
      return data_.getByteString(index);
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @param index The index to set the value at.
     * @param value The data to set.
     * @return This builder for chaining.
     */
    public Builder setData(
      int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDataIsMutable();
      data_.set(index, value);
      onChanged();
      return this;
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @param value The data to add.
     * @return This builder for chaining.
     */
    public Builder addData(
      java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureDataIsMutable();
      data_.add(value);
      onChanged();
      return this;
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @param values The data to add.
     * @return This builder for chaining.
     */
    public Builder addAllData(
      java.lang.Iterable<java.lang.String> values) {
      ensureDataIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
        values, data_);
      onChanged();
      return this;
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearData() {
      data_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }

    /**
     * <code>repeated string data = 5;</code>
     *
     * @param value The bytes of the data to add.
     * @return This builder for chaining.
     */
    public Builder addDataBytes(
      com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureDataIsMutable();
      data_.add(value);
      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:kafdrop.Person)
  }

  // @@protoc_insertion_point(class_scope:kafdrop.Person)
  private static final kafdrop.protos.Person DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new kafdrop.protos.Person();
  }

  public static kafdrop.protos.Person getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public kafdrop.protos.Person getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

