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

package com.ywt.gapi.third.taihe;

/**
 * Protobuf type {@code com.ywt.gapi.third.taihe.AddDiagnosisRequest}
 */
public  final class AddDiagnosisRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.third.taihe.AddDiagnosisRequest)
    AddDiagnosisRequestOrBuilder {
  // Use AddDiagnosisRequest.newBuilder() to construct.
  private AddDiagnosisRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private AddDiagnosisRequest() {
    patientId_ = "";
    clinicCode_ = "";
    deptCode_ = "";
    doctorCode_ = "";
    diagnoseList_ = java.util.Collections.emptyList();
    hospitalId_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private AddDiagnosisRequest(
      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 10: {
            java.lang.String s = input.readStringRequireUtf8();

            patientId_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            clinicCode_ = s;
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

            deptCode_ = s;
            break;
          }
          case 34: {
            java.lang.String s = input.readStringRequireUtf8();

            doctorCode_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
              diagnoseList_ = new java.util.ArrayList<com.ywt.gapi.third.taihe.Diagnose>();
              mutable_bitField0_ |= 0x00000010;
            }
            diagnoseList_.add(
                input.readMessage(com.ywt.gapi.third.taihe.Diagnose.parser(), extensionRegistry));
            break;
          }
          case 48: {

            hospitalId_ = input.readInt32();
            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_ & 0x00000010) == 0x00000010)) {
        diagnoseList_ = java.util.Collections.unmodifiableList(diagnoseList_);
      }
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.third.taihe.Taihe.internal_static_com_ywt_gapi_third_taihe_AddDiagnosisRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.third.taihe.Taihe.internal_static_com_ywt_gapi_third_taihe_AddDiagnosisRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.third.taihe.AddDiagnosisRequest.class, com.ywt.gapi.third.taihe.AddDiagnosisRequest.Builder.class);
  }

  private int bitField0_;
  public static final int PATIENTID_FIELD_NUMBER = 1;
  private volatile java.lang.Object patientId_;
  /**
   * <code>string patientId = 1;</code>
   */
  public java.lang.String getPatientId() {
    java.lang.Object ref = patientId_;
    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();
      patientId_ = s;
      return s;
    }
  }
  /**
   * <code>string patientId = 1;</code>
   */
  public com.google.protobuf.ByteString
      getPatientIdBytes() {
    java.lang.Object ref = patientId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      patientId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CLINICCODE_FIELD_NUMBER = 2;
  private volatile java.lang.Object clinicCode_;
  /**
   * <code>string clinicCode = 2;</code>
   */
  public java.lang.String getClinicCode() {
    java.lang.Object ref = clinicCode_;
    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();
      clinicCode_ = s;
      return s;
    }
  }
  /**
   * <code>string clinicCode = 2;</code>
   */
  public com.google.protobuf.ByteString
      getClinicCodeBytes() {
    java.lang.Object ref = clinicCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      clinicCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DEPTCODE_FIELD_NUMBER = 3;
  private volatile java.lang.Object deptCode_;
  /**
   * <code>string deptCode = 3;</code>
   */
  public java.lang.String getDeptCode() {
    java.lang.Object ref = deptCode_;
    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();
      deptCode_ = s;
      return s;
    }
  }
  /**
   * <code>string deptCode = 3;</code>
   */
  public com.google.protobuf.ByteString
      getDeptCodeBytes() {
    java.lang.Object ref = deptCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      deptCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DOCTORCODE_FIELD_NUMBER = 4;
  private volatile java.lang.Object doctorCode_;
  /**
   * <code>string doctorCode = 4;</code>
   */
  public java.lang.String getDoctorCode() {
    java.lang.Object ref = doctorCode_;
    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();
      doctorCode_ = s;
      return s;
    }
  }
  /**
   * <code>string doctorCode = 4;</code>
   */
  public com.google.protobuf.ByteString
      getDoctorCodeBytes() {
    java.lang.Object ref = doctorCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      doctorCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DIAGNOSELIST_FIELD_NUMBER = 5;
  private java.util.List<com.ywt.gapi.third.taihe.Diagnose> diagnoseList_;
  /**
   * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
   */
  public java.util.List<com.ywt.gapi.third.taihe.Diagnose> getDiagnoseListList() {
    return diagnoseList_;
  }
  /**
   * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
   */
  public java.util.List<? extends com.ywt.gapi.third.taihe.DiagnoseOrBuilder> 
      getDiagnoseListOrBuilderList() {
    return diagnoseList_;
  }
  /**
   * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
   */
  public int getDiagnoseListCount() {
    return diagnoseList_.size();
  }
  /**
   * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
   */
  public com.ywt.gapi.third.taihe.Diagnose getDiagnoseList(int index) {
    return diagnoseList_.get(index);
  }
  /**
   * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
   */
  public com.ywt.gapi.third.taihe.DiagnoseOrBuilder getDiagnoseListOrBuilder(
      int index) {
    return diagnoseList_.get(index);
  }

  public static final int HOSPITALID_FIELD_NUMBER = 6;
  private int hospitalId_;
  /**
   * <code>int32 hospitalId = 6;</code>
   */
  public int getHospitalId() {
    return hospitalId_;
  }

  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 (!getPatientIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, patientId_);
    }
    if (!getClinicCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, clinicCode_);
    }
    if (!getDeptCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, deptCode_);
    }
    if (!getDoctorCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, doctorCode_);
    }
    for (int i = 0; i < diagnoseList_.size(); i++) {
      output.writeMessage(5, diagnoseList_.get(i));
    }
    if (hospitalId_ != 0) {
      output.writeInt32(6, hospitalId_);
    }
  }

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

    size = 0;
    if (!getPatientIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, patientId_);
    }
    if (!getClinicCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, clinicCode_);
    }
    if (!getDeptCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, deptCode_);
    }
    if (!getDoctorCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, doctorCode_);
    }
    for (int i = 0; i < diagnoseList_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, diagnoseList_.get(i));
    }
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, hospitalId_);
    }
    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 com.ywt.gapi.third.taihe.AddDiagnosisRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.third.taihe.AddDiagnosisRequest other = (com.ywt.gapi.third.taihe.AddDiagnosisRequest) obj;

    boolean result = true;
    result = result && getPatientId()
        .equals(other.getPatientId());
    result = result && getClinicCode()
        .equals(other.getClinicCode());
    result = result && getDeptCode()
        .equals(other.getDeptCode());
    result = result && getDoctorCode()
        .equals(other.getDoctorCode());
    result = result && getDiagnoseListList()
        .equals(other.getDiagnoseListList());
    result = result && (getHospitalId()
        == other.getHospitalId());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + PATIENTID_FIELD_NUMBER;
    hash = (53 * hash) + getPatientId().hashCode();
    hash = (37 * hash) + CLINICCODE_FIELD_NUMBER;
    hash = (53 * hash) + getClinicCode().hashCode();
    hash = (37 * hash) + DEPTCODE_FIELD_NUMBER;
    hash = (53 * hash) + getDeptCode().hashCode();
    hash = (37 * hash) + DOCTORCODE_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorCode().hashCode();
    if (getDiagnoseListCount() > 0) {
      hash = (37 * hash) + DIAGNOSELIST_FIELD_NUMBER;
      hash = (53 * hash) + getDiagnoseListList().hashCode();
    }
    hash = (37 * hash) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest 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 com.ywt.gapi.third.taihe.AddDiagnosisRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest 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 com.ywt.gapi.third.taihe.AddDiagnosisRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest 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(com.ywt.gapi.third.taihe.AddDiagnosisRequest 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 com.ywt.gapi.third.taihe.AddDiagnosisRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.third.taihe.AddDiagnosisRequest)
      com.ywt.gapi.third.taihe.AddDiagnosisRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.third.taihe.Taihe.internal_static_com_ywt_gapi_third_taihe_AddDiagnosisRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.third.taihe.Taihe.internal_static_com_ywt_gapi_third_taihe_AddDiagnosisRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.third.taihe.AddDiagnosisRequest.class, com.ywt.gapi.third.taihe.AddDiagnosisRequest.Builder.class);
    }

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

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getDiagnoseListFieldBuilder();
      }
    }
    public Builder clear() {
      super.clear();
      patientId_ = "";

      clinicCode_ = "";

      deptCode_ = "";

      doctorCode_ = "";

      if (diagnoseListBuilder_ == null) {
        diagnoseList_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
      } else {
        diagnoseListBuilder_.clear();
      }
      hospitalId_ = 0;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.third.taihe.Taihe.internal_static_com_ywt_gapi_third_taihe_AddDiagnosisRequest_descriptor;
    }

    public com.ywt.gapi.third.taihe.AddDiagnosisRequest getDefaultInstanceForType() {
      return com.ywt.gapi.third.taihe.AddDiagnosisRequest.getDefaultInstance();
    }

    public com.ywt.gapi.third.taihe.AddDiagnosisRequest build() {
      com.ywt.gapi.third.taihe.AddDiagnosisRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public com.ywt.gapi.third.taihe.AddDiagnosisRequest buildPartial() {
      com.ywt.gapi.third.taihe.AddDiagnosisRequest result = new com.ywt.gapi.third.taihe.AddDiagnosisRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.patientId_ = patientId_;
      result.clinicCode_ = clinicCode_;
      result.deptCode_ = deptCode_;
      result.doctorCode_ = doctorCode_;
      if (diagnoseListBuilder_ == null) {
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          diagnoseList_ = java.util.Collections.unmodifiableList(diagnoseList_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.diagnoseList_ = diagnoseList_;
      } else {
        result.diagnoseList_ = diagnoseListBuilder_.build();
      }
      result.hospitalId_ = hospitalId_;
      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 com.ywt.gapi.third.taihe.AddDiagnosisRequest) {
        return mergeFrom((com.ywt.gapi.third.taihe.AddDiagnosisRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.third.taihe.AddDiagnosisRequest other) {
      if (other == com.ywt.gapi.third.taihe.AddDiagnosisRequest.getDefaultInstance()) return this;
      if (!other.getPatientId().isEmpty()) {
        patientId_ = other.patientId_;
        onChanged();
      }
      if (!other.getClinicCode().isEmpty()) {
        clinicCode_ = other.clinicCode_;
        onChanged();
      }
      if (!other.getDeptCode().isEmpty()) {
        deptCode_ = other.deptCode_;
        onChanged();
      }
      if (!other.getDoctorCode().isEmpty()) {
        doctorCode_ = other.doctorCode_;
        onChanged();
      }
      if (diagnoseListBuilder_ == null) {
        if (!other.diagnoseList_.isEmpty()) {
          if (diagnoseList_.isEmpty()) {
            diagnoseList_ = other.diagnoseList_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureDiagnoseListIsMutable();
            diagnoseList_.addAll(other.diagnoseList_);
          }
          onChanged();
        }
      } else {
        if (!other.diagnoseList_.isEmpty()) {
          if (diagnoseListBuilder_.isEmpty()) {
            diagnoseListBuilder_.dispose();
            diagnoseListBuilder_ = null;
            diagnoseList_ = other.diagnoseList_;
            bitField0_ = (bitField0_ & ~0x00000010);
            diagnoseListBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getDiagnoseListFieldBuilder() : null;
          } else {
            diagnoseListBuilder_.addAllMessages(other.diagnoseList_);
          }
        }
      }
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      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 {
      com.ywt.gapi.third.taihe.AddDiagnosisRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.third.taihe.AddDiagnosisRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object patientId_ = "";
    /**
     * <code>string patientId = 1;</code>
     */
    public java.lang.String getPatientId() {
      java.lang.Object ref = patientId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        patientId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public com.google.protobuf.ByteString
        getPatientIdBytes() {
      java.lang.Object ref = patientId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        patientId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public Builder setPatientId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public Builder clearPatientId() {
      
      patientId_ = getDefaultInstance().getPatientId();
      onChanged();
      return this;
    }
    /**
     * <code>string patientId = 1;</code>
     */
    public Builder setPatientIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object clinicCode_ = "";
    /**
     * <code>string clinicCode = 2;</code>
     */
    public java.lang.String getClinicCode() {
      java.lang.Object ref = clinicCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        clinicCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string clinicCode = 2;</code>
     */
    public com.google.protobuf.ByteString
        getClinicCodeBytes() {
      java.lang.Object ref = clinicCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        clinicCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string clinicCode = 2;</code>
     */
    public Builder setClinicCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      clinicCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string clinicCode = 2;</code>
     */
    public Builder clearClinicCode() {
      
      clinicCode_ = getDefaultInstance().getClinicCode();
      onChanged();
      return this;
    }
    /**
     * <code>string clinicCode = 2;</code>
     */
    public Builder setClinicCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      clinicCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object deptCode_ = "";
    /**
     * <code>string deptCode = 3;</code>
     */
    public java.lang.String getDeptCode() {
      java.lang.Object ref = deptCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deptCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string deptCode = 3;</code>
     */
    public com.google.protobuf.ByteString
        getDeptCodeBytes() {
      java.lang.Object ref = deptCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        deptCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string deptCode = 3;</code>
     */
    public Builder setDeptCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      deptCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string deptCode = 3;</code>
     */
    public Builder clearDeptCode() {
      
      deptCode_ = getDefaultInstance().getDeptCode();
      onChanged();
      return this;
    }
    /**
     * <code>string deptCode = 3;</code>
     */
    public Builder setDeptCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      deptCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object doctorCode_ = "";
    /**
     * <code>string doctorCode = 4;</code>
     */
    public java.lang.String getDoctorCode() {
      java.lang.Object ref = doctorCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        doctorCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string doctorCode = 4;</code>
     */
    public com.google.protobuf.ByteString
        getDoctorCodeBytes() {
      java.lang.Object ref = doctorCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        doctorCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string doctorCode = 4;</code>
     */
    public Builder setDoctorCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      doctorCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string doctorCode = 4;</code>
     */
    public Builder clearDoctorCode() {
      
      doctorCode_ = getDefaultInstance().getDoctorCode();
      onChanged();
      return this;
    }
    /**
     * <code>string doctorCode = 4;</code>
     */
    public Builder setDoctorCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      doctorCode_ = value;
      onChanged();
      return this;
    }

    private java.util.List<com.ywt.gapi.third.taihe.Diagnose> diagnoseList_ =
      java.util.Collections.emptyList();
    private void ensureDiagnoseListIsMutable() {
      if (!((bitField0_ & 0x00000010) == 0x00000010)) {
        diagnoseList_ = new java.util.ArrayList<com.ywt.gapi.third.taihe.Diagnose>(diagnoseList_);
        bitField0_ |= 0x00000010;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.third.taihe.Diagnose, com.ywt.gapi.third.taihe.Diagnose.Builder, com.ywt.gapi.third.taihe.DiagnoseOrBuilder> diagnoseListBuilder_;

    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public java.util.List<com.ywt.gapi.third.taihe.Diagnose> getDiagnoseListList() {
      if (diagnoseListBuilder_ == null) {
        return java.util.Collections.unmodifiableList(diagnoseList_);
      } else {
        return diagnoseListBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public int getDiagnoseListCount() {
      if (diagnoseListBuilder_ == null) {
        return diagnoseList_.size();
      } else {
        return diagnoseListBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public com.ywt.gapi.third.taihe.Diagnose getDiagnoseList(int index) {
      if (diagnoseListBuilder_ == null) {
        return diagnoseList_.get(index);
      } else {
        return diagnoseListBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder setDiagnoseList(
        int index, com.ywt.gapi.third.taihe.Diagnose value) {
      if (diagnoseListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDiagnoseListIsMutable();
        diagnoseList_.set(index, value);
        onChanged();
      } else {
        diagnoseListBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder setDiagnoseList(
        int index, com.ywt.gapi.third.taihe.Diagnose.Builder builderForValue) {
      if (diagnoseListBuilder_ == null) {
        ensureDiagnoseListIsMutable();
        diagnoseList_.set(index, builderForValue.build());
        onChanged();
      } else {
        diagnoseListBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder addDiagnoseList(com.ywt.gapi.third.taihe.Diagnose value) {
      if (diagnoseListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDiagnoseListIsMutable();
        diagnoseList_.add(value);
        onChanged();
      } else {
        diagnoseListBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder addDiagnoseList(
        int index, com.ywt.gapi.third.taihe.Diagnose value) {
      if (diagnoseListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureDiagnoseListIsMutable();
        diagnoseList_.add(index, value);
        onChanged();
      } else {
        diagnoseListBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder addDiagnoseList(
        com.ywt.gapi.third.taihe.Diagnose.Builder builderForValue) {
      if (diagnoseListBuilder_ == null) {
        ensureDiagnoseListIsMutable();
        diagnoseList_.add(builderForValue.build());
        onChanged();
      } else {
        diagnoseListBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder addDiagnoseList(
        int index, com.ywt.gapi.third.taihe.Diagnose.Builder builderForValue) {
      if (diagnoseListBuilder_ == null) {
        ensureDiagnoseListIsMutable();
        diagnoseList_.add(index, builderForValue.build());
        onChanged();
      } else {
        diagnoseListBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder addAllDiagnoseList(
        java.lang.Iterable<? extends com.ywt.gapi.third.taihe.Diagnose> values) {
      if (diagnoseListBuilder_ == null) {
        ensureDiagnoseListIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, diagnoseList_);
        onChanged();
      } else {
        diagnoseListBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder clearDiagnoseList() {
      if (diagnoseListBuilder_ == null) {
        diagnoseList_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
      } else {
        diagnoseListBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public Builder removeDiagnoseList(int index) {
      if (diagnoseListBuilder_ == null) {
        ensureDiagnoseListIsMutable();
        diagnoseList_.remove(index);
        onChanged();
      } else {
        diagnoseListBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public com.ywt.gapi.third.taihe.Diagnose.Builder getDiagnoseListBuilder(
        int index) {
      return getDiagnoseListFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public com.ywt.gapi.third.taihe.DiagnoseOrBuilder getDiagnoseListOrBuilder(
        int index) {
      if (diagnoseListBuilder_ == null) {
        return diagnoseList_.get(index);  } else {
        return diagnoseListBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public java.util.List<? extends com.ywt.gapi.third.taihe.DiagnoseOrBuilder> 
         getDiagnoseListOrBuilderList() {
      if (diagnoseListBuilder_ != null) {
        return diagnoseListBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(diagnoseList_);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public com.ywt.gapi.third.taihe.Diagnose.Builder addDiagnoseListBuilder() {
      return getDiagnoseListFieldBuilder().addBuilder(
          com.ywt.gapi.third.taihe.Diagnose.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public com.ywt.gapi.third.taihe.Diagnose.Builder addDiagnoseListBuilder(
        int index) {
      return getDiagnoseListFieldBuilder().addBuilder(
          index, com.ywt.gapi.third.taihe.Diagnose.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.third.taihe.Diagnose diagnoseList = 5;</code>
     */
    public java.util.List<com.ywt.gapi.third.taihe.Diagnose.Builder> 
         getDiagnoseListBuilderList() {
      return getDiagnoseListFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.third.taihe.Diagnose, com.ywt.gapi.third.taihe.Diagnose.Builder, com.ywt.gapi.third.taihe.DiagnoseOrBuilder> 
        getDiagnoseListFieldBuilder() {
      if (diagnoseListBuilder_ == null) {
        diagnoseListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.third.taihe.Diagnose, com.ywt.gapi.third.taihe.Diagnose.Builder, com.ywt.gapi.third.taihe.DiagnoseOrBuilder>(
                diagnoseList_,
                ((bitField0_ & 0x00000010) == 0x00000010),
                getParentForChildren(),
                isClean());
        diagnoseList_ = null;
      }
      return diagnoseListBuilder_;
    }

    private int hospitalId_ ;
    /**
     * <code>int32 hospitalId = 6;</code>
     */
    public int getHospitalId() {
      return hospitalId_;
    }
    /**
     * <code>int32 hospitalId = 6;</code>
     */
    public Builder setHospitalId(int value) {
      
      hospitalId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 hospitalId = 6;</code>
     */
    public Builder clearHospitalId() {
      
      hospitalId_ = 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:com.ywt.gapi.third.taihe.AddDiagnosisRequest)
  }

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

  public static com.ywt.gapi.third.taihe.AddDiagnosisRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.ywt.gapi.third.taihe.AddDiagnosisRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

