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

package com.ywt.gapi.nfyy;

/**
 * <pre>
 *门诊病历
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.nfyy.MedCase}
 */
public final class MedCase extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.nfyy.MedCase)
    MedCaseOrBuilder {
private static final long serialVersionUID = 0L;
  // Use MedCase.newBuilder() to construct.
  private MedCase(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private MedCase() {
    id_ = "";
    title_ = "";
    effectiveTime_ = "";
    author_ = "";
    doctorId_ = "";
    custodian_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new MedCase();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private MedCase(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    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: {
            java.lang.String s = input.readStringRequireUtf8();

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

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

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

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

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

            custodian_ = s;
            break;
          }
          case 58: {
            com.ywt.gapi.nfyy.MedCasePatInfo.Builder subBuilder = null;
            if (patient_ != null) {
              subBuilder = patient_.toBuilder();
            }
            patient_ = input.readMessage(com.ywt.gapi.nfyy.MedCasePatInfo.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(patient_);
              patient_ = subBuilder.buildPartial();
            }

            break;
          }
          case 66: {
            com.ywt.gapi.nfyy.MedRecordDetail.Builder subBuilder = null;
            if (detail_ != null) {
              subBuilder = detail_.toBuilder();
            }
            detail_ = input.readMessage(com.ywt.gapi.nfyy.MedRecordDetail.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(detail_);
              detail_ = subBuilder.buildPartial();
            }

            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 {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.nfyy.NfyyProto.internal_static_com_ywt_gapi_nfyy_MedCase_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.nfyy.NfyyProto.internal_static_com_ywt_gapi_nfyy_MedCase_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.nfyy.MedCase.class, com.ywt.gapi.nfyy.MedCase.Builder.class);
  }

  public static final int ID_FIELD_NUMBER = 1;
  private volatile java.lang.Object id_;
  /**
   * <pre>
   *id
   * </pre>
   *
   * <code>string id = 1;</code>
   * @return The id.
   */
  @java.lang.Override
  public java.lang.String getId() {
    java.lang.Object ref = id_;
    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();
      id_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *id
   * </pre>
   *
   * <code>string id = 1;</code>
   * @return The bytes for id.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getIdBytes() {
    java.lang.Object ref = id_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      id_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TITLE_FIELD_NUMBER = 2;
  private volatile java.lang.Object title_;
  /**
   * <pre>
   *标题
   * </pre>
   *
   * <code>string title = 2;</code>
   * @return The title.
   */
  @java.lang.Override
  public java.lang.String getTitle() {
    java.lang.Object ref = title_;
    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();
      title_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *标题
   * </pre>
   *
   * <code>string title = 2;</code>
   * @return The bytes for title.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTitleBytes() {
    java.lang.Object ref = title_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      title_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EFFECTIVETIME_FIELD_NUMBER = 3;
  private volatile java.lang.Object effectiveTime_;
  /**
   * <pre>
   *时间（YYYYMMDD)
   * </pre>
   *
   * <code>string effectiveTime = 3;</code>
   * @return The effectiveTime.
   */
  @java.lang.Override
  public java.lang.String getEffectiveTime() {
    java.lang.Object ref = effectiveTime_;
    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();
      effectiveTime_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *时间（YYYYMMDD)
   * </pre>
   *
   * <code>string effectiveTime = 3;</code>
   * @return The bytes for effectiveTime.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getEffectiveTimeBytes() {
    java.lang.Object ref = effectiveTime_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      effectiveTime_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int AUTHOR_FIELD_NUMBER = 4;
  private volatile java.lang.Object author_;
  /**
   * <pre>
   *医生姓名
   * </pre>
   *
   * <code>string author = 4;</code>
   * @return The author.
   */
  @java.lang.Override
  public java.lang.String getAuthor() {
    java.lang.Object ref = author_;
    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();
      author_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *医生姓名
   * </pre>
   *
   * <code>string author = 4;</code>
   * @return The bytes for author.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getAuthorBytes() {
    java.lang.Object ref = author_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      author_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DOCTORID_FIELD_NUMBER = 5;
  private volatile java.lang.Object doctorId_;
  /**
   * <pre>
   *医生ID
   * </pre>
   *
   * <code>string doctorId = 5;</code>
   * @return The doctorId.
   */
  @java.lang.Override
  public java.lang.String getDoctorId() {
    java.lang.Object ref = doctorId_;
    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();
      doctorId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *医生ID
   * </pre>
   *
   * <code>string doctorId = 5;</code>
   * @return The bytes for doctorId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDoctorIdBytes() {
    java.lang.Object ref = doctorId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      doctorId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CUSTODIAN_FIELD_NUMBER = 6;
  private volatile java.lang.Object custodian_;
  /**
   * <pre>
   *医院名称
   * </pre>
   *
   * <code>string custodian = 6;</code>
   * @return The custodian.
   */
  @java.lang.Override
  public java.lang.String getCustodian() {
    java.lang.Object ref = custodian_;
    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();
      custodian_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *医院名称
   * </pre>
   *
   * <code>string custodian = 6;</code>
   * @return The bytes for custodian.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getCustodianBytes() {
    java.lang.Object ref = custodian_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      custodian_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PATIENT_FIELD_NUMBER = 7;
  private com.ywt.gapi.nfyy.MedCasePatInfo patient_;
  /**
   * <pre>
   *患者信息
   * </pre>
   *
   * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
   * @return Whether the patient field is set.
   */
  @java.lang.Override
  public boolean hasPatient() {
    return patient_ != null;
  }
  /**
   * <pre>
   *患者信息
   * </pre>
   *
   * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
   * @return The patient.
   */
  @java.lang.Override
  public com.ywt.gapi.nfyy.MedCasePatInfo getPatient() {
    return patient_ == null ? com.ywt.gapi.nfyy.MedCasePatInfo.getDefaultInstance() : patient_;
  }
  /**
   * <pre>
   *患者信息
   * </pre>
   *
   * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.nfyy.MedCasePatInfoOrBuilder getPatientOrBuilder() {
    return getPatient();
  }

  public static final int DETAIL_FIELD_NUMBER = 8;
  private com.ywt.gapi.nfyy.MedRecordDetail detail_;
  /**
   * <pre>
   *病历记录
   * </pre>
   *
   * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
   * @return Whether the detail field is set.
   */
  @java.lang.Override
  public boolean hasDetail() {
    return detail_ != null;
  }
  /**
   * <pre>
   *病历记录
   * </pre>
   *
   * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
   * @return The detail.
   */
  @java.lang.Override
  public com.ywt.gapi.nfyy.MedRecordDetail getDetail() {
    return detail_ == null ? com.ywt.gapi.nfyy.MedRecordDetail.getDefaultInstance() : detail_;
  }
  /**
   * <pre>
   *病历记录
   * </pre>
   *
   * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.nfyy.MedRecordDetailOrBuilder getDetailOrBuilder() {
    return getDetail();
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, title_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(effectiveTime_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, effectiveTime_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(author_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, author_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(doctorId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, doctorId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(custodian_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, custodian_);
    }
    if (patient_ != null) {
      output.writeMessage(7, getPatient());
    }
    if (detail_ != null) {
      output.writeMessage(8, getDetail());
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(title_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, title_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(effectiveTime_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, effectiveTime_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(author_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, author_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(doctorId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, doctorId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(custodian_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, custodian_);
    }
    if (patient_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, getPatient());
    }
    if (detail_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getDetail());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.nfyy.MedCase)) {
      return super.equals(obj);
    }
    com.ywt.gapi.nfyy.MedCase other = (com.ywt.gapi.nfyy.MedCase) obj;

    if (!getId()
        .equals(other.getId())) return false;
    if (!getTitle()
        .equals(other.getTitle())) return false;
    if (!getEffectiveTime()
        .equals(other.getEffectiveTime())) return false;
    if (!getAuthor()
        .equals(other.getAuthor())) return false;
    if (!getDoctorId()
        .equals(other.getDoctorId())) return false;
    if (!getCustodian()
        .equals(other.getCustodian())) return false;
    if (hasPatient() != other.hasPatient()) return false;
    if (hasPatient()) {
      if (!getPatient()
          .equals(other.getPatient())) return false;
    }
    if (hasDetail() != other.hasDetail()) return false;
    if (hasDetail()) {
      if (!getDetail()
          .equals(other.getDetail())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + ID_FIELD_NUMBER;
    hash = (53 * hash) + getId().hashCode();
    hash = (37 * hash) + TITLE_FIELD_NUMBER;
    hash = (53 * hash) + getTitle().hashCode();
    hash = (37 * hash) + EFFECTIVETIME_FIELD_NUMBER;
    hash = (53 * hash) + getEffectiveTime().hashCode();
    hash = (37 * hash) + AUTHOR_FIELD_NUMBER;
    hash = (53 * hash) + getAuthor().hashCode();
    hash = (37 * hash) + DOCTORID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorId().hashCode();
    hash = (37 * hash) + CUSTODIAN_FIELD_NUMBER;
    hash = (53 * hash) + getCustodian().hashCode();
    if (hasPatient()) {
      hash = (37 * hash) + PATIENT_FIELD_NUMBER;
      hash = (53 * hash) + getPatient().hashCode();
    }
    if (hasDetail()) {
      hash = (37 * hash) + DETAIL_FIELD_NUMBER;
      hash = (53 * hash) + getDetail().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.nfyy.MedCase prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  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;
  }
  /**
   * <pre>
   *门诊病历
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.nfyy.MedCase}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.nfyy.MedCase)
      com.ywt.gapi.nfyy.MedCaseOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.nfyy.NfyyProto.internal_static_com_ywt_gapi_nfyy_MedCase_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.nfyy.NfyyProto.internal_static_com_ywt_gapi_nfyy_MedCase_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.nfyy.MedCase.class, com.ywt.gapi.nfyy.MedCase.Builder.class);
    }

    // Construct using com.ywt.gapi.nfyy.MedCase.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      id_ = "";

      title_ = "";

      effectiveTime_ = "";

      author_ = "";

      doctorId_ = "";

      custodian_ = "";

      if (patientBuilder_ == null) {
        patient_ = null;
      } else {
        patient_ = null;
        patientBuilder_ = null;
      }
      if (detailBuilder_ == null) {
        detail_ = null;
      } else {
        detail_ = null;
        detailBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.nfyy.NfyyProto.internal_static_com_ywt_gapi_nfyy_MedCase_descriptor;
    }

    @java.lang.Override
    public com.ywt.gapi.nfyy.MedCase getDefaultInstanceForType() {
      return com.ywt.gapi.nfyy.MedCase.getDefaultInstance();
    }

    @java.lang.Override
    public com.ywt.gapi.nfyy.MedCase build() {
      com.ywt.gapi.nfyy.MedCase result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.ywt.gapi.nfyy.MedCase buildPartial() {
      com.ywt.gapi.nfyy.MedCase result = new com.ywt.gapi.nfyy.MedCase(this);
      result.id_ = id_;
      result.title_ = title_;
      result.effectiveTime_ = effectiveTime_;
      result.author_ = author_;
      result.doctorId_ = doctorId_;
      result.custodian_ = custodian_;
      if (patientBuilder_ == null) {
        result.patient_ = patient_;
      } else {
        result.patient_ = patientBuilder_.build();
      }
      if (detailBuilder_ == null) {
        result.detail_ = detail_;
      } else {
        result.detail_ = detailBuilder_.build();
      }
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.ywt.gapi.nfyy.MedCase other) {
      if (other == com.ywt.gapi.nfyy.MedCase.getDefaultInstance()) return this;
      if (!other.getId().isEmpty()) {
        id_ = other.id_;
        onChanged();
      }
      if (!other.getTitle().isEmpty()) {
        title_ = other.title_;
        onChanged();
      }
      if (!other.getEffectiveTime().isEmpty()) {
        effectiveTime_ = other.effectiveTime_;
        onChanged();
      }
      if (!other.getAuthor().isEmpty()) {
        author_ = other.author_;
        onChanged();
      }
      if (!other.getDoctorId().isEmpty()) {
        doctorId_ = other.doctorId_;
        onChanged();
      }
      if (!other.getCustodian().isEmpty()) {
        custodian_ = other.custodian_;
        onChanged();
      }
      if (other.hasPatient()) {
        mergePatient(other.getPatient());
      }
      if (other.hasDetail()) {
        mergeDetail(other.getDetail());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private java.lang.Object id_ = "";
    /**
     * <pre>
     *id
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return The id.
     */
    public java.lang.String getId() {
      java.lang.Object ref = id_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        id_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *id
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return The bytes for id.
     */
    public com.google.protobuf.ByteString
        getIdBytes() {
      java.lang.Object ref = id_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        id_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *id
     * </pre>
     *
     * <code>string id = 1;</code>
     * @param value The id to set.
     * @return This builder for chaining.
     */
    public Builder setId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      id_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *id
     * </pre>
     *
     * <code>string id = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearId() {
      
      id_ = getDefaultInstance().getId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *id
     * </pre>
     *
     * <code>string id = 1;</code>
     * @param value The bytes for id to set.
     * @return This builder for chaining.
     */
    public Builder setIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      id_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object title_ = "";
    /**
     * <pre>
     *标题
     * </pre>
     *
     * <code>string title = 2;</code>
     * @return The title.
     */
    public java.lang.String getTitle() {
      java.lang.Object ref = title_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        title_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *标题
     * </pre>
     *
     * <code>string title = 2;</code>
     * @return The bytes for title.
     */
    public com.google.protobuf.ByteString
        getTitleBytes() {
      java.lang.Object ref = title_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        title_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *标题
     * </pre>
     *
     * <code>string title = 2;</code>
     * @param value The title to set.
     * @return This builder for chaining.
     */
    public Builder setTitle(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      title_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *标题
     * </pre>
     *
     * <code>string title = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearTitle() {
      
      title_ = getDefaultInstance().getTitle();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *标题
     * </pre>
     *
     * <code>string title = 2;</code>
     * @param value The bytes for title to set.
     * @return This builder for chaining.
     */
    public Builder setTitleBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      title_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object effectiveTime_ = "";
    /**
     * <pre>
     *时间（YYYYMMDD)
     * </pre>
     *
     * <code>string effectiveTime = 3;</code>
     * @return The effectiveTime.
     */
    public java.lang.String getEffectiveTime() {
      java.lang.Object ref = effectiveTime_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        effectiveTime_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *时间（YYYYMMDD)
     * </pre>
     *
     * <code>string effectiveTime = 3;</code>
     * @return The bytes for effectiveTime.
     */
    public com.google.protobuf.ByteString
        getEffectiveTimeBytes() {
      java.lang.Object ref = effectiveTime_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        effectiveTime_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *时间（YYYYMMDD)
     * </pre>
     *
     * <code>string effectiveTime = 3;</code>
     * @param value The effectiveTime to set.
     * @return This builder for chaining.
     */
    public Builder setEffectiveTime(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      effectiveTime_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *时间（YYYYMMDD)
     * </pre>
     *
     * <code>string effectiveTime = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearEffectiveTime() {
      
      effectiveTime_ = getDefaultInstance().getEffectiveTime();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *时间（YYYYMMDD)
     * </pre>
     *
     * <code>string effectiveTime = 3;</code>
     * @param value The bytes for effectiveTime to set.
     * @return This builder for chaining.
     */
    public Builder setEffectiveTimeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      effectiveTime_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object author_ = "";
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string author = 4;</code>
     * @return The author.
     */
    public java.lang.String getAuthor() {
      java.lang.Object ref = author_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        author_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string author = 4;</code>
     * @return The bytes for author.
     */
    public com.google.protobuf.ByteString
        getAuthorBytes() {
      java.lang.Object ref = author_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        author_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string author = 4;</code>
     * @param value The author to set.
     * @return This builder for chaining.
     */
    public Builder setAuthor(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      author_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string author = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearAuthor() {
      
      author_ = getDefaultInstance().getAuthor();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生姓名
     * </pre>
     *
     * <code>string author = 4;</code>
     * @param value The bytes for author to set.
     * @return This builder for chaining.
     */
    public Builder setAuthorBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      author_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object doctorId_ = "";
    /**
     * <pre>
     *医生ID
     * </pre>
     *
     * <code>string doctorId = 5;</code>
     * @return The doctorId.
     */
    public java.lang.String getDoctorId() {
      java.lang.Object ref = doctorId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        doctorId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *医生ID
     * </pre>
     *
     * <code>string doctorId = 5;</code>
     * @return The bytes for doctorId.
     */
    public com.google.protobuf.ByteString
        getDoctorIdBytes() {
      java.lang.Object ref = doctorId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        doctorId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *医生ID
     * </pre>
     *
     * <code>string doctorId = 5;</code>
     * @param value The doctorId to set.
     * @return This builder for chaining.
     */
    public Builder setDoctorId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      doctorId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生ID
     * </pre>
     *
     * <code>string doctorId = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearDoctorId() {
      
      doctorId_ = getDefaultInstance().getDoctorId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医生ID
     * </pre>
     *
     * <code>string doctorId = 5;</code>
     * @param value The bytes for doctorId to set.
     * @return This builder for chaining.
     */
    public Builder setDoctorIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      doctorId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object custodian_ = "";
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string custodian = 6;</code>
     * @return The custodian.
     */
    public java.lang.String getCustodian() {
      java.lang.Object ref = custodian_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        custodian_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string custodian = 6;</code>
     * @return The bytes for custodian.
     */
    public com.google.protobuf.ByteString
        getCustodianBytes() {
      java.lang.Object ref = custodian_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        custodian_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string custodian = 6;</code>
     * @param value The custodian to set.
     * @return This builder for chaining.
     */
    public Builder setCustodian(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      custodian_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string custodian = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearCustodian() {
      
      custodian_ = getDefaultInstance().getCustodian();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *医院名称
     * </pre>
     *
     * <code>string custodian = 6;</code>
     * @param value The bytes for custodian to set.
     * @return This builder for chaining.
     */
    public Builder setCustodianBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      custodian_ = value;
      onChanged();
      return this;
    }

    private com.ywt.gapi.nfyy.MedCasePatInfo patient_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.nfyy.MedCasePatInfo, com.ywt.gapi.nfyy.MedCasePatInfo.Builder, com.ywt.gapi.nfyy.MedCasePatInfoOrBuilder> patientBuilder_;
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     * @return Whether the patient field is set.
     */
    public boolean hasPatient() {
      return patientBuilder_ != null || patient_ != null;
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     * @return The patient.
     */
    public com.ywt.gapi.nfyy.MedCasePatInfo getPatient() {
      if (patientBuilder_ == null) {
        return patient_ == null ? com.ywt.gapi.nfyy.MedCasePatInfo.getDefaultInstance() : patient_;
      } else {
        return patientBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    public Builder setPatient(com.ywt.gapi.nfyy.MedCasePatInfo value) {
      if (patientBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        patient_ = value;
        onChanged();
      } else {
        patientBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    public Builder setPatient(
        com.ywt.gapi.nfyy.MedCasePatInfo.Builder builderForValue) {
      if (patientBuilder_ == null) {
        patient_ = builderForValue.build();
        onChanged();
      } else {
        patientBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    public Builder mergePatient(com.ywt.gapi.nfyy.MedCasePatInfo value) {
      if (patientBuilder_ == null) {
        if (patient_ != null) {
          patient_ =
            com.ywt.gapi.nfyy.MedCasePatInfo.newBuilder(patient_).mergeFrom(value).buildPartial();
        } else {
          patient_ = value;
        }
        onChanged();
      } else {
        patientBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    public Builder clearPatient() {
      if (patientBuilder_ == null) {
        patient_ = null;
        onChanged();
      } else {
        patient_ = null;
        patientBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    public com.ywt.gapi.nfyy.MedCasePatInfo.Builder getPatientBuilder() {
      
      onChanged();
      return getPatientFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    public com.ywt.gapi.nfyy.MedCasePatInfoOrBuilder getPatientOrBuilder() {
      if (patientBuilder_ != null) {
        return patientBuilder_.getMessageOrBuilder();
      } else {
        return patient_ == null ?
            com.ywt.gapi.nfyy.MedCasePatInfo.getDefaultInstance() : patient_;
      }
    }
    /**
     * <pre>
     *患者信息
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedCasePatInfo patient = 7;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.nfyy.MedCasePatInfo, com.ywt.gapi.nfyy.MedCasePatInfo.Builder, com.ywt.gapi.nfyy.MedCasePatInfoOrBuilder> 
        getPatientFieldBuilder() {
      if (patientBuilder_ == null) {
        patientBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.nfyy.MedCasePatInfo, com.ywt.gapi.nfyy.MedCasePatInfo.Builder, com.ywt.gapi.nfyy.MedCasePatInfoOrBuilder>(
                getPatient(),
                getParentForChildren(),
                isClean());
        patient_ = null;
      }
      return patientBuilder_;
    }

    private com.ywt.gapi.nfyy.MedRecordDetail detail_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.nfyy.MedRecordDetail, com.ywt.gapi.nfyy.MedRecordDetail.Builder, com.ywt.gapi.nfyy.MedRecordDetailOrBuilder> detailBuilder_;
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     * @return Whether the detail field is set.
     */
    public boolean hasDetail() {
      return detailBuilder_ != null || detail_ != null;
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     * @return The detail.
     */
    public com.ywt.gapi.nfyy.MedRecordDetail getDetail() {
      if (detailBuilder_ == null) {
        return detail_ == null ? com.ywt.gapi.nfyy.MedRecordDetail.getDefaultInstance() : detail_;
      } else {
        return detailBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    public Builder setDetail(com.ywt.gapi.nfyy.MedRecordDetail value) {
      if (detailBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        detail_ = value;
        onChanged();
      } else {
        detailBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    public Builder setDetail(
        com.ywt.gapi.nfyy.MedRecordDetail.Builder builderForValue) {
      if (detailBuilder_ == null) {
        detail_ = builderForValue.build();
        onChanged();
      } else {
        detailBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    public Builder mergeDetail(com.ywt.gapi.nfyy.MedRecordDetail value) {
      if (detailBuilder_ == null) {
        if (detail_ != null) {
          detail_ =
            com.ywt.gapi.nfyy.MedRecordDetail.newBuilder(detail_).mergeFrom(value).buildPartial();
        } else {
          detail_ = value;
        }
        onChanged();
      } else {
        detailBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    public Builder clearDetail() {
      if (detailBuilder_ == null) {
        detail_ = null;
        onChanged();
      } else {
        detail_ = null;
        detailBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    public com.ywt.gapi.nfyy.MedRecordDetail.Builder getDetailBuilder() {
      
      onChanged();
      return getDetailFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    public com.ywt.gapi.nfyy.MedRecordDetailOrBuilder getDetailOrBuilder() {
      if (detailBuilder_ != null) {
        return detailBuilder_.getMessageOrBuilder();
      } else {
        return detail_ == null ?
            com.ywt.gapi.nfyy.MedRecordDetail.getDefaultInstance() : detail_;
      }
    }
    /**
     * <pre>
     *病历记录
     * </pre>
     *
     * <code>.com.ywt.gapi.nfyy.MedRecordDetail detail = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.nfyy.MedRecordDetail, com.ywt.gapi.nfyy.MedRecordDetail.Builder, com.ywt.gapi.nfyy.MedRecordDetailOrBuilder> 
        getDetailFieldBuilder() {
      if (detailBuilder_ == null) {
        detailBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.nfyy.MedRecordDetail, com.ywt.gapi.nfyy.MedRecordDetail.Builder, com.ywt.gapi.nfyy.MedRecordDetailOrBuilder>(
                getDetail(),
                getParentForChildren(),
                isClean());
        detail_ = null;
      }
      return detailBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.nfyy.MedCase)
  }

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

  public static com.ywt.gapi.nfyy.MedCase getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.ywt.gapi.nfyy.MedCase getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

