View Javadoc

    1   /*
    2    *  Licensed to the Apache Software Foundation (ASF) under one
    3    *  or more contributor license agreements.  See the NOTICE file
    4    *  distributed with this work for additional information
    5    *  regarding copyright ownership.  The ASF licenses this file
    6    *  to you under the Apache License, Version 2.0 (the
    7    *  "License"); you may not use this file except in compliance
    8    *  with the License.  You may obtain a copy of the License at
    9    *
    10   *    http://www.apache.org/licenses/LICENSE-2.0
    11   *
    12   *  Unless required by applicable law or agreed to in writing,
    13   *  software distributed under the License is distributed on an
    14   *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    15   *  KIND, either express or implied.  See the License for the
    16   *  specific language governing permissions and limitations
    17   *  under the License.
    18   *
    19   */
    20
    21  // Generated by the protocol buffer compiler.  DO NOT EDIT!
    22  // source: src/test/protobuf/addressbook.proto
    23
    24  package org.apache.mina.generated.protoc;
    25
    26  public final class AddressBookProtos {
    27      private AddressBookProtos() {
    28      }
    29
    30      public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
    31      }
    32
    33      public interface PersonOrBuilder extends com.google.protobuf.MessageOrBuilder {
    34
    35          // required string name = 1;
    36          /**
    37           * <code>required string name = 1;</code>
    38           */
    39          boolean hasName();
    40
    41          /**
    42           * <code>required string name = 1;</code>
    43           */
    44          java.lang.String getName();
    45
    46          /**
    47           * <code>required string name = 1;</code>
    48           */
    49          com.google.protobuf.ByteString getNameBytes();
    50
    51          // required int32 id = 2;
    52          /**
    53           * <code>required int32 id = 2;</code>
    54           *
    55           * <pre>
    56           * Unique ID number for this person.
    57           * </pre>
    58           */
    59          boolean hasId();
    60
    61          /**
    62           * <code>required int32 id = 2;</code>
    63           *
    64           * <pre>
    65           * Unique ID number for this person.
    66           * </pre>
    67           */
    68          int getId();
    69
    70          // optional string email = 3;
    71          /**
    72           * <code>optional string email = 3;</code>
    73           */
    74          boolean hasEmail();
    75
    76          /**
    77           * <code>optional string email = 3;</code>
    78           */
    79          java.lang.String getEmail();
    80
    81          /**
    82           * <code>optional string email = 3;</code>
    83           */
    84          com.google.protobuf.ByteString getEmailBytes();
    85
    86          // repeated .tutorial.Person.PhoneNumber phone = 4;
    87          /**
    88           * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    89           */
    90          java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> getPhoneList();
    91
    92          /**
    93           * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    94           */
    95          org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber getPhone(int index);
    96
    97          /**
    98           * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    99           */
    100         int getPhoneCount();
    101
    102         /**
    103          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    104          */
    105         java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder> getPhoneOrBuilderList();
    106
    107         /**
    108          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    109          */
    110         org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder getPhoneOrBuilder(int index);
    111     }
    112
    113     /**
    114      * Protobuf type {@code tutorial.Person}
    115      */
    116     public static final class Person extends com.google.protobuf.GeneratedMessage implements PersonOrBuilder {
    117         // Use Person.newBuilder() to construct.
    118         private Person(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    119             super(builder);
    120             this.unknownFields = builder.getUnknownFields();
    121         }
    122
    123         private Person(boolean noInit) {
    124             this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    125         }
    126
    127         private static final Person defaultInstance;
    128
    129         public static Person getDefaultInstance() {
    130             return defaultInstance;
    131         }
    132
    133         public Person getDefaultInstanceForType() {
    134             return defaultInstance;
    135         }
    136
    137         private final com.google.protobuf.UnknownFieldSet unknownFields;
    138
    139         @java.lang.Override
    140         public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    141             return this.unknownFields;
    142         }
    143
    144         private Person(com.google.protobuf.CodedInputStream input,
    145                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    146                 throws com.google.protobuf.InvalidProtocolBufferException {
    147             initFields();
    148             int mutable_bitField0_ = 0;
    149             com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet
    150                     .newBuilder();
    151             try {
    152                 boolean done = false;
    153                 while (!done) {
    154                     int tag = input.readTag();
    155                     switch (tag) {
    156                     case 0:
    157                         done = true;
    158                         break;
    159                     default: {
    160                         if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
    161                             done = true;
    162                         }
    163                         break;
    164                     }
    165                     case 10: {
    166                         bitField0_ |= 0x00000001;
    167                         name_ = input.readBytes();
    168                         break;
    169                     }
    170                     case 16: {
    171                         bitField0_ |= 0x00000002;
    172                         id_ = input.readInt32();
    173                         break;
    174                     }
    175                     case 26: {
    176                         bitField0_ |= 0x00000004;
    177                         email_ = input.readBytes();
    178                         break;
    179                     }
    180                     case 34: {
    181                         if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
    182                             phone_ = new java.util.ArrayList<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber>();
    183                             mutable_bitField0_ |= 0x00000008;
    184                         }
    185                         phone_.add(input.readMessage(
    186                                 org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.PARSER,
    187                                 extensionRegistry));
    188                         break;
    189                     }
    190                     }
    191                 }
    192             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    193                 throw e.setUnfinishedMessage(this);
    194             } catch (java.io.IOException e) {
    195                 throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this);
    196             } finally {
    197                 if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
    198                     phone_ = java.util.Collections.unmodifiableList(phone_);
    199                 }
    200                 this.unknownFields = unknownFields.build();
    201                 makeExtensionsImmutable();
    202             }
    203         }
    204
    205         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    206             return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_descriptor;
    207         }
    208
    209         protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
    210             return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_fieldAccessorTable
    211                     .ensureFieldAccessorsInitialized(org.apache.mina.generated.protoc.AddressBookProtos.Person.class,
    212                             org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder.class);
    213         }
    214
    215         public static com.google.protobuf.Parser<Person> PARSER = new com.google.protobuf.AbstractParser<Person>() {
    216             public Person parsePartialFrom(com.google.protobuf.CodedInputStream input,
    217                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    218                     throws com.google.protobuf.InvalidProtocolBufferException {
    219                 return new Person(input, extensionRegistry);
    220             }
    221         };
    222
    223         @java.lang.Override
    224         public com.google.protobuf.Parser<Person> getParserForType() {
    225             return PARSER;
    226         }
    227
    228         /**
    229          * Protobuf enum {@code tutorial.Person.PhoneType}
    230          */
    231         public enum PhoneType implements com.google.protobuf.ProtocolMessageEnum {
    232             /**
    233              * <code>MOBILE = 0;</code>
    234              */
    235             MOBILE(0, 0),
    236             /**
    237              * <code>HOME = 1;</code>
    238              */
    239             HOME(1, 1),
    240             /**
    241              * <code>WORK = 2;</code>
    242              */
    243             WORK(2, 2), ;
    244
    245             /**
    246              * <code>MOBILE = 0;</code>
    247              */
    248             public static final int MOBILE_VALUE = 0;
    249
    250             /**
    251              * <code>HOME = 1;</code>
    252              */
    253             public static final int HOME_VALUE = 1;
    254
    255             /**
    256              * <code>WORK = 2;</code>
    257              */
    258             public static final int WORK_VALUE = 2;
    259
    260             public final int getNumber() {
    261                 return value;
    262             }
    263
    264             public static PhoneType valueOf(int value) {
    265                 switch (value) {
    266                 case 0:
    267                     return MOBILE;
    268                 case 1:
    269                     return HOME;
    270                 case 2:
    271                     return WORK;
    272                 default:
    273                     return null;
    274                 }
    275             }
    276
    277             public static com.google.protobuf.Internal.EnumLiteMap<PhoneType> internalGetValueMap() {
    278                 return internalValueMap;
    279             }
    280
    281             private static com.google.protobuf.Internal.EnumLiteMap<PhoneType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<PhoneType>() {
    282                 public PhoneType findValueByNumber(int number) {
    283                     return PhoneType.valueOf(number);
    284                 }
    285             };
    286
    287             public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
    288                 return getDescriptor().getValues().get(index);
    289             }
    290
    291             public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
    292                 return getDescriptor();
    293             }
    294
    295             public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
    296                 return org.apache.mina.generated.protoc.AddressBookProtos.Person.getDescriptor().getEnumTypes().get(0);
    297             }
    298
    299             private static final PhoneType[] VALUES = values();
    300
    301             public static PhoneType valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
    302                 if (desc.getType() != getDescriptor()) {
    303                     throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
    304                 }
    305                 return VALUES[desc.getIndex()];
    306             }
    307
    308             private final int index;
    309
    310             private final int value;
    311
    312             private PhoneType(int index, int value) {
    313                 this.index = index;
    314                 this.value = value;
    315             }
    316
    317             // @@protoc_insertion_point(enum_scope:tutorial.Person.PhoneType)
    318         }
    319
    320         public interface PhoneNumberOrBuilder extends com.google.protobuf.MessageOrBuilder {
    321
    322             // required string number = 1;
    323             /**
    324              * <code>required string number = 1;</code>
    325              */
    326             boolean hasNumber();
    327
    328             /**
    329              * <code>required string number = 1;</code>
    330              */
    331             java.lang.String getNumber();
    332
    333             /**
    334              * <code>required string number = 1;</code>
    335              */
    336             com.google.protobuf.ByteString getNumberBytes();
    337
    338             // optional .tutorial.Person.PhoneType type = 2 [default = HOME];
    339             /**
    340              * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    341              */
    342             boolean hasType();
    343
    344             /**
    345              * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    346              */
    347             org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType getType();
    348         }
    349
    350         /**
    351          * Protobuf type {@code tutorial.Person.PhoneNumber}
    352          */
    353         public static final class PhoneNumber extends com.google.protobuf.GeneratedMessage implements
    354                 PhoneNumberOrBuilder {
    355             // Use PhoneNumber.newBuilder() to construct.
    356             private PhoneNumber(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    357                 super(builder);
    358                 this.unknownFields = builder.getUnknownFields();
    359             }
    360
    361             private PhoneNumber(boolean noInit) {
    362                 this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    363             }
    364
    365             private static final PhoneNumber defaultInstance;
    366
    367             public static PhoneNumber getDefaultInstance() {
    368                 return defaultInstance;
    369             }
    370
    371             public PhoneNumber getDefaultInstanceForType() {
    372                 return defaultInstance;
    373             }
    374
    375             private final com.google.protobuf.UnknownFieldSet unknownFields;
    376
    377             @java.lang.Override
    378             public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    379                 return this.unknownFields;
    380             }
    381
    382             private PhoneNumber(com.google.protobuf.CodedInputStream input,
    383                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    384                     throws com.google.protobuf.InvalidProtocolBufferException {
    385                 initFields();
    386                 int mutable_bitField0_ = 0;
    387                 com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet
    388                         .newBuilder();
    389                 try {
    390                     boolean done = false;
    391                     while (!done) {
    392                         int tag = input.readTag();
    393                         switch (tag) {
    394                         case 0:
    395                             done = true;
    396                             break;
    397                         default: {
    398                             if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
    399                                 done = true;
    400                             }
    401                             break;
    402                         }
    403                         case 10: {
    404                             bitField0_ |= 0x00000001;
    405                             number_ = input.readBytes();
    406                             break;
    407                         }
    408                         case 16: {
    409                             int rawValue = input.readEnum();
    410                             org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType value = org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType
    411                                     .valueOf(rawValue);
    412                             if (value == null) {
    413                                 unknownFields.mergeVarintField(2, rawValue);
    414                             } else {
    415                                 bitField0_ |= 0x00000002;
    416                                 type_ = value;
    417                             }
    418                             break;
    419                         }
    420                         }
    421                     }
    422                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    423                     throw e.setUnfinishedMessage(this);
    424                 } catch (java.io.IOException e) {
    425                     throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage())
    426                             .setUnfinishedMessage(this);
    427                 } finally {
    428                     this.unknownFields = unknownFields.build();
    429                     makeExtensionsImmutable();
    430                 }
    431             }
    432
    433             public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    434                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_PhoneNumber_descriptor;
    435             }
    436
    437             protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
    438                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_PhoneNumber_fieldAccessorTable
    439                         .ensureFieldAccessorsInitialized(
    440                                 org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.class,
    441                                 org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder.class);
    442             }
    443
    444             public static com.google.protobuf.Parser<PhoneNumber> PARSER = new com.google.protobuf.AbstractParser<PhoneNumber>() {
    445                 public PhoneNumber parsePartialFrom(com.google.protobuf.CodedInputStream input,
    446                         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    447                         throws com.google.protobuf.InvalidProtocolBufferException {
    448                     return new PhoneNumber(input, extensionRegistry);
    449                 }
    450             };
    451
    452             @java.lang.Override
    453             public com.google.protobuf.Parser<PhoneNumber> getParserForType() {
    454                 return PARSER;
    455             }
    456
    457             private int bitField0_;
    458
    459             // required string number = 1;
    460             public static final int NUMBER_FIELD_NUMBER = 1;
    461
    462             private java.lang.Object number_;
    463
    464             /**
    465              * <code>required string number = 1;</code>
    466              */
    467             public boolean hasNumber() {
    468                 return ((bitField0_ & 0x00000001) == 0x00000001);
    469             }
    470
    471             /**
    472              * <code>required string number = 1;</code>
    473              */
    474             public java.lang.String getNumber() {
    475                 java.lang.Object ref = number_;
    476                 if (ref instanceof java.lang.String) {
    477                     return (java.lang.String) ref;
    478                 } else {
    479                     com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
    480                     java.lang.String s = bs.toStringUtf8();
    481                     if (bs.isValidUtf8()) {
    482                         number_ = s;
    483                     }
    484                     return s;
    485                 }
    486             }
    487
    488             /**
    489              * <code>required string number = 1;</code>
    490              */
    491             public com.google.protobuf.ByteString getNumberBytes() {
    492                 java.lang.Object ref = number_;
    493                 if (ref instanceof java.lang.String) {
    494                     com.google.protobuf.ByteString b = com.google.protobuf.ByteString
    495                             .copyFromUtf8((java.lang.String) ref);
    496                     number_ = b;
    497                     return b;
    498                 } else {
    499                     return (com.google.protobuf.ByteString) ref;
    500                 }
    501             }
    502
    503             // optional .tutorial.Person.PhoneType type = 2 [default = HOME];
    504             public static final int TYPE_FIELD_NUMBER = 2;
    505
    506             private org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType type_;
    507
    508             /**
    509              * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    510              */
    511             public boolean hasType() {
    512                 return ((bitField0_ & 0x00000002) == 0x00000002);
    513             }
    514
    515             /**
    516              * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    517              */
    518             public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType getType() {
    519                 return type_;
    520             }
    521
    522             private void initFields() {
    523                 number_ = "";
    524                 type_ = org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType.HOME;
    525             }
    526
    527             private byte memoizedIsInitialized = -1;
    528
    529             public final boolean isInitialized() {
    530                 byte isInitialized = memoizedIsInitialized;
    531                 if (isInitialized != -1)
    532                     return isInitialized == 1;
    533
    534                 if (!hasNumber()) {
    535                     memoizedIsInitialized = 0;
    536                     return false;
    537                 }
    538                 memoizedIsInitialized = 1;
    539                 return true;
    540             }
    541
    542             public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    543                 getSerializedSize();
    544                 if (((bitField0_ & 0x00000001) == 0x00000001)) {
    545                     output.writeBytes(1, getNumberBytes());
    546                 }
    547                 if (((bitField0_ & 0x00000002) == 0x00000002)) {
    548                     output.writeEnum(2, type_.getNumber());
    549                 }
    550                 getUnknownFields().writeTo(output);
    551             }
    552
    553             private int memoizedSerializedSize = -1;
    554
    555             public int getSerializedSize() {
    556                 int size = memoizedSerializedSize;
    557                 if (size != -1)
    558                     return size;
    559
    560                 size = 0;
    561                 if (((bitField0_ & 0x00000001) == 0x00000001)) {
    562                     size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, getNumberBytes());
    563                 }
    564                 if (((bitField0_ & 0x00000002) == 0x00000002)) {
    565                     size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_.getNumber());
    566                 }
    567                 size += getUnknownFields().getSerializedSize();
    568                 memoizedSerializedSize = size;
    569                 return size;
    570             }
    571
    572             private static final long serialVersionUID = 0L;
    573
    574             @java.lang.Override
    575             protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
    576                 return super.writeReplace();
    577             }
    578
    579             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(
    580                     com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
    581                 return PARSER.parseFrom(data);
    582             }
    583
    584             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(
    585                     com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    586                     throws com.google.protobuf.InvalidProtocolBufferException {
    587                 return PARSER.parseFrom(data, extensionRegistry);
    588             }
    589
    590             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(byte[] data)
    591                     throws com.google.protobuf.InvalidProtocolBufferException {
    592                 return PARSER.parseFrom(data);
    593             }
    594
    595             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(byte[] data,
    596                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    597                     throws com.google.protobuf.InvalidProtocolBufferException {
    598                 return PARSER.parseFrom(data, extensionRegistry);
    599             }
    600
    601             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(
    602                     java.io.InputStream input) throws java.io.IOException {
    603                 return PARSER.parseFrom(input);
    604             }
    605
    606             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(
    607                     java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    608                     throws java.io.IOException {
    609                 return PARSER.parseFrom(input, extensionRegistry);
    610             }
    611
    612             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseDelimitedFrom(
    613                     java.io.InputStream input) throws java.io.IOException {
    614                 return PARSER.parseDelimitedFrom(input);
    615             }
    616
    617             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseDelimitedFrom(
    618                     java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    619                     throws java.io.IOException {
    620                 return PARSER.parseDelimitedFrom(input, extensionRegistry);
    621             }
    622
    623             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(
    624                     com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    625                 return PARSER.parseFrom(input);
    626             }
    627
    628             public static org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parseFrom(
    629                     com.google.protobuf.CodedInputStream input,
    630                     com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
    631                 return PARSER.parseFrom(input, extensionRegistry);
    632             }
    633
    634             public static Builder newBuilder() {
    635                 return Builder.create();
    636             }
    637
    638             public Builder newBuilderForType() {
    639                 return newBuilder();
    640             }
    641
    642             public static Builder newBuilder(
    643                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber prototype) {
    644                 return newBuilder().mergeFrom(prototype);
    645             }
    646
    647             public Builder toBuilder() {
    648                 return newBuilder(this);
    649             }
    650
    651             @java.lang.Override
    652             protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    653                 Builder builder = new Builder(parent);
    654                 return builder;
    655             }
    656
    657             /**
    658              * Protobuf type {@code tutorial.Person.PhoneNumber}
    659              */
    660             public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements
    661                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder {
    662                 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    663                     return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_PhoneNumber_descriptor;
    664                 }
    665
    666                 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
    667                     return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_PhoneNumber_fieldAccessorTable
    668                             .ensureFieldAccessorsInitialized(
    669                                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.class,
    670                                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder.class);
    671                 }
    672
    673                 // Construct using org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.newBuilder()
    674                 private Builder() {
    675                     maybeForceBuilderInitialization();
    676                 }
    677
    678                 private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    679                     super(parent);
    680                     maybeForceBuilderInitialization();
    681                 }
    682
    683                 private void maybeForceBuilderInitialization() {
    684                     if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
    685                     }
    686                 }
    687
    688                 private static Builder create() {
    689                     return new Builder();
    690                 }
    691
    692                 public Builder clear() {
    693                     super.clear();
    694                     number_ = "";
    695                     bitField0_ = (bitField0_ & ~0x00000001);
    696                     type_ = org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType.HOME;
    697                     bitField0_ = (bitField0_ & ~0x00000002);
    698                     return this;
    699                 }
    700
    701                 public Builder clone() {
    702                     return create().mergeFrom(buildPartial());
    703                 }
    704
    705                 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
    706                     return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_PhoneNumber_descriptor;
    707                 }
    708
    709                 public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber getDefaultInstanceForType() {
    710                     return org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.getDefaultInstance();
    711                 }
    712
    713                 public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber build() {
    714                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber result = buildPartial();
    715                     if (!result.isInitialized()) {
    716                         throw newUninitializedMessageException(result);
    717                     }
    718                     return result;
    719                 }
    720
    721                 public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber buildPartial() {
    722                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber result = new org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber(
    723                             this);
    724                     int from_bitField0_ = bitField0_;
    725                     int to_bitField0_ = 0;
    726                     if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
    727                         to_bitField0_ |= 0x00000001;
    728                     }
    729                     result.number_ = number_;
    730                     if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
    731                         to_bitField0_ |= 0x00000002;
    732                     }
    733                     result.type_ = type_;
    734                     result.bitField0_ = to_bitField0_;
    735                     onBuilt();
    736                     return result;
    737                 }
    738
    739                 public Builder mergeFrom(com.google.protobuf.Message other) {
    740                     if (other instanceof org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber) {
    741                         return mergeFrom((org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber) other);
    742                     } else {
    743                         super.mergeFrom(other);
    744                         return this;
    745                     }
    746                 }
    747
    748                 public Builder mergeFrom(org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber other) {
    749                     if (other == org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber
    750                             .getDefaultInstance())
    751                         return this;
    752                     if (other.hasNumber()) {
    753                         bitField0_ |= 0x00000001;
    754                         number_ = other.number_;
    755                         onChanged();
    756                     }
    757                     if (other.hasType()) {
    758                         setType(other.getType());
    759                     }
    760                     this.mergeUnknownFields(other.getUnknownFields());
    761                     return this;
    762                 }
    763
    764                 public final boolean isInitialized() {
    765                     if (!hasNumber()) {
    766
    767                         return false;
    768                     }
    769                     return true;
    770                 }
    771
    772                 public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
    773                         com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
    774                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber parsedMessage = null;
    775                     try {
    776                         parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    777                     } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    778                         parsedMessage = (org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber) e
    779                                 .getUnfinishedMessage();
    780                         throw e;
    781                     } finally {
    782                         if (parsedMessage != null) {
    783                             mergeFrom(parsedMessage);
    784                         }
    785                     }
    786                     return this;
    787                 }
    788
    789                 private int bitField0_;
    790
    791                 // required string number = 1;
    792                 private java.lang.Object number_ = "";
    793
    794                 /**
    795                  * <code>required string number = 1;</code>
    796                  */
    797                 public boolean hasNumber() {
    798                     return ((bitField0_ & 0x00000001) == 0x00000001);
    799                 }
    800
    801                 /**
    802                  * <code>required string number = 1;</code>
    803                  */
    804                 public java.lang.String getNumber() {
    805                     java.lang.Object ref = number_;
    806                     if (!(ref instanceof java.lang.String)) {
    807                         java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
    808                         number_ = s;
    809                         return s;
    810                     } else {
    811                         return (java.lang.String) ref;
    812                     }
    813                 }
    814
    815                 /**
    816                  * <code>required string number = 1;</code>
    817                  */
    818                 public com.google.protobuf.ByteString getNumberBytes() {
    819                     java.lang.Object ref = number_;
    820                     if (ref instanceof String) {
    821                         com.google.protobuf.ByteString b = com.google.protobuf.ByteString
    822                                 .copyFromUtf8((java.lang.String) ref);
    823                         number_ = b;
    824                         return b;
    825                     } else {
    826                         return (com.google.protobuf.ByteString) ref;
    827                     }
    828                 }
    829
    830                 /**
    831                  * <code>required string number = 1;</code>
    832                  */
    833                 public Builder setNumber(java.lang.String value) {
    834                     if (value == null) {
    835                         throw new NullPointerException();
    836                     }
    837                     bitField0_ |= 0x00000001;
    838                     number_ = value;
    839                     onChanged();
    840                     return this;
    841                 }
    842
    843                 /**
    844                  * <code>required string number = 1;</code>
    845                  */
    846                 public Builder clearNumber() {
    847                     bitField0_ = (bitField0_ & ~0x00000001);
    848                     number_ = getDefaultInstance().getNumber();
    849                     onChanged();
    850                     return this;
    851                 }
    852
    853                 /**
    854                  * <code>required string number = 1;</code>
    855                  */
    856                 public Builder setNumberBytes(com.google.protobuf.ByteString value) {
    857                     if (value == null) {
    858                         throw new NullPointerException();
    859                     }
    860                     bitField0_ |= 0x00000001;
    861                     number_ = value;
    862                     onChanged();
    863                     return this;
    864                 }
    865
    866                 // optional .tutorial.Person.PhoneType type = 2 [default = HOME];
    867                 private org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType type_ = org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType.HOME;
    868
    869                 /**
    870                  * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    871                  */
    872                 public boolean hasType() {
    873                     return ((bitField0_ & 0x00000002) == 0x00000002);
    874                 }
    875
    876                 /**
    877                  * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    878                  */
    879                 public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType getType() {
    880                     return type_;
    881                 }
    882
    883                 /**
    884                  * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    885                  */
    886                 public Builder setType(org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType value) {
    887                     if (value == null) {
    888                         throw new NullPointerException();
    889                     }
    890                     bitField0_ |= 0x00000002;
    891                     type_ = value;
    892                     onChanged();
    893                     return this;
    894                 }
    895
    896                 /**
    897                  * <code>optional .tutorial.Person.PhoneType type = 2 [default = HOME];</code>
    898                  */
    899                 public Builder clearType() {
    900                     bitField0_ = (bitField0_ & ~0x00000002);
    901                     type_ = org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneType.HOME;
    902                     onChanged();
    903                     return this;
    904                 }
    905
    906                 // @@protoc_insertion_point(builder_scope:tutorial.Person.PhoneNumber)
    907             }
    908
    909             static {
    910                 defaultInstance = new PhoneNumber(true);
    911                 defaultInstance.initFields();
    912             }
    913
    914             // @@protoc_insertion_point(class_scope:tutorial.Person.PhoneNumber)
    915         }
    916
    917         private int bitField0_;
    918
    919         // required string name = 1;
    920         public static final int NAME_FIELD_NUMBER = 1;
    921
    922         private java.lang.Object name_;
    923
    924         /**
    925          * <code>required string name = 1;</code>
    926          */
    927         public boolean hasName() {
    928             return ((bitField0_ & 0x00000001) == 0x00000001);
    929         }
    930
    931         /**
    932          * <code>required string name = 1;</code>
    933          */
    934         public java.lang.String getName() {
    935             java.lang.Object ref = name_;
    936             if (ref instanceof java.lang.String) {
    937                 return (java.lang.String) ref;
    938             } else {
    939                 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
    940                 java.lang.String s = bs.toStringUtf8();
    941                 if (bs.isValidUtf8()) {
    942                     name_ = s;
    943                 }
    944                 return s;
    945             }
    946         }
    947
    948         /**
    949          * <code>required string name = 1;</code>
    950          */
    951         public com.google.protobuf.ByteString getNameBytes() {
    952             java.lang.Object ref = name_;
    953             if (ref instanceof java.lang.String) {
    954                 com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
    955                 name_ = b;
    956                 return b;
    957             } else {
    958                 return (com.google.protobuf.ByteString) ref;
    959             }
    960         }
    961
    962         // required int32 id = 2;
    963         public static final int ID_FIELD_NUMBER = 2;
    964
    965         private int id_;
    966
    967         /**
    968          * <code>required int32 id = 2;</code>
    969          *
    970          * <pre>
    971          * Unique ID number for this person.
    972          * </pre>
    973          */
    974         public boolean hasId() {
    975             return ((bitField0_ & 0x00000002) == 0x00000002);
    976         }
    977
    978         /**
    979          * <code>required int32 id = 2;</code>
    980          *
    981          * <pre>
    982          * Unique ID number for this person.
    983          * </pre>
    984          */
    985         public int getId() {
    986             return id_;
    987         }
    988
    989         // optional string email = 3;
    990         public static final int EMAIL_FIELD_NUMBER = 3;
    991
    992         private java.lang.Object email_;
    993
    994         /**
    995          * <code>optional string email = 3;</code>
    996          */
    997         public boolean hasEmail() {
    998             return ((bitField0_ & 0x00000004) == 0x00000004);
    999         }
    1000
    1001         /**
    1002          * <code>optional string email = 3;</code>
    1003          */
    1004         public java.lang.String getEmail() {
    1005             java.lang.Object ref = email_;
    1006             if (ref instanceof java.lang.String) {
    1007                 return (java.lang.String) ref;
    1008             } else {
    1009                 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
    1010                 java.lang.String s = bs.toStringUtf8();
    1011                 if (bs.isValidUtf8()) {
    1012                     email_ = s;
    1013                 }
    1014                 return s;
    1015             }
    1016         }
    1017
    1018         /**
    1019          * <code>optional string email = 3;</code>
    1020          */
    1021         public com.google.protobuf.ByteString getEmailBytes() {
    1022             java.lang.Object ref = email_;
    1023             if (ref instanceof java.lang.String) {
    1024                 com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
    1025                 email_ = b;
    1026                 return b;
    1027             } else {
    1028                 return (com.google.protobuf.ByteString) ref;
    1029             }
    1030         }
    1031
    1032         // repeated .tutorial.Person.PhoneNumber phone = 4;
    1033         public static final int PHONE_FIELD_NUMBER = 4;
    1034
    1035         private java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> phone_;
    1036
    1037         /**
    1038          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1039          */
    1040         public java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> getPhoneList() {
    1041             return phone_;
    1042         }
    1043
    1044         /**
    1045          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1046          */
    1047         public java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder> getPhoneOrBuilderList() {
    1048             return phone_;
    1049         }
    1050
    1051         /**
    1052          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1053          */
    1054         public int getPhoneCount() {
    1055             return phone_.size();
    1056         }
    1057
    1058         /**
    1059          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1060          */
    1061         public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber getPhone(int index) {
    1062             return phone_.get(index);
    1063         }
    1064
    1065         /**
    1066          * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1067          */
    1068         public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder getPhoneOrBuilder(
    1069                 int index) {
    1070             return phone_.get(index);
    1071         }
    1072
    1073         private void initFields() {
    1074             name_ = "";
    1075             id_ = 0;
    1076             email_ = "";
    1077             phone_ = java.util.Collections.emptyList();
    1078         }
    1079
    1080         private byte memoizedIsInitialized = -1;
    1081
    1082         public final boolean isInitialized() {
    1083             byte isInitialized = memoizedIsInitialized;
    1084             if (isInitialized != -1)
    1085                 return isInitialized == 1;
    1086
    1087             if (!hasName()) {
    1088                 memoizedIsInitialized = 0;
    1089                 return false;
    1090             }
    1091             if (!hasId()) {
    1092                 memoizedIsInitialized = 0;
    1093                 return false;
    1094             }
    1095             for (int i = 0; i < getPhoneCount(); i++) {
    1096                 if (!getPhone(i).isInitialized()) {
    1097                     memoizedIsInitialized = 0;
    1098                     return false;
    1099                 }
    1100             }
    1101             memoizedIsInitialized = 1;
    1102             return true;
    1103         }
    1104
    1105         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    1106             getSerializedSize();
    1107             if (((bitField0_ & 0x00000001) == 0x00000001)) {
    1108                 output.writeBytes(1, getNameBytes());
    1109             }
    1110             if (((bitField0_ & 0x00000002) == 0x00000002)) {
    1111                 output.writeInt32(2, id_);
    1112             }
    1113             if (((bitField0_ & 0x00000004) == 0x00000004)) {
    1114                 output.writeBytes(3, getEmailBytes());
    1115             }
    1116             for (int i = 0; i < phone_.size(); i++) {
    1117                 output.writeMessage(4, phone_.get(i));
    1118             }
    1119             getUnknownFields().writeTo(output);
    1120         }
    1121
    1122         private int memoizedSerializedSize = -1;
    1123
    1124         public int getSerializedSize() {
    1125             int size = memoizedSerializedSize;
    1126             if (size != -1)
    1127                 return size;
    1128
    1129             size = 0;
    1130             if (((bitField0_ & 0x00000001) == 0x00000001)) {
    1131                 size += com.google.protobuf.CodedOutputStream.computeBytesSize(1, getNameBytes());
    1132             }
    1133             if (((bitField0_ & 0x00000002) == 0x00000002)) {
    1134                 size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, id_);
    1135             }
    1136             if (((bitField0_ & 0x00000004) == 0x00000004)) {
    1137                 size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, getEmailBytes());
    1138             }
    1139             for (int i = 0; i < phone_.size(); i++) {
    1140                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, phone_.get(i));
    1141             }
    1142             size += getUnknownFields().getSerializedSize();
    1143             memoizedSerializedSize = size;
    1144             return size;
    1145         }
    1146
    1147         private static final long serialVersionUID = 0L;
    1148
    1149         @java.lang.Override
    1150         protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
    1151             return super.writeReplace();
    1152         }
    1153
    1154         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(
    1155                 com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
    1156             return PARSER.parseFrom(data);
    1157         }
    1158
    1159         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(
    1160                 com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    1161                 throws com.google.protobuf.InvalidProtocolBufferException {
    1162             return PARSER.parseFrom(data, extensionRegistry);
    1163         }
    1164
    1165         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(byte[] data)
    1166                 throws com.google.protobuf.InvalidProtocolBufferException {
    1167             return PARSER.parseFrom(data);
    1168         }
    1169
    1170         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(byte[] data,
    1171                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    1172                 throws com.google.protobuf.InvalidProtocolBufferException {
    1173             return PARSER.parseFrom(data, extensionRegistry);
    1174         }
    1175
    1176         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(java.io.InputStream input)
    1177                 throws java.io.IOException {
    1178             return PARSER.parseFrom(input);
    1179         }
    1180
    1181         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(java.io.InputStream input,
    1182                 com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
    1183             return PARSER.parseFrom(input, extensionRegistry);
    1184         }
    1185
    1186         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseDelimitedFrom(
    1187                 java.io.InputStream input) throws java.io.IOException {
    1188             return PARSER.parseDelimitedFrom(input);
    1189         }
    1190
    1191         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseDelimitedFrom(
    1192                 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    1193                 throws java.io.IOException {
    1194             return PARSER.parseDelimitedFrom(input, extensionRegistry);
    1195         }
    1196
    1197         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(
    1198                 com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    1199             return PARSER.parseFrom(input);
    1200         }
    1201
    1202         public static org.apache.mina.generated.protoc.AddressBookProtos.Person parseFrom(
    1203                 com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    1204                 throws java.io.IOException {
    1205             return PARSER.parseFrom(input, extensionRegistry);
    1206         }
    1207
    1208         public static Builder newBuilder() {
    1209             return Builder.create();
    1210         }
    1211
    1212         public Builder newBuilderForType() {
    1213             return newBuilder();
    1214         }
    1215
    1216         public static Builder newBuilder(org.apache.mina.generated.protoc.AddressBookProtos.Person prototype) {
    1217             return newBuilder().mergeFrom(prototype);
    1218         }
    1219
    1220         public Builder toBuilder() {
    1221             return newBuilder(this);
    1222         }
    1223
    1224         @java.lang.Override
    1225         protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    1226             Builder builder = new Builder(parent);
    1227             return builder;
    1228         }
    1229
    1230         /**
    1231          * Protobuf type {@code tutorial.Person}
    1232          */
    1233         public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements
    1234                 org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder {
    1235             public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    1236                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_descriptor;
    1237             }
    1238
    1239             protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
    1240                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_fieldAccessorTable
    1241                         .ensureFieldAccessorsInitialized(
    1242                                 org.apache.mina.generated.protoc.AddressBookProtos.Person.class,
    1243                                 org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder.class);
    1244             }
    1245
    1246             // Construct using org.apache.mina.generated.protoc.AddressBookProtos.Person.newBuilder()
    1247             private Builder() {
    1248                 maybeForceBuilderInitialization();
    1249             }
    1250
    1251             private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    1252                 super(parent);
    1253                 maybeForceBuilderInitialization();
    1254             }
    1255
    1256             private void maybeForceBuilderInitialization() {
    1257                 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
    1258                     getPhoneFieldBuilder();
    1259                 }
    1260             }
    1261
    1262             private static Builder create() {
    1263                 return new Builder();
    1264             }
    1265
    1266             public Builder clear() {
    1267                 super.clear();
    1268                 name_ = "";
    1269                 bitField0_ = (bitField0_ & ~0x00000001);
    1270                 id_ = 0;
    1271                 bitField0_ = (bitField0_ & ~0x00000002);
    1272                 email_ = "";
    1273                 bitField0_ = (bitField0_ & ~0x00000004);
    1274                 if (phoneBuilder_ == null) {
    1275                     phone_ = java.util.Collections.emptyList();
    1276                     bitField0_ = (bitField0_ & ~0x00000008);
    1277                 } else {
    1278                     phoneBuilder_.clear();
    1279                 }
    1280                 return this;
    1281             }
    1282
    1283             public Builder clone() {
    1284                 return create().mergeFrom(buildPartial());
    1285             }
    1286
    1287             public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
    1288                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_descriptor;
    1289             }
    1290
    1291             public org.apache.mina.generated.protoc.AddressBookProtos.Person getDefaultInstanceForType() {
    1292                 return org.apache.mina.generated.protoc.AddressBookProtos.Person.getDefaultInstance();
    1293             }
    1294
    1295             public org.apache.mina.generated.protoc.AddressBookProtos.Person build() {
    1296                 org.apache.mina.generated.protoc.AddressBookProtos.Person result = buildPartial();
    1297                 if (!result.isInitialized()) {
    1298                     throw newUninitializedMessageException(result);
    1299                 }
    1300                 return result;
    1301             }
    1302
    1303             public org.apache.mina.generated.protoc.AddressBookProtos.Person buildPartial() {
    1304                 org.apache.mina.generated.protoc.AddressBookProtos.Person result = new org.apache.mina.generated.protoc.AddressBookProtos.Person(
    1305                         this);
    1306                 int from_bitField0_ = bitField0_;
    1307                 int to_bitField0_ = 0;
    1308                 if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
    1309                     to_bitField0_ |= 0x00000001;
    1310                 }
    1311                 result.name_ = name_;
    1312                 if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
    1313                     to_bitField0_ |= 0x00000002;
    1314                 }
    1315                 result.id_ = id_;
    1316                 if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
    1317                     to_bitField0_ |= 0x00000004;
    1318                 }
    1319                 result.email_ = email_;
    1320                 if (phoneBuilder_ == null) {
    1321                     if (((bitField0_ & 0x00000008) == 0x00000008)) {
    1322                         phone_ = java.util.Collections.unmodifiableList(phone_);
    1323                         bitField0_ = (bitField0_ & ~0x00000008);
    1324                     }
    1325                     result.phone_ = phone_;
    1326                 } else {
    1327                     result.phone_ = phoneBuilder_.build();
    1328                 }
    1329                 result.bitField0_ = to_bitField0_;
    1330                 onBuilt();
    1331                 return result;
    1332             }
    1333
    1334             public Builder mergeFrom(com.google.protobuf.Message other) {
    1335                 if (other instanceof org.apache.mina.generated.protoc.AddressBookProtos.Person) {
    1336                     return mergeFrom((org.apache.mina.generated.protoc.AddressBookProtos.Person) other);
    1337                 } else {
    1338                     super.mergeFrom(other);
    1339                     return this;
    1340                 }
    1341             }
    1342
    1343             public Builder mergeFrom(org.apache.mina.generated.protoc.AddressBookProtos.Person other) {
    1344                 if (other == org.apache.mina.generated.protoc.AddressBookProtos.Person.getDefaultInstance())
    1345                     return this;
    1346                 if (other.hasName()) {
    1347                     bitField0_ |= 0x00000001;
    1348                     name_ = other.name_;
    1349                     onChanged();
    1350                 }
    1351                 if (other.hasId()) {
    1352                     setId(other.getId());
    1353                 }
    1354                 if (other.hasEmail()) {
    1355                     bitField0_ |= 0x00000004;
    1356                     email_ = other.email_;
    1357                     onChanged();
    1358                 }
    1359                 if (phoneBuilder_ == null) {
    1360                     if (!other.phone_.isEmpty()) {
    1361                         if (phone_.isEmpty()) {
    1362                             phone_ = other.phone_;
    1363                             bitField0_ = (bitField0_ & ~0x00000008);
    1364                         } else {
    1365                             ensurePhoneIsMutable();
    1366                             phone_.addAll(other.phone_);
    1367                         }
    1368                         onChanged();
    1369                     }
    1370                 } else {
    1371                     if (!other.phone_.isEmpty()) {
    1372                         if (phoneBuilder_.isEmpty()) {
    1373                             phoneBuilder_.dispose();
    1374                             phoneBuilder_ = null;
    1375                             phone_ = other.phone_;
    1376                             bitField0_ = (bitField0_ & ~0x00000008);
    1377                             phoneBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPhoneFieldBuilder()
    1378                                     : null;
    1379                         } else {
    1380                             phoneBuilder_.addAllMessages(other.phone_);
    1381                         }
    1382                     }
    1383                 }
    1384                 this.mergeUnknownFields(other.getUnknownFields());
    1385                 return this;
    1386             }
    1387
    1388             public final boolean isInitialized() {
    1389                 if (!hasName()) {
    1390
    1391                     return false;
    1392                 }
    1393                 if (!hasId()) {
    1394
    1395                     return false;
    1396                 }
    1397                 for (int i = 0; i < getPhoneCount(); i++) {
    1398                     if (!getPhone(i).isInitialized()) {
    1399
    1400                         return false;
    1401                     }
    1402                 }
    1403                 return true;
    1404             }
    1405
    1406             public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
    1407                     com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
    1408                 org.apache.mina.generated.protoc.AddressBookProtos.Person parsedMessage = null;
    1409                 try {
    1410                     parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    1411                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    1412                     parsedMessage = (org.apache.mina.generated.protoc.AddressBookProtos.Person) e
    1413                             .getUnfinishedMessage();
    1414                     throw e;
    1415                 } finally {
    1416                     if (parsedMessage != null) {
    1417                         mergeFrom(parsedMessage);
    1418                     }
    1419                 }
    1420                 return this;
    1421             }
    1422
    1423             private int bitField0_;
    1424
    1425             // required string name = 1;
    1426             private java.lang.Object name_ = "";
    1427
    1428             /**
    1429              * <code>required string name = 1;</code>
    1430              */
    1431             public boolean hasName() {
    1432                 return ((bitField0_ & 0x00000001) == 0x00000001);
    1433             }
    1434
    1435             /**
    1436              * <code>required string name = 1;</code>
    1437              */
    1438             public java.lang.String getName() {
    1439                 java.lang.Object ref = name_;
    1440                 if (!(ref instanceof java.lang.String)) {
    1441                     java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
    1442                     name_ = s;
    1443                     return s;
    1444                 } else {
    1445                     return (java.lang.String) ref;
    1446                 }
    1447             }
    1448
    1449             /**
    1450              * <code>required string name = 1;</code>
    1451              */
    1452             public com.google.protobuf.ByteString getNameBytes() {
    1453                 java.lang.Object ref = name_;
    1454                 if (ref instanceof String) {
    1455                     com.google.protobuf.ByteString b = com.google.protobuf.ByteString
    1456                             .copyFromUtf8((java.lang.String) ref);
    1457                     name_ = b;
    1458                     return b;
    1459                 } else {
    1460                     return (com.google.protobuf.ByteString) ref;
    1461                 }
    1462             }
    1463
    1464             /**
    1465              * <code>required string name = 1;</code>
    1466              */
    1467             public Builder setName(java.lang.String value) {
    1468                 if (value == null) {
    1469                     throw new NullPointerException();
    1470                 }
    1471                 bitField0_ |= 0x00000001;
    1472                 name_ = value;
    1473                 onChanged();
    1474                 return this;
    1475             }
    1476
    1477             /**
    1478              * <code>required string name = 1;</code>
    1479              */
    1480             public Builder clearName() {
    1481                 bitField0_ = (bitField0_ & ~0x00000001);
    1482                 name_ = getDefaultInstance().getName();
    1483                 onChanged();
    1484                 return this;
    1485             }
    1486
    1487             /**
    1488              * <code>required string name = 1;</code>
    1489              */
    1490             public Builder setNameBytes(com.google.protobuf.ByteString value) {
    1491                 if (value == null) {
    1492                     throw new NullPointerException();
    1493                 }
    1494                 bitField0_ |= 0x00000001;
    1495                 name_ = value;
    1496                 onChanged();
    1497                 return this;
    1498             }
    1499
    1500             // required int32 id = 2;
    1501             private int id_;
    1502
    1503             /**
    1504              * <code>required int32 id = 2;</code>
    1505              *
    1506              * <pre>
    1507              * Unique ID number for this person.
    1508              * </pre>
    1509              */
    1510             public boolean hasId() {
    1511                 return ((bitField0_ & 0x00000002) == 0x00000002);
    1512             }
    1513
    1514             /**
    1515              * <code>required int32 id = 2;</code>
    1516              *
    1517              * <pre>
    1518              * Unique ID number for this person.
    1519              * </pre>
    1520              */
    1521             public int getId() {
    1522                 return id_;
    1523             }
    1524
    1525             /**
    1526              * <code>required int32 id = 2;</code>
    1527              *
    1528              * <pre>
    1529              * Unique ID number for this person.
    1530              * </pre>
    1531              */
    1532             public Builder setId(int value) {
    1533                 bitField0_ |= 0x00000002;
    1534                 id_ = value;
    1535                 onChanged();
    1536                 return this;
    1537             }
    1538
    1539             /**
    1540              * <code>required int32 id = 2;</code>
    1541              *
    1542              * <pre>
    1543              * Unique ID number for this person.
    1544              * </pre>
    1545              */
    1546             public Builder clearId() {
    1547                 bitField0_ = (bitField0_ & ~0x00000002);
    1548                 id_ = 0;
    1549                 onChanged();
    1550                 return this;
    1551             }
    1552
    1553             // optional string email = 3;
    1554             private java.lang.Object email_ = "";
    1555
    1556             /**
    1557              * <code>optional string email = 3;</code>
    1558              */
    1559             public boolean hasEmail() {
    1560                 return ((bitField0_ & 0x00000004) == 0x00000004);
    1561             }
    1562
    1563             /**
    1564              * <code>optional string email = 3;</code>
    1565              */
    1566             public java.lang.String getEmail() {
    1567                 java.lang.Object ref = email_;
    1568                 if (!(ref instanceof java.lang.String)) {
    1569                     java.lang.String s = ((com.google.protobuf.ByteString) ref).toStringUtf8();
    1570                     email_ = s;
    1571                     return s;
    1572                 } else {
    1573                     return (java.lang.String) ref;
    1574                 }
    1575             }
    1576
    1577             /**
    1578              * <code>optional string email = 3;</code>
    1579              */
    1580             public com.google.protobuf.ByteString getEmailBytes() {
    1581                 java.lang.Object ref = email_;
    1582                 if (ref instanceof String) {
    1583                     com.google.protobuf.ByteString b = com.google.protobuf.ByteString
    1584                             .copyFromUtf8((java.lang.String) ref);
    1585                     email_ = b;
    1586                     return b;
    1587                 } else {
    1588                     return (com.google.protobuf.ByteString) ref;
    1589                 }
    1590             }
    1591
    1592             /**
    1593              * <code>optional string email = 3;</code>
    1594              */
    1595             public Builder setEmail(java.lang.String value) {
    1596                 if (value == null) {
    1597                     throw new NullPointerException();
    1598                 }
    1599                 bitField0_ |= 0x00000004;
    1600                 email_ = value;
    1601                 onChanged();
    1602                 return this;
    1603             }
    1604
    1605             /**
    1606              * <code>optional string email = 3;</code>
    1607              */
    1608             public Builder clearEmail() {
    1609                 bitField0_ = (bitField0_ & ~0x00000004);
    1610                 email_ = getDefaultInstance().getEmail();
    1611                 onChanged();
    1612                 return this;
    1613             }
    1614
    1615             /**
    1616              * <code>optional string email = 3;</code>
    1617              */
    1618             public Builder setEmailBytes(com.google.protobuf.ByteString value) {
    1619                 if (value == null) {
    1620                     throw new NullPointerException();
    1621                 }
    1622                 bitField0_ |= 0x00000004;
    1623                 email_ = value;
    1624                 onChanged();
    1625                 return this;
    1626             }
    1627
    1628             // repeated .tutorial.Person.PhoneNumber phone = 4;
    1629             private java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> phone_ = java.util.Collections
    1630                     .emptyList();
    1631
    1632             private void ensurePhoneIsMutable() {
    1633                 if (!((bitField0_ & 0x00000008) == 0x00000008)) {
    1634                     phone_ = new java.util.ArrayList<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber>(
    1635                             phone_);
    1636                     bitField0_ |= 0x00000008;
    1637                 }
    1638             }
    1639
    1640             private com.google.protobuf.RepeatedFieldBuilder<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber, org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder, org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder> phoneBuilder_;
    1641
    1642             /**
    1643              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1644              */
    1645             public java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> getPhoneList() {
    1646                 if (phoneBuilder_ == null) {
    1647                     return java.util.Collections.unmodifiableList(phone_);
    1648                 } else {
    1649                     return phoneBuilder_.getMessageList();
    1650                 }
    1651             }
    1652
    1653             /**
    1654              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1655              */
    1656             public int getPhoneCount() {
    1657                 if (phoneBuilder_ == null) {
    1658                     return phone_.size();
    1659                 } else {
    1660                     return phoneBuilder_.getCount();
    1661                 }
    1662             }
    1663
    1664             /**
    1665              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1666              */
    1667             public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber getPhone(int index) {
    1668                 if (phoneBuilder_ == null) {
    1669                     return phone_.get(index);
    1670                 } else {
    1671                     return phoneBuilder_.getMessage(index);
    1672                 }
    1673             }
    1674
    1675             /**
    1676              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1677              */
    1678             public Builder setPhone(int index,
    1679                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber value) {
    1680                 if (phoneBuilder_ == null) {
    1681                     if (value == null) {
    1682                         throw new NullPointerException();
    1683                     }
    1684                     ensurePhoneIsMutable();
    1685                     phone_.set(index, value);
    1686                     onChanged();
    1687                 } else {
    1688                     phoneBuilder_.setMessage(index, value);
    1689                 }
    1690                 return this;
    1691             }
    1692
    1693             /**
    1694              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1695              */
    1696             public Builder setPhone(int index,
    1697                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder builderForValue) {
    1698                 if (phoneBuilder_ == null) {
    1699                     ensurePhoneIsMutable();
    1700                     phone_.set(index, builderForValue.build());
    1701                     onChanged();
    1702                 } else {
    1703                     phoneBuilder_.setMessage(index, builderForValue.build());
    1704                 }
    1705                 return this;
    1706             }
    1707
    1708             /**
    1709              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1710              */
    1711             public Builder addPhone(org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber value) {
    1712                 if (phoneBuilder_ == null) {
    1713                     if (value == null) {
    1714                         throw new NullPointerException();
    1715                     }
    1716                     ensurePhoneIsMutable();
    1717                     phone_.add(value);
    1718                     onChanged();
    1719                 } else {
    1720                     phoneBuilder_.addMessage(value);
    1721                 }
    1722                 return this;
    1723             }
    1724
    1725             /**
    1726              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1727              */
    1728             public Builder addPhone(int index,
    1729                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber value) {
    1730                 if (phoneBuilder_ == null) {
    1731                     if (value == null) {
    1732                         throw new NullPointerException();
    1733                     }
    1734                     ensurePhoneIsMutable();
    1735                     phone_.add(index, value);
    1736                     onChanged();
    1737                 } else {
    1738                     phoneBuilder_.addMessage(index, value);
    1739                 }
    1740                 return this;
    1741             }
    1742
    1743             /**
    1744              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1745              */
    1746             public Builder addPhone(
    1747                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder builderForValue) {
    1748                 if (phoneBuilder_ == null) {
    1749                     ensurePhoneIsMutable();
    1750                     phone_.add(builderForValue.build());
    1751                     onChanged();
    1752                 } else {
    1753                     phoneBuilder_.addMessage(builderForValue.build());
    1754                 }
    1755                 return this;
    1756             }
    1757
    1758             /**
    1759              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1760              */
    1761             public Builder addPhone(int index,
    1762                     org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder builderForValue) {
    1763                 if (phoneBuilder_ == null) {
    1764                     ensurePhoneIsMutable();
    1765                     phone_.add(index, builderForValue.build());
    1766                     onChanged();
    1767                 } else {
    1768                     phoneBuilder_.addMessage(index, builderForValue.build());
    1769                 }
    1770                 return this;
    1771             }
    1772
    1773             /**
    1774              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1775              */
    1776             public Builder addAllPhone(
    1777                     java.lang.Iterable<? extends org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> values) {
    1778                 if (phoneBuilder_ == null) {
    1779                     ensurePhoneIsMutable();
    1780                     super.addAll(values, phone_);
    1781                     onChanged();
    1782                 } else {
    1783                     phoneBuilder_.addAllMessages(values);
    1784                 }
    1785                 return this;
    1786             }
    1787
    1788             /**
    1789              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1790              */
    1791             public Builder clearPhone() {
    1792                 if (phoneBuilder_ == null) {
    1793                     phone_ = java.util.Collections.emptyList();
    1794                     bitField0_ = (bitField0_ & ~0x00000008);
    1795                     onChanged();
    1796                 } else {
    1797                     phoneBuilder_.clear();
    1798                 }
    1799                 return this;
    1800             }
    1801
    1802             /**
    1803              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1804              */
    1805             public Builder removePhone(int index) {
    1806                 if (phoneBuilder_ == null) {
    1807                     ensurePhoneIsMutable();
    1808                     phone_.remove(index);
    1809                     onChanged();
    1810                 } else {
    1811                     phoneBuilder_.remove(index);
    1812                 }
    1813                 return this;
    1814             }
    1815
    1816             /**
    1817              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1818              */
    1819             public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder getPhoneBuilder(
    1820                     int index) {
    1821                 return getPhoneFieldBuilder().getBuilder(index);
    1822             }
    1823
    1824             /**
    1825              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1826              */
    1827             public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder getPhoneOrBuilder(
    1828                     int index) {
    1829                 if (phoneBuilder_ == null) {
    1830                     return phone_.get(index);
    1831                 } else {
    1832                     return phoneBuilder_.getMessageOrBuilder(index);
    1833                 }
    1834             }
    1835
    1836             /**
    1837              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1838              */
    1839             public java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder> getPhoneOrBuilderList() {
    1840                 if (phoneBuilder_ != null) {
    1841                     return phoneBuilder_.getMessageOrBuilderList();
    1842                 } else {
    1843                     return java.util.Collections.unmodifiableList(phone_);
    1844                 }
    1845             }
    1846
    1847             /**
    1848              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1849              */
    1850             public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder addPhoneBuilder() {
    1851                 return getPhoneFieldBuilder().addBuilder(
    1852                         org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.getDefaultInstance());
    1853             }
    1854
    1855             /**
    1856              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1857              */
    1858             public org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder addPhoneBuilder(
    1859                     int index) {
    1860                 return getPhoneFieldBuilder().addBuilder(index,
    1861                         org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.getDefaultInstance());
    1862             }
    1863
    1864             /**
    1865              * <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
    1866              */
    1867             public java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder> getPhoneBuilderList() {
    1868                 return getPhoneFieldBuilder().getBuilderList();
    1869             }
    1870
    1871             private com.google.protobuf.RepeatedFieldBuilder<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber, org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder, org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder> getPhoneFieldBuilder() {
    1872                 if (phoneBuilder_ == null) {
    1873                     phoneBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber, org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.Builder, org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder>(
    1874                             phone_, ((bitField0_ & 0x00000008) == 0x00000008), getParentForChildren(), isClean());
    1875                     phone_ = null;
    1876                 }
    1877                 return phoneBuilder_;
    1878             }
    1879
    1880             // @@protoc_insertion_point(builder_scope:tutorial.Person)
    1881         }
    1882
    1883         static {
    1884             defaultInstance = new Person(true);
    1885             defaultInstance.initFields();
    1886         }
    1887
    1888         // @@protoc_insertion_point(class_scope:tutorial.Person)
    1889     }
    1890
    1891     public interface AddressBookOrBuilder extends com.google.protobuf.MessageOrBuilder {
    1892
    1893         // repeated .tutorial.Person person = 1;
    1894         /**
    1895          * <code>repeated .tutorial.Person person = 1;</code>
    1896          */
    1897         java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person> getPersonList();
    1898
    1899         /**
    1900          * <code>repeated .tutorial.Person person = 1;</code>
    1901          */
    1902         org.apache.mina.generated.protoc.AddressBookProtos.Person getPerson(int index);
    1903
    1904         /**
    1905          * <code>repeated .tutorial.Person person = 1;</code>
    1906          */
    1907         int getPersonCount();
    1908
    1909         /**
    1910          * <code>repeated .tutorial.Person person = 1;</code>
    1911          */
    1912         java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder> getPersonOrBuilderList();
    1913
    1914         /**
    1915          * <code>repeated .tutorial.Person person = 1;</code>
    1916          */
    1917         org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder getPersonOrBuilder(int index);
    1918     }
    1919
    1920     /**
    1921      * Protobuf type {@code tutorial.AddressBook}
    1922      *
    1923      * <pre>
    1924      * Our address book file is just one of these.
    1925      * </pre>
    1926      */
    1927     public static final class AddressBook extends com.google.protobuf.GeneratedMessage implements AddressBookOrBuilder {
    1928         // Use AddressBook.newBuilder() to construct.
    1929         private AddressBook(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
    1930             super(builder);
    1931             this.unknownFields = builder.getUnknownFields();
    1932         }
    1933
    1934         private AddressBook(boolean noInit) {
    1935             this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    1936         }
    1937
    1938         private static final AddressBook defaultInstance;
    1939
    1940         public static AddressBook getDefaultInstance() {
    1941             return defaultInstance;
    1942         }
    1943
    1944         public AddressBook getDefaultInstanceForType() {
    1945             return defaultInstance;
    1946         }
    1947
    1948         private final com.google.protobuf.UnknownFieldSet unknownFields;
    1949
    1950         @java.lang.Override
    1951         public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    1952             return this.unknownFields;
    1953         }
    1954
    1955         private AddressBook(com.google.protobuf.CodedInputStream input,
    1956                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    1957                 throws com.google.protobuf.InvalidProtocolBufferException {
    1958             initFields();
    1959             int mutable_bitField0_ = 0;
    1960             com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet
    1961                     .newBuilder();
    1962             try {
    1963                 boolean done = false;
    1964                 while (!done) {
    1965                     int tag = input.readTag();
    1966                     switch (tag) {
    1967                     case 0:
    1968                         done = true;
    1969                         break;
    1970                     default: {
    1971                         if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
    1972                             done = true;
    1973                         }
    1974                         break;
    1975                     }
    1976                     case 10: {
    1977                         if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
    1978                             person_ = new java.util.ArrayList<org.apache.mina.generated.protoc.AddressBookProtos.Person>();
    1979                             mutable_bitField0_ |= 0x00000001;
    1980                         }
    1981                         person_.add(input.readMessage(org.apache.mina.generated.protoc.AddressBookProtos.Person.PARSER,
    1982                                 extensionRegistry));
    1983                         break;
    1984                     }
    1985                     }
    1986                 }
    1987             } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    1988                 throw e.setUnfinishedMessage(this);
    1989             } catch (java.io.IOException e) {
    1990                 throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this);
    1991             } finally {
    1992                 if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
    1993                     person_ = java.util.Collections.unmodifiableList(person_);
    1994                 }
    1995                 this.unknownFields = unknownFields.build();
    1996                 makeExtensionsImmutable();
    1997             }
    1998         }
    1999
    2000         public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    2001             return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_AddressBook_descriptor;
    2002         }
    2003
    2004         protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
    2005             return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_AddressBook_fieldAccessorTable
    2006                     .ensureFieldAccessorsInitialized(
    2007                             org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.class,
    2008                             org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.Builder.class);
    2009         }
    2010
    2011         public static com.google.protobuf.Parser<AddressBook> PARSER = new com.google.protobuf.AbstractParser<AddressBook>() {
    2012             public AddressBook parsePartialFrom(com.google.protobuf.CodedInputStream input,
    2013                     com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    2014                     throws com.google.protobuf.InvalidProtocolBufferException {
    2015                 return new AddressBook(input, extensionRegistry);
    2016             }
    2017         };
    2018
    2019         @java.lang.Override
    2020         public com.google.protobuf.Parser<AddressBook> getParserForType() {
    2021             return PARSER;
    2022         }
    2023
    2024         // repeated .tutorial.Person person = 1;
    2025         public static final int PERSON_FIELD_NUMBER = 1;
    2026
    2027         private java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person> person_;
    2028
    2029         /**
    2030          * <code>repeated .tutorial.Person person = 1;</code>
    2031          */
    2032         public java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person> getPersonList() {
    2033             return person_;
    2034         }
    2035
    2036         /**
    2037          * <code>repeated .tutorial.Person person = 1;</code>
    2038          */
    2039         public java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder> getPersonOrBuilderList() {
    2040             return person_;
    2041         }
    2042
    2043         /**
    2044          * <code>repeated .tutorial.Person person = 1;</code>
    2045          */
    2046         public int getPersonCount() {
    2047             return person_.size();
    2048         }
    2049
    2050         /**
    2051          * <code>repeated .tutorial.Person person = 1;</code>
    2052          */
    2053         public org.apache.mina.generated.protoc.AddressBookProtos.Person getPerson(int index) {
    2054             return person_.get(index);
    2055         }
    2056
    2057         /**
    2058          * <code>repeated .tutorial.Person person = 1;</code>
    2059          */
    2060         public org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder getPersonOrBuilder(int index) {
    2061             return person_.get(index);
    2062         }
    2063
    2064         private void initFields() {
    2065             person_ = java.util.Collections.emptyList();
    2066         }
    2067
    2068         private byte memoizedIsInitialized = -1;
    2069
    2070         public final boolean isInitialized() {
    2071             byte isInitialized = memoizedIsInitialized;
    2072             if (isInitialized != -1)
    2073                 return isInitialized == 1;
    2074
    2075             for (int i = 0; i < getPersonCount(); i++) {
    2076                 if (!getPerson(i).isInitialized()) {
    2077                     memoizedIsInitialized = 0;
    2078                     return false;
    2079                 }
    2080             }
    2081             memoizedIsInitialized = 1;
    2082             return true;
    2083         }
    2084
    2085         public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    2086             getSerializedSize();
    2087             for (int i = 0; i < person_.size(); i++) {
    2088                 output.writeMessage(1, person_.get(i));
    2089             }
    2090             getUnknownFields().writeTo(output);
    2091         }
    2092
    2093         private int memoizedSerializedSize = -1;
    2094
    2095         public int getSerializedSize() {
    2096             int size = memoizedSerializedSize;
    2097             if (size != -1)
    2098                 return size;
    2099
    2100             size = 0;
    2101             for (int i = 0; i < person_.size(); i++) {
    2102                 size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, person_.get(i));
    2103             }
    2104             size += getUnknownFields().getSerializedSize();
    2105             memoizedSerializedSize = size;
    2106             return size;
    2107         }
    2108
    2109         private static final long serialVersionUID = 0L;
    2110
    2111         @java.lang.Override
    2112         protected java.lang.Object writeReplace() throws java.io.ObjectStreamException {
    2113             return super.writeReplace();
    2114         }
    2115
    2116         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(
    2117                 com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException {
    2118             return PARSER.parseFrom(data);
    2119         }
    2120
    2121         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(
    2122                 com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    2123                 throws com.google.protobuf.InvalidProtocolBufferException {
    2124             return PARSER.parseFrom(data, extensionRegistry);
    2125         }
    2126
    2127         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(byte[] data)
    2128                 throws com.google.protobuf.InvalidProtocolBufferException {
    2129             return PARSER.parseFrom(data);
    2130         }
    2131
    2132         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(byte[] data,
    2133                 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    2134                 throws com.google.protobuf.InvalidProtocolBufferException {
    2135             return PARSER.parseFrom(data, extensionRegistry);
    2136         }
    2137
    2138         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(java.io.InputStream input)
    2139                 throws java.io.IOException {
    2140             return PARSER.parseFrom(input);
    2141         }
    2142
    2143         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(
    2144                 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    2145                 throws java.io.IOException {
    2146             return PARSER.parseFrom(input, extensionRegistry);
    2147         }
    2148
    2149         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseDelimitedFrom(
    2150                 java.io.InputStream input) throws java.io.IOException {
    2151             return PARSER.parseDelimitedFrom(input);
    2152         }
    2153
    2154         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseDelimitedFrom(
    2155                 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    2156                 throws java.io.IOException {
    2157             return PARSER.parseDelimitedFrom(input, extensionRegistry);
    2158         }
    2159
    2160         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(
    2161                 com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    2162             return PARSER.parseFrom(input);
    2163         }
    2164
    2165         public static org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parseFrom(
    2166                 com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
    2167                 throws java.io.IOException {
    2168             return PARSER.parseFrom(input, extensionRegistry);
    2169         }
    2170
    2171         public static Builder newBuilder() {
    2172             return Builder.create();
    2173         }
    2174
    2175         public Builder newBuilderForType() {
    2176             return newBuilder();
    2177         }
    2178
    2179         public static Builder newBuilder(org.apache.mina.generated.protoc.AddressBookProtos.AddressBook prototype) {
    2180             return newBuilder().mergeFrom(prototype);
    2181         }
    2182
    2183         public Builder toBuilder() {
    2184             return newBuilder(this);
    2185         }
    2186
    2187         @java.lang.Override
    2188         protected Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    2189             Builder builder = new Builder(parent);
    2190             return builder;
    2191         }
    2192
    2193         /**
    2194          * Protobuf type {@code tutorial.AddressBook}
    2195          *
    2196          * <pre>
    2197          * Our address book file is just one of these.
    2198          * </pre>
    2199          */
    2200         public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder<Builder> implements
    2201                 org.apache.mina.generated.protoc.AddressBookProtos.AddressBookOrBuilder {
    2202             public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    2203                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_AddressBook_descriptor;
    2204             }
    2205
    2206             protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
    2207                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_AddressBook_fieldAccessorTable
    2208                         .ensureFieldAccessorsInitialized(
    2209                                 org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.class,
    2210                                 org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.Builder.class);
    2211             }
    2212
    2213             // Construct using org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.newBuilder()
    2214             private Builder() {
    2215                 maybeForceBuilderInitialization();
    2216             }
    2217
    2218             private Builder(com.google.protobuf.GeneratedMessage.BuilderParent parent) {
    2219                 super(parent);
    2220                 maybeForceBuilderInitialization();
    2221             }
    2222
    2223             private void maybeForceBuilderInitialization() {
    2224                 if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
    2225                     getPersonFieldBuilder();
    2226                 }
    2227             }
    2228
    2229             private static Builder create() {
    2230                 return new Builder();
    2231             }
    2232
    2233             public Builder clear() {
    2234                 super.clear();
    2235                 if (personBuilder_ == null) {
    2236                     person_ = java.util.Collections.emptyList();
    2237                     bitField0_ = (bitField0_ & ~0x00000001);
    2238                 } else {
    2239                     personBuilder_.clear();
    2240                 }
    2241                 return this;
    2242             }
    2243
    2244             public Builder clone() {
    2245                 return create().mergeFrom(buildPartial());
    2246             }
    2247
    2248             public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
    2249                 return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_AddressBook_descriptor;
    2250             }
    2251
    2252             public org.apache.mina.generated.protoc.AddressBookProtos.AddressBook getDefaultInstanceForType() {
    2253                 return org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.getDefaultInstance();
    2254             }
    2255
    2256             public org.apache.mina.generated.protoc.AddressBookProtos.AddressBook build() {
    2257                 org.apache.mina.generated.protoc.AddressBookProtos.AddressBook result = buildPartial();
    2258                 if (!result.isInitialized()) {
    2259                     throw newUninitializedMessageException(result);
    2260                 }
    2261                 return result;
    2262             }
    2263
    2264             public org.apache.mina.generated.protoc.AddressBookProtos.AddressBook buildPartial() {
    2265                 org.apache.mina.generated.protoc.AddressBookProtos.AddressBook result = new org.apache.mina.generated.protoc.AddressBookProtos.AddressBook(
    2266                         this);
    2267                 int from_bitField0_ = bitField0_;
    2268                 if (personBuilder_ == null) {
    2269                     if (((bitField0_ & 0x00000001) == 0x00000001)) {
    2270                         person_ = java.util.Collections.unmodifiableList(person_);
    2271                         bitField0_ = (bitField0_ & ~0x00000001);
    2272                     }
    2273                     result.person_ = person_;
    2274                 } else {
    2275                     result.person_ = personBuilder_.build();
    2276                 }
    2277                 onBuilt();
    2278                 return result;
    2279             }
    2280
    2281             public Builder mergeFrom(com.google.protobuf.Message other) {
    2282                 if (other instanceof org.apache.mina.generated.protoc.AddressBookProtos.AddressBook) {
    2283                     return mergeFrom((org.apache.mina.generated.protoc.AddressBookProtos.AddressBook) other);
    2284                 } else {
    2285                     super.mergeFrom(other);
    2286                     return this;
    2287                 }
    2288             }
    2289
    2290             public Builder mergeFrom(org.apache.mina.generated.protoc.AddressBookProtos.AddressBook other) {
    2291                 if (other == org.apache.mina.generated.protoc.AddressBookProtos.AddressBook.getDefaultInstance())
    2292                     return this;
    2293                 if (personBuilder_ == null) {
    2294                     if (!other.person_.isEmpty()) {
    2295                         if (person_.isEmpty()) {
    2296                             person_ = other.person_;
    2297                             bitField0_ = (bitField0_ & ~0x00000001);
    2298                         } else {
    2299                             ensurePersonIsMutable();
    2300                             person_.addAll(other.person_);
    2301                         }
    2302                         onChanged();
    2303                     }
    2304                 } else {
    2305                     if (!other.person_.isEmpty()) {
    2306                         if (personBuilder_.isEmpty()) {
    2307                             personBuilder_.dispose();
    2308                             personBuilder_ = null;
    2309                             person_ = other.person_;
    2310                             bitField0_ = (bitField0_ & ~0x00000001);
    2311                             personBuilder_ = com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? getPersonFieldBuilder()
    2312                                     : null;
    2313                         } else {
    2314                             personBuilder_.addAllMessages(other.person_);
    2315                         }
    2316                     }
    2317                 }
    2318                 this.mergeUnknownFields(other.getUnknownFields());
    2319                 return this;
    2320             }
    2321
    2322             public final boolean isInitialized() {
    2323                 for (int i = 0; i < getPersonCount(); i++) {
    2324                     if (!getPerson(i).isInitialized()) {
    2325
    2326                         return false;
    2327                     }
    2328                 }
    2329                 return true;
    2330             }
    2331
    2332             public Builder mergeFrom(com.google.protobuf.CodedInputStream input,
    2333                     com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException {
    2334                 org.apache.mina.generated.protoc.AddressBookProtos.AddressBook parsedMessage = null;
    2335                 try {
    2336                     parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
    2337                 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
    2338                     parsedMessage = (org.apache.mina.generated.protoc.AddressBookProtos.AddressBook) e
    2339                             .getUnfinishedMessage();
    2340                     throw e;
    2341                 } finally {
    2342                     if (parsedMessage != null) {
    2343                         mergeFrom(parsedMessage);
    2344                     }
    2345                 }
    2346                 return this;
    2347             }
    2348
    2349             private int bitField0_;
    2350
    2351             // repeated .tutorial.Person person = 1;
    2352             private java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person> person_ = java.util.Collections
    2353                     .emptyList();
    2354
    2355             private void ensurePersonIsMutable() {
    2356                 if (!((bitField0_ & 0x00000001) == 0x00000001)) {
    2357                     person_ = new java.util.ArrayList<org.apache.mina.generated.protoc.AddressBookProtos.Person>(
    2358                             person_);
    2359                     bitField0_ |= 0x00000001;
    2360                 }
    2361             }
    2362
    2363             private com.google.protobuf.RepeatedFieldBuilder<org.apache.mina.generated.protoc.AddressBookProtos.Person, org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder, org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder> personBuilder_;
    2364
    2365             /**
    2366              * <code>repeated .tutorial.Person person = 1;</code>
    2367              */
    2368             public java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person> getPersonList() {
    2369                 if (personBuilder_ == null) {
    2370                     return java.util.Collections.unmodifiableList(person_);
    2371                 } else {
    2372                     return personBuilder_.getMessageList();
    2373                 }
    2374             }
    2375
    2376             /**
    2377              * <code>repeated .tutorial.Person person = 1;</code>
    2378              */
    2379             public int getPersonCount() {
    2380                 if (personBuilder_ == null) {
    2381                     return person_.size();
    2382                 } else {
    2383                     return personBuilder_.getCount();
    2384                 }
    2385             }
    2386
    2387             /**
    2388              * <code>repeated .tutorial.Person person = 1;</code>
    2389              */
    2390             public org.apache.mina.generated.protoc.AddressBookProtos.Person getPerson(int index) {
    2391                 if (personBuilder_ == null) {
    2392                     return person_.get(index);
    2393                 } else {
    2394                     return personBuilder_.getMessage(index);
    2395                 }
    2396             }
    2397
    2398             /**
    2399              * <code>repeated .tutorial.Person person = 1;</code>
    2400              */
    2401             public Builder setPerson(int index, org.apache.mina.generated.protoc.AddressBookProtos.Person value) {
    2402                 if (personBuilder_ == null) {
    2403                     if (value == null) {
    2404                         throw new NullPointerException();
    2405                     }
    2406                     ensurePersonIsMutable();
    2407                     person_.set(index, value);
    2408                     onChanged();
    2409                 } else {
    2410                     personBuilder_.setMessage(index, value);
    2411                 }
    2412                 return this;
    2413             }
    2414
    2415             /**
    2416              * <code>repeated .tutorial.Person person = 1;</code>
    2417              */
    2418             public Builder setPerson(int index,
    2419                     org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder builderForValue) {
    2420                 if (personBuilder_ == null) {
    2421                     ensurePersonIsMutable();
    2422                     person_.set(index, builderForValue.build());
    2423                     onChanged();
    2424                 } else {
    2425                     personBuilder_.setMessage(index, builderForValue.build());
    2426                 }
    2427                 return this;
    2428             }
    2429
    2430             /**
    2431              * <code>repeated .tutorial.Person person = 1;</code>
    2432              */
    2433             public Builder addPerson(org.apache.mina.generated.protoc.AddressBookProtos.Person value) {
    2434                 if (personBuilder_ == null) {
    2435                     if (value == null) {
    2436                         throw new NullPointerException();
    2437                     }
    2438                     ensurePersonIsMutable();
    2439                     person_.add(value);
    2440                     onChanged();
    2441                 } else {
    2442                     personBuilder_.addMessage(value);
    2443                 }
    2444                 return this;
    2445             }
    2446
    2447             /**
    2448              * <code>repeated .tutorial.Person person = 1;</code>
    2449              */
    2450             public Builder addPerson(int index, org.apache.mina.generated.protoc.AddressBookProtos.Person value) {
    2451                 if (personBuilder_ == null) {
    2452                     if (value == null) {
    2453                         throw new NullPointerException();
    2454                     }
    2455                     ensurePersonIsMutable();
    2456                     person_.add(index, value);
    2457                     onChanged();
    2458                 } else {
    2459                     personBuilder_.addMessage(index, value);
    2460                 }
    2461                 return this;
    2462             }
    2463
    2464             /**
    2465              * <code>repeated .tutorial.Person person = 1;</code>
    2466              */
    2467             public Builder addPerson(org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder builderForValue) {
    2468                 if (personBuilder_ == null) {
    2469                     ensurePersonIsMutable();
    2470                     person_.add(builderForValue.build());
    2471                     onChanged();
    2472                 } else {
    2473                     personBuilder_.addMessage(builderForValue.build());
    2474                 }
    2475                 return this;
    2476             }
    2477
    2478             /**
    2479              * <code>repeated .tutorial.Person person = 1;</code>
    2480              */
    2481             public Builder addPerson(int index,
    2482                     org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder builderForValue) {
    2483                 if (personBuilder_ == null) {
    2484                     ensurePersonIsMutable();
    2485                     person_.add(index, builderForValue.build());
    2486                     onChanged();
    2487                 } else {
    2488                     personBuilder_.addMessage(index, builderForValue.build());
    2489                 }
    2490                 return this;
    2491             }
    2492
    2493             /**
    2494              * <code>repeated .tutorial.Person person = 1;</code>
    2495              */
    2496             public Builder addAllPerson(
    2497                     java.lang.Iterable<? extends org.apache.mina.generated.protoc.AddressBookProtos.Person> values) {
    2498                 if (personBuilder_ == null) {
    2499                     ensurePersonIsMutable();
    2500                     super.addAll(values, person_);
    2501                     onChanged();
    2502                 } else {
    2503                     personBuilder_.addAllMessages(values);
    2504                 }
    2505                 return this;
    2506             }
    2507
    2508             /**
    2509              * <code>repeated .tutorial.Person person = 1;</code>
    2510              */
    2511             public Builder clearPerson() {
    2512                 if (personBuilder_ == null) {
    2513                     person_ = java.util.Collections.emptyList();
    2514                     bitField0_ = (bitField0_ & ~0x00000001);
    2515                     onChanged();
    2516                 } else {
    2517                     personBuilder_.clear();
    2518                 }
    2519                 return this;
    2520             }
    2521
    2522             /**
    2523              * <code>repeated .tutorial.Person person = 1;</code>
    2524              */
    2525             public Builder removePerson(int index) {
    2526                 if (personBuilder_ == null) {
    2527                     ensurePersonIsMutable();
    2528                     person_.remove(index);
    2529                     onChanged();
    2530                 } else {
    2531                     personBuilder_.remove(index);
    2532                 }
    2533                 return this;
    2534             }
    2535
    2536             /**
    2537              * <code>repeated .tutorial.Person person = 1;</code>
    2538              */
    2539             public org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder getPersonBuilder(int index) {
    2540                 return getPersonFieldBuilder().getBuilder(index);
    2541             }
    2542
    2543             /**
    2544              * <code>repeated .tutorial.Person person = 1;</code>
    2545              */
    2546             public org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder getPersonOrBuilder(int index) {
    2547                 if (personBuilder_ == null) {
    2548                     return person_.get(index);
    2549                 } else {
    2550                     return personBuilder_.getMessageOrBuilder(index);
    2551                 }
    2552             }
    2553
    2554             /**
    2555              * <code>repeated .tutorial.Person person = 1;</code>
    2556              */
    2557             public java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder> getPersonOrBuilderList() {
    2558                 if (personBuilder_ != null) {
    2559                     return personBuilder_.getMessageOrBuilderList();
    2560                 } else {
    2561                     return java.util.Collections.unmodifiableList(person_);
    2562                 }
    2563             }
    2564
    2565             /**
    2566              * <code>repeated .tutorial.Person person = 1;</code>
    2567              */
    2568             public org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder addPersonBuilder() {
    2569                 return getPersonFieldBuilder().addBuilder(
    2570                         org.apache.mina.generated.protoc.AddressBookProtos.Person.getDefaultInstance());
    2571             }
    2572
    2573             /**
    2574              * <code>repeated .tutorial.Person person = 1;</code>
    2575              */
    2576             public org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder addPersonBuilder(int index) {
    2577                 return getPersonFieldBuilder().addBuilder(index,
    2578                         org.apache.mina.generated.protoc.AddressBookProtos.Person.getDefaultInstance());
    2579             }
    2580
    2581             /**
    2582              * <code>repeated .tutorial.Person person = 1;</code>
    2583              */
    2584             public java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder> getPersonBuilderList() {
    2585                 return getPersonFieldBuilder().getBuilderList();
    2586             }
    2587
    2588             private com.google.protobuf.RepeatedFieldBuilder<org.apache.mina.generated.protoc.AddressBookProtos.Person, org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder, org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder> getPersonFieldBuilder() {
    2589                 if (personBuilder_ == null) {
    2590                     personBuilder_ = new com.google.protobuf.RepeatedFieldBuilder<org.apache.mina.generated.protoc.AddressBookProtos.Person, org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder, org.apache.mina.generated.protoc.AddressBookProtos.PersonOrBuilder>(
    2591                             person_, ((bitField0_ & 0x00000001) == 0x00000001), getParentForChildren(), isClean());
    2592                     person_ = null;
    2593                 }
    2594                 return personBuilder_;
    2595             }
    2596
    2597             // @@protoc_insertion_point(builder_scope:tutorial.AddressBook)
    2598         }
    2599
    2600         static {
    2601             defaultInstance = new AddressBook(true);
    2602             defaultInstance.initFields();
    2603         }
    2604
    2605         // @@protoc_insertion_point(class_scope:tutorial.AddressBook)
    2606     }
    2607
    2608     private static com.google.protobuf.Descriptors.Descriptor internal_static_tutorial_Person_descriptor;
    2609
    2610     private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tutorial_Person_fieldAccessorTable;
    2611
    2612     private static com.google.protobuf.Descriptors.Descriptor internal_static_tutorial_Person_PhoneNumber_descriptor;
    2613
    2614     private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tutorial_Person_PhoneNumber_fieldAccessorTable;
    2615
    2616     private static com.google.protobuf.Descriptors.Descriptor internal_static_tutorial_AddressBook_descriptor;
    2617
    2618     private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_tutorial_AddressBook_fieldAccessorTable;
    2619
    2620     public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
    2621         return descriptor;
    2622     }
    2623
    2624     private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
    2625     static {
    2626         java.lang.String[] descriptorData = { "\n#src/test/protobuf/addressbook.proto\022\010t"
    2627                 + "utorial\"\332\001\n\006Person\022\014\n\004name\030\001 \002(\t\022\n\n\002id\030\002"
    2628                 + " \002(\005\022\r\n\005email\030\003 \001(\t\022+\n\005phone\030\004 \003(\0132\034.tut"
    2629                 + "orial.Person.PhoneNumber\032M\n\013PhoneNumber\022"
    2630                 + "\016\n\006number\030\001 \002(\t\022.\n\004type\030\002 \001(\0162\032.tutorial"
    2631                 + ".Person.PhoneType:\004HOME\"+\n\tPhoneType\022\n\n\006"
    2632                 + "MOBILE\020\000\022\010\n\004HOME\020\001\022\010\n\004WORK\020\002\"/\n\013AddressB"
    2633                 + "ook\022 \n\006person\030\001 \003(\0132\020.tutorial.PersonB5\n"
    2634                 + " org.apache.mina.generated.protocB\021Addre" + "ssBookProtos" };
    2635         com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
    2636             public com.google.protobuf.ExtensionRegistry assignDescriptors(
    2637                     com.google.protobuf.Descriptors.FileDescriptor root) {
    2638                 descriptor = root;
    2639                 internal_static_tutorial_Person_descriptor = getDescriptor().getMessageTypes().get(0);
    2640                 internal_static_tutorial_Person_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    2641                         internal_static_tutorial_Person_descriptor, new java.lang.String[] { "Name", "Id", "Email",
    2642                                 "Phone", });
    2643                 internal_static_tutorial_Person_PhoneNumber_descriptor = internal_static_tutorial_Person_descriptor
    2644                         .getNestedTypes().get(0);
    2645                 internal_static_tutorial_Person_PhoneNumber_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    2646                         internal_static_tutorial_Person_PhoneNumber_descriptor, new java.lang.String[] { "Number",
    2647                                 "Type", });
    2648                 internal_static_tutorial_AddressBook_descriptor = getDescriptor().getMessageTypes().get(1);
    2649                 internal_static_tutorial_AddressBook_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable(
    2650                         internal_static_tutorial_AddressBook_descriptor, new java.lang.String[] { "Person", });
    2651                 return null;
    2652             }
    2653         };
    2654         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(descriptorData,
    2655                 new com.google.protobuf.Descriptors.FileDescriptor[] {}, assigner);
    2656     }
    2657
    2658     // @@protoc_insertion_point(outer_class_scope)
    2659 }