00001
00002
00003 package de.aitools.aq.invertedindex.usage;
00004
00005 public final class MyProtobufObject {
00006 private MyProtobufObject() {}
00007 public static void registerAllExtensions(
00008 com.google.protobuf.ExtensionRegistry registry) {
00009 }
00010 public static final class Person extends
00011 com.google.protobuf.GeneratedMessage {
00012
00013 private Person() {}
00014
00015 private static final Person defaultInstance = new Person();
00016 public static Person getDefaultInstance() {
00017 return defaultInstance;
00018 }
00019
00020 public Person getDefaultInstanceForType() {
00021 return defaultInstance;
00022 }
00023
00024 public static final com.google.protobuf.Descriptors.Descriptor
00025 getDescriptor() {
00026 return de.aitools.aq.invertedindex.usage.MyProtobufObject.internal_static_Person_descriptor;
00027 }
00028
00029 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
00030 internalGetFieldAccessorTable() {
00031 return de.aitools.aq.invertedindex.usage.MyProtobufObject.internal_static_Person_fieldAccessorTable;
00032 }
00033
00034
00035 public static final int ID_FIELD_NUMBER = 1;
00036 private boolean hasId;
00037 private int id_ = 0;
00038 public boolean hasId() { return hasId; }
00039 public int getId() { return id_; }
00040
00041
00042 public static final int NAME_FIELD_NUMBER = 2;
00043 private boolean hasName;
00044 private java.lang.String name_ = "";
00045 public boolean hasName() { return hasName; }
00046 public java.lang.String getName() { return name_; }
00047
00048
00049 public static final int EMAIL_FIELD_NUMBER = 3;
00050 private boolean hasEmail;
00051 private java.lang.String email_ = "";
00052 public boolean hasEmail() { return hasEmail; }
00053 public java.lang.String getEmail() { return email_; }
00054
00055 public final boolean isInitialized() {
00056 if (!hasId) return false;
00057 if (!hasName) return false;
00058 return true;
00059 }
00060
00061 public void writeTo(com.google.protobuf.CodedOutputStream output)
00062 throws java.io.IOException {
00063 if (hasId()) {
00064 output.writeInt32(1, getId());
00065 }
00066 if (hasName()) {
00067 output.writeString(2, getName());
00068 }
00069 if (hasEmail()) {
00070 output.writeString(3, getEmail());
00071 }
00072 getUnknownFields().writeTo(output);
00073 }
00074
00075 private int memoizedSerializedSize = -1;
00076 public int getSerializedSize() {
00077 int size = memoizedSerializedSize;
00078 if (size != -1) return size;
00079
00080 size = 0;
00081 if (hasId()) {
00082 size += com.google.protobuf.CodedOutputStream
00083 .computeInt32Size(1, getId());
00084 }
00085 if (hasName()) {
00086 size += com.google.protobuf.CodedOutputStream
00087 .computeStringSize(2, getName());
00088 }
00089 if (hasEmail()) {
00090 size += com.google.protobuf.CodedOutputStream
00091 .computeStringSize(3, getEmail());
00092 }
00093 size += getUnknownFields().getSerializedSize();
00094 memoizedSerializedSize = size;
00095 return size;
00096 }
00097
00098 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(
00099 com.google.protobuf.ByteString data)
00100 throws com.google.protobuf.InvalidProtocolBufferException {
00101 return newBuilder().mergeFrom(data).buildParsed();
00102 }
00103 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(
00104 com.google.protobuf.ByteString data,
00105 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
00106 throws com.google.protobuf.InvalidProtocolBufferException {
00107 return newBuilder().mergeFrom(data, extensionRegistry)
00108 .buildParsed();
00109 }
00110 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(byte[] data)
00111 throws com.google.protobuf.InvalidProtocolBufferException {
00112 return newBuilder().mergeFrom(data).buildParsed();
00113 }
00114 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(
00115 byte[] data,
00116 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
00117 throws com.google.protobuf.InvalidProtocolBufferException {
00118 return newBuilder().mergeFrom(data, extensionRegistry)
00119 .buildParsed();
00120 }
00121 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(java.io.InputStream input)
00122 throws java.io.IOException {
00123 return newBuilder().mergeFrom(input).buildParsed();
00124 }
00125 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(
00126 java.io.InputStream input,
00127 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
00128 throws java.io.IOException {
00129 return newBuilder().mergeFrom(input, extensionRegistry)
00130 .buildParsed();
00131 }
00132 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseDelimitedFrom(java.io.InputStream input)
00133 throws java.io.IOException {
00134 return newBuilder().mergeDelimitedFrom(input).buildParsed();
00135 }
00136 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseDelimitedFrom(
00137 java.io.InputStream input,
00138 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
00139 throws java.io.IOException {
00140 return newBuilder().mergeDelimitedFrom(input, extensionRegistry)
00141 .buildParsed();
00142 }
00143 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(
00144 com.google.protobuf.CodedInputStream input)
00145 throws java.io.IOException {
00146 return newBuilder().mergeFrom(input).buildParsed();
00147 }
00148 public static de.aitools.aq.invertedindex.usage.MyProtobufObject.Person parseFrom(
00149 com.google.protobuf.CodedInputStream input,
00150 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
00151 throws java.io.IOException {
00152 return newBuilder().mergeFrom(input, extensionRegistry)
00153 .buildParsed();
00154 }
00155
00156 public static Builder newBuilder() { return Builder.create(); }
00157 public Builder newBuilderForType() { return newBuilder(); }
00158 public static Builder newBuilder(de.aitools.aq.invertedindex.usage.MyProtobufObject.Person prototype) {
00159 return newBuilder().mergeFrom(prototype);
00160 }
00161 public Builder toBuilder() { return newBuilder(this); }
00162
00163 public static final class Builder extends
00164 com.google.protobuf.GeneratedMessage.Builder<Builder> {
00165 private de.aitools.aq.invertedindex.usage.MyProtobufObject.Person result;
00166
00167
00168 private Builder() {}
00169
00170 private static Builder create() {
00171 Builder builder = new Builder();
00172 builder.result = new de.aitools.aq.invertedindex.usage.MyProtobufObject.Person();
00173 return builder;
00174 }
00175
00176 protected de.aitools.aq.invertedindex.usage.MyProtobufObject.Person internalGetResult() {
00177 return result;
00178 }
00179
00180 public Builder clear() {
00181 if (result == null) {
00182 throw new IllegalStateException(
00183 "Cannot call clear() after build().");
00184 }
00185 result = new de.aitools.aq.invertedindex.usage.MyProtobufObject.Person();
00186 return this;
00187 }
00188
00189 public Builder clone() {
00190 return create().mergeFrom(result);
00191 }
00192
00193 public com.google.protobuf.Descriptors.Descriptor
00194 getDescriptorForType() {
00195 return de.aitools.aq.invertedindex.usage.MyProtobufObject.Person.getDescriptor();
00196 }
00197
00198 public de.aitools.aq.invertedindex.usage.MyProtobufObject.Person getDefaultInstanceForType() {
00199 return de.aitools.aq.invertedindex.usage.MyProtobufObject.Person.getDefaultInstance();
00200 }
00201
00202 public boolean isInitialized() {
00203 return result.isInitialized();
00204 }
00205 public de.aitools.aq.invertedindex.usage.MyProtobufObject.Person build() {
00206 if (result != null && !isInitialized()) {
00207 throw newUninitializedMessageException(result);
00208 }
00209 return buildPartial();
00210 }
00211
00212 private de.aitools.aq.invertedindex.usage.MyProtobufObject.Person buildParsed()
00213 throws com.google.protobuf.InvalidProtocolBufferException {
00214 if (!isInitialized()) {
00215 throw newUninitializedMessageException(
00216 result).asInvalidProtocolBufferException();
00217 }
00218 return buildPartial();
00219 }
00220
00221 public de.aitools.aq.invertedindex.usage.MyProtobufObject.Person buildPartial() {
00222 if (result == null) {
00223 throw new IllegalStateException(
00224 "build() has already been called on this Builder.");
00225 }
00226 de.aitools.aq.invertedindex.usage.MyProtobufObject.Person returnMe = result;
00227 result = null;
00228 return returnMe;
00229 }
00230
00231 public Builder mergeFrom(com.google.protobuf.Message other) {
00232 if (other instanceof de.aitools.aq.invertedindex.usage.MyProtobufObject.Person) {
00233 return mergeFrom((de.aitools.aq.invertedindex.usage.MyProtobufObject.Person)other);
00234 } else {
00235 super.mergeFrom(other);
00236 return this;
00237 }
00238 }
00239
00240 public Builder mergeFrom(de.aitools.aq.invertedindex.usage.MyProtobufObject.Person other) {
00241 if (other == de.aitools.aq.invertedindex.usage.MyProtobufObject.Person.getDefaultInstance()) return this;
00242 if (other.hasId()) {
00243 setId(other.getId());
00244 }
00245 if (other.hasName()) {
00246 setName(other.getName());
00247 }
00248 if (other.hasEmail()) {
00249 setEmail(other.getEmail());
00250 }
00251 this.mergeUnknownFields(other.getUnknownFields());
00252 return this;
00253 }
00254
00255 public Builder mergeFrom(
00256 com.google.protobuf.CodedInputStream input,
00257 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
00258 throws java.io.IOException {
00259 com.google.protobuf.UnknownFieldSet.Builder unknownFields =
00260 com.google.protobuf.UnknownFieldSet.newBuilder(
00261 this.getUnknownFields());
00262 while (true) {
00263 int tag = input.readTag();
00264 switch (tag) {
00265 case 0:
00266 this.setUnknownFields(unknownFields.build());
00267 return this;
00268 default: {
00269 if (!parseUnknownField(input, unknownFields,
00270 extensionRegistry, tag)) {
00271 this.setUnknownFields(unknownFields.build());
00272 return this;
00273 }
00274 break;
00275 }
00276 case 8: {
00277 setId(input.readInt32());
00278 break;
00279 }
00280 case 18: {
00281 setName(input.readString());
00282 break;
00283 }
00284 case 26: {
00285 setEmail(input.readString());
00286 break;
00287 }
00288 }
00289 }
00290 }
00291
00292
00293
00294 public boolean hasId() {
00295 return result.hasId();
00296 }
00297 public int getId() {
00298 return result.getId();
00299 }
00300 public Builder setId(int value) {
00301 result.hasId = true;
00302 result.id_ = value;
00303 return this;
00304 }
00305 public Builder clearId() {
00306 result.hasId = false;
00307 result.id_ = 0;
00308 return this;
00309 }
00310
00311
00312 public boolean hasName() {
00313 return result.hasName();
00314 }
00315 public java.lang.String getName() {
00316 return result.getName();
00317 }
00318 public Builder setName(java.lang.String value) {
00319 if (value == null) {
00320 throw new NullPointerException();
00321 }
00322 result.hasName = true;
00323 result.name_ = value;
00324 return this;
00325 }
00326 public Builder clearName() {
00327 result.hasName = false;
00328 result.name_ = getDefaultInstance().getName();
00329 return this;
00330 }
00331
00332
00333 public boolean hasEmail() {
00334 return result.hasEmail();
00335 }
00336 public java.lang.String getEmail() {
00337 return result.getEmail();
00338 }
00339 public Builder setEmail(java.lang.String value) {
00340 if (value == null) {
00341 throw new NullPointerException();
00342 }
00343 result.hasEmail = true;
00344 result.email_ = value;
00345 return this;
00346 }
00347 public Builder clearEmail() {
00348 result.hasEmail = false;
00349 result.email_ = getDefaultInstance().getEmail();
00350 return this;
00351 }
00352 }
00353
00354 static {
00355 de.aitools.aq.invertedindex.usage.MyProtobufObject.getDescriptor();
00356 }
00357
00358 static {
00359 de.aitools.aq.invertedindex.usage.MyProtobufObject.internalForceInit();
00360 }
00361 }
00362
00363 private static com.google.protobuf.Descriptors.Descriptor
00364 internal_static_Person_descriptor;
00365 private static
00366 com.google.protobuf.GeneratedMessage.FieldAccessorTable
00367 internal_static_Person_fieldAccessorTable;
00368
00369 public static com.google.protobuf.Descriptors.FileDescriptor
00370 getDescriptor() {
00371 return descriptor;
00372 }
00373 private static com.google.protobuf.Descriptors.FileDescriptor
00374 descriptor;
00375 static {
00376 java.lang.String[] descriptorData = {
00377 "\n\026MyProtobufObject.proto\"1\n\006Person\022\n\n\002id" +
00378 "\030\001 \002(\005\022\014\n\004name\030\002 \002(\t\022\r\n\005email\030\003 \001(\tB#\n!d" +
00379 "e.aitools.aq.invertedindex.usage"
00380 };
00381 com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
00382 new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
00383 public com.google.protobuf.ExtensionRegistry assignDescriptors(
00384 com.google.protobuf.Descriptors.FileDescriptor root) {
00385 descriptor = root;
00386 internal_static_Person_descriptor =
00387 getDescriptor().getMessageTypes().get(0);
00388 internal_static_Person_fieldAccessorTable = new
00389 com.google.protobuf.GeneratedMessage.FieldAccessorTable(
00390 internal_static_Person_descriptor,
00391 new java.lang.String[] { "Id", "Name", "Email", },
00392 de.aitools.aq.invertedindex.usage.MyProtobufObject.Person.class,
00393 de.aitools.aq.invertedindex.usage.MyProtobufObject.Person.Builder.class);
00394 return null;
00395 }
00396 };
00397 com.google.protobuf.Descriptors.FileDescriptor
00398 .internalBuildGeneratedFileFrom(descriptorData,
00399 new com.google.protobuf.Descriptors.FileDescriptor[] {
00400 }, assigner);
00401 }
00402
00403 public static void internalForceInit() {}
00404 }