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

package com.ywt.gapi.checkup_booking;

/**
 * Protobuf type {@code com.ywt.gapi.checkup_booking.CreateOrderRequest}
 */
public final class CreateOrderRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.checkup_booking.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() {
    medCardNo_ = "";
  }

  @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();
    }
    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: {

            userId_ = input.readInt32();
            break;
          }
          case 18: {
            com.ywt.gapi.checkup_booking.RegRecord.Builder subBuilder = null;
            if (regRecord_ != null) {
              subBuilder = regRecord_.toBuilder();
            }
            regRecord_ = input.readMessage(com.ywt.gapi.checkup_booking.RegRecord.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(regRecord_);
              regRecord_ = subBuilder.buildPartial();
            }

            break;
          }
          case 24: {

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

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

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

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

  public static final int USERID_FIELD_NUMBER = 1;
  private int userId_;
  /**
   * <code>int32 userId = 1;</code>
   * @return The userId.
   */
  @java.lang.Override
  public int getUserId() {
    return userId_;
  }

  public static final int REGRECORD_FIELD_NUMBER = 2;
  private com.ywt.gapi.checkup_booking.RegRecord regRecord_;
  /**
   * <pre>
   * 预约信息
   * </pre>
   *
   * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
   * @return Whether the regRecord field is set.
   */
  @java.lang.Override
  public boolean hasRegRecord() {
    return regRecord_ != null;
  }
  /**
   * <pre>
   * 预约信息
   * </pre>
   *
   * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
   * @return The regRecord.
   */
  @java.lang.Override
  public com.ywt.gapi.checkup_booking.RegRecord getRegRecord() {
    return regRecord_ == null ? com.ywt.gapi.checkup_booking.RegRecord.getDefaultInstance() : regRecord_;
  }
  /**
   * <pre>
   * 预约信息
   * </pre>
   *
   * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.checkup_booking.RegRecordOrBuilder getRegRecordOrBuilder() {
    return getRegRecord();
  }

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

  public static final int SUBHOSPITALID_FIELD_NUMBER = 4;
  private int subHospitalId_;
  /**
   * <code>int32 subHospitalId = 4;</code>
   * @return The subHospitalId.
   */
  @java.lang.Override
  public int getSubHospitalId() {
    return subHospitalId_;
  }

  public static final int MEDCARDNO_FIELD_NUMBER = 5;
  private volatile java.lang.Object medCardNo_;
  /**
   * <pre>
   * 诊疗卡号
   * </pre>
   *
   * <code>string medCardNo = 5;</code>
   * @return The medCardNo.
   */
  @java.lang.Override
  public java.lang.String getMedCardNo() {
    java.lang.Object ref = medCardNo_;
    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();
      medCardNo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 诊疗卡号
   * </pre>
   *
   * <code>string medCardNo = 5;</code>
   * @return The bytes for medCardNo.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getMedCardNoBytes() {
    java.lang.Object ref = medCardNo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      medCardNo_ = 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 (userId_ != 0) {
      output.writeInt32(1, userId_);
    }
    if (regRecord_ != null) {
      output.writeMessage(2, getRegRecord());
    }
    if (hospitalId_ != 0) {
      output.writeInt32(3, hospitalId_);
    }
    if (subHospitalId_ != 0) {
      output.writeInt32(4, subHospitalId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(medCardNo_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, medCardNo_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (userId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, userId_);
    }
    if (regRecord_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getRegRecord());
    }
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(3, hospitalId_);
    }
    if (subHospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(4, subHospitalId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(medCardNo_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, medCardNo_);
    }
    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.checkup_booking.CreateOrderRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.checkup_booking.CreateOrderRequest other = (com.ywt.gapi.checkup_booking.CreateOrderRequest) obj;

    if (getUserId()
        != other.getUserId()) return false;
    if (hasRegRecord() != other.hasRegRecord()) return false;
    if (hasRegRecord()) {
      if (!getRegRecord()
          .equals(other.getRegRecord())) return false;
    }
    if (getHospitalId()
        != other.getHospitalId()) return false;
    if (getSubHospitalId()
        != other.getSubHospitalId()) return false;
    if (!getMedCardNo()
        .equals(other.getMedCardNo())) 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) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserId();
    if (hasRegRecord()) {
      hash = (37 * hash) + REGRECORD_FIELD_NUMBER;
      hash = (53 * hash) + getRegRecord().hashCode();
    }
    hash = (37 * hash) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (37 * hash) + SUBHOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getSubHospitalId();
    hash = (37 * hash) + MEDCARDNO_FIELD_NUMBER;
    hash = (53 * hash) + getMedCardNo().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

    // Construct using com.ywt.gapi.checkup_booking.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) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      userId_ = 0;

      if (regRecordBuilder_ == null) {
        regRecord_ = null;
      } else {
        regRecord_ = null;
        regRecordBuilder_ = null;
      }
      hospitalId_ = 0;

      subHospitalId_ = 0;

      medCardNo_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.checkup_booking.CheckupBookingProto.internal_static_com_ywt_gapi_checkup_booking_CreateOrderRequest_descriptor;
    }

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

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

    @java.lang.Override
    public com.ywt.gapi.checkup_booking.CreateOrderRequest buildPartial() {
      com.ywt.gapi.checkup_booking.CreateOrderRequest result = new com.ywt.gapi.checkup_booking.CreateOrderRequest(this);
      result.userId_ = userId_;
      if (regRecordBuilder_ == null) {
        result.regRecord_ = regRecord_;
      } else {
        result.regRecord_ = regRecordBuilder_.build();
      }
      result.hospitalId_ = hospitalId_;
      result.subHospitalId_ = subHospitalId_;
      result.medCardNo_ = medCardNo_;
      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.checkup_booking.CreateOrderRequest) {
        return mergeFrom((com.ywt.gapi.checkup_booking.CreateOrderRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.checkup_booking.CreateOrderRequest other) {
      if (other == com.ywt.gapi.checkup_booking.CreateOrderRequest.getDefaultInstance()) return this;
      if (other.getUserId() != 0) {
        setUserId(other.getUserId());
      }
      if (other.hasRegRecord()) {
        mergeRegRecord(other.getRegRecord());
      }
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      if (other.getSubHospitalId() != 0) {
        setSubHospitalId(other.getSubHospitalId());
      }
      if (!other.getMedCardNo().isEmpty()) {
        medCardNo_ = other.medCardNo_;
        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.checkup_booking.CreateOrderRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.checkup_booking.CreateOrderRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int userId_ ;
    /**
     * <code>int32 userId = 1;</code>
     * @return The userId.
     */
    @java.lang.Override
    public int getUserId() {
      return userId_;
    }
    /**
     * <code>int32 userId = 1;</code>
     * @param value The userId to set.
     * @return This builder for chaining.
     */
    public Builder setUserId(int value) {
      
      userId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 userId = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearUserId() {
      
      userId_ = 0;
      onChanged();
      return this;
    }

    private com.ywt.gapi.checkup_booking.RegRecord regRecord_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.checkup_booking.RegRecord, com.ywt.gapi.checkup_booking.RegRecord.Builder, com.ywt.gapi.checkup_booking.RegRecordOrBuilder> regRecordBuilder_;
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     * @return Whether the regRecord field is set.
     */
    public boolean hasRegRecord() {
      return regRecordBuilder_ != null || regRecord_ != null;
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     * @return The regRecord.
     */
    public com.ywt.gapi.checkup_booking.RegRecord getRegRecord() {
      if (regRecordBuilder_ == null) {
        return regRecord_ == null ? com.ywt.gapi.checkup_booking.RegRecord.getDefaultInstance() : regRecord_;
      } else {
        return regRecordBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    public Builder setRegRecord(com.ywt.gapi.checkup_booking.RegRecord value) {
      if (regRecordBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        regRecord_ = value;
        onChanged();
      } else {
        regRecordBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    public Builder setRegRecord(
        com.ywt.gapi.checkup_booking.RegRecord.Builder builderForValue) {
      if (regRecordBuilder_ == null) {
        regRecord_ = builderForValue.build();
        onChanged();
      } else {
        regRecordBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    public Builder mergeRegRecord(com.ywt.gapi.checkup_booking.RegRecord value) {
      if (regRecordBuilder_ == null) {
        if (regRecord_ != null) {
          regRecord_ =
            com.ywt.gapi.checkup_booking.RegRecord.newBuilder(regRecord_).mergeFrom(value).buildPartial();
        } else {
          regRecord_ = value;
        }
        onChanged();
      } else {
        regRecordBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    public Builder clearRegRecord() {
      if (regRecordBuilder_ == null) {
        regRecord_ = null;
        onChanged();
      } else {
        regRecord_ = null;
        regRecordBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    public com.ywt.gapi.checkup_booking.RegRecord.Builder getRegRecordBuilder() {
      
      onChanged();
      return getRegRecordFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    public com.ywt.gapi.checkup_booking.RegRecordOrBuilder getRegRecordOrBuilder() {
      if (regRecordBuilder_ != null) {
        return regRecordBuilder_.getMessageOrBuilder();
      } else {
        return regRecord_ == null ?
            com.ywt.gapi.checkup_booking.RegRecord.getDefaultInstance() : regRecord_;
      }
    }
    /**
     * <pre>
     * 预约信息
     * </pre>
     *
     * <code>.com.ywt.gapi.checkup_booking.RegRecord regRecord = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.checkup_booking.RegRecord, com.ywt.gapi.checkup_booking.RegRecord.Builder, com.ywt.gapi.checkup_booking.RegRecordOrBuilder> 
        getRegRecordFieldBuilder() {
      if (regRecordBuilder_ == null) {
        regRecordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.checkup_booking.RegRecord, com.ywt.gapi.checkup_booking.RegRecord.Builder, com.ywt.gapi.checkup_booking.RegRecordOrBuilder>(
                getRegRecord(),
                getParentForChildren(),
                isClean());
        regRecord_ = null;
      }
      return regRecordBuilder_;
    }

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

    private int subHospitalId_ ;
    /**
     * <code>int32 subHospitalId = 4;</code>
     * @return The subHospitalId.
     */
    @java.lang.Override
    public int getSubHospitalId() {
      return subHospitalId_;
    }
    /**
     * <code>int32 subHospitalId = 4;</code>
     * @param value The subHospitalId to set.
     * @return This builder for chaining.
     */
    public Builder setSubHospitalId(int value) {
      
      subHospitalId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 subHospitalId = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearSubHospitalId() {
      
      subHospitalId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object medCardNo_ = "";
    /**
     * <pre>
     * 诊疗卡号
     * </pre>
     *
     * <code>string medCardNo = 5;</code>
     * @return The medCardNo.
     */
    public java.lang.String getMedCardNo() {
      java.lang.Object ref = medCardNo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        medCardNo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 诊疗卡号
     * </pre>
     *
     * <code>string medCardNo = 5;</code>
     * @return The bytes for medCardNo.
     */
    public com.google.protobuf.ByteString
        getMedCardNoBytes() {
      java.lang.Object ref = medCardNo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        medCardNo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 诊疗卡号
     * </pre>
     *
     * <code>string medCardNo = 5;</code>
     * @param value The medCardNo to set.
     * @return This builder for chaining.
     */
    public Builder setMedCardNo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      medCardNo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 诊疗卡号
     * </pre>
     *
     * <code>string medCardNo = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearMedCardNo() {
      
      medCardNo_ = getDefaultInstance().getMedCardNo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 诊疗卡号
     * </pre>
     *
     * <code>string medCardNo = 5;</code>
     * @param value The bytes for medCardNo to set.
     * @return This builder for chaining.
     */
    public Builder setMedCardNoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      medCardNo_ = 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.checkup_booking.CreateOrderRequest)
  }

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

  public static com.ywt.gapi.checkup_booking.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.checkup_booking.CreateOrderRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

