// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: src/test/resources/proto/complex.proto

package resources.java;

public final class Complex {
  private Complex() {}
  public static void registerAllExtensions(
      com.google.protobuf.ExtensionRegistryLite registry) {
  }
  public interface ComplexMessageOrBuilder
      extends com.google.protobuf.MessageLiteOrBuilder {
    
    // required bytes first_field = 1;
    boolean hasFirstField();
    com.google.protobuf.ByteString getFirstField();
    
    // optional string second_field = 2 [default = "defaultValueForSecondField"];
    boolean hasSecondField();
    String getSecondField();
    
    // optional .resources.java.ComplexMessage.Nested nested_outer_field = 3;
    boolean hasNestedOuterField();
    resources.java.Complex.ComplexMessage.Nested getNestedOuterField();
    
    // repeated .resources.java.ComplexMessage.SimpleEnum simple_enum_field = 4;
    java.util.List<resources.java.Complex.ComplexMessage.SimpleEnum> getSimpleEnumFieldList();
    int getSimpleEnumFieldCount();
    resources.java.Complex.ComplexMessage.SimpleEnum getSimpleEnumField(int index);
    
    // repeated string repeated_string_field = 5;
    java.util.List<String> getRepeatedStringFieldList();
    int getRepeatedStringFieldCount();
    String getRepeatedStringField(int index);
    
    // repeated bytes repeated_bytes_field = 6;
    java.util.List<com.google.protobuf.ByteString> getRepeatedBytesFieldList();
    int getRepeatedBytesFieldCount();
    com.google.protobuf.ByteString getRepeatedBytesField(int index);
  }
  public static final class ComplexMessage extends
      com.google.protobuf.GeneratedMessageLite
      implements ComplexMessageOrBuilder {
    // Use ComplexMessage.newBuilder() to construct.
    private ComplexMessage(Builder builder) {
      super(builder);
    }
    private ComplexMessage(boolean noInit) {}
    
    private static final ComplexMessage defaultInstance;
    public static ComplexMessage getDefaultInstance() {
      return defaultInstance;
    }
    
    public ComplexMessage getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    public enum SimpleEnum
        implements com.google.protobuf.Internal.EnumLite {
      KEY_NAME(0, 1),
      ;
      
      public static final int KEY_NAME_VALUE = 1;
      
      
      public final int getNumber() { return value; }
      
      public static SimpleEnum valueOf(int value) {
        switch (value) {
          case 1: return KEY_NAME;
          default: return null;
        }
      }
      
      public static com.google.protobuf.Internal.EnumLiteMap<SimpleEnum>
          internalGetValueMap() {
        return internalValueMap;
      }
      private static com.google.protobuf.Internal.EnumLiteMap<SimpleEnum>
          internalValueMap =
            new com.google.protobuf.Internal.EnumLiteMap<SimpleEnum>() {
              public SimpleEnum findValueByNumber(int number) {
                return SimpleEnum.valueOf(number);
              }
            };
      
      private final int value;
      
      private SimpleEnum(int index, int value) {
        this.value = value;
      }
      
      // @@protoc_insertion_point(enum_scope:resources.java.ComplexMessage.SimpleEnum)
    }
    
    public interface NestedOrBuilder
        extends com.google.protobuf.MessageLiteOrBuilder {
      
      // required string nested_field = 1;
      boolean hasNestedField();
      String getNestedField();
      
      // optional .resources.java.ComplexMessage.SimpleEnum nested_enum = 2;
      boolean hasNestedEnum();
      resources.java.Complex.ComplexMessage.SimpleEnum getNestedEnum();
    }
    public static final class Nested extends
        com.google.protobuf.GeneratedMessageLite
        implements NestedOrBuilder {
      // Use Nested.newBuilder() to construct.
      private Nested(Builder builder) {
        super(builder);
      }
      private Nested(boolean noInit) {}
      
      private static final Nested defaultInstance;
      public static Nested getDefaultInstance() {
        return defaultInstance;
      }
      
      public Nested getDefaultInstanceForType() {
        return defaultInstance;
      }
      
      private int bitField0_;
      // required string nested_field = 1;
      public static final int NESTED_FIELD_FIELD_NUMBER = 1;
      private java.lang.Object nestedField_;
      public boolean hasNestedField() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public String getNestedField() {
        java.lang.Object ref = nestedField_;
        if (ref instanceof String) {
          return (String) ref;
        } else {
          com.google.protobuf.ByteString bs = 
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          if (com.google.protobuf.Internal.isValidUtf8(bs)) {
            nestedField_ = s;
          }
          return s;
        }
      }
      private com.google.protobuf.ByteString getNestedFieldBytes() {
        java.lang.Object ref = nestedField_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8((String) ref);
          nestedField_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      
      // optional .resources.java.ComplexMessage.SimpleEnum nested_enum = 2;
      public static final int NESTED_ENUM_FIELD_NUMBER = 2;
      private resources.java.Complex.ComplexMessage.SimpleEnum nestedEnum_;
      public boolean hasNestedEnum() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public resources.java.Complex.ComplexMessage.SimpleEnum getNestedEnum() {
        return nestedEnum_;
      }
      
      private void initFields() {
        nestedField_ = "";
        nestedEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
      }
      private byte memoizedIsInitialized = -1;
      public final boolean isInitialized() {
        byte isInitialized = memoizedIsInitialized;
        if (isInitialized != -1) return isInitialized == 1;
        
        if (!hasNestedField()) {
          memoizedIsInitialized = 0;
          return false;
        }
        memoizedIsInitialized = 1;
        return true;
      }
      
      public void writeTo(com.google.protobuf.CodedOutputStream output)
                          throws java.io.IOException {
        getSerializedSize();
        if (((bitField0_ & 0x00000001) == 0x00000001)) {
          output.writeBytes(1, getNestedFieldBytes());
        }
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          output.writeEnum(2, nestedEnum_.getNumber());
        }
      }
      
      private int memoizedSerializedSize = -1;
      public int getSerializedSize() {
        int size = memoizedSerializedSize;
        if (size != -1) return size;
      
        size = 0;
        if (((bitField0_ & 0x00000001) == 0x00000001)) {
          size += com.google.protobuf.CodedOutputStream
            .computeBytesSize(1, getNestedFieldBytes());
        }
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          size += com.google.protobuf.CodedOutputStream
            .computeEnumSize(2, nestedEnum_.getNumber());
        }
        memoizedSerializedSize = size;
        return size;
      }
      
      private static final long serialVersionUID = 0L;
      @java.lang.Override
      protected java.lang.Object writeReplace()
          throws java.io.ObjectStreamException {
        return super.writeReplace();
      }
      
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(
          com.google.protobuf.ByteString data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data).buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(
          com.google.protobuf.ByteString data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data, extensionRegistry)
                 .buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(byte[] data)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data).buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(
          byte[] data,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws com.google.protobuf.InvalidProtocolBufferException {
        return newBuilder().mergeFrom(data, extensionRegistry)
                 .buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(java.io.InputStream input)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input).buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input, extensionRegistry)
                 .buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested parseDelimitedFrom(java.io.InputStream input)
          throws java.io.IOException {
        Builder builder = newBuilder();
        if (builder.mergeDelimitedFrom(input)) {
          return builder.buildParsed();
        } else {
          return null;
        }
      }
      public static resources.java.Complex.ComplexMessage.Nested parseDelimitedFrom(
          java.io.InputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        Builder builder = newBuilder();
        if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
          return builder.buildParsed();
        } else {
          return null;
        }
      }
      public static resources.java.Complex.ComplexMessage.Nested parseFrom(
          com.google.protobuf.CodedInputStream input)
          throws java.io.IOException {
        return newBuilder().mergeFrom(input).buildParsed();
      }
      public static resources.java.Complex.ComplexMessage.Nested 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(resources.java.Complex.ComplexMessage.Nested prototype) {
        return newBuilder().mergeFrom(prototype);
      }
      public Builder toBuilder() { return newBuilder(this); }
      
      public static final class Builder extends
          com.google.protobuf.GeneratedMessageLite.Builder<
            resources.java.Complex.ComplexMessage.Nested, Builder>
          implements resources.java.Complex.ComplexMessage.NestedOrBuilder {
        // Construct using resources.java.Complex.ComplexMessage.Nested.newBuilder()
        private Builder() {
          maybeForceBuilderInitialization();
        }
        
        private void maybeForceBuilderInitialization() {
        }
        private static Builder create() {
          return new Builder();
        }
        
        public Builder clear() {
          super.clear();
          nestedField_ = "";
          bitField0_ = (bitField0_ & ~0x00000001);
          nestedEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
          bitField0_ = (bitField0_ & ~0x00000002);
          return this;
        }
        
        public Builder clone() {
          return create().mergeFrom(buildPartial());
        }
        
        public resources.java.Complex.ComplexMessage.Nested getDefaultInstanceForType() {
          return resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
        }
        
        public resources.java.Complex.ComplexMessage.Nested build() {
          resources.java.Complex.ComplexMessage.Nested result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(result);
          }
          return result;
        }
        
        private resources.java.Complex.ComplexMessage.Nested buildParsed()
            throws com.google.protobuf.InvalidProtocolBufferException {
          resources.java.Complex.ComplexMessage.Nested result = buildPartial();
          if (!result.isInitialized()) {
            throw newUninitializedMessageException(
              result).asInvalidProtocolBufferException();
          }
          return result;
        }
        
        public resources.java.Complex.ComplexMessage.Nested buildPartial() {
          resources.java.Complex.ComplexMessage.Nested result = new resources.java.Complex.ComplexMessage.Nested(this);
          int from_bitField0_ = bitField0_;
          int to_bitField0_ = 0;
          if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
            to_bitField0_ |= 0x00000001;
          }
          result.nestedField_ = nestedField_;
          if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
            to_bitField0_ |= 0x00000002;
          }
          result.nestedEnum_ = nestedEnum_;
          result.bitField0_ = to_bitField0_;
          return result;
        }
        
        public Builder mergeFrom(resources.java.Complex.ComplexMessage.Nested other) {
          if (other == resources.java.Complex.ComplexMessage.Nested.getDefaultInstance()) return this;
          if (other.hasNestedField()) {
            setNestedField(other.getNestedField());
          }
          if (other.hasNestedEnum()) {
            setNestedEnum(other.getNestedEnum());
          }
          return this;
        }
        
        public final boolean isInitialized() {
          if (!hasNestedField()) {
            
            return false;
          }
          return true;
        }
        
        public Builder mergeFrom(
            com.google.protobuf.CodedInputStream input,
            com.google.protobuf.ExtensionRegistryLite extensionRegistry)
            throws java.io.IOException {
          while (true) {
            int tag = input.readTag();
            switch (tag) {
              case 0:
                
                return this;
              default: {
                if (!parseUnknownField(input, extensionRegistry, tag)) {
                  
                  return this;
                }
                break;
              }
              case 10: {
                bitField0_ |= 0x00000001;
                nestedField_ = input.readBytes();
                break;
              }
              case 16: {
                int rawValue = input.readEnum();
                resources.java.Complex.ComplexMessage.SimpleEnum value = resources.java.Complex.ComplexMessage.SimpleEnum.valueOf(rawValue);
                if (value != null) {
                  bitField0_ |= 0x00000002;
                  nestedEnum_ = value;
                }
                break;
              }
            }
          }
        }
        
        private int bitField0_;
        
        // required string nested_field = 1;
        private java.lang.Object nestedField_ = "";
        public boolean hasNestedField() {
          return ((bitField0_ & 0x00000001) == 0x00000001);
        }
        public String getNestedField() {
          java.lang.Object ref = nestedField_;
          if (!(ref instanceof String)) {
            String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
            nestedField_ = s;
            return s;
          } else {
            return (String) ref;
          }
        }
        public Builder setNestedField(String value) {
          if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
          nestedField_ = value;
          
          return this;
        }
        public Builder clearNestedField() {
          bitField0_ = (bitField0_ & ~0x00000001);
          nestedField_ = getDefaultInstance().getNestedField();
          
          return this;
        }
        void setNestedField(com.google.protobuf.ByteString value) {
          bitField0_ |= 0x00000001;
          nestedField_ = value;
          
        }
        
        // optional .resources.java.ComplexMessage.SimpleEnum nested_enum = 2;
        private resources.java.Complex.ComplexMessage.SimpleEnum nestedEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
        public boolean hasNestedEnum() {
          return ((bitField0_ & 0x00000002) == 0x00000002);
        }
        public resources.java.Complex.ComplexMessage.SimpleEnum getNestedEnum() {
          return nestedEnum_;
        }
        public Builder setNestedEnum(resources.java.Complex.ComplexMessage.SimpleEnum value) {
          if (value == null) {
            throw new NullPointerException();
          }
          bitField0_ |= 0x00000002;
          nestedEnum_ = value;
          
          return this;
        }
        public Builder clearNestedEnum() {
          bitField0_ = (bitField0_ & ~0x00000002);
          nestedEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
          
          return this;
        }
        
        // @@protoc_insertion_point(builder_scope:resources.java.ComplexMessage.Nested)
      }
      
      static {
        defaultInstance = new Nested(true);
        defaultInstance.initFields();
      }
      
      // @@protoc_insertion_point(class_scope:resources.java.ComplexMessage.Nested)
    }
    
    private int bitField0_;
    // required bytes first_field = 1;
    public static final int FIRST_FIELD_FIELD_NUMBER = 1;
    private com.google.protobuf.ByteString firstField_;
    public boolean hasFirstField() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public com.google.protobuf.ByteString getFirstField() {
      return firstField_;
    }
    
    // optional string second_field = 2 [default = "defaultValueForSecondField"];
    public static final int SECOND_FIELD_FIELD_NUMBER = 2;
    private java.lang.Object secondField_;
    public boolean hasSecondField() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public String getSecondField() {
      java.lang.Object ref = secondField_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        if (com.google.protobuf.Internal.isValidUtf8(bs)) {
          secondField_ = s;
        }
        return s;
      }
    }
    private com.google.protobuf.ByteString getSecondFieldBytes() {
      java.lang.Object ref = secondField_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8((String) ref);
        secondField_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    
    // optional .resources.java.ComplexMessage.Nested nested_outer_field = 3;
    public static final int NESTED_OUTER_FIELD_FIELD_NUMBER = 3;
    private resources.java.Complex.ComplexMessage.Nested nestedOuterField_;
    public boolean hasNestedOuterField() {
      return ((bitField0_ & 0x00000004) == 0x00000004);
    }
    public resources.java.Complex.ComplexMessage.Nested getNestedOuterField() {
      return nestedOuterField_;
    }
    
    // repeated .resources.java.ComplexMessage.SimpleEnum simple_enum_field = 4;
    public static final int SIMPLE_ENUM_FIELD_FIELD_NUMBER = 4;
    private java.util.List<resources.java.Complex.ComplexMessage.SimpleEnum> simpleEnumField_;
    public java.util.List<resources.java.Complex.ComplexMessage.SimpleEnum> getSimpleEnumFieldList() {
      return simpleEnumField_;
    }
    public int getSimpleEnumFieldCount() {
      return simpleEnumField_.size();
    }
    public resources.java.Complex.ComplexMessage.SimpleEnum getSimpleEnumField(int index) {
      return simpleEnumField_.get(index);
    }
    
    // repeated string repeated_string_field = 5;
    public static final int REPEATED_STRING_FIELD_FIELD_NUMBER = 5;
    private com.google.protobuf.LazyStringList repeatedStringField_;
    public java.util.List<String>
        getRepeatedStringFieldList() {
      return repeatedStringField_;
    }
    public int getRepeatedStringFieldCount() {
      return repeatedStringField_.size();
    }
    public String getRepeatedStringField(int index) {
      return repeatedStringField_.get(index);
    }
    
    // repeated bytes repeated_bytes_field = 6;
    public static final int REPEATED_BYTES_FIELD_FIELD_NUMBER = 6;
    private java.util.List<com.google.protobuf.ByteString> repeatedBytesField_;
    public java.util.List<com.google.protobuf.ByteString>
        getRepeatedBytesFieldList() {
      return repeatedBytesField_;
    }
    public int getRepeatedBytesFieldCount() {
      return repeatedBytesField_.size();
    }
    public com.google.protobuf.ByteString getRepeatedBytesField(int index) {
      return repeatedBytesField_.get(index);
    }
    
    private void initFields() {
      firstField_ = com.google.protobuf.ByteString.EMPTY;
      secondField_ = "defaultValueForSecondField";
      nestedOuterField_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
      simpleEnumField_ = java.util.Collections.emptyList();
      repeatedStringField_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      repeatedBytesField_ = java.util.Collections.emptyList();;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasFirstField()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (hasNestedOuterField()) {
        if (!getNestedOuterField().isInitialized()) {
          memoizedIsInitialized = 0;
          return false;
        }
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeBytes(1, firstField_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeBytes(2, getSecondFieldBytes());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        output.writeMessage(3, nestedOuterField_);
      }
      for (int i = 0; i < simpleEnumField_.size(); i++) {
        output.writeEnum(4, simpleEnumField_.get(i).getNumber());
      }
      for (int i = 0; i < repeatedStringField_.size(); i++) {
        output.writeBytes(5, repeatedStringField_.getByteString(i));
      }
      for (int i = 0; i < repeatedBytesField_.size(); i++) {
        output.writeBytes(6, repeatedBytesField_.get(i));
      }
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(1, firstField_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeBytesSize(2, getSecondFieldBytes());
      }
      if (((bitField0_ & 0x00000004) == 0x00000004)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(3, nestedOuterField_);
      }
      {
        int dataSize = 0;
        for (int i = 0; i < simpleEnumField_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeEnumSizeNoTag(simpleEnumField_.get(i).getNumber());
        }
        size += dataSize;
        size += 1 * simpleEnumField_.size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < repeatedStringField_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(repeatedStringField_.getByteString(i));
        }
        size += dataSize;
        size += 1 * getRepeatedStringFieldList().size();
      }
      {
        int dataSize = 0;
        for (int i = 0; i < repeatedBytesField_.size(); i++) {
          dataSize += com.google.protobuf.CodedOutputStream
            .computeBytesSizeNoTag(repeatedBytesField_.get(i));
        }
        size += dataSize;
        size += 1 * getRepeatedBytesFieldList().size();
      }
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static resources.java.Complex.ComplexMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static resources.java.Complex.ComplexMessage parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static resources.java.Complex.ComplexMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static resources.java.Complex.ComplexMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static resources.java.Complex.ComplexMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static resources.java.Complex.ComplexMessage parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static resources.java.Complex.ComplexMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static resources.java.Complex.ComplexMessage parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static resources.java.Complex.ComplexMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static resources.java.Complex.ComplexMessage 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(resources.java.Complex.ComplexMessage prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          resources.java.Complex.ComplexMessage, Builder>
        implements resources.java.Complex.ComplexMessageOrBuilder {
      // Construct using resources.java.Complex.ComplexMessage.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private void maybeForceBuilderInitialization() {
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        firstField_ = com.google.protobuf.ByteString.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000001);
        secondField_ = "defaultValueForSecondField";
        bitField0_ = (bitField0_ & ~0x00000002);
        nestedOuterField_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
        bitField0_ = (bitField0_ & ~0x00000004);
        simpleEnumField_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        repeatedStringField_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        repeatedBytesField_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00000020);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public resources.java.Complex.ComplexMessage getDefaultInstanceForType() {
        return resources.java.Complex.ComplexMessage.getDefaultInstance();
      }
      
      public resources.java.Complex.ComplexMessage build() {
        resources.java.Complex.ComplexMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private resources.java.Complex.ComplexMessage buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        resources.java.Complex.ComplexMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public resources.java.Complex.ComplexMessage buildPartial() {
        resources.java.Complex.ComplexMessage result = new resources.java.Complex.ComplexMessage(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.firstField_ = firstField_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.secondField_ = secondField_;
        if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
          to_bitField0_ |= 0x00000004;
        }
        result.nestedOuterField_ = nestedOuterField_;
        if (((bitField0_ & 0x00000008) == 0x00000008)) {
          simpleEnumField_ = java.util.Collections.unmodifiableList(simpleEnumField_);
          bitField0_ = (bitField0_ & ~0x00000008);
        }
        result.simpleEnumField_ = simpleEnumField_;
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          repeatedStringField_ = new com.google.protobuf.UnmodifiableLazyStringList(
              repeatedStringField_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.repeatedStringField_ = repeatedStringField_;
        if (((bitField0_ & 0x00000020) == 0x00000020)) {
          repeatedBytesField_ = java.util.Collections.unmodifiableList(repeatedBytesField_);
          bitField0_ = (bitField0_ & ~0x00000020);
        }
        result.repeatedBytesField_ = repeatedBytesField_;
        result.bitField0_ = to_bitField0_;
        return result;
      }
      
      public Builder mergeFrom(resources.java.Complex.ComplexMessage other) {
        if (other == resources.java.Complex.ComplexMessage.getDefaultInstance()) return this;
        if (other.hasFirstField()) {
          setFirstField(other.getFirstField());
        }
        if (other.hasSecondField()) {
          setSecondField(other.getSecondField());
        }
        if (other.hasNestedOuterField()) {
          mergeNestedOuterField(other.getNestedOuterField());
        }
        if (!other.simpleEnumField_.isEmpty()) {
          if (simpleEnumField_.isEmpty()) {
            simpleEnumField_ = other.simpleEnumField_;
            bitField0_ = (bitField0_ & ~0x00000008);
          } else {
            ensureSimpleEnumFieldIsMutable();
            simpleEnumField_.addAll(other.simpleEnumField_);
          }
          
        }
        if (!other.repeatedStringField_.isEmpty()) {
          if (repeatedStringField_.isEmpty()) {
            repeatedStringField_ = other.repeatedStringField_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureRepeatedStringFieldIsMutable();
            repeatedStringField_.addAll(other.repeatedStringField_);
          }
          
        }
        if (!other.repeatedBytesField_.isEmpty()) {
          if (repeatedBytesField_.isEmpty()) {
            repeatedBytesField_ = other.repeatedBytesField_;
            bitField0_ = (bitField0_ & ~0x00000020);
          } else {
            ensureRepeatedBytesFieldIsMutable();
            repeatedBytesField_.addAll(other.repeatedBytesField_);
          }
          
        }
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasFirstField()) {
          
          return false;
        }
        if (hasNestedOuterField()) {
          if (!getNestedOuterField().isInitialized()) {
            
            return false;
          }
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              
              return this;
            default: {
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                
                return this;
              }
              break;
            }
            case 10: {
              bitField0_ |= 0x00000001;
              firstField_ = input.readBytes();
              break;
            }
            case 18: {
              bitField0_ |= 0x00000002;
              secondField_ = input.readBytes();
              break;
            }
            case 26: {
              resources.java.Complex.ComplexMessage.Nested.Builder subBuilder = resources.java.Complex.ComplexMessage.Nested.newBuilder();
              if (hasNestedOuterField()) {
                subBuilder.mergeFrom(getNestedOuterField());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setNestedOuterField(subBuilder.buildPartial());
              break;
            }
            case 32: {
              int rawValue = input.readEnum();
              resources.java.Complex.ComplexMessage.SimpleEnum value = resources.java.Complex.ComplexMessage.SimpleEnum.valueOf(rawValue);
              if (value != null) {
                addSimpleEnumField(value);
              }
              break;
            }
            case 34: {
              int length = input.readRawVarint32();
              int oldLimit = input.pushLimit(length);
              while(input.getBytesUntilLimit() > 0) {
                int rawValue = input.readEnum();
                resources.java.Complex.ComplexMessage.SimpleEnum value = resources.java.Complex.ComplexMessage.SimpleEnum.valueOf(rawValue);
                if (value != null) {
                  addSimpleEnumField(value);
                }
              }
              input.popLimit(oldLimit);
              break;
            }
            case 42: {
              ensureRepeatedStringFieldIsMutable();
              repeatedStringField_.add(input.readBytes());
              break;
            }
            case 50: {
              ensureRepeatedBytesFieldIsMutable();
              repeatedBytesField_.add(input.readBytes());
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required bytes first_field = 1;
      private com.google.protobuf.ByteString firstField_ = com.google.protobuf.ByteString.EMPTY;
      public boolean hasFirstField() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public com.google.protobuf.ByteString getFirstField() {
        return firstField_;
      }
      public Builder setFirstField(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
        firstField_ = value;
        
        return this;
      }
      public Builder clearFirstField() {
        bitField0_ = (bitField0_ & ~0x00000001);
        firstField_ = getDefaultInstance().getFirstField();
        
        return this;
      }
      
      // optional string second_field = 2 [default = "defaultValueForSecondField"];
      private java.lang.Object secondField_ = "defaultValueForSecondField";
      public boolean hasSecondField() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public String getSecondField() {
        java.lang.Object ref = secondField_;
        if (!(ref instanceof String)) {
          String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
          secondField_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      public Builder setSecondField(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000002;
        secondField_ = value;
        
        return this;
      }
      public Builder clearSecondField() {
        bitField0_ = (bitField0_ & ~0x00000002);
        secondField_ = getDefaultInstance().getSecondField();
        
        return this;
      }
      void setSecondField(com.google.protobuf.ByteString value) {
        bitField0_ |= 0x00000002;
        secondField_ = value;
        
      }
      
      // optional .resources.java.ComplexMessage.Nested nested_outer_field = 3;
      private resources.java.Complex.ComplexMessage.Nested nestedOuterField_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
      public boolean hasNestedOuterField() {
        return ((bitField0_ & 0x00000004) == 0x00000004);
      }
      public resources.java.Complex.ComplexMessage.Nested getNestedOuterField() {
        return nestedOuterField_;
      }
      public Builder setNestedOuterField(resources.java.Complex.ComplexMessage.Nested value) {
        if (value == null) {
          throw new NullPointerException();
        }
        nestedOuterField_ = value;
        
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder setNestedOuterField(
          resources.java.Complex.ComplexMessage.Nested.Builder builderForValue) {
        nestedOuterField_ = builderForValue.build();
        
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder mergeNestedOuterField(resources.java.Complex.ComplexMessage.Nested value) {
        if (((bitField0_ & 0x00000004) == 0x00000004) &&
            nestedOuterField_ != resources.java.Complex.ComplexMessage.Nested.getDefaultInstance()) {
          nestedOuterField_ =
            resources.java.Complex.ComplexMessage.Nested.newBuilder(nestedOuterField_).mergeFrom(value).buildPartial();
        } else {
          nestedOuterField_ = value;
        }
        
        bitField0_ |= 0x00000004;
        return this;
      }
      public Builder clearNestedOuterField() {
        nestedOuterField_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
        
        bitField0_ = (bitField0_ & ~0x00000004);
        return this;
      }
      
      // repeated .resources.java.ComplexMessage.SimpleEnum simple_enum_field = 4;
      private java.util.List<resources.java.Complex.ComplexMessage.SimpleEnum> simpleEnumField_ =
        java.util.Collections.emptyList();
      private void ensureSimpleEnumFieldIsMutable() {
        if (!((bitField0_ & 0x00000008) == 0x00000008)) {
          simpleEnumField_ = new java.util.ArrayList<resources.java.Complex.ComplexMessage.SimpleEnum>(simpleEnumField_);
          bitField0_ |= 0x00000008;
        }
      }
      public java.util.List<resources.java.Complex.ComplexMessage.SimpleEnum> getSimpleEnumFieldList() {
        return java.util.Collections.unmodifiableList(simpleEnumField_);
      }
      public int getSimpleEnumFieldCount() {
        return simpleEnumField_.size();
      }
      public resources.java.Complex.ComplexMessage.SimpleEnum getSimpleEnumField(int index) {
        return simpleEnumField_.get(index);
      }
      public Builder setSimpleEnumField(
          int index, resources.java.Complex.ComplexMessage.SimpleEnum value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSimpleEnumFieldIsMutable();
        simpleEnumField_.set(index, value);
        
        return this;
      }
      public Builder addSimpleEnumField(resources.java.Complex.ComplexMessage.SimpleEnum value) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureSimpleEnumFieldIsMutable();
        simpleEnumField_.add(value);
        
        return this;
      }
      public Builder addAllSimpleEnumField(
          java.lang.Iterable<? extends resources.java.Complex.ComplexMessage.SimpleEnum> values) {
        ensureSimpleEnumFieldIsMutable();
        super.addAll(values, simpleEnumField_);
        
        return this;
      }
      public Builder clearSimpleEnumField() {
        simpleEnumField_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000008);
        
        return this;
      }
      
      // repeated string repeated_string_field = 5;
      private com.google.protobuf.LazyStringList repeatedStringField_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      private void ensureRepeatedStringFieldIsMutable() {
        if (!((bitField0_ & 0x00000010) == 0x00000010)) {
          repeatedStringField_ = new com.google.protobuf.LazyStringArrayList(repeatedStringField_);
          bitField0_ |= 0x00000010;
         }
      }
      public java.util.List<String>
          getRepeatedStringFieldList() {
        return java.util.Collections.unmodifiableList(repeatedStringField_);
      }
      public int getRepeatedStringFieldCount() {
        return repeatedStringField_.size();
      }
      public String getRepeatedStringField(int index) {
        return repeatedStringField_.get(index);
      }
      public Builder setRepeatedStringField(
          int index, String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureRepeatedStringFieldIsMutable();
        repeatedStringField_.set(index, value);
        
        return this;
      }
      public Builder addRepeatedStringField(String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureRepeatedStringFieldIsMutable();
        repeatedStringField_.add(value);
        
        return this;
      }
      public Builder addAllRepeatedStringField(
          java.lang.Iterable<String> values) {
        ensureRepeatedStringFieldIsMutable();
        super.addAll(values, repeatedStringField_);
        
        return this;
      }
      public Builder clearRepeatedStringField() {
        repeatedStringField_ = com.google.protobuf.LazyStringArrayList.EMPTY;
        bitField0_ = (bitField0_ & ~0x00000010);
        
        return this;
      }
      void addRepeatedStringField(com.google.protobuf.ByteString value) {
        ensureRepeatedStringFieldIsMutable();
        repeatedStringField_.add(value);
        
      }
      
      // repeated bytes repeated_bytes_field = 6;
      private java.util.List<com.google.protobuf.ByteString> repeatedBytesField_ = java.util.Collections.emptyList();;
      private void ensureRepeatedBytesFieldIsMutable() {
        if (!((bitField0_ & 0x00000020) == 0x00000020)) {
          repeatedBytesField_ = new java.util.ArrayList<com.google.protobuf.ByteString>(repeatedBytesField_);
          bitField0_ |= 0x00000020;
         }
      }
      public java.util.List<com.google.protobuf.ByteString>
          getRepeatedBytesFieldList() {
        return java.util.Collections.unmodifiableList(repeatedBytesField_);
      }
      public int getRepeatedBytesFieldCount() {
        return repeatedBytesField_.size();
      }
      public com.google.protobuf.ByteString getRepeatedBytesField(int index) {
        return repeatedBytesField_.get(index);
      }
      public Builder setRepeatedBytesField(
          int index, com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureRepeatedBytesFieldIsMutable();
        repeatedBytesField_.set(index, value);
        
        return this;
      }
      public Builder addRepeatedBytesField(com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  ensureRepeatedBytesFieldIsMutable();
        repeatedBytesField_.add(value);
        
        return this;
      }
      public Builder addAllRepeatedBytesField(
          java.lang.Iterable<? extends com.google.protobuf.ByteString> values) {
        ensureRepeatedBytesFieldIsMutable();
        super.addAll(values, repeatedBytesField_);
        
        return this;
      }
      public Builder clearRepeatedBytesField() {
        repeatedBytesField_ = java.util.Collections.emptyList();;
        bitField0_ = (bitField0_ & ~0x00000020);
        
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:resources.java.ComplexMessage)
    }
    
    static {
      defaultInstance = new ComplexMessage(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:resources.java.ComplexMessage)
  }
  
  public interface AnotherMessageOrBuilder
      extends com.google.protobuf.MessageLiteOrBuilder {
    
    // required .resources.java.ComplexMessage.Nested field_nested = 1;
    boolean hasFieldNested();
    resources.java.Complex.ComplexMessage.Nested getFieldNested();
    
    // required .resources.java.ComplexMessage.SimpleEnum field_enum = 2;
    boolean hasFieldEnum();
    resources.java.Complex.ComplexMessage.SimpleEnum getFieldEnum();
  }
  public static final class AnotherMessage extends
      com.google.protobuf.GeneratedMessageLite
      implements AnotherMessageOrBuilder {
    // Use AnotherMessage.newBuilder() to construct.
    private AnotherMessage(Builder builder) {
      super(builder);
    }
    private AnotherMessage(boolean noInit) {}
    
    private static final AnotherMessage defaultInstance;
    public static AnotherMessage getDefaultInstance() {
      return defaultInstance;
    }
    
    public AnotherMessage getDefaultInstanceForType() {
      return defaultInstance;
    }
    
    private int bitField0_;
    // required .resources.java.ComplexMessage.Nested field_nested = 1;
    public static final int FIELD_NESTED_FIELD_NUMBER = 1;
    private resources.java.Complex.ComplexMessage.Nested fieldNested_;
    public boolean hasFieldNested() {
      return ((bitField0_ & 0x00000001) == 0x00000001);
    }
    public resources.java.Complex.ComplexMessage.Nested getFieldNested() {
      return fieldNested_;
    }
    
    // required .resources.java.ComplexMessage.SimpleEnum field_enum = 2;
    public static final int FIELD_ENUM_FIELD_NUMBER = 2;
    private resources.java.Complex.ComplexMessage.SimpleEnum fieldEnum_;
    public boolean hasFieldEnum() {
      return ((bitField0_ & 0x00000002) == 0x00000002);
    }
    public resources.java.Complex.ComplexMessage.SimpleEnum getFieldEnum() {
      return fieldEnum_;
    }
    
    private void initFields() {
      fieldNested_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
      fieldEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
    }
    private byte memoizedIsInitialized = -1;
    public final boolean isInitialized() {
      byte isInitialized = memoizedIsInitialized;
      if (isInitialized != -1) return isInitialized == 1;
      
      if (!hasFieldNested()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!hasFieldEnum()) {
        memoizedIsInitialized = 0;
        return false;
      }
      if (!getFieldNested().isInitialized()) {
        memoizedIsInitialized = 0;
        return false;
      }
      memoizedIsInitialized = 1;
      return true;
    }
    
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      getSerializedSize();
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        output.writeMessage(1, fieldNested_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        output.writeEnum(2, fieldEnum_.getNumber());
      }
    }
    
    private int memoizedSerializedSize = -1;
    public int getSerializedSize() {
      int size = memoizedSerializedSize;
      if (size != -1) return size;
    
      size = 0;
      if (((bitField0_ & 0x00000001) == 0x00000001)) {
        size += com.google.protobuf.CodedOutputStream
          .computeMessageSize(1, fieldNested_);
      }
      if (((bitField0_ & 0x00000002) == 0x00000002)) {
        size += com.google.protobuf.CodedOutputStream
          .computeEnumSize(2, fieldEnum_.getNumber());
      }
      memoizedSerializedSize = size;
      return size;
    }
    
    private static final long serialVersionUID = 0L;
    @java.lang.Override
    protected java.lang.Object writeReplace()
        throws java.io.ObjectStreamException {
      return super.writeReplace();
    }
    
    public static resources.java.Complex.AnotherMessage parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static resources.java.Complex.AnotherMessage parseFrom(
        com.google.protobuf.ByteString data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static resources.java.Complex.AnotherMessage parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data).buildParsed();
    }
    public static resources.java.Complex.AnotherMessage parseFrom(
        byte[] data,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return newBuilder().mergeFrom(data, extensionRegistry)
               .buildParsed();
    }
    public static resources.java.Complex.AnotherMessage parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static resources.java.Complex.AnotherMessage parseFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input, extensionRegistry)
               .buildParsed();
    }
    public static resources.java.Complex.AnotherMessage parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static resources.java.Complex.AnotherMessage parseDelimitedFrom(
        java.io.InputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      Builder builder = newBuilder();
      if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
        return builder.buildParsed();
      } else {
        return null;
      }
    }
    public static resources.java.Complex.AnotherMessage parseFrom(
        com.google.protobuf.CodedInputStream input)
        throws java.io.IOException {
      return newBuilder().mergeFrom(input).buildParsed();
    }
    public static resources.java.Complex.AnotherMessage 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(resources.java.Complex.AnotherMessage prototype) {
      return newBuilder().mergeFrom(prototype);
    }
    public Builder toBuilder() { return newBuilder(this); }
    
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageLite.Builder<
          resources.java.Complex.AnotherMessage, Builder>
        implements resources.java.Complex.AnotherMessageOrBuilder {
      // Construct using resources.java.Complex.AnotherMessage.newBuilder()
      private Builder() {
        maybeForceBuilderInitialization();
      }
      
      private void maybeForceBuilderInitialization() {
      }
      private static Builder create() {
        return new Builder();
      }
      
      public Builder clear() {
        super.clear();
        fieldNested_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
        bitField0_ = (bitField0_ & ~0x00000001);
        fieldEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
        bitField0_ = (bitField0_ & ~0x00000002);
        return this;
      }
      
      public Builder clone() {
        return create().mergeFrom(buildPartial());
      }
      
      public resources.java.Complex.AnotherMessage getDefaultInstanceForType() {
        return resources.java.Complex.AnotherMessage.getDefaultInstance();
      }
      
      public resources.java.Complex.AnotherMessage build() {
        resources.java.Complex.AnotherMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }
      
      private resources.java.Complex.AnotherMessage buildParsed()
          throws com.google.protobuf.InvalidProtocolBufferException {
        resources.java.Complex.AnotherMessage result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(
            result).asInvalidProtocolBufferException();
        }
        return result;
      }
      
      public resources.java.Complex.AnotherMessage buildPartial() {
        resources.java.Complex.AnotherMessage result = new resources.java.Complex.AnotherMessage(this);
        int from_bitField0_ = bitField0_;
        int to_bitField0_ = 0;
        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
          to_bitField0_ |= 0x00000001;
        }
        result.fieldNested_ = fieldNested_;
        if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
          to_bitField0_ |= 0x00000002;
        }
        result.fieldEnum_ = fieldEnum_;
        result.bitField0_ = to_bitField0_;
        return result;
      }
      
      public Builder mergeFrom(resources.java.Complex.AnotherMessage other) {
        if (other == resources.java.Complex.AnotherMessage.getDefaultInstance()) return this;
        if (other.hasFieldNested()) {
          mergeFieldNested(other.getFieldNested());
        }
        if (other.hasFieldEnum()) {
          setFieldEnum(other.getFieldEnum());
        }
        return this;
      }
      
      public final boolean isInitialized() {
        if (!hasFieldNested()) {
          
          return false;
        }
        if (!hasFieldEnum()) {
          
          return false;
        }
        if (!getFieldNested().isInitialized()) {
          
          return false;
        }
        return true;
      }
      
      public Builder mergeFrom(
          com.google.protobuf.CodedInputStream input,
          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
          throws java.io.IOException {
        while (true) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              
              return this;
            default: {
              if (!parseUnknownField(input, extensionRegistry, tag)) {
                
                return this;
              }
              break;
            }
            case 10: {
              resources.java.Complex.ComplexMessage.Nested.Builder subBuilder = resources.java.Complex.ComplexMessage.Nested.newBuilder();
              if (hasFieldNested()) {
                subBuilder.mergeFrom(getFieldNested());
              }
              input.readMessage(subBuilder, extensionRegistry);
              setFieldNested(subBuilder.buildPartial());
              break;
            }
            case 16: {
              int rawValue = input.readEnum();
              resources.java.Complex.ComplexMessage.SimpleEnum value = resources.java.Complex.ComplexMessage.SimpleEnum.valueOf(rawValue);
              if (value != null) {
                bitField0_ |= 0x00000002;
                fieldEnum_ = value;
              }
              break;
            }
          }
        }
      }
      
      private int bitField0_;
      
      // required .resources.java.ComplexMessage.Nested field_nested = 1;
      private resources.java.Complex.ComplexMessage.Nested fieldNested_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
      public boolean hasFieldNested() {
        return ((bitField0_ & 0x00000001) == 0x00000001);
      }
      public resources.java.Complex.ComplexMessage.Nested getFieldNested() {
        return fieldNested_;
      }
      public Builder setFieldNested(resources.java.Complex.ComplexMessage.Nested value) {
        if (value == null) {
          throw new NullPointerException();
        }
        fieldNested_ = value;
        
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder setFieldNested(
          resources.java.Complex.ComplexMessage.Nested.Builder builderForValue) {
        fieldNested_ = builderForValue.build();
        
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder mergeFieldNested(resources.java.Complex.ComplexMessage.Nested value) {
        if (((bitField0_ & 0x00000001) == 0x00000001) &&
            fieldNested_ != resources.java.Complex.ComplexMessage.Nested.getDefaultInstance()) {
          fieldNested_ =
            resources.java.Complex.ComplexMessage.Nested.newBuilder(fieldNested_).mergeFrom(value).buildPartial();
        } else {
          fieldNested_ = value;
        }
        
        bitField0_ |= 0x00000001;
        return this;
      }
      public Builder clearFieldNested() {
        fieldNested_ = resources.java.Complex.ComplexMessage.Nested.getDefaultInstance();
        
        bitField0_ = (bitField0_ & ~0x00000001);
        return this;
      }
      
      // required .resources.java.ComplexMessage.SimpleEnum field_enum = 2;
      private resources.java.Complex.ComplexMessage.SimpleEnum fieldEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
      public boolean hasFieldEnum() {
        return ((bitField0_ & 0x00000002) == 0x00000002);
      }
      public resources.java.Complex.ComplexMessage.SimpleEnum getFieldEnum() {
        return fieldEnum_;
      }
      public Builder setFieldEnum(resources.java.Complex.ComplexMessage.SimpleEnum value) {
        if (value == null) {
          throw new NullPointerException();
        }
        bitField0_ |= 0x00000002;
        fieldEnum_ = value;
        
        return this;
      }
      public Builder clearFieldEnum() {
        bitField0_ = (bitField0_ & ~0x00000002);
        fieldEnum_ = resources.java.Complex.ComplexMessage.SimpleEnum.KEY_NAME;
        
        return this;
      }
      
      // @@protoc_insertion_point(builder_scope:resources.java.AnotherMessage)
    }
    
    static {
      defaultInstance = new AnotherMessage(true);
      defaultInstance.initFields();
    }
    
    // @@protoc_insertion_point(class_scope:resources.java.AnotherMessage)
  }
  
  
  static {
  }
  
  // @@protoc_insertion_point(outer_class_scope)
}
