// Generated by the protocol buffer compiler.  DO NOT EDIT!

package org.apache.camel.dataformat.protobuf.generated;

public final class AddressBookProtos {
  private AddressBookProtos() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistry registry) {
  }
  public static final class Person extends
      com.google.protobuf.GeneratedMessage {
    // Use Person.newBuilder() to construct.
    private Person() {}
    
    private static final Person defaultInstance = new Person();
    public static Person getDefaultInstance() {
      return defaultInstance;
    }
    
    public Person getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internal_static_org_apache_camel_dataformat_protobuf_generated_Person_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internal_static_org_apache_camel_dataformat_protobuf_generated_Person_fieldAccessorTable;
    }
    
    public enum PhoneType
        implements com.google.protobuf.ProtocolMessageEnum {
      MOBILE(0, 0),
      HOME(1, 1),
      WORK(2, 2),
      ;
      
      
      public final int getNumber() { return value; }
      
      public static PhoneType valueOf(int value) {
        switch (value) {
          case 0: return MOBILE;
          case 1: return HOME;
          case 2: return WORK;
          default: return null;
        }
      }
      
      public static com.google.protobuf.Internal.EnumLiteMap<PhoneType>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap<PhoneType>
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<PhoneType>() {
              public PhoneType findValueByNumber(int number) {
                return PhoneType.valueOf(number)
      ;        }
            };
      
      public final com.google.protobuf.Descriptors.EnumValueDescriptor
          getValueDescriptor() {
        return getDescriptor().getValues().get(index);
      }
      public final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }
      public static final com.google.protobuf.Descriptors.EnumDescriptor
          getDescriptor() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.getDescriptor().getEnumTypes().get(0);
      }
      
      private static final PhoneType[] VALUES = {
        MOBILE, HOME, WORK, 
      };
      public static PhoneType 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 index;
      private final int value;
      private PhoneType(int index, int value) {
        this.index = index;
        this.value = value;
      }
      
      static {
        org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.getDescriptor();
      }
    }
    
    public static final class PhoneNumber extends
        com.google.protobuf.GeneratedMessage {
      // Use PhoneNumber.newBuilder() to construct.
      private PhoneNumber() {}
      
      private static final PhoneNumber defaultInstance = new PhoneNumber();
      public static PhoneNumber getDefaultInstance() {
        return defaultInstance;
      }
      
      public PhoneNumber getDefaultInstanceForType() {
        return defaultInstance;
      }
      
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_descriptor;
      }
      
      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
          internalGetFieldAccessorTable() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_fieldAccessorTable;
      }
      
      // required string number = 1;
      public static final int NUMBER_FIELD_NUMBER = 1;
      private boolean hasNumber;
      private java.lang.String number_ = "";
      public boolean hasNumber() { return hasNumber; }
      public java.lang.String getNumber() { return number_; }
      
      // optional .org.apache.camel.dataformat.protobuf.generated.Person.PhoneType type = 2 [default = HOME];
      public static final int TYPE_FIELD_NUMBER = 2;
      private boolean hasType;
      private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType type_ = org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType.HOME;
      public boolean hasType() { return hasType; }
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType getType() { return type_; }
      
      public final boolean isInitialized() {
        if (!hasNumber) return false;
        return true;
      }
      
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        if (hasNumber()) {
          output.writeString(1, getNumber());
        }
        if (hasType()) {
          output.writeEnum(2, getType().getNumber());
        }
        getUnknownFields().writeTo(output);
      }
      
      private int memoizedSerializedSize = -1;
      public int getSerializedSize() {
        int size = memoizedSerializedSize;
        if (size != -1) return size;
      
        size = 0;
        if (hasNumber()) {
          size += com.google.protobuf.CodedOutputStream
            .computeStringSize(1, getNumber());
        }
        if (hasType()) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(2, getType().getNumber());
        }
        size += getUnknownFields().getSerializedSize();
        memoizedSerializedSize = size;
        return size;
      }
      
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data).buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data, extensionRegistry)
                 .buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data).buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data, extensionRegistry)
                 .buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input).buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input, extensionRegistry)
                 .buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        return newBuilder().mergeDelimitedFrom(input).buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
                 .buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input).buildParsed();
      }
      public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber parseFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input, extensionRegistry)
                 .buildParsed();
      }
      
      public static Builder newBuilder() { return Builder.create(); }
      public Builder newBuilderForType() { return newBuilder(); }
      public static Builder newBuilder(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber prototype) {
        return newBuilder().mergeFrom(prototype);
      }
      public Builder toBuilder() { return newBuilder(this); }
      
      public static final class Builder extends
          com.google.protobuf.GeneratedMessage.Builder<Builder> {
        private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber result;
        
        // Construct using org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.newBuilder()
        private Builder() {}
        
        private static Builder create() {
          Builder builder = new Builder();
          builder.result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber();
          return builder;
        }
        
        protected org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber internalGetResult() {
          return result;
        }
        
        public Builder clear() {
          if (result == null) {
            throw new IllegalStateException(
              "Cannot call clear() after build().");
          }
          result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber();
          return this;
        }
        
        public Builder clone() {
          return create().mergeFrom(result);
        }
        
        public com.google.protobuf.Descriptors.Descriptor
            getDescriptorForType() {
          return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.getDescriptor();
        }
        
        public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber getDefaultInstanceForType() {
          return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.getDefaultInstance();
        }
        
        public boolean isInitialized() {
          return result.isInitialized();
        }
        public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber build() {
          if (result != null && !isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return buildPartial();
        }
        
        private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber buildParsed()
            throws com.google.protobuf.InvalidProtocolBufferException {
          if (!isInitialized()) {
            throw newUninitializedMessageException(
              result).asInvalidProtocolBufferException();
          }
          return buildPartial();
        }
        
        public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber buildPartial() {
          if (result == null) {
            throw new IllegalStateException(
              "build() has already been called on this Builder.");
          }
          org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber returnMe = result;
          result = null;
          return returnMe;
        }
        
        public Builder mergeFrom(com.google.protobuf.Message other) {
          if (other instanceof org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber) {
            return mergeFrom((org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber)other);
          } else {
            super.mergeFrom(other);
            return this;
          }
        }
        
        public Builder mergeFrom(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber other) {
          if (other == org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.getDefaultInstance()) return this;
          if (other.hasNumber()) {
            setNumber(other.getNumber());
          }
          if (other.hasType()) {
            setType(other.getType());
          }
          this.mergeUnknownFields(other.getUnknownFields());
          return this;
        }
        
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          com.google.protobuf.UnknownFieldSet.Builder unknownFields =
            com.google.protobuf.UnknownFieldSet.newBuilder(
              this.getUnknownFields());
          while (true) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                this.setUnknownFields(unknownFields.build());
                return this;
              default: {
                if (!parseUnknownField(input, unknownFields,
                                       extensionRegistry, tag)) {
                  this.setUnknownFields(unknownFields.build());
                  return this;
                }
                break;
              }
              case 10: {
                setNumber(input.readString());
                break;
              }
              case 16: {
                int rawValue = input.readEnum();
                org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType value = org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType.valueOf(rawValue);
                if (value == null) {
                  unknownFields.mergeVarintField(2, rawValue);
                } else {
                  setType(value);
                }
                break;
              }
            }
          }
        }
        
        
        // required string number = 1;
        public boolean hasNumber() {
          return result.hasNumber();
        }
        public java.lang.String getNumber() {
          return result.getNumber();
        }
        public Builder setNumber(java.lang.String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  result.hasNumber = true;
          result.number_ = value;
          return this;
        }
        public Builder clearNumber() {
          result.hasNumber = false;
          result.number_ = getDefaultInstance().getNumber();
          return this;
        }
        
        // optional .org.apache.camel.dataformat.protobuf.generated.Person.PhoneType type = 2 [default = HOME];
        public boolean hasType() {
          return result.hasType();
        }
        public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType getType() {
          return result.getType();
        }
        public Builder setType(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType value) {
          if (value == null) {
            throw new NullPointerException();
          }
          result.hasType = true;
          result.type_ = value;
          return this;
        }
        public Builder clearType() {
          result.hasType = false;
          result.type_ = org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneType.HOME;
          return this;
        }
      }
      
      static {
        org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.getDescriptor();
      }
      
      static {
        org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internalForceInit();
      }
    }
    
    // required string name = 1;
    public static final int NAME_FIELD_NUMBER = 1;
    private boolean hasName;
    private java.lang.String name_ = "";
    public boolean hasName() { return hasName; }
    public java.lang.String getName() { return name_; }
    
    // required int32 id = 2;
    public static final int ID_FIELD_NUMBER = 2;
    private boolean hasId;
    private int id_ = 0;
    public boolean hasId() { return hasId; }
    public int getId() { return id_; }
    
    // optional string email = 3;
    public static final int EMAIL_FIELD_NUMBER = 3;
    private boolean hasEmail;
    private java.lang.String email_ = "";
    public boolean hasEmail() { return hasEmail; }
    public java.lang.String getEmail() { return email_; }
    
    // repeated .org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 4;
    public static final int PHONE_FIELD_NUMBER = 4;
    private java.util.List<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber> phone_ =
      java.util.Collections.emptyList();
    public java.util.List<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber> getPhoneList() {
      return phone_;
    }
    public int getPhoneCount() { return phone_.size(); }
    public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber getPhone(int index) {
      return phone_.get(index);
    }
    
    public final boolean isInitialized() {
      if (!hasName) return false;
      if (!hasId) return false;
      for (org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber element : getPhoneList()) {
        if (!element.isInitialized()) return false;
      }
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (hasName()) {
        output.writeString(1, getName());
      }
      if (hasId()) {
        output.writeInt32(2, getId());
      }
      if (hasEmail()) {
        output.writeString(3, getEmail());
      }
      for (org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber element : getPhoneList()) {
        output.writeMessage(4, element);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (hasName()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(1, getName());
      }
      if (hasId()) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(2, getId());
      }
      if (hasEmail()) {
        size += com.google.protobuf.CodedOutputStream
          .computeStringSize(3, getEmail());
      }
      for (org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber element : getPhoneList()) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(4, element);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeDelimitedFrom(input).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> {
      private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person result;
      
      // Construct using org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.newBuilder()
      private Builder() {}
      
      private static Builder create() {
        Builder builder = new Builder();
        builder.result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person();
        return builder;
      }
      
      protected org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person internalGetResult() {
        return result;
      }
      
      public Builder clear() {
        if (result == null) {
          throw new IllegalStateException(
            "Cannot call clear() after build().");
        }
        result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person();
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(result);
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.getDescriptor();
      }
      
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person getDefaultInstanceForType() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.getDefaultInstance();
      }
      
      public boolean isInitialized() {
        return result.isInitialized();
      }
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person build() {
        if (result != null && !isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return buildPartial();
      }
      
      private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        if (!isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return buildPartial();
      }
      
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person buildPartial() {
        if (result == null) {
          throw new IllegalStateException(
            "build() has already been called on this Builder.");
        }
        if (result.phone_ != java.util.Collections.EMPTY_LIST) {
          result.phone_ =
            java.util.Collections.unmodifiableList(result.phone_);
        }
        org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person returnMe = result;
        result = null;
        return returnMe;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person) {
          return mergeFrom((org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person other) {
        if (other == org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.getDefaultInstance()) return this;
        if (other.hasName()) {
          setName(other.getName());
        }
        if (other.hasId()) {
          setId(other.getId());
        }
        if (other.hasEmail()) {
          setEmail(other.getEmail());
        }
        if (!other.phone_.isEmpty()) {
          if (result.phone_.isEmpty()) {
            result.phone_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber>();
          }
          result.phone_.addAll(other.phone_);
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                return this;
              }
              break;
            }
            case 10: {
              setName(input.readString());
              break;
            }
            case 16: {
              setId(input.readInt32());
              break;
            }
            case 26: {
              setEmail(input.readString());
              break;
            }
            case 34: {
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.Builder subBuilder = org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addPhone(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      
      // required string name = 1;
      public boolean hasName() {
        return result.hasName();
      }
      public java.lang.String getName() {
        return result.getName();
      }
      public Builder setName(java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  result.hasName = true;
        result.name_ = value;
        return this;
      }
      public Builder clearName() {
        result.hasName = false;
        result.name_ = getDefaultInstance().getName();
        return this;
      }
      
      // required int32 id = 2;
      public boolean hasId() {
        return result.hasId();
      }
      public int getId() {
        return result.getId();
      }
      public Builder setId(int value) {
        result.hasId = true;
        result.id_ = value;
        return this;
      }
      public Builder clearId() {
        result.hasId = false;
        result.id_ = 0;
        return this;
      }
      
      // optional string email = 3;
      public boolean hasEmail() {
        return result.hasEmail();
      }
      public java.lang.String getEmail() {
        return result.getEmail();
      }
      public Builder setEmail(java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  result.hasEmail = true;
        result.email_ = value;
        return this;
      }
      public Builder clearEmail() {
        result.hasEmail = false;
        result.email_ = getDefaultInstance().getEmail();
        return this;
      }
      
      // repeated .org.apache.camel.dataformat.protobuf.generated.Person.PhoneNumber phone = 4;
      public java.util.List<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber> getPhoneList() {
        return java.util.Collections.unmodifiableList(result.phone_);
      }
      public int getPhoneCount() {
        return result.getPhoneCount();
      }
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber getPhone(int index) {
        return result.getPhone(index);
      }
      public Builder setPhone(int index, org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber value) {
        if (value == null) {
          throw new NullPointerException();
        }
        result.phone_.set(index, value);
        return this;
      }
      public Builder setPhone(int index, org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.Builder builderForValue) {
        result.phone_.set(index, builderForValue.build());
        return this;
      }
      public Builder addPhone(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber value) {
        if (value == null) {
          throw new NullPointerException();
        }
        if (result.phone_.isEmpty()) {
          result.phone_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber>();
        }
        result.phone_.add(value);
        return this;
      }
      public Builder addPhone(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.Builder builderForValue) {
        if (result.phone_.isEmpty()) {
          result.phone_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber>();
        }
        result.phone_.add(builderForValue.build());
        return this;
      }
      public Builder addAllPhone(
          java.lang.Iterable<? extends org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber> values) {
        if (result.phone_.isEmpty()) {
          result.phone_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber>();
        }
        super.addAll(values, result.phone_);
        return this;
      }
      public Builder clearPhone() {
        result.phone_ = java.util.Collections.emptyList();
        return this;
      }
    }
    
    static {
      org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.getDescriptor();
    }
    
    static {
      org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internalForceInit();
    }
  }
  
  public static final class AddressBook extends
      com.google.protobuf.GeneratedMessage {
    // Use AddressBook.newBuilder() to construct.
    private AddressBook() {}
    
    private static final AddressBook defaultInstance = new AddressBook();
    public static AddressBook getDefaultInstance() {
      return defaultInstance;
    }
    
    public AddressBook getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_descriptor;
    }
    
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_fieldAccessorTable;
    }
    
    // repeated .org.apache.camel.dataformat.protobuf.generated.Person person = 1;
    public static final int PERSON_FIELD_NUMBER = 1;
    private java.util.List<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person> person_ =
      java.util.Collections.emptyList();
    public java.util.List<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person> getPersonList() {
      return person_;
    }
    public int getPersonCount() { return person_.size(); }
    public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person getPerson(int index) {
      return person_.get(index);
    }
    
    public final boolean isInitialized() {
      for (org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person element : getPersonList()) {
        if (!element.isInitialized()) return false;
      }
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      for (org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person element : getPersonList()) {
        output.writeMessage(1, element);
      }
      getUnknownFields().writeTo(output);
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      for (org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person element : getPersonList()) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, element);
      }
      size += getUnknownFields().getSerializedSize();
      memoizedSerializedSize = size;
      return size;
    }
    
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeDelimitedFrom(input).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook parseFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    
    public static Builder newBuilder() { return Builder.create(); }
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessage.Builder<Builder> {
      private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook result;
      
      // Construct using org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook.newBuilder()
      private Builder() {}
      
      private static Builder create() {
        Builder builder = new Builder();
        builder.result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook();
        return builder;
      }
      
      protected org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook internalGetResult() {
        return result;
      }
      
      public Builder clear() {
        if (result == null) {
          throw new IllegalStateException(
            "Cannot call clear() after build().");
        }
        result = new org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook();
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(result);
      }
      
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook.getDescriptor();
      }
      
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook getDefaultInstanceForType() {
        return org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook.getDefaultInstance();
      }
      
      public boolean isInitialized() {
        return result.isInitialized();
      }
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook build() {
        if (result != null && !isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return buildPartial();
      }
      
      private org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        if (!isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return buildPartial();
      }
      
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook buildPartial() {
        if (result == null) {
          throw new IllegalStateException(
            "build() has already been called on this Builder.");
        }
        if (result.person_ != java.util.Collections.EMPTY_LIST) {
          result.person_ =
            java.util.Collections.unmodifiableList(result.person_);
        }
        org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook returnMe = result;
        result = null;
        return returnMe;
      }
      
      public Builder mergeFrom(com.google.protobuf.Message other) {
        if (other instanceof org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook) {
          return mergeFrom((org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }
      
      public Builder mergeFrom(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook other) {
        if (other == org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook.getDefaultInstance()) return this;
        if (!other.person_.isEmpty()) {
          if (result.person_.isEmpty()) {
            result.person_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person>();
          }
          result.person_.addAll(other.person_);
        }
        this.mergeUnknownFields(other.getUnknownFields());
        return this;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        com.google.protobuf.UnknownFieldSet.Builder unknownFields =
          com.google.protobuf.UnknownFieldSet.newBuilder(
            this.getUnknownFields());
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              this.setUnknownFields(unknownFields.build());
              return this;
            default: {
              if (!parseUnknownField(input, unknownFields,
                                     extensionRegistry, tag)) {
                this.setUnknownFields(unknownFields.build());
                return this;
              }
              break;
            }
            case 10: {
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.Builder subBuilder = org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.newBuilder();
              input.readMessage(subBuilder, extensionRegistry);
              addPerson(subBuilder.buildPartial());
              break;
            }
          }
        }
      }
      
      
      // repeated .org.apache.camel.dataformat.protobuf.generated.Person person = 1;
      public java.util.List<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person> getPersonList() {
        return java.util.Collections.unmodifiableList(result.person_);
      }
      public int getPersonCount() {
        return result.getPersonCount();
      }
      public org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person getPerson(int index) {
        return result.getPerson(index);
      }
      public Builder setPerson(int index, org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person value) {
        if (value == null) {
          throw new NullPointerException();
        }
        result.person_.set(index, value);
        return this;
      }
      public Builder setPerson(int index, org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.Builder builderForValue) {
        result.person_.set(index, builderForValue.build());
        return this;
      }
      public Builder addPerson(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person value) {
        if (value == null) {
          throw new NullPointerException();
        }
        if (result.person_.isEmpty()) {
          result.person_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person>();
        }
        result.person_.add(value);
        return this;
      }
      public Builder addPerson(org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.Builder builderForValue) {
        if (result.person_.isEmpty()) {
          result.person_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person>();
        }
        result.person_.add(builderForValue.build());
        return this;
      }
      public Builder addAllPerson(
          java.lang.Iterable<? extends org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person> values) {
        if (result.person_.isEmpty()) {
          result.person_ = new java.util.ArrayList<org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person>();
        }
        super.addAll(values, result.person_);
        return this;
      }
      public Builder clearPerson() {
        result.person_ = java.util.Collections.emptyList();
        return this;
      }
    }
    
    static {
      org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.getDescriptor();
    }
    
    static {
      org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.internalForceInit();
    }
  }
  
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_org_apache_camel_dataformat_protobuf_generated_Person_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_org_apache_camel_dataformat_protobuf_generated_Person_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_fieldAccessorTable;
  private static com.google.protobuf.Descriptors.Descriptor
    internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_descriptor;
  private static
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
      internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_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\021addressbook.proto\022.org.apache.camel.da" +
      "taformat.protobuf.generated\"\246\002\n\006Person\022\014" +
      "\n\004name\030\001 \002(\t\022\n\n\002id\030\002 \002(\005\022\r\n\005email\030\003 \001(\t\022" +
      "Q\n\005phone\030\004 \003(\0132B.org.apache.camel.datafo" +
      "rmat.protobuf.generated.Person.PhoneNumb" +
      "er\032s\n\013PhoneNumber\022\016\n\006number\030\001 \002(\t\022T\n\004typ" +
      "e\030\002 \001(\0162@.org.apache.camel.dataformat.pr" +
      "otobuf.generated.Person.PhoneType:\004HOME\"" +
      "+\n\tPhoneType\022\n\n\006MOBILE\020\000\022\010\n\004HOME\020\001\022\010\n\004WO" +
      "RK\020\002\"U\n\013AddressBook\022F\n\006person\030\001 \003(\01326.or",
      "g.apache.camel.dataformat.protobuf.gener" +
      "ated.PersonBC\n.org.apache.camel.dataform" +
      "at.protobuf.generatedB\021AddressBookProtos"
    };
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
            com.google.protobuf.Descriptors.FileDescriptor root) {
          descriptor = root;
          internal_static_org_apache_camel_dataformat_protobuf_generated_Person_descriptor =
            getDescriptor().getMessageTypes().get(0);
          internal_static_org_apache_camel_dataformat_protobuf_generated_Person_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_org_apache_camel_dataformat_protobuf_generated_Person_descriptor,
              new java.lang.String[] { "Name", "Id", "Email", "Phone", },
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.class,
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.Builder.class);
          internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_descriptor =
            internal_static_org_apache_camel_dataformat_protobuf_generated_Person_descriptor.getNestedTypes().get(0);
          internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_org_apache_camel_dataformat_protobuf_generated_Person_PhoneNumber_descriptor,
              new java.lang.String[] { "Number", "Type", },
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.class,
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.Person.PhoneNumber.Builder.class);
          internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_descriptor =
            getDescriptor().getMessageTypes().get(1);
          internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_fieldAccessorTable = new
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
              internal_static_org_apache_camel_dataformat_protobuf_generated_AddressBook_descriptor,
              new java.lang.String[] { "Person", },
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook.class,
              org.apache.camel.dataformat.protobuf.generated.AddressBookProtos.AddressBook.Builder.class);
          return null;
        }
      };
    com.google.protobuf.Descriptors.FileDescriptor
      .internalBuildGeneratedFileFrom(descriptorData,
        new com.google.protobuf.Descriptors.FileDescriptor[] {
        }, assigner);
  }
  
  public static void internalForceInit() {}
}
