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

package com.ywt.gapi.med_equip;

/**
 * <pre>
 * 医生开检查单请求
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.med_equip.CreateOrderRequest}
 */
public final class CreateOrderRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.med_equip.CreateOrderRequest)
    CreateOrderRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use CreateOrderRequest.newBuilder() to construct.
  private CreateOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private CreateOrderRequest() {
    diagnose_ = "";
    inspectionItem_ = java.util.Collections.emptyList();
    remark_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private CreateOrderRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8: {

            hospitalId_ = input.readInt32();
            break;
          }
          case 16: {

            doctorId_ = input.readInt32();
            break;
          }
          case 24: {

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

            diagnose_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              inspectionItem_ = new java.util.ArrayList<com.ywt.gapi.med_equip.InspectionItem>();
              mutable_bitField0_ |= 0x00000001;
            }
            inspectionItem_.add(
                input.readMessage(com.ywt.gapi.med_equip.InspectionItem.parser(), extensionRegistry));
            break;
          }
          case 48: {

            totalPrice_ = input.readInt32();
            break;
          }
          case 56: {

            doctorSignId_ = input.readInt32();
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();

            remark_ = s;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        inspectionItem_ = java.util.Collections.unmodifiableList(inspectionItem_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.med_equip.MedEquipProto.internal_static_com_ywt_gapi_med_equip_CreateOrderRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.med_equip.MedEquipProto.internal_static_com_ywt_gapi_med_equip_CreateOrderRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.med_equip.CreateOrderRequest.class, com.ywt.gapi.med_equip.CreateOrderRequest.Builder.class);
  }

  public static final int HOSPITALID_FIELD_NUMBER = 1;
  private int hospitalId_;
  /**
   * <pre>
   * unused
   * </pre>
   *
   * <code>int32 hospitalId = 1;</code>
   * @return The hospitalId.
   */
  @java.lang.Override
  public int getHospitalId() {
    return hospitalId_;
  }

  public static final int DOCTORID_FIELD_NUMBER = 2;
  private int doctorId_;
  /**
   * <pre>
   * 开单医生 id
   * </pre>
   *
   * <code>int32 doctorId = 2;</code>
   * @return The doctorId.
   */
  @java.lang.Override
  public int getDoctorId() {
    return doctorId_;
  }

  public static final int DEPTID_FIELD_NUMBER = 3;
  private int deptId_;
  /**
   * <pre>
   * 科室 id, unused
   * </pre>
   *
   * <code>int32 deptId = 3;</code>
   * @return The deptId.
   */
  @java.lang.Override
  public int getDeptId() {
    return deptId_;
  }

  public static final int DIAGNOSE_FIELD_NUMBER = 4;
  private volatile java.lang.Object diagnose_;
  /**
   * <pre>
   * 诊断
   * </pre>
   *
   * <code>string diagnose = 4;</code>
   * @return The diagnose.
   */
  @java.lang.Override
  public java.lang.String getDiagnose() {
    java.lang.Object ref = diagnose_;
    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();
      diagnose_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 诊断
   * </pre>
   *
   * <code>string diagnose = 4;</code>
   * @return The bytes for diagnose.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDiagnoseBytes() {
    java.lang.Object ref = diagnose_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      diagnose_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int INSPECTIONITEM_FIELD_NUMBER = 5;
  private java.util.List<com.ywt.gapi.med_equip.InspectionItem> inspectionItem_;
  /**
   * <pre>
   * 检查项目列表
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
   */
  @java.lang.Override
  public java.util.List<com.ywt.gapi.med_equip.InspectionItem> getInspectionItemList() {
    return inspectionItem_;
  }
  /**
   * <pre>
   * 检查项目列表
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.ywt.gapi.med_equip.InspectionItemOrBuilder> 
      getInspectionItemOrBuilderList() {
    return inspectionItem_;
  }
  /**
   * <pre>
   * 检查项目列表
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
   */
  @java.lang.Override
  public int getInspectionItemCount() {
    return inspectionItem_.size();
  }
  /**
   * <pre>
   * 检查项目列表
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.med_equip.InspectionItem getInspectionItem(int index) {
    return inspectionItem_.get(index);
  }
  /**
   * <pre>
   * 检查项目列表
   * </pre>
   *
   * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.med_equip.InspectionItemOrBuilder getInspectionItemOrBuilder(
      int index) {
    return inspectionItem_.get(index);
  }

  public static final int TOTALPRICE_FIELD_NUMBER = 6;
  private int totalPrice_;
  /**
   * <pre>
   * 总价，单位：分, unused
   * </pre>
   *
   * <code>int32 totalPrice = 6;</code>
   * @return The totalPrice.
   */
  @java.lang.Override
  public int getTotalPrice() {
    return totalPrice_;
  }

  public static final int DOCTORSIGNID_FIELD_NUMBER = 7;
  private int doctorSignId_;
  /**
   * <pre>
   * 医生签名 id
   * </pre>
   *
   * <code>int32 doctorSignId = 7;</code>
   * @return The doctorSignId.
   */
  @java.lang.Override
  public int getDoctorSignId() {
    return doctorSignId_;
  }

  public static final int REMARK_FIELD_NUMBER = 8;
  private volatile java.lang.Object remark_;
  /**
   * <pre>
   * 备注
   * </pre>
   *
   * <code>string remark = 8;</code>
   * @return The remark.
   */
  @java.lang.Override
  public java.lang.String getRemark() {
    java.lang.Object ref = remark_;
    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();
      remark_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 备注
   * </pre>
   *
   * <code>string remark = 8;</code>
   * @return The bytes for remark.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getRemarkBytes() {
    java.lang.Object ref = remark_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      remark_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (hospitalId_ != 0) {
      output.writeInt32(1, hospitalId_);
    }
    if (doctorId_ != 0) {
      output.writeInt32(2, doctorId_);
    }
    if (deptId_ != 0) {
      output.writeInt32(3, deptId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diagnose_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, diagnose_);
    }
    for (int i = 0; i < inspectionItem_.size(); i++) {
      output.writeMessage(5, inspectionItem_.get(i));
    }
    if (totalPrice_ != 0) {
      output.writeInt32(6, totalPrice_);
    }
    if (doctorSignId_ != 0) {
      output.writeInt32(7, doctorSignId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remark_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, remark_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, hospitalId_);
    }
    if (doctorId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, doctorId_);
    }
    if (deptId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, deptId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(diagnose_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, diagnose_);
    }
    for (int i = 0; i < inspectionItem_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, inspectionItem_.get(i));
    }
    if (totalPrice_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, totalPrice_);
    }
    if (doctorSignId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, doctorSignId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(remark_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, remark_);
    }
    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.med_equip.CreateOrderRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.med_equip.CreateOrderRequest other = (com.ywt.gapi.med_equip.CreateOrderRequest) obj;

    if (getHospitalId()
        != other.getHospitalId()) return false;
    if (getDoctorId()
        != other.getDoctorId()) return false;
    if (getDeptId()
        != other.getDeptId()) return false;
    if (!getDiagnose()
        .equals(other.getDiagnose())) return false;
    if (!getInspectionItemList()
        .equals(other.getInspectionItemList())) return false;
    if (getTotalPrice()
        != other.getTotalPrice()) return false;
    if (getDoctorSignId()
        != other.getDoctorSignId()) return false;
    if (!getRemark()
        .equals(other.getRemark())) 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) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (37 * hash) + DOCTORID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorId();
    hash = (37 * hash) + DEPTID_FIELD_NUMBER;
    hash = (53 * hash) + getDeptId();
    hash = (37 * hash) + DIAGNOSE_FIELD_NUMBER;
    hash = (53 * hash) + getDiagnose().hashCode();
    if (getInspectionItemCount() > 0) {
      hash = (37 * hash) + INSPECTIONITEM_FIELD_NUMBER;
      hash = (53 * hash) + getInspectionItemList().hashCode();
    }
    hash = (37 * hash) + TOTALPRICE_FIELD_NUMBER;
    hash = (53 * hash) + getTotalPrice();
    hash = (37 * hash) + DOCTORSIGNID_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorSignId();
    hash = (37 * hash) + REMARK_FIELD_NUMBER;
    hash = (53 * hash) + getRemark().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.med_equip.MedEquipProto.internal_static_com_ywt_gapi_med_equip_CreateOrderRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.med_equip.CreateOrderRequest.class, com.ywt.gapi.med_equip.CreateOrderRequest.Builder.class);
    }

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

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

      doctorId_ = 0;

      deptId_ = 0;

      diagnose_ = "";

      if (inspectionItemBuilder_ == null) {
        inspectionItem_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        inspectionItemBuilder_.clear();
      }
      totalPrice_ = 0;

      doctorSignId_ = 0;

      remark_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.med_equip.MedEquipProto.internal_static_com_ywt_gapi_med_equip_CreateOrderRequest_descriptor;
    }

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

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

    @java.lang.Override
    public com.ywt.gapi.med_equip.CreateOrderRequest buildPartial() {
      com.ywt.gapi.med_equip.CreateOrderRequest result = new com.ywt.gapi.med_equip.CreateOrderRequest(this);
      int from_bitField0_ = bitField0_;
      result.hospitalId_ = hospitalId_;
      result.doctorId_ = doctorId_;
      result.deptId_ = deptId_;
      result.diagnose_ = diagnose_;
      if (inspectionItemBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          inspectionItem_ = java.util.Collections.unmodifiableList(inspectionItem_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.inspectionItem_ = inspectionItem_;
      } else {
        result.inspectionItem_ = inspectionItemBuilder_.build();
      }
      result.totalPrice_ = totalPrice_;
      result.doctorSignId_ = doctorSignId_;
      result.remark_ = remark_;
      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.med_equip.CreateOrderRequest) {
        return mergeFrom((com.ywt.gapi.med_equip.CreateOrderRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.med_equip.CreateOrderRequest other) {
      if (other == com.ywt.gapi.med_equip.CreateOrderRequest.getDefaultInstance()) return this;
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      if (other.getDoctorId() != 0) {
        setDoctorId(other.getDoctorId());
      }
      if (other.getDeptId() != 0) {
        setDeptId(other.getDeptId());
      }
      if (!other.getDiagnose().isEmpty()) {
        diagnose_ = other.diagnose_;
        onChanged();
      }
      if (inspectionItemBuilder_ == null) {
        if (!other.inspectionItem_.isEmpty()) {
          if (inspectionItem_.isEmpty()) {
            inspectionItem_ = other.inspectionItem_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureInspectionItemIsMutable();
            inspectionItem_.addAll(other.inspectionItem_);
          }
          onChanged();
        }
      } else {
        if (!other.inspectionItem_.isEmpty()) {
          if (inspectionItemBuilder_.isEmpty()) {
            inspectionItemBuilder_.dispose();
            inspectionItemBuilder_ = null;
            inspectionItem_ = other.inspectionItem_;
            bitField0_ = (bitField0_ & ~0x00000001);
            inspectionItemBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getInspectionItemFieldBuilder() : null;
          } else {
            inspectionItemBuilder_.addAllMessages(other.inspectionItem_);
          }
        }
      }
      if (other.getTotalPrice() != 0) {
        setTotalPrice(other.getTotalPrice());
      }
      if (other.getDoctorSignId() != 0) {
        setDoctorSignId(other.getDoctorSignId());
      }
      if (!other.getRemark().isEmpty()) {
        remark_ = other.remark_;
        onChanged();
      }
      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.med_equip.CreateOrderRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.med_equip.CreateOrderRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private int hospitalId_ ;
    /**
     * <pre>
     * unused
     * </pre>
     *
     * <code>int32 hospitalId = 1;</code>
     * @return The hospitalId.
     */
    @java.lang.Override
    public int getHospitalId() {
      return hospitalId_;
    }
    /**
     * <pre>
     * unused
     * </pre>
     *
     * <code>int32 hospitalId = 1;</code>
     * @param value The hospitalId to set.
     * @return This builder for chaining.
     */
    public Builder setHospitalId(int value) {
      
      hospitalId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * unused
     * </pre>
     *
     * <code>int32 hospitalId = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearHospitalId() {
      
      hospitalId_ = 0;
      onChanged();
      return this;
    }

    private int doctorId_ ;
    /**
     * <pre>
     * 开单医生 id
     * </pre>
     *
     * <code>int32 doctorId = 2;</code>
     * @return The doctorId.
     */
    @java.lang.Override
    public int getDoctorId() {
      return doctorId_;
    }
    /**
     * <pre>
     * 开单医生 id
     * </pre>
     *
     * <code>int32 doctorId = 2;</code>
     * @param value The doctorId to set.
     * @return This builder for chaining.
     */
    public Builder setDoctorId(int value) {
      
      doctorId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 开单医生 id
     * </pre>
     *
     * <code>int32 doctorId = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearDoctorId() {
      
      doctorId_ = 0;
      onChanged();
      return this;
    }

    private int deptId_ ;
    /**
     * <pre>
     * 科室 id, unused
     * </pre>
     *
     * <code>int32 deptId = 3;</code>
     * @return The deptId.
     */
    @java.lang.Override
    public int getDeptId() {
      return deptId_;
    }
    /**
     * <pre>
     * 科室 id, unused
     * </pre>
     *
     * <code>int32 deptId = 3;</code>
     * @param value The deptId to set.
     * @return This builder for chaining.
     */
    public Builder setDeptId(int value) {
      
      deptId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 科室 id, unused
     * </pre>
     *
     * <code>int32 deptId = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearDeptId() {
      
      deptId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object diagnose_ = "";
    /**
     * <pre>
     * 诊断
     * </pre>
     *
     * <code>string diagnose = 4;</code>
     * @return The diagnose.
     */
    public java.lang.String getDiagnose() {
      java.lang.Object ref = diagnose_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        diagnose_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 诊断
     * </pre>
     *
     * <code>string diagnose = 4;</code>
     * @return The bytes for diagnose.
     */
    public com.google.protobuf.ByteString
        getDiagnoseBytes() {
      java.lang.Object ref = diagnose_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        diagnose_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 诊断
     * </pre>
     *
     * <code>string diagnose = 4;</code>
     * @param value The diagnose to set.
     * @return This builder for chaining.
     */
    public Builder setDiagnose(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      diagnose_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 诊断
     * </pre>
     *
     * <code>string diagnose = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearDiagnose() {
      
      diagnose_ = getDefaultInstance().getDiagnose();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 诊断
     * </pre>
     *
     * <code>string diagnose = 4;</code>
     * @param value The bytes for diagnose to set.
     * @return This builder for chaining.
     */
    public Builder setDiagnoseBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      diagnose_ = value;
      onChanged();
      return this;
    }

    private java.util.List<com.ywt.gapi.med_equip.InspectionItem> inspectionItem_ =
      java.util.Collections.emptyList();
    private void ensureInspectionItemIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        inspectionItem_ = new java.util.ArrayList<com.ywt.gapi.med_equip.InspectionItem>(inspectionItem_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.med_equip.InspectionItem, com.ywt.gapi.med_equip.InspectionItem.Builder, com.ywt.gapi.med_equip.InspectionItemOrBuilder> inspectionItemBuilder_;

    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public java.util.List<com.ywt.gapi.med_equip.InspectionItem> getInspectionItemList() {
      if (inspectionItemBuilder_ == null) {
        return java.util.Collections.unmodifiableList(inspectionItem_);
      } else {
        return inspectionItemBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public int getInspectionItemCount() {
      if (inspectionItemBuilder_ == null) {
        return inspectionItem_.size();
      } else {
        return inspectionItemBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public com.ywt.gapi.med_equip.InspectionItem getInspectionItem(int index) {
      if (inspectionItemBuilder_ == null) {
        return inspectionItem_.get(index);
      } else {
        return inspectionItemBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder setInspectionItem(
        int index, com.ywt.gapi.med_equip.InspectionItem value) {
      if (inspectionItemBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInspectionItemIsMutable();
        inspectionItem_.set(index, value);
        onChanged();
      } else {
        inspectionItemBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder setInspectionItem(
        int index, com.ywt.gapi.med_equip.InspectionItem.Builder builderForValue) {
      if (inspectionItemBuilder_ == null) {
        ensureInspectionItemIsMutable();
        inspectionItem_.set(index, builderForValue.build());
        onChanged();
      } else {
        inspectionItemBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder addInspectionItem(com.ywt.gapi.med_equip.InspectionItem value) {
      if (inspectionItemBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInspectionItemIsMutable();
        inspectionItem_.add(value);
        onChanged();
      } else {
        inspectionItemBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder addInspectionItem(
        int index, com.ywt.gapi.med_equip.InspectionItem value) {
      if (inspectionItemBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureInspectionItemIsMutable();
        inspectionItem_.add(index, value);
        onChanged();
      } else {
        inspectionItemBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder addInspectionItem(
        com.ywt.gapi.med_equip.InspectionItem.Builder builderForValue) {
      if (inspectionItemBuilder_ == null) {
        ensureInspectionItemIsMutable();
        inspectionItem_.add(builderForValue.build());
        onChanged();
      } else {
        inspectionItemBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder addInspectionItem(
        int index, com.ywt.gapi.med_equip.InspectionItem.Builder builderForValue) {
      if (inspectionItemBuilder_ == null) {
        ensureInspectionItemIsMutable();
        inspectionItem_.add(index, builderForValue.build());
        onChanged();
      } else {
        inspectionItemBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder addAllInspectionItem(
        java.lang.Iterable<? extends com.ywt.gapi.med_equip.InspectionItem> values) {
      if (inspectionItemBuilder_ == null) {
        ensureInspectionItemIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, inspectionItem_);
        onChanged();
      } else {
        inspectionItemBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder clearInspectionItem() {
      if (inspectionItemBuilder_ == null) {
        inspectionItem_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        inspectionItemBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public Builder removeInspectionItem(int index) {
      if (inspectionItemBuilder_ == null) {
        ensureInspectionItemIsMutable();
        inspectionItem_.remove(index);
        onChanged();
      } else {
        inspectionItemBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public com.ywt.gapi.med_equip.InspectionItem.Builder getInspectionItemBuilder(
        int index) {
      return getInspectionItemFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public com.ywt.gapi.med_equip.InspectionItemOrBuilder getInspectionItemOrBuilder(
        int index) {
      if (inspectionItemBuilder_ == null) {
        return inspectionItem_.get(index);  } else {
        return inspectionItemBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public java.util.List<? extends com.ywt.gapi.med_equip.InspectionItemOrBuilder> 
         getInspectionItemOrBuilderList() {
      if (inspectionItemBuilder_ != null) {
        return inspectionItemBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(inspectionItem_);
      }
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public com.ywt.gapi.med_equip.InspectionItem.Builder addInspectionItemBuilder() {
      return getInspectionItemFieldBuilder().addBuilder(
          com.ywt.gapi.med_equip.InspectionItem.getDefaultInstance());
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public com.ywt.gapi.med_equip.InspectionItem.Builder addInspectionItemBuilder(
        int index) {
      return getInspectionItemFieldBuilder().addBuilder(
          index, com.ywt.gapi.med_equip.InspectionItem.getDefaultInstance());
    }
    /**
     * <pre>
     * 检查项目列表
     * </pre>
     *
     * <code>repeated .com.ywt.gapi.med_equip.InspectionItem inspectionItem = 5;</code>
     */
    public java.util.List<com.ywt.gapi.med_equip.InspectionItem.Builder> 
         getInspectionItemBuilderList() {
      return getInspectionItemFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.med_equip.InspectionItem, com.ywt.gapi.med_equip.InspectionItem.Builder, com.ywt.gapi.med_equip.InspectionItemOrBuilder> 
        getInspectionItemFieldBuilder() {
      if (inspectionItemBuilder_ == null) {
        inspectionItemBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.med_equip.InspectionItem, com.ywt.gapi.med_equip.InspectionItem.Builder, com.ywt.gapi.med_equip.InspectionItemOrBuilder>(
                inspectionItem_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        inspectionItem_ = null;
      }
      return inspectionItemBuilder_;
    }

    private int totalPrice_ ;
    /**
     * <pre>
     * 总价，单位：分, unused
     * </pre>
     *
     * <code>int32 totalPrice = 6;</code>
     * @return The totalPrice.
     */
    @java.lang.Override
    public int getTotalPrice() {
      return totalPrice_;
    }
    /**
     * <pre>
     * 总价，单位：分, unused
     * </pre>
     *
     * <code>int32 totalPrice = 6;</code>
     * @param value The totalPrice to set.
     * @return This builder for chaining.
     */
    public Builder setTotalPrice(int value) {
      
      totalPrice_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 总价，单位：分, unused
     * </pre>
     *
     * <code>int32 totalPrice = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearTotalPrice() {
      
      totalPrice_ = 0;
      onChanged();
      return this;
    }

    private int doctorSignId_ ;
    /**
     * <pre>
     * 医生签名 id
     * </pre>
     *
     * <code>int32 doctorSignId = 7;</code>
     * @return The doctorSignId.
     */
    @java.lang.Override
    public int getDoctorSignId() {
      return doctorSignId_;
    }
    /**
     * <pre>
     * 医生签名 id
     * </pre>
     *
     * <code>int32 doctorSignId = 7;</code>
     * @param value The doctorSignId to set.
     * @return This builder for chaining.
     */
    public Builder setDoctorSignId(int value) {
      
      doctorSignId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 医生签名 id
     * </pre>
     *
     * <code>int32 doctorSignId = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearDoctorSignId() {
      
      doctorSignId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object remark_ = "";
    /**
     * <pre>
     * 备注
     * </pre>
     *
     * <code>string remark = 8;</code>
     * @return The remark.
     */
    public java.lang.String getRemark() {
      java.lang.Object ref = remark_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        remark_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 备注
     * </pre>
     *
     * <code>string remark = 8;</code>
     * @return The bytes for remark.
     */
    public com.google.protobuf.ByteString
        getRemarkBytes() {
      java.lang.Object ref = remark_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        remark_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 备注
     * </pre>
     *
     * <code>string remark = 8;</code>
     * @param value The remark to set.
     * @return This builder for chaining.
     */
    public Builder setRemark(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      remark_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 备注
     * </pre>
     *
     * <code>string remark = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearRemark() {
      
      remark_ = getDefaultInstance().getRemark();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 备注
     * </pre>
     *
     * <code>string remark = 8;</code>
     * @param value The bytes for remark to set.
     * @return This builder for chaining.
     */
    public Builder setRemarkBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      remark_ = value;
      onChanged();
      return this;
    }
    @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.med_equip.CreateOrderRequest)
  }

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

  public static com.ywt.gapi.med_equip.CreateOrderRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

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

}

