// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: taihe_biz.proto

package com.ywt.gapi.taihe.biz;

/**
 * Protobuf type {@code com.ywt.gapi.taihe.biz.ScreeningTable}
 */
public final class ScreeningTable extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.taihe.biz.ScreeningTable)
    ScreeningTableOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ScreeningTable.newBuilder() to construct.
  private ScreeningTable(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ScreeningTable() {
    questions_ = java.util.Collections.emptyList();
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new ScreeningTable();
  }

  @Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private ScreeningTable(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            PatientInfo.Builder subBuilder = null;
            if (patientInfo_ != null) {
              subBuilder = patientInfo_.toBuilder();
            }
            patientInfo_ = input.readMessage(PatientInfo.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(patientInfo_);
              patientInfo_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              questions_ = new java.util.ArrayList<Question>();
              mutable_bitField0_ |= 0x00000001;
            }
            questions_.add(
                input.readMessage(Question.parser(), extensionRegistry));
            break;
          }
          case 24: {

            tableId_ = input.readInt32();
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            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_ & 0x00000001) != 0)) {
        questions_ = java.util.Collections.unmodifiableList(questions_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return TaiheBizProto.internal_static_com_ywt_gapi_taihe_biz_ScreeningTable_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return TaiheBizProto.internal_static_com_ywt_gapi_taihe_biz_ScreeningTable_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            ScreeningTable.class, Builder.class);
  }

  public static final int PATIENTINFO_FIELD_NUMBER = 1;
  private PatientInfo patientInfo_;
  /**
   * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
   * @return Whether the patientInfo field is set.
   */
  @Override
  public boolean hasPatientInfo() {
    return patientInfo_ != null;
  }
  /**
   * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
   * @return The patientInfo.
   */
  @Override
  public PatientInfo getPatientInfo() {
    return patientInfo_ == null ? PatientInfo.getDefaultInstance() : patientInfo_;
  }
  /**
   * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
   */
  @Override
  public com.ywt.gapi.taihe.biz.PatientInfoOrBuilder getPatientInfoOrBuilder() {
    return getPatientInfo();
  }

  public static final int QUESTIONS_FIELD_NUMBER = 2;
  private java.util.List<Question> questions_;
  /**
   * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
   */
  @Override
  public java.util.List<Question> getQuestionsList() {
    return questions_;
  }
  /**
   * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
   */
  @Override
  public java.util.List<? extends com.ywt.gapi.taihe.biz.QuestionOrBuilder>
      getQuestionsOrBuilderList() {
    return questions_;
  }
  /**
   * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
   */
  @Override
  public int getQuestionsCount() {
    return questions_.size();
  }
  /**
   * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
   */
  @Override
  public Question getQuestions(int index) {
    return questions_.get(index);
  }
  /**
   * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
   */
  @Override
  public com.ywt.gapi.taihe.biz.QuestionOrBuilder getQuestionsOrBuilder(
      int index) {
    return questions_.get(index);
  }

  public static final int TABLEID_FIELD_NUMBER = 3;
  private int tableId_;
  /**
   * <pre>
   * 题目 id，大于 0 表示是修改答案
   * </pre>
   *
   * <code>int32 tableId = 3;</code>
   * @return The tableId.
   */
  @Override
  public int getTableId() {
    return tableId_;
  }

  private byte memoizedIsInitialized = -1;
  @Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (patientInfo_ != null) {
      output.writeMessage(1, getPatientInfo());
    }
    for (int i = 0; i < questions_.size(); i++) {
      output.writeMessage(2, questions_.get(i));
    }
    if (tableId_ != 0) {
      output.writeInt32(3, tableId_);
    }
    unknownFields.writeTo(output);
  }

  @Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (patientInfo_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getPatientInfo());
    }
    for (int i = 0; i < questions_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, questions_.get(i));
    }
    if (tableId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, tableId_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof ScreeningTable)) {
      return super.equals(obj);
    }
    ScreeningTable other = (ScreeningTable) obj;

    if (hasPatientInfo() != other.hasPatientInfo()) return false;
    if (hasPatientInfo()) {
      if (!getPatientInfo()
          .equals(other.getPatientInfo())) return false;
    }
    if (!getQuestionsList()
        .equals(other.getQuestionsList())) return false;
    if (getTableId()
        != other.getTableId()) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasPatientInfo()) {
      hash = (37 * hash) + PATIENTINFO_FIELD_NUMBER;
      hash = (53 * hash) + getPatientInfo().hashCode();
    }
    if (getQuestionsCount() > 0) {
      hash = (37 * hash) + QUESTIONS_FIELD_NUMBER;
      hash = (53 * hash) + getQuestionsList().hashCode();
    }
    hash = (37 * hash) + TABLEID_FIELD_NUMBER;
    hash = (53 * hash) + getTableId();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static ScreeningTable parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static ScreeningTable parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static ScreeningTable parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static ScreeningTable parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static ScreeningTable parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static ScreeningTable parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static ScreeningTable parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static ScreeningTable 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 ScreeningTable parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static ScreeningTable 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 ScreeningTable parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static ScreeningTable parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(ScreeningTable prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code com.ywt.gapi.taihe.biz.ScreeningTable}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.taihe.biz.ScreeningTable)
      com.ywt.gapi.taihe.biz.ScreeningTableOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return TaiheBizProto.internal_static_com_ywt_gapi_taihe_biz_ScreeningTable_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return TaiheBizProto.internal_static_com_ywt_gapi_taihe_biz_ScreeningTable_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              ScreeningTable.class, Builder.class);
    }

    // Construct using com.ywt.gapi.taihe.biz.ScreeningTable.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getQuestionsFieldBuilder();
      }
    }
    @Override
    public Builder clear() {
      super.clear();
      if (patientInfoBuilder_ == null) {
        patientInfo_ = null;
      } else {
        patientInfo_ = null;
        patientInfoBuilder_ = null;
      }
      if (questionsBuilder_ == null) {
        questions_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        questionsBuilder_.clear();
      }
      tableId_ = 0;

      return this;
    }

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return TaiheBizProto.internal_static_com_ywt_gapi_taihe_biz_ScreeningTable_descriptor;
    }

    @Override
    public ScreeningTable getDefaultInstanceForType() {
      return ScreeningTable.getDefaultInstance();
    }

    @Override
    public ScreeningTable build() {
      ScreeningTable result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public ScreeningTable buildPartial() {
      ScreeningTable result = new ScreeningTable(this);
      int from_bitField0_ = bitField0_;
      if (patientInfoBuilder_ == null) {
        result.patientInfo_ = patientInfo_;
      } else {
        result.patientInfo_ = patientInfoBuilder_.build();
      }
      if (questionsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          questions_ = java.util.Collections.unmodifiableList(questions_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.questions_ = questions_;
      } else {
        result.questions_ = questionsBuilder_.build();
      }
      result.tableId_ = tableId_;
      onBuilt();
      return result;
    }

    @Override
    public Builder clone() {
      return super.clone();
    }
    @Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.setField(field, value);
    }
    @Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return super.clearField(field);
    }
    @Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return super.clearOneof(oneof);
    }
    @Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, Object value) {
      return super.setRepeatedField(field, index, value);
    }
    @Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        Object value) {
      return super.addRepeatedField(field, value);
    }
    @Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof ScreeningTable) {
        return mergeFrom((ScreeningTable)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(ScreeningTable other) {
      if (other == ScreeningTable.getDefaultInstance()) return this;
      if (other.hasPatientInfo()) {
        mergePatientInfo(other.getPatientInfo());
      }
      if (questionsBuilder_ == null) {
        if (!other.questions_.isEmpty()) {
          if (questions_.isEmpty()) {
            questions_ = other.questions_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureQuestionsIsMutable();
            questions_.addAll(other.questions_);
          }
          onChanged();
        }
      } else {
        if (!other.questions_.isEmpty()) {
          if (questionsBuilder_.isEmpty()) {
            questionsBuilder_.dispose();
            questionsBuilder_ = null;
            questions_ = other.questions_;
            bitField0_ = (bitField0_ & ~0x00000001);
            questionsBuilder_ =
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getQuestionsFieldBuilder() : null;
          } else {
            questionsBuilder_.addAllMessages(other.questions_);
          }
        }
      }
      if (other.getTableId() != 0) {
        setTableId(other.getTableId());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @Override
    public final boolean isInitialized() {
      return true;
    }

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      ScreeningTable parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (ScreeningTable) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private PatientInfo patientInfo_;
    private com.google.protobuf.SingleFieldBuilderV3<
        PatientInfo, PatientInfo.Builder, com.ywt.gapi.taihe.biz.PatientInfoOrBuilder> patientInfoBuilder_;
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     * @return Whether the patientInfo field is set.
     */
    public boolean hasPatientInfo() {
      return patientInfoBuilder_ != null || patientInfo_ != null;
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     * @return The patientInfo.
     */
    public PatientInfo getPatientInfo() {
      if (patientInfoBuilder_ == null) {
        return patientInfo_ == null ? PatientInfo.getDefaultInstance() : patientInfo_;
      } else {
        return patientInfoBuilder_.getMessage();
      }
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    public Builder setPatientInfo(PatientInfo value) {
      if (patientInfoBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        patientInfo_ = value;
        onChanged();
      } else {
        patientInfoBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    public Builder setPatientInfo(
        PatientInfo.Builder builderForValue) {
      if (patientInfoBuilder_ == null) {
        patientInfo_ = builderForValue.build();
        onChanged();
      } else {
        patientInfoBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    public Builder mergePatientInfo(PatientInfo value) {
      if (patientInfoBuilder_ == null) {
        if (patientInfo_ != null) {
          patientInfo_ =
            PatientInfo.newBuilder(patientInfo_).mergeFrom(value).buildPartial();
        } else {
          patientInfo_ = value;
        }
        onChanged();
      } else {
        patientInfoBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    public Builder clearPatientInfo() {
      if (patientInfoBuilder_ == null) {
        patientInfo_ = null;
        onChanged();
      } else {
        patientInfo_ = null;
        patientInfoBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    public PatientInfo.Builder getPatientInfoBuilder() {

      onChanged();
      return getPatientInfoFieldBuilder().getBuilder();
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    public com.ywt.gapi.taihe.biz.PatientInfoOrBuilder getPatientInfoOrBuilder() {
      if (patientInfoBuilder_ != null) {
        return patientInfoBuilder_.getMessageOrBuilder();
      } else {
        return patientInfo_ == null ?
            PatientInfo.getDefaultInstance() : patientInfo_;
      }
    }
    /**
     * <code>.com.ywt.gapi.taihe.biz.PatientInfo patientInfo = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        PatientInfo, PatientInfo.Builder, com.ywt.gapi.taihe.biz.PatientInfoOrBuilder>
        getPatientInfoFieldBuilder() {
      if (patientInfoBuilder_ == null) {
        patientInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            PatientInfo, PatientInfo.Builder, com.ywt.gapi.taihe.biz.PatientInfoOrBuilder>(
                getPatientInfo(),
                getParentForChildren(),
                isClean());
        patientInfo_ = null;
      }
      return patientInfoBuilder_;
    }

    private java.util.List<Question> questions_ =
      java.util.Collections.emptyList();
    private void ensureQuestionsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        questions_ = new java.util.ArrayList<Question>(questions_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Question, Question.Builder, com.ywt.gapi.taihe.biz.QuestionOrBuilder> questionsBuilder_;

    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public java.util.List<Question> getQuestionsList() {
      if (questionsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(questions_);
      } else {
        return questionsBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public int getQuestionsCount() {
      if (questionsBuilder_ == null) {
        return questions_.size();
      } else {
        return questionsBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Question getQuestions(int index) {
      if (questionsBuilder_ == null) {
        return questions_.get(index);
      } else {
        return questionsBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder setQuestions(
        int index, Question value) {
      if (questionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureQuestionsIsMutable();
        questions_.set(index, value);
        onChanged();
      } else {
        questionsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder setQuestions(
        int index, Question.Builder builderForValue) {
      if (questionsBuilder_ == null) {
        ensureQuestionsIsMutable();
        questions_.set(index, builderForValue.build());
        onChanged();
      } else {
        questionsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder addQuestions(Question value) {
      if (questionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureQuestionsIsMutable();
        questions_.add(value);
        onChanged();
      } else {
        questionsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder addQuestions(
        int index, Question value) {
      if (questionsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureQuestionsIsMutable();
        questions_.add(index, value);
        onChanged();
      } else {
        questionsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder addQuestions(
        Question.Builder builderForValue) {
      if (questionsBuilder_ == null) {
        ensureQuestionsIsMutable();
        questions_.add(builderForValue.build());
        onChanged();
      } else {
        questionsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder addQuestions(
        int index, Question.Builder builderForValue) {
      if (questionsBuilder_ == null) {
        ensureQuestionsIsMutable();
        questions_.add(index, builderForValue.build());
        onChanged();
      } else {
        questionsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder addAllQuestions(
        Iterable<? extends Question> values) {
      if (questionsBuilder_ == null) {
        ensureQuestionsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, questions_);
        onChanged();
      } else {
        questionsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder clearQuestions() {
      if (questionsBuilder_ == null) {
        questions_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        questionsBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Builder removeQuestions(int index) {
      if (questionsBuilder_ == null) {
        ensureQuestionsIsMutable();
        questions_.remove(index);
        onChanged();
      } else {
        questionsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Question.Builder getQuestionsBuilder(
        int index) {
      return getQuestionsFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public com.ywt.gapi.taihe.biz.QuestionOrBuilder getQuestionsOrBuilder(
        int index) {
      if (questionsBuilder_ == null) {
        return questions_.get(index);  } else {
        return questionsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public java.util.List<? extends com.ywt.gapi.taihe.biz.QuestionOrBuilder>
         getQuestionsOrBuilderList() {
      if (questionsBuilder_ != null) {
        return questionsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(questions_);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Question.Builder addQuestionsBuilder() {
      return getQuestionsFieldBuilder().addBuilder(
          Question.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public Question.Builder addQuestionsBuilder(
        int index) {
      return getQuestionsFieldBuilder().addBuilder(
          index, Question.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.taihe.biz.Question questions = 2;</code>
     */
    public java.util.List<Question.Builder>
         getQuestionsBuilderList() {
      return getQuestionsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        Question, Question.Builder, com.ywt.gapi.taihe.biz.QuestionOrBuilder>
        getQuestionsFieldBuilder() {
      if (questionsBuilder_ == null) {
        questionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            Question, Question.Builder, com.ywt.gapi.taihe.biz.QuestionOrBuilder>(
                questions_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        questions_ = null;
      }
      return questionsBuilder_;
    }

    private int tableId_ ;
    /**
     * <pre>
     * 题目 id，大于 0 表示是修改答案
     * </pre>
     *
     * <code>int32 tableId = 3;</code>
     * @return The tableId.
     */
    @Override
    public int getTableId() {
      return tableId_;
    }
    /**
     * <pre>
     * 题目 id，大于 0 表示是修改答案
     * </pre>
     *
     * <code>int32 tableId = 3;</code>
     * @param value The tableId to set.
     * @return This builder for chaining.
     */
    public Builder setTableId(int value) {

      tableId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 题目 id，大于 0 表示是修改答案
     * </pre>
     *
     * <code>int32 tableId = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearTableId() {

      tableId_ = 0;
      onChanged();
      return this;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

    @Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.taihe.biz.ScreeningTable)
  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.taihe.biz.ScreeningTable)
  private static final ScreeningTable DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new ScreeningTable();
  }

  public static ScreeningTable getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<ScreeningTable>
      PARSER = new com.google.protobuf.AbstractParser<ScreeningTable>() {
    @Override
    public ScreeningTable parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new ScreeningTable(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<ScreeningTable> parser() {
    return PARSER;
  }

  @Override
  public com.google.protobuf.Parser<ScreeningTable> getParserForType() {
    return PARSER;
  }

  @Override
  public ScreeningTable getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

