// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: src/test/resources/Person.proto
package org.apache.niolex.commons.seri;
public final class Proto3 {
private Proto3() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code PhoneType}
*/
public enum PhoneType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* <code>MOBILE = 0;</code>
*/
MOBILE(0),
/**
* <code>HOME = 1;</code>
*/
HOME(1),
/**
* <code>WORK = 2;</code>
*/
WORK(2),
UNRECOGNIZED(-1),
;
/**
* <code>MOBILE = 0;</code>
*/
public static final int MOBILE_VALUE = 0;
/**
* <code>HOME = 1;</code>
*/
public static final int HOME_VALUE = 1;
/**
* <code>WORK = 2;</code>
*/
public static final int WORK_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static PhoneType valueOf(int value) {
return forNumber(value);
}
public static PhoneType forNumber(int value) {
switch (value) {
case 0: return MOBILE;
case 1: return HOME;
case 2: return WORK;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap<PhoneType>
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
PhoneType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<PhoneType>() {
public PhoneType findValueByNumber(int number) {
return PhoneType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return org.apache.niolex.commons.seri.Proto3.getDescriptor().getEnumTypes().get(0);
}
private static final PhoneType[] VALUES = values();
public static PhoneType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private PhoneType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:PhoneType)
}
public interface PersonOrBuilder extends
// @@protoc_insertion_point(interface_extends:Person)
com.google.protobuf.MessageOrBuilder {
/**
* <code>optional int32 id = 1;</code>
*/
int getId();
/**
* <code>optional string name = 2;</code>
*/
java.lang.String getName();
/**
* <code>optional string name = 2;</code>
*/
com.google.protobuf.ByteString
getNameBytes();
/**
* <code>optional string email = 3;</code>
*/
java.lang.String getEmail();
/**
* <code>optional string email = 3;</code>
*/
com.google.protobuf.ByteString
getEmailBytes();
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
java.util.List<org.apache.niolex.commons.seri.Proto3.PhoneNumber>
getPhoneList();
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
org.apache.niolex.commons.seri.Proto3.PhoneNumber getPhone(int index);
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
int getPhoneCount();
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
java.util.List<? extends org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder>
getPhoneOrBuilderList();
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder getPhoneOrBuilder(
int index);
}
/**
* Protobuf type {@code Person}
*/
public static final class Person extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:Person)
PersonOrBuilder {
// Use Person.newBuilder() to construct.
private Person(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private Person() {
id_ = 0;
name_ = "";
email_ = "";
phone_ = java.util.Collections.emptyList();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private Person(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
int mutable_bitField0_ = 0;
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 8: {
id_ = input.readInt32();
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
email_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
phone_ = new java.util.ArrayList<org.apache.niolex.commons.seri.Proto3.PhoneNumber>();
mutable_bitField0_ |= 0x00000008;
}
phone_.add(
input.readMessage(org.apache.niolex.commons.seri.Proto3.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).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
phone_ = java.util.Collections.unmodifiableList(phone_);
}
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.niolex.commons.seri.Proto3.internal_static_Person_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.niolex.commons.seri.Proto3.internal_static_Person_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.niolex.commons.seri.Proto3.Person.class, org.apache.niolex.commons.seri.Proto3.Person.Builder.class);
}
@SuppressWarnings("unused")
private int bitField0_;
public static final int ID_FIELD_NUMBER = 1;
private int id_;
/**
* <code>optional int32 id = 1;</code>
*/
public int getId() {
return id_;
}
public static final int NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object name_;
/**
* <code>optional string name = 2;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
* <code>optional string name = 2;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EMAIL_FIELD_NUMBER = 3;
private volatile java.lang.Object email_;
/**
* <code>optional string email = 3;</code>
*/
public java.lang.String getEmail() {
java.lang.Object ref = email_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
email_ = s;
return s;
}
}
/**
* <code>optional string email = 3;</code>
*/
public com.google.protobuf.ByteString
getEmailBytes() {
java.lang.Object ref = email_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
email_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PHONE_FIELD_NUMBER = 4;
private java.util.List<org.apache.niolex.commons.seri.Proto3.PhoneNumber> phone_;
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public java.util.List<org.apache.niolex.commons.seri.Proto3.PhoneNumber> getPhoneList() {
return phone_;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public java.util.List<? extends org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder>
getPhoneOrBuilderList() {
return phone_;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public int getPhoneCount() {
return phone_.size();
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumber getPhone(int index) {
return phone_.get(index);
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder getPhoneOrBuilder(
int index) {
return phone_.get(index);
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (id_ != 0) {
output.writeInt32(1, id_);
}
if (!getNameBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (!getEmailBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_);
}
for (int i = 0; i < phone_.size(); i++) {
output.writeMessage(4, phone_.get(i));
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (id_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(1, id_);
}
if (!getNameBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (!getEmailBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_);
}
for (int i = 0; i < phone_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, phone_.get(i));
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.apache.niolex.commons.seri.Proto3.Person)) {
return super.equals(obj);
}
org.apache.niolex.commons.seri.Proto3.Person other = (org.apache.niolex.commons.seri.Proto3.Person) obj;
boolean result = true;
result = result && (getId()
== other.getId());
result = result && getName()
.equals(other.getName());
result = result && getEmail()
.equals(other.getEmail());
result = result && getPhoneList()
.equals(other.getPhoneList());
return result;
}
@SuppressWarnings("unchecked")
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + EMAIL_FIELD_NUMBER;
hash = (53 * hash) + getEmail().hashCode();
if (getPhoneCount() > 0) {
hash = (37 * hash) + PHONE_FIELD_NUMBER;
hash = (53 * hash) + getPhoneList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.niolex.commons.seri.Proto3.Person parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.niolex.commons.seri.Proto3.Person prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code Person}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:Person)
org.apache.niolex.commons.seri.Proto3.PersonOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.niolex.commons.seri.Proto3.internal_static_Person_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.niolex.commons.seri.Proto3.internal_static_Person_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.niolex.commons.seri.Proto3.Person.class, org.apache.niolex.commons.seri.Proto3.Person.Builder.class);
}
// Construct using org.apache.niolex.commons.seri.Proto3.Person.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getPhoneFieldBuilder();
}
}
public Builder clear() {
super.clear();
id_ = 0;
name_ = "";
email_ = "";
if (phoneBuilder_ == null) {
phone_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
phoneBuilder_.clear();
}
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.niolex.commons.seri.Proto3.internal_static_Person_descriptor;
}
public org.apache.niolex.commons.seri.Proto3.Person getDefaultInstanceForType() {
return org.apache.niolex.commons.seri.Proto3.Person.getDefaultInstance();
}
public org.apache.niolex.commons.seri.Proto3.Person build() {
org.apache.niolex.commons.seri.Proto3.Person result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.apache.niolex.commons.seri.Proto3.Person buildPartial() {
org.apache.niolex.commons.seri.Proto3.Person result = new org.apache.niolex.commons.seri.Proto3.Person(this);
int to_bitField0_ = 0;
result.id_ = id_;
result.name_ = name_;
result.email_ = email_;
if (phoneBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008)) {
phone_ = java.util.Collections.unmodifiableList(phone_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.phone_ = phone_;
} else {
result.phone_ = phoneBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.niolex.commons.seri.Proto3.Person) {
return mergeFrom((org.apache.niolex.commons.seri.Proto3.Person)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.niolex.commons.seri.Proto3.Person other) {
if (other == org.apache.niolex.commons.seri.Proto3.Person.getDefaultInstance()) return this;
if (other.getId() != 0) {
setId(other.getId());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getEmail().isEmpty()) {
email_ = other.email_;
onChanged();
}
if (phoneBuilder_ == null) {
if (!other.phone_.isEmpty()) {
if (phone_.isEmpty()) {
phone_ = other.phone_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensurePhoneIsMutable();
phone_.addAll(other.phone_);
}
onChanged();
}
} else {
if (!other.phone_.isEmpty()) {
if (phoneBuilder_.isEmpty()) {
phoneBuilder_.dispose();
phoneBuilder_ = null;
phone_ = other.phone_;
bitField0_ = (bitField0_ & ~0x00000008);
phoneBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getPhoneFieldBuilder() : null;
} else {
phoneBuilder_.addAllMessages(other.phone_);
}
}
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.niolex.commons.seri.Proto3.Person parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.niolex.commons.seri.Proto3.Person) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int id_ ;
/**
* <code>optional int32 id = 1;</code>
*/
public int getId() {
return id_;
}
/**
* <code>optional int32 id = 1;</code>
*/
public Builder setId(int value) {
id_ = value;
onChanged();
return this;
}
/**
* <code>optional int32 id = 1;</code>
*/
public Builder clearId() {
id_ = 0;
onChanged();
return this;
}
private java.lang.Object name_ = "";
/**
* <code>optional string name = 2;</code>
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string name = 2;</code>
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string name = 2;</code>
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
* <code>optional string name = 2;</code>
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
* <code>optional string name = 2;</code>
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private java.lang.Object email_ = "";
/**
* <code>optional string email = 3;</code>
*/
public java.lang.String getEmail() {
java.lang.Object ref = email_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
email_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string email = 3;</code>
*/
public com.google.protobuf.ByteString
getEmailBytes() {
java.lang.Object ref = email_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
email_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string email = 3;</code>
*/
public Builder setEmail(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
email_ = value;
onChanged();
return this;
}
/**
* <code>optional string email = 3;</code>
*/
public Builder clearEmail() {
email_ = getDefaultInstance().getEmail();
onChanged();
return this;
}
/**
* <code>optional string email = 3;</code>
*/
public Builder setEmailBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
email_ = value;
onChanged();
return this;
}
private java.util.List<org.apache.niolex.commons.seri.Proto3.PhoneNumber> phone_ =
java.util.Collections.emptyList();
private void ensurePhoneIsMutable() {
if (!((bitField0_ & 0x00000008) == 0x00000008)) {
phone_ = new java.util.ArrayList<org.apache.niolex.commons.seri.Proto3.PhoneNumber>(phone_);
bitField0_ |= 0x00000008;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.apache.niolex.commons.seri.Proto3.PhoneNumber, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder, org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder> phoneBuilder_;
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public java.util.List<org.apache.niolex.commons.seri.Proto3.PhoneNumber> getPhoneList() {
if (phoneBuilder_ == null) {
return java.util.Collections.unmodifiableList(phone_);
} else {
return phoneBuilder_.getMessageList();
}
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public int getPhoneCount() {
if (phoneBuilder_ == null) {
return phone_.size();
} else {
return phoneBuilder_.getCount();
}
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumber getPhone(int index) {
if (phoneBuilder_ == null) {
return phone_.get(index);
} else {
return phoneBuilder_.getMessage(index);
}
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder setPhone(
int index, org.apache.niolex.commons.seri.Proto3.PhoneNumber value) {
if (phoneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePhoneIsMutable();
phone_.set(index, value);
onChanged();
} else {
phoneBuilder_.setMessage(index, value);
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder setPhone(
int index, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder builderForValue) {
if (phoneBuilder_ == null) {
ensurePhoneIsMutable();
phone_.set(index, builderForValue.build());
onChanged();
} else {
phoneBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder addPhone(org.apache.niolex.commons.seri.Proto3.PhoneNumber value) {
if (phoneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePhoneIsMutable();
phone_.add(value);
onChanged();
} else {
phoneBuilder_.addMessage(value);
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder addPhone(
int index, org.apache.niolex.commons.seri.Proto3.PhoneNumber value) {
if (phoneBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensurePhoneIsMutable();
phone_.add(index, value);
onChanged();
} else {
phoneBuilder_.addMessage(index, value);
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder addPhone(
org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder builderForValue) {
if (phoneBuilder_ == null) {
ensurePhoneIsMutable();
phone_.add(builderForValue.build());
onChanged();
} else {
phoneBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder addPhone(
int index, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder builderForValue) {
if (phoneBuilder_ == null) {
ensurePhoneIsMutable();
phone_.add(index, builderForValue.build());
onChanged();
} else {
phoneBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder addAllPhone(
java.lang.Iterable<? extends org.apache.niolex.commons.seri.Proto3.PhoneNumber> values) {
if (phoneBuilder_ == null) {
ensurePhoneIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, phone_);
onChanged();
} else {
phoneBuilder_.addAllMessages(values);
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder clearPhone() {
if (phoneBuilder_ == null) {
phone_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
} else {
phoneBuilder_.clear();
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public Builder removePhone(int index) {
if (phoneBuilder_ == null) {
ensurePhoneIsMutable();
phone_.remove(index);
onChanged();
} else {
phoneBuilder_.remove(index);
}
return this;
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder getPhoneBuilder(
int index) {
return getPhoneFieldBuilder().getBuilder(index);
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder getPhoneOrBuilder(
int index) {
if (phoneBuilder_ == null) {
return phone_.get(index); } else {
return phoneBuilder_.getMessageOrBuilder(index);
}
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public java.util.List<? extends org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder>
getPhoneOrBuilderList() {
if (phoneBuilder_ != null) {
return phoneBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(phone_);
}
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder addPhoneBuilder() {
return getPhoneFieldBuilder().addBuilder(
org.apache.niolex.commons.seri.Proto3.PhoneNumber.getDefaultInstance());
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder addPhoneBuilder(
int index) {
return getPhoneFieldBuilder().addBuilder(
index, org.apache.niolex.commons.seri.Proto3.PhoneNumber.getDefaultInstance());
}
/**
* <code>repeated .PhoneNumber phone = 4;</code>
*/
public java.util.List<org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder>
getPhoneBuilderList() {
return getPhoneFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
org.apache.niolex.commons.seri.Proto3.PhoneNumber, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder, org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder>
getPhoneFieldBuilder() {
if (phoneBuilder_ == null) {
phoneBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.apache.niolex.commons.seri.Proto3.PhoneNumber, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder, org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder>(
phone_,
((bitField0_ & 0x00000008) == 0x00000008),
getParentForChildren(),
isClean());
phone_ = null;
}
return phoneBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:Person)
}
// @@protoc_insertion_point(class_scope:Person)
private static final org.apache.niolex.commons.seri.Proto3.Person DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.niolex.commons.seri.Proto3.Person();
}
public static org.apache.niolex.commons.seri.Proto3.Person getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<Person>
PARSER = new com.google.protobuf.AbstractParser<Person>() {
public Person parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Person(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<Person> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<Person> getParserForType() {
return PARSER;
}
public org.apache.niolex.commons.seri.Proto3.Person getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface PhoneNumberOrBuilder extends
// @@protoc_insertion_point(interface_extends:PhoneNumber)
com.google.protobuf.MessageOrBuilder {
/**
* <code>optional string number = 1;</code>
*/
java.lang.String getNumber();
/**
* <code>optional string number = 1;</code>
*/
com.google.protobuf.ByteString
getNumberBytes();
/**
* <code>optional .PhoneType type = 2;</code>
*/
int getTypeValue();
/**
* <code>optional .PhoneType type = 2;</code>
*/
org.apache.niolex.commons.seri.Proto3.PhoneType getType();
}
/**
* Protobuf type {@code PhoneNumber}
*/
public static final class PhoneNumber extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:PhoneNumber)
PhoneNumberOrBuilder {
// Use PhoneNumber.newBuilder() to construct.
private PhoneNumber(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
super(builder);
}
private PhoneNumber() {
number_ = "";
type_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
}
private PhoneNumber(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!input.skipField(tag)) {
done = true;
}
break;
}
case 10: {
java.lang.String s = input.readStringRequireUtf8();
number_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
type_ = rawValue;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.niolex.commons.seri.Proto3.internal_static_PhoneNumber_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.niolex.commons.seri.Proto3.internal_static_PhoneNumber_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.niolex.commons.seri.Proto3.PhoneNumber.class, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder.class);
}
public static final int NUMBER_FIELD_NUMBER = 1;
private volatile java.lang.Object number_;
/**
* <code>optional string number = 1;</code>
*/
public java.lang.String getNumber() {
java.lang.Object ref = number_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
number_ = s;
return s;
}
}
/**
* <code>optional string number = 1;</code>
*/
public com.google.protobuf.ByteString
getNumberBytes() {
java.lang.Object ref = number_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
number_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TYPE_FIELD_NUMBER = 2;
private int type_;
/**
* <code>optional .PhoneType type = 2;</code>
*/
public int getTypeValue() {
return type_;
}
/**
* <code>optional .PhoneType type = 2;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneType getType() {
org.apache.niolex.commons.seri.Proto3.PhoneType result = org.apache.niolex.commons.seri.Proto3.PhoneType.valueOf(type_);
return result == null ? org.apache.niolex.commons.seri.Proto3.PhoneType.UNRECOGNIZED : result;
}
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!getNumberBytes().isEmpty()) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, number_);
}
if (type_ != org.apache.niolex.commons.seri.Proto3.PhoneType.MOBILE.getNumber()) {
output.writeEnum(2, type_);
}
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getNumberBytes().isEmpty()) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, number_);
}
if (type_ != org.apache.niolex.commons.seri.Proto3.PhoneType.MOBILE.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, type_);
}
memoizedSize = size;
return size;
}
private static final long serialVersionUID = 0L;
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof org.apache.niolex.commons.seri.Proto3.PhoneNumber)) {
return super.equals(obj);
}
org.apache.niolex.commons.seri.Proto3.PhoneNumber other = (org.apache.niolex.commons.seri.Proto3.PhoneNumber) obj;
boolean result = true;
result = result && getNumber()
.equals(other.getNumber());
result = result && type_ == other.type_;
return result;
}
@SuppressWarnings("unchecked")
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptorForType().hashCode();
hash = (37 * hash) + NUMBER_FIELD_NUMBER;
hash = (53 * hash) + getNumber().hashCode();
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(org.apache.niolex.commons.seri.Proto3.PhoneNumber prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code PhoneNumber}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
// @@protoc_insertion_point(builder_implements:PhoneNumber)
org.apache.niolex.commons.seri.Proto3.PhoneNumberOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return org.apache.niolex.commons.seri.Proto3.internal_static_PhoneNumber_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.niolex.commons.seri.Proto3.internal_static_PhoneNumber_fieldAccessorTable
.ensureFieldAccessorsInitialized(
org.apache.niolex.commons.seri.Proto3.PhoneNumber.class, org.apache.niolex.commons.seri.Proto3.PhoneNumber.Builder.class);
}
// Construct using org.apache.niolex.commons.seri.Proto3.PhoneNumber.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
public Builder clear() {
super.clear();
number_ = "";
type_ = 0;
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return org.apache.niolex.commons.seri.Proto3.internal_static_PhoneNumber_descriptor;
}
public org.apache.niolex.commons.seri.Proto3.PhoneNumber getDefaultInstanceForType() {
return org.apache.niolex.commons.seri.Proto3.PhoneNumber.getDefaultInstance();
}
public org.apache.niolex.commons.seri.Proto3.PhoneNumber build() {
org.apache.niolex.commons.seri.Proto3.PhoneNumber result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public org.apache.niolex.commons.seri.Proto3.PhoneNumber buildPartial() {
org.apache.niolex.commons.seri.Proto3.PhoneNumber result = new org.apache.niolex.commons.seri.Proto3.PhoneNumber(this);
result.number_ = number_;
result.type_ = type_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof org.apache.niolex.commons.seri.Proto3.PhoneNumber) {
return mergeFrom((org.apache.niolex.commons.seri.Proto3.PhoneNumber)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(org.apache.niolex.commons.seri.Proto3.PhoneNumber other) {
if (other == org.apache.niolex.commons.seri.Proto3.PhoneNumber.getDefaultInstance()) return this;
if (!other.getNumber().isEmpty()) {
number_ = other.number_;
onChanged();
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
onChanged();
return this;
}
public final boolean isInitialized() {
return true;
}
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
org.apache.niolex.commons.seri.Proto3.PhoneNumber parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (org.apache.niolex.commons.seri.Proto3.PhoneNumber) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object number_ = "";
/**
* <code>optional string number = 1;</code>
*/
public java.lang.String getNumber() {
java.lang.Object ref = number_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
number_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
* <code>optional string number = 1;</code>
*/
public com.google.protobuf.ByteString
getNumberBytes() {
java.lang.Object ref = number_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
number_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
* <code>optional string number = 1;</code>
*/
public Builder setNumber(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
number_ = value;
onChanged();
return this;
}
/**
* <code>optional string number = 1;</code>
*/
public Builder clearNumber() {
number_ = getDefaultInstance().getNumber();
onChanged();
return this;
}
/**
* <code>optional string number = 1;</code>
*/
public Builder setNumberBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
number_ = value;
onChanged();
return this;
}
private int type_ = 0;
/**
* <code>optional .PhoneType type = 2;</code>
*/
public int getTypeValue() {
return type_;
}
/**
* <code>optional .PhoneType type = 2;</code>
*/
public Builder setTypeValue(int value) {
type_ = value;
onChanged();
return this;
}
/**
* <code>optional .PhoneType type = 2;</code>
*/
public org.apache.niolex.commons.seri.Proto3.PhoneType getType() {
org.apache.niolex.commons.seri.Proto3.PhoneType result = org.apache.niolex.commons.seri.Proto3.PhoneType.valueOf(type_);
return result == null ? org.apache.niolex.commons.seri.Proto3.PhoneType.UNRECOGNIZED : result;
}
/**
* <code>optional .PhoneType type = 2;</code>
*/
public Builder setType(org.apache.niolex.commons.seri.Proto3.PhoneType value) {
if (value == null) {
throw new NullPointerException();
}
type_ = value.getNumber();
onChanged();
return this;
}
/**
* <code>optional .PhoneType type = 2;</code>
*/
public Builder clearType() {
type_ = 0;
onChanged();
return this;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return this;
}
// @@protoc_insertion_point(builder_scope:PhoneNumber)
}
// @@protoc_insertion_point(class_scope:PhoneNumber)
private static final org.apache.niolex.commons.seri.Proto3.PhoneNumber DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new org.apache.niolex.commons.seri.Proto3.PhoneNumber();
}
public static org.apache.niolex.commons.seri.Proto3.PhoneNumber getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser<PhoneNumber>
PARSER = new com.google.protobuf.AbstractParser<PhoneNumber>() {
public PhoneNumber parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PhoneNumber(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser<PhoneNumber> parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser<PhoneNumber> getParserForType() {
return PARSER;
}
public org.apache.niolex.commons.seri.Proto3.PhoneNumber getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_Person_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_Person_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_PhoneNumber_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_PhoneNumber_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n\037src/test/resources/Person.proto\"N\n\006Per" +
"son\022\n\n\002id\030\001 \001(\005\022\014\n\004name\030\002 \001(\t\022\r\n\005email\030\003" +
" \001(\t\022\033\n\005phone\030\004 \003(\0132\014.PhoneNumber\"7\n\013Pho" +
"neNumber\022\016\n\006number\030\001 \001(\t\022\030\n\004type\030\002 \001(\0162\n" +
".PhoneType*+\n\tPhoneType\022\n\n\006MOBILE\020\000\022\010\n\004H" +
"OME\020\001\022\010\n\004WORK\020\002B(\n\036org.apache.niolex.com" +
"mons.seriB\006Proto3b\006proto3"
};
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
public com.google.protobuf.ExtensionRegistry assignDescriptors(
com.google.protobuf.Descriptors.FileDescriptor root) {
descriptor = root;
return null;
}
};
com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
}, assigner);
internal_static_Person_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_Person_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_Person_descriptor,
new java.lang.String[] { "Id", "Name", "Email", "Phone", });
internal_static_PhoneNumber_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_PhoneNumber_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_PhoneNumber_descriptor,
new java.lang.String[] { "Number", "Type", });
}
// @@protoc_insertion_point(outer_class_scope)
}