/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/test/protobuf/addressbook.proto
package org.apache.mina.generated.protoc;
public final class AddressBookProtos {
private AddressBookProtos() {
}
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
}
public interface PersonOrBuilder extends com.google.protobuf.MessageOrBuilder {
// required string name = 1;
/**
* <code>required string name = 1;</code>
*/
boolean hasName();
/**
* <code>required string name = 1;</code>
*/
java.lang.String getName();
/**
* <code>required string name = 1;</code>
*/
com.google.protobuf.ByteString getNameBytes();
// required int32 id = 2;
/**
* <code>required int32 id = 2;</code>
*
* <pre>
* Unique ID number for this person.
* </pre>
*/
boolean hasId();
/**
* <code>required int32 id = 2;</code>
*
* <pre>
* Unique ID number for this person.
* </pre>
*/
int getId();
// optional string email = 3;
/**
* <code>optional string email = 3;</code>
*/
boolean hasEmail();
/**
* <code>optional string email = 3;</code>
*/
java.lang.String getEmail();
/**
* <code>optional string email = 3;</code>
*/
com.google.protobuf.ByteString getEmailBytes();
// repeated .tutorial.Person.PhoneNumber phone = 4;
/**
* <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
*/
java.util.List<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber> getPhoneList();
/**
* <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
*/
org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber getPhone(int index);
/**
* <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
*/
int getPhoneCount();
/**
* <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
*/
java.util.List<? extends org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder> getPhoneOrBuilderList();
/**
* <code>repeated .tutorial.Person.PhoneNumber phone = 4;</code>
*/
org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumberOrBuilder getPhoneOrBuilder(int index);
}
/**
* Protobuf type {@code tutorial.Person}
*/
public static final class Person extends com.google.protobuf.GeneratedMessage implements PersonOrBuilder {
// Use Person.newBuilder() to construct.
private Person(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
this.unknownFields = builder.getUnknownFields();
}
private Person(boolean noInit) {
this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private static final Person defaultInstance;
public static Person getDefaultInstance() {
return defaultInstance;
}
public Person getDefaultInstanceForType() {
return defaultInstance;
}
private final com.google.protobuf.UnknownFieldSet unknownFields;
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
return this.unknownFields;
}
private Person(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
initFields();
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet
.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 10: {
bitField0_ |= 0x00000001;
name_ = input.readBytes();
break;
}
case 16: {
bitField0_ |= 0x00000002;
id_ = input.readInt32();
break;
}
case 26: {
bitField0_ |= 0x00000004;
email_ = input.readBytes();
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
phone_ = new java.util.ArrayList<org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber>();
mutable_bitField0_ |= 0x00000008;
}
phone_.add(input.readMessage(
org.apache.mina.generated.protoc.AddressBookProtos.Person.PhoneNumber.PARSER,
extensionRegistry));
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e.getMessage()).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
phone_ = java.util.Collections.unmodifiableList(phone_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_descriptor;
}
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() {
return org.apache.mina.generated.protoc.AddressBookProtos.internal_static_tutorial_Person_fieldAccessorTable
.ensureFieldAccessorsInitialized(org.apache.mina.generated.protoc.AddressBookProtos.Person.class,
org.apache.mina.generated.protoc.AddressBookProtos.Person.Builder.class);
}
public static com.google.protobuf.Parser<Person> PARSER = new com.g
评论0