// Generated by the protocol buffer compiler. DO NOT EDIT! // source: query.proto package muduo.codec.tests; public final class QueryProtos { private QueryProtos() {} public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } public interface QueryOrBuilder extends com.google.protobuf.MessageOrBuilder { // required int64 id = 1; boolean hasId(); long getId(); // required string questioner = 2; boolean hasQuestioner(); String getQuestioner(); // repeated string question = 3; java.util.List getQuestionList(); int getQuestionCount(); String getQuestion(int index); } public static final class Query extends com.google.protobuf.GeneratedMessage implements QueryOrBuilder { // Use Query.newBuilder() to construct. private Query(Builder builder) { super(builder); } private Query(boolean noInit) {} private static final Query defaultInstance; public static Query getDefaultInstance() { return defaultInstance; } public Query getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Query_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Query_fieldAccessorTable; } private int bitField0_; // required int64 id = 1; public static final int ID_FIELD_NUMBER = 1; private long id_; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public long getId() { return id_; } // required string questioner = 2; public static final int QUESTIONER_FIELD_NUMBER = 2; private Object questioner_; public boolean hasQuestioner() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getQuestioner() { Object ref = questioner_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { questioner_ = s; } return s; } } private com.google.protobuf.ByteString getQuestionerBytes() { Object ref = questioner_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); questioner_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // repeated string question = 3; public static final int QUESTION_FIELD_NUMBER = 3; private com.google.protobuf.LazyStringList question_; public java.util.List getQuestionList() { return question_; } public int getQuestionCount() { return question_.size(); } public String getQuestion(int index) { return question_.get(index); } private void initFields() { id_ = 0L; questioner_ = ""; question_ = com.google.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasId()) { memoizedIsInitialized = 0; return false; } if (!hasQuestioner()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, id_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getQuestionerBytes()); } for (int i = 0; i < question_.size(); i++) { output.writeBytes(3, question_.getByteString(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, id_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getQuestionerBytes()); } { int dataSize = 0; for (int i = 0; i < question_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(question_.getByteString(i)); } size += dataSize; size += 1 * getQuestionList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } @java.lang.Override protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static muduo.codec.tests.QueryProtos.Query parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static muduo.codec.tests.QueryProtos.Query parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static muduo.codec.tests.QueryProtos.Query parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.codec.tests.QueryProtos.Query parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(muduo.codec.tests.QueryProtos.Query prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements muduo.codec.tests.QueryProtos.QueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Query_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Query_fieldAccessorTable; } // Construct using muduo.codec.tests.QueryProtos.Query.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); questioner_ = ""; bitField0_ = (bitField0_ & ~0x00000002); question_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return muduo.codec.tests.QueryProtos.Query.getDescriptor(); } public muduo.codec.tests.QueryProtos.Query getDefaultInstanceForType() { return muduo.codec.tests.QueryProtos.Query.getDefaultInstance(); } public muduo.codec.tests.QueryProtos.Query build() { muduo.codec.tests.QueryProtos.Query result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private muduo.codec.tests.QueryProtos.Query buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { muduo.codec.tests.QueryProtos.Query result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public muduo.codec.tests.QueryProtos.Query buildPartial() { muduo.codec.tests.QueryProtos.Query result = new muduo.codec.tests.QueryProtos.Query(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.id_ = id_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.questioner_ = questioner_; if (((bitField0_ & 0x00000004) == 0x00000004)) { question_ = new com.google.protobuf.UnmodifiableLazyStringList( question_); bitField0_ = (bitField0_ & ~0x00000004); } result.question_ = question_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof muduo.codec.tests.QueryProtos.Query) { return mergeFrom((muduo.codec.tests.QueryProtos.Query)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(muduo.codec.tests.QueryProtos.Query other) { if (other == muduo.codec.tests.QueryProtos.Query.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } if (other.hasQuestioner()) { setQuestioner(other.getQuestioner()); } if (!other.question_.isEmpty()) { if (question_.isEmpty()) { question_ = other.question_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureQuestionIsMutable(); question_.addAll(other.question_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasId()) { return false; } if (!hasQuestioner()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; id_ = input.readInt64(); break; } case 18: { bitField0_ |= 0x00000002; questioner_ = input.readBytes(); break; } case 26: { ensureQuestionIsMutable(); question_.add(input.readBytes()); break; } } } } private int bitField0_; // required int64 id = 1; private long id_ ; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public long getId() { return id_; } public Builder setId(long value) { bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; } public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); id_ = 0L; onChanged(); return this; } // required string questioner = 2; private Object questioner_ = ""; public boolean hasQuestioner() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getQuestioner() { Object ref = questioner_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); questioner_ = s; return s; } else { return (String) ref; } } public Builder setQuestioner(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; questioner_ = value; onChanged(); return this; } public Builder clearQuestioner() { bitField0_ = (bitField0_ & ~0x00000002); questioner_ = getDefaultInstance().getQuestioner(); onChanged(); return this; } void setQuestioner(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000002; questioner_ = value; onChanged(); } // repeated string question = 3; private com.google.protobuf.LazyStringList question_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureQuestionIsMutable() { if (!((bitField0_ & 0x00000004) == 0x00000004)) { question_ = new com.google.protobuf.LazyStringArrayList(question_); bitField0_ |= 0x00000004; } } public java.util.List getQuestionList() { return java.util.Collections.unmodifiableList(question_); } public int getQuestionCount() { return question_.size(); } public String getQuestion(int index) { return question_.get(index); } public Builder setQuestion( int index, String value) { if (value == null) { throw new NullPointerException(); } ensureQuestionIsMutable(); question_.set(index, value); onChanged(); return this; } public Builder addQuestion(String value) { if (value == null) { throw new NullPointerException(); } ensureQuestionIsMutable(); question_.add(value); onChanged(); return this; } public Builder addAllQuestion( java.lang.Iterable values) { ensureQuestionIsMutable(); super.addAll(values, question_); onChanged(); return this; } public Builder clearQuestion() { question_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } void addQuestion(com.google.protobuf.ByteString value) { ensureQuestionIsMutable(); question_.add(value); onChanged(); } // @@protoc_insertion_point(builder_scope:muduo.Query) } static { defaultInstance = new Query(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:muduo.Query) } public interface AnswerOrBuilder extends com.google.protobuf.MessageOrBuilder { // required int64 id = 1; boolean hasId(); long getId(); // required string questioner = 2; boolean hasQuestioner(); String getQuestioner(); // required string answerer = 3; boolean hasAnswerer(); String getAnswerer(); // repeated string solution = 4; java.util.List getSolutionList(); int getSolutionCount(); String getSolution(int index); } public static final class Answer extends com.google.protobuf.GeneratedMessage implements AnswerOrBuilder { // Use Answer.newBuilder() to construct. private Answer(Builder builder) { super(builder); } private Answer(boolean noInit) {} private static final Answer defaultInstance; public static Answer getDefaultInstance() { return defaultInstance; } public Answer getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Answer_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Answer_fieldAccessorTable; } private int bitField0_; // required int64 id = 1; public static final int ID_FIELD_NUMBER = 1; private long id_; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public long getId() { return id_; } // required string questioner = 2; public static final int QUESTIONER_FIELD_NUMBER = 2; private Object questioner_; public boolean hasQuestioner() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getQuestioner() { Object ref = questioner_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { questioner_ = s; } return s; } } private com.google.protobuf.ByteString getQuestionerBytes() { Object ref = questioner_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); questioner_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // required string answerer = 3; public static final int ANSWERER_FIELD_NUMBER = 3; private Object answerer_; public boolean hasAnswerer() { return ((bitField0_ & 0x00000004) == 0x00000004); } public String getAnswerer() { Object ref = answerer_; if (ref instanceof String) { return (String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; String s = bs.toStringUtf8(); if (com.google.protobuf.Internal.isValidUtf8(bs)) { answerer_ = s; } return s; } } private com.google.protobuf.ByteString getAnswererBytes() { Object ref = answerer_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((String) ref); answerer_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } // repeated string solution = 4; public static final int SOLUTION_FIELD_NUMBER = 4; private com.google.protobuf.LazyStringList solution_; public java.util.List getSolutionList() { return solution_; } public int getSolutionCount() { return solution_.size(); } public String getSolution(int index) { return solution_.get(index); } private void initFields() { id_ = 0L; questioner_ = ""; answerer_ = ""; solution_ = com.google.protobuf.LazyStringArrayList.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; if (!hasId()) { memoizedIsInitialized = 0; return false; } if (!hasQuestioner()) { memoizedIsInitialized = 0; return false; } if (!hasAnswerer()) { memoizedIsInitialized = 0; return false; } memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt64(1, id_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { output.writeBytes(2, getQuestionerBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { output.writeBytes(3, getAnswererBytes()); } for (int i = 0; i < solution_.size(); i++) { output.writeBytes(4, solution_.getByteString(i)); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt64Size(1, id_); } if (((bitField0_ & 0x00000002) == 0x00000002)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(2, getQuestionerBytes()); } if (((bitField0_ & 0x00000004) == 0x00000004)) { size += com.google.protobuf.CodedOutputStream .computeBytesSize(3, getAnswererBytes()); } { int dataSize = 0; for (int i = 0; i < solution_.size(); i++) { dataSize += com.google.protobuf.CodedOutputStream .computeBytesSizeNoTag(solution_.getByteString(i)); } size += dataSize; size += 1 * getSolutionList().size(); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } @java.lang.Override protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static muduo.codec.tests.QueryProtos.Answer parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static muduo.codec.tests.QueryProtos.Answer parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.codec.tests.QueryProtos.Answer parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(muduo.codec.tests.QueryProtos.Answer prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements muduo.codec.tests.QueryProtos.AnswerOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Answer_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Answer_fieldAccessorTable; } // Construct using muduo.codec.tests.QueryProtos.Answer.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); id_ = 0L; bitField0_ = (bitField0_ & ~0x00000001); questioner_ = ""; bitField0_ = (bitField0_ & ~0x00000002); answerer_ = ""; bitField0_ = (bitField0_ & ~0x00000004); solution_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return muduo.codec.tests.QueryProtos.Answer.getDescriptor(); } public muduo.codec.tests.QueryProtos.Answer getDefaultInstanceForType() { return muduo.codec.tests.QueryProtos.Answer.getDefaultInstance(); } public muduo.codec.tests.QueryProtos.Answer build() { muduo.codec.tests.QueryProtos.Answer result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private muduo.codec.tests.QueryProtos.Answer buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { muduo.codec.tests.QueryProtos.Answer result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public muduo.codec.tests.QueryProtos.Answer buildPartial() { muduo.codec.tests.QueryProtos.Answer result = new muduo.codec.tests.QueryProtos.Answer(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.id_ = id_; if (((from_bitField0_ & 0x00000002) == 0x00000002)) { to_bitField0_ |= 0x00000002; } result.questioner_ = questioner_; if (((from_bitField0_ & 0x00000004) == 0x00000004)) { to_bitField0_ |= 0x00000004; } result.answerer_ = answerer_; if (((bitField0_ & 0x00000008) == 0x00000008)) { solution_ = new com.google.protobuf.UnmodifiableLazyStringList( solution_); bitField0_ = (bitField0_ & ~0x00000008); } result.solution_ = solution_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof muduo.codec.tests.QueryProtos.Answer) { return mergeFrom((muduo.codec.tests.QueryProtos.Answer)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(muduo.codec.tests.QueryProtos.Answer other) { if (other == muduo.codec.tests.QueryProtos.Answer.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } if (other.hasQuestioner()) { setQuestioner(other.getQuestioner()); } if (other.hasAnswerer()) { setAnswerer(other.getAnswerer()); } if (!other.solution_.isEmpty()) { if (solution_.isEmpty()) { solution_ = other.solution_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureSolutionIsMutable(); solution_.addAll(other.solution_); } onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); return this; } public final boolean isInitialized() { if (!hasId()) { return false; } if (!hasQuestioner()) { return false; } if (!hasAnswerer()) { return false; } return true; } public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; id_ = input.readInt64(); break; } case 18: { bitField0_ |= 0x00000002; questioner_ = input.readBytes(); break; } case 26: { bitField0_ |= 0x00000004; answerer_ = input.readBytes(); break; } case 34: { ensureSolutionIsMutable(); solution_.add(input.readBytes()); break; } } } } private int bitField0_; // required int64 id = 1; private long id_ ; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public long getId() { return id_; } public Builder setId(long value) { bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; } public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); id_ = 0L; onChanged(); return this; } // required string questioner = 2; private Object questioner_ = ""; public boolean hasQuestioner() { return ((bitField0_ & 0x00000002) == 0x00000002); } public String getQuestioner() { Object ref = questioner_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); questioner_ = s; return s; } else { return (String) ref; } } public Builder setQuestioner(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000002; questioner_ = value; onChanged(); return this; } public Builder clearQuestioner() { bitField0_ = (bitField0_ & ~0x00000002); questioner_ = getDefaultInstance().getQuestioner(); onChanged(); return this; } void setQuestioner(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000002; questioner_ = value; onChanged(); } // required string answerer = 3; private Object answerer_ = ""; public boolean hasAnswerer() { return ((bitField0_ & 0x00000004) == 0x00000004); } public String getAnswerer() { Object ref = answerer_; if (!(ref instanceof String)) { String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); answerer_ = s; return s; } else { return (String) ref; } } public Builder setAnswerer(String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; answerer_ = value; onChanged(); return this; } public Builder clearAnswerer() { bitField0_ = (bitField0_ & ~0x00000004); answerer_ = getDefaultInstance().getAnswerer(); onChanged(); return this; } void setAnswerer(com.google.protobuf.ByteString value) { bitField0_ |= 0x00000004; answerer_ = value; onChanged(); } // repeated string solution = 4; private com.google.protobuf.LazyStringList solution_ = com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureSolutionIsMutable() { if (!((bitField0_ & 0x00000008) == 0x00000008)) { solution_ = new com.google.protobuf.LazyStringArrayList(solution_); bitField0_ |= 0x00000008; } } public java.util.List getSolutionList() { return java.util.Collections.unmodifiableList(solution_); } public int getSolutionCount() { return solution_.size(); } public String getSolution(int index) { return solution_.get(index); } public Builder setSolution( int index, String value) { if (value == null) { throw new NullPointerException(); } ensureSolutionIsMutable(); solution_.set(index, value); onChanged(); return this; } public Builder addSolution(String value) { if (value == null) { throw new NullPointerException(); } ensureSolutionIsMutable(); solution_.add(value); onChanged(); return this; } public Builder addAllSolution( java.lang.Iterable values) { ensureSolutionIsMutable(); super.addAll(values, solution_); onChanged(); return this; } public Builder clearSolution() { solution_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } void addSolution(com.google.protobuf.ByteString value) { ensureSolutionIsMutable(); solution_.add(value); onChanged(); } // @@protoc_insertion_point(builder_scope:muduo.Answer) } static { defaultInstance = new Answer(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:muduo.Answer) } public interface EmptyOrBuilder extends com.google.protobuf.MessageOrBuilder { // optional int32 id = 1; boolean hasId(); int getId(); } public static final class Empty extends com.google.protobuf.GeneratedMessage implements EmptyOrBuilder { // Use Empty.newBuilder() to construct. private Empty(Builder builder) { super(builder); } private Empty(boolean noInit) {} private static final Empty defaultInstance; public static Empty getDefaultInstance() { return defaultInstance; } public Empty getDefaultInstanceForType() { return defaultInstance; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Empty_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Empty_fieldAccessorTable; } private int bitField0_; // optional int32 id = 1; public static final int ID_FIELD_NUMBER = 1; private int id_; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getId() { return id_; } private void initFields() { id_ = 0; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized != -1) return isInitialized == 1; memoizedIsInitialized = 1; return true; } public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); if (((bitField0_ & 0x00000001) == 0x00000001)) { output.writeInt32(1, id_); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, id_); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } @java.lang.Override protected Object writeReplace() throws java.io.ObjectStreamException { return super.writeReplace(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data).buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return newBuilder().mergeFrom(data, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom(java.io.InputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input)) { return builder.buildParsed(); } else { return null; } } public static muduo.codec.tests.QueryProtos.Empty parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { Builder builder = newBuilder(); if (builder.mergeDelimitedFrom(input, extensionRegistry)) { return builder.buildParsed(); } else { return null; } } public static muduo.codec.tests.QueryProtos.Empty parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return newBuilder().mergeFrom(input).buildParsed(); } public static muduo.codec.tests.QueryProtos.Empty parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return newBuilder().mergeFrom(input, extensionRegistry) .buildParsed(); } public static Builder newBuilder() { return Builder.create(); } public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(muduo.codec.tests.QueryProtos.Empty prototype) { return newBuilder().mergeFrom(prototype); } public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessage.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } public static final class Builder extends com.google.protobuf.GeneratedMessage.Builder implements muduo.codec.tests.QueryProtos.EmptyOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Empty_descriptor; } protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return muduo.codec.tests.QueryProtos.internal_static_muduo_Empty_fieldAccessorTable; } // Construct using muduo.codec.tests.QueryProtos.Empty.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { } } private static Builder create() { return new Builder(); } public Builder clear() { super.clear(); id_ = 0; bitField0_ = (bitField0_ & ~0x00000001); return this; } public Builder clone() { return create().mergeFrom(buildPartial()); } public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return muduo.codec.tests.QueryProtos.Empty.getDescriptor(); } public muduo.codec.tests.QueryProtos.Empty getDefaultInstanceForType() { return muduo.codec.tests.QueryProtos.Empty.getDefaultInstance(); } public muduo.codec.tests.QueryProtos.Empty build() { muduo.codec.tests.QueryProtos.Empty result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } private muduo.codec.tests.QueryProtos.Empty buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { muduo.codec.tests.QueryProtos.Empty result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } return result; } public muduo.codec.tests.QueryProtos.Empty buildPartial() { muduo.codec.tests.QueryProtos.Empty result = new muduo.codec.tests.QueryProtos.Empty(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000001) == 0x00000001)) { to_bitField0_ |= 0x00000001; } result.id_ = id_; result.bitField0_ = to_bitField0_; onBuilt(); return result; } public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof muduo.codec.tests.QueryProtos.Empty) { return mergeFrom((muduo.codec.tests.QueryProtos.Empty)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(muduo.codec.tests.QueryProtos.Empty other) { if (other == muduo.codec.tests.QueryProtos.Empty.getDefaultInstance()) return this; if (other.hasId()) { setId(other.getId()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder( this.getUnknownFields()); while (true) { int tag = input.readTag(); switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); onChanged(); return this; } break; } case 8: { bitField0_ |= 0x00000001; id_ = input.readInt32(); break; } } } } private int bitField0_; // optional int32 id = 1; private int id_ ; public boolean hasId() { return ((bitField0_ & 0x00000001) == 0x00000001); } public int getId() { return id_; } public Builder setId(int value) { bitField0_ |= 0x00000001; id_ = value; onChanged(); return this; } public Builder clearId() { bitField0_ = (bitField0_ & ~0x00000001); id_ = 0; onChanged(); return this; } // @@protoc_insertion_point(builder_scope:muduo.Empty) } static { defaultInstance = new Empty(true); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:muduo.Empty) } private static com.google.protobuf.Descriptors.Descriptor internal_static_muduo_Query_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_muduo_Query_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_muduo_Answer_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_muduo_Answer_fieldAccessorTable; private static com.google.protobuf.Descriptors.Descriptor internal_static_muduo_Empty_descriptor; private static com.google.protobuf.GeneratedMessage.FieldAccessorTable internal_static_muduo_Empty_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\013query.proto\022\005muduo\"9\n\005Query\022\n\n\002id\030\001 \002(" + "\003\022\022\n\nquestioner\030\002 \002(\t\022\020\n\010question\030\003 \003(\t\"" + "L\n\006Answer\022\n\n\002id\030\001 \002(\003\022\022\n\nquestioner\030\002 \002(" + "\t\022\020\n\010answerer\030\003 \002(\t\022\020\n\010solution\030\004 \003(\t\"\023\n" + "\005Empty\022\n\n\002id\030\001 \001(\005B \n\021muduo.codec.testsB" + "\013QueryProtos" }; 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; internal_static_muduo_Query_descriptor = getDescriptor().getMessageTypes().get(0); internal_static_muduo_Query_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_muduo_Query_descriptor, new java.lang.String[] { "Id", "Questioner", "Question", }, muduo.codec.tests.QueryProtos.Query.class, muduo.codec.tests.QueryProtos.Query.Builder.class); internal_static_muduo_Answer_descriptor = getDescriptor().getMessageTypes().get(1); internal_static_muduo_Answer_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_muduo_Answer_descriptor, new java.lang.String[] { "Id", "Questioner", "Answerer", "Solution", }, muduo.codec.tests.QueryProtos.Answer.class, muduo.codec.tests.QueryProtos.Answer.Builder.class); internal_static_muduo_Empty_descriptor = getDescriptor().getMessageTypes().get(2); internal_static_muduo_Empty_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_muduo_Empty_descriptor, new java.lang.String[] { "Id", }, muduo.codec.tests.QueryProtos.Empty.class, muduo.codec.tests.QueryProtos.Empty.Builder.class); return null; } }; com.google.protobuf.Descriptors.FileDescriptor .internalBuildGeneratedFileFrom(descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { }, assigner); } // @@protoc_insertion_point(outer_class_scope) }