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

package com.ywt.gapi.third.sinopharm;

/**
 * <pre>
 *药品匹配信息请求
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.third.sinopharm.DrugMatchingRequest}
 */
public final class DrugMatchingRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.third.sinopharm.DrugMatchingRequest)
    DrugMatchingRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use DrugMatchingRequest.newBuilder() to construct.
  private DrugMatchingRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private DrugMatchingRequest() {
    matchId_ = "";
    pscripts_ = java.util.Collections.emptyList();
  }

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

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

            matchId_ = s;
            break;
          }
          case 16: {

            isExpress_ = input.readInt32();
            break;
          }
          case 26: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              pscripts_ = new java.util.ArrayList<com.ywt.gapi.third.sinopharm.DpPrescription>();
              mutable_bitField0_ |= 0x00000001;
            }
            pscripts_.add(
                input.readMessage(com.ywt.gapi.third.sinopharm.DpPrescription.parser(), extensionRegistry));
            break;
          }
          case 34: {
            com.ywt.gapi.third.sinopharm.ContactInfo.Builder subBuilder = null;
            if (contactInfo_ != null) {
              subBuilder = contactInfo_.toBuilder();
            }
            contactInfo_ = input.readMessage(com.ywt.gapi.third.sinopharm.ContactInfo.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(contactInfo_);
              contactInfo_ = 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 {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        pscripts_ = java.util.Collections.unmodifiableList(pscripts_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.third.sinopharm.SinopharmProto.internal_static_com_ywt_gapi_third_sinopharm_DrugMatchingRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.third.sinopharm.SinopharmProto.internal_static_com_ywt_gapi_third_sinopharm_DrugMatchingRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.third.sinopharm.DrugMatchingRequest.class, com.ywt.gapi.third.sinopharm.DrugMatchingRequest.Builder.class);
  }

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

  public static final int ISEXPRESS_FIELD_NUMBER = 2;
  private int isExpress_;
  /**
   * <pre>
   *取药方式：0-快递；1-到店自取(会传递收药人信息)  目前取药方式没有快递
   * </pre>
   *
   * <code>int32 isExpress = 2;</code>
   * @return The isExpress.
   */
  @java.lang.Override
  public int getIsExpress() {
    return isExpress_;
  }

  public static final int PSCRIPTS_FIELD_NUMBER = 3;
  private java.util.List<com.ywt.gapi.third.sinopharm.DpPrescription> pscripts_;
  /**
   * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
   */
  @java.lang.Override
  public java.util.List<com.ywt.gapi.third.sinopharm.DpPrescription> getPscriptsList() {
    return pscripts_;
  }
  /**
   * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder> 
      getPscriptsOrBuilderList() {
    return pscripts_;
  }
  /**
   * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
   */
  @java.lang.Override
  public int getPscriptsCount() {
    return pscripts_.size();
  }
  /**
   * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.third.sinopharm.DpPrescription getPscripts(int index) {
    return pscripts_.get(index);
  }
  /**
   * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder getPscriptsOrBuilder(
      int index) {
    return pscripts_.get(index);
  }

  public static final int CONTACTINFO_FIELD_NUMBER = 4;
  private com.ywt.gapi.third.sinopharm.ContactInfo contactInfo_;
  /**
   * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
   * @return Whether the contactInfo field is set.
   */
  @java.lang.Override
  public boolean hasContactInfo() {
    return contactInfo_ != null;
  }
  /**
   * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
   * @return The contactInfo.
   */
  @java.lang.Override
  public com.ywt.gapi.third.sinopharm.ContactInfo getContactInfo() {
    return contactInfo_ == null ? com.ywt.gapi.third.sinopharm.ContactInfo.getDefaultInstance() : contactInfo_;
  }
  /**
   * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
   */
  @java.lang.Override
  public com.ywt.gapi.third.sinopharm.ContactInfoOrBuilder getContactInfoOrBuilder() {
    return getContactInfo();
  }

  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(matchId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, matchId_);
    }
    if (isExpress_ != 0) {
      output.writeInt32(2, isExpress_);
    }
    for (int i = 0; i < pscripts_.size(); i++) {
      output.writeMessage(3, pscripts_.get(i));
    }
    if (contactInfo_ != null) {
      output.writeMessage(4, getContactInfo());
    }
    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(matchId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, matchId_);
    }
    if (isExpress_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, isExpress_);
    }
    for (int i = 0; i < pscripts_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, pscripts_.get(i));
    }
    if (contactInfo_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getContactInfo());
    }
    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.third.sinopharm.DrugMatchingRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.third.sinopharm.DrugMatchingRequest other = (com.ywt.gapi.third.sinopharm.DrugMatchingRequest) obj;

    if (!getMatchId()
        .equals(other.getMatchId())) return false;
    if (getIsExpress()
        != other.getIsExpress()) return false;
    if (!getPscriptsList()
        .equals(other.getPscriptsList())) return false;
    if (hasContactInfo() != other.hasContactInfo()) return false;
    if (hasContactInfo()) {
      if (!getContactInfo()
          .equals(other.getContactInfo())) 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) + MATCHID_FIELD_NUMBER;
    hash = (53 * hash) + getMatchId().hashCode();
    hash = (37 * hash) + ISEXPRESS_FIELD_NUMBER;
    hash = (53 * hash) + getIsExpress();
    if (getPscriptsCount() > 0) {
      hash = (37 * hash) + PSCRIPTS_FIELD_NUMBER;
      hash = (53 * hash) + getPscriptsList().hashCode();
    }
    if (hasContactInfo()) {
      hash = (37 * hash) + CONTACTINFO_FIELD_NUMBER;
      hash = (53 * hash) + getContactInfo().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.third.sinopharm.SinopharmProto.internal_static_com_ywt_gapi_third_sinopharm_DrugMatchingRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.third.sinopharm.DrugMatchingRequest.class, com.ywt.gapi.third.sinopharm.DrugMatchingRequest.Builder.class);
    }

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

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

      isExpress_ = 0;

      if (pscriptsBuilder_ == null) {
        pscripts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
      } else {
        pscriptsBuilder_.clear();
      }
      if (contactInfoBuilder_ == null) {
        contactInfo_ = null;
      } else {
        contactInfo_ = null;
        contactInfoBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.third.sinopharm.SinopharmProto.internal_static_com_ywt_gapi_third_sinopharm_DrugMatchingRequest_descriptor;
    }

    @java.lang.Override
    public com.ywt.gapi.third.sinopharm.DrugMatchingRequest getDefaultInstanceForType() {
      return com.ywt.gapi.third.sinopharm.DrugMatchingRequest.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.ywt.gapi.third.sinopharm.DrugMatchingRequest buildPartial() {
      com.ywt.gapi.third.sinopharm.DrugMatchingRequest result = new com.ywt.gapi.third.sinopharm.DrugMatchingRequest(this);
      int from_bitField0_ = bitField0_;
      result.matchId_ = matchId_;
      result.isExpress_ = isExpress_;
      if (pscriptsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          pscripts_ = java.util.Collections.unmodifiableList(pscripts_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.pscripts_ = pscripts_;
      } else {
        result.pscripts_ = pscriptsBuilder_.build();
      }
      if (contactInfoBuilder_ == null) {
        result.contactInfo_ = contactInfo_;
      } else {
        result.contactInfo_ = contactInfoBuilder_.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.third.sinopharm.DrugMatchingRequest) {
        return mergeFrom((com.ywt.gapi.third.sinopharm.DrugMatchingRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.third.sinopharm.DrugMatchingRequest other) {
      if (other == com.ywt.gapi.third.sinopharm.DrugMatchingRequest.getDefaultInstance()) return this;
      if (!other.getMatchId().isEmpty()) {
        matchId_ = other.matchId_;
        onChanged();
      }
      if (other.getIsExpress() != 0) {
        setIsExpress(other.getIsExpress());
      }
      if (pscriptsBuilder_ == null) {
        if (!other.pscripts_.isEmpty()) {
          if (pscripts_.isEmpty()) {
            pscripts_ = other.pscripts_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensurePscriptsIsMutable();
            pscripts_.addAll(other.pscripts_);
          }
          onChanged();
        }
      } else {
        if (!other.pscripts_.isEmpty()) {
          if (pscriptsBuilder_.isEmpty()) {
            pscriptsBuilder_.dispose();
            pscriptsBuilder_ = null;
            pscripts_ = other.pscripts_;
            bitField0_ = (bitField0_ & ~0x00000001);
            pscriptsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getPscriptsFieldBuilder() : null;
          } else {
            pscriptsBuilder_.addAllMessages(other.pscripts_);
          }
        }
      }
      if (other.hasContactInfo()) {
        mergeContactInfo(other.getContactInfo());
      }
      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.third.sinopharm.DrugMatchingRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.third.sinopharm.DrugMatchingRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object matchId_ = "";
    /**
     * <code>string matchId = 1;</code>
     * @return The matchId.
     */
    public java.lang.String getMatchId() {
      java.lang.Object ref = matchId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        matchId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string matchId = 1;</code>
     * @return The bytes for matchId.
     */
    public com.google.protobuf.ByteString
        getMatchIdBytes() {
      java.lang.Object ref = matchId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        matchId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string matchId = 1;</code>
     * @param value The matchId to set.
     * @return This builder for chaining.
     */
    public Builder setMatchId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      matchId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string matchId = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearMatchId() {
      
      matchId_ = getDefaultInstance().getMatchId();
      onChanged();
      return this;
    }
    /**
     * <code>string matchId = 1;</code>
     * @param value The bytes for matchId to set.
     * @return This builder for chaining.
     */
    public Builder setMatchIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      matchId_ = value;
      onChanged();
      return this;
    }

    private int isExpress_ ;
    /**
     * <pre>
     *取药方式：0-快递；1-到店自取(会传递收药人信息)  目前取药方式没有快递
     * </pre>
     *
     * <code>int32 isExpress = 2;</code>
     * @return The isExpress.
     */
    @java.lang.Override
    public int getIsExpress() {
      return isExpress_;
    }
    /**
     * <pre>
     *取药方式：0-快递；1-到店自取(会传递收药人信息)  目前取药方式没有快递
     * </pre>
     *
     * <code>int32 isExpress = 2;</code>
     * @param value The isExpress to set.
     * @return This builder for chaining.
     */
    public Builder setIsExpress(int value) {
      
      isExpress_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *取药方式：0-快递；1-到店自取(会传递收药人信息)  目前取药方式没有快递
     * </pre>
     *
     * <code>int32 isExpress = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearIsExpress() {
      
      isExpress_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<com.ywt.gapi.third.sinopharm.DpPrescription> pscripts_ =
      java.util.Collections.emptyList();
    private void ensurePscriptsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        pscripts_ = new java.util.ArrayList<com.ywt.gapi.third.sinopharm.DpPrescription>(pscripts_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.third.sinopharm.DpPrescription, com.ywt.gapi.third.sinopharm.DpPrescription.Builder, com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder> pscriptsBuilder_;

    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public java.util.List<com.ywt.gapi.third.sinopharm.DpPrescription> getPscriptsList() {
      if (pscriptsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(pscripts_);
      } else {
        return pscriptsBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public int getPscriptsCount() {
      if (pscriptsBuilder_ == null) {
        return pscripts_.size();
      } else {
        return pscriptsBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public com.ywt.gapi.third.sinopharm.DpPrescription getPscripts(int index) {
      if (pscriptsBuilder_ == null) {
        return pscripts_.get(index);
      } else {
        return pscriptsBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder setPscripts(
        int index, com.ywt.gapi.third.sinopharm.DpPrescription value) {
      if (pscriptsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePscriptsIsMutable();
        pscripts_.set(index, value);
        onChanged();
      } else {
        pscriptsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder setPscripts(
        int index, com.ywt.gapi.third.sinopharm.DpPrescription.Builder builderForValue) {
      if (pscriptsBuilder_ == null) {
        ensurePscriptsIsMutable();
        pscripts_.set(index, builderForValue.build());
        onChanged();
      } else {
        pscriptsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder addPscripts(com.ywt.gapi.third.sinopharm.DpPrescription value) {
      if (pscriptsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePscriptsIsMutable();
        pscripts_.add(value);
        onChanged();
      } else {
        pscriptsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder addPscripts(
        int index, com.ywt.gapi.third.sinopharm.DpPrescription value) {
      if (pscriptsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensurePscriptsIsMutable();
        pscripts_.add(index, value);
        onChanged();
      } else {
        pscriptsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder addPscripts(
        com.ywt.gapi.third.sinopharm.DpPrescription.Builder builderForValue) {
      if (pscriptsBuilder_ == null) {
        ensurePscriptsIsMutable();
        pscripts_.add(builderForValue.build());
        onChanged();
      } else {
        pscriptsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder addPscripts(
        int index, com.ywt.gapi.third.sinopharm.DpPrescription.Builder builderForValue) {
      if (pscriptsBuilder_ == null) {
        ensurePscriptsIsMutable();
        pscripts_.add(index, builderForValue.build());
        onChanged();
      } else {
        pscriptsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder addAllPscripts(
        java.lang.Iterable<? extends com.ywt.gapi.third.sinopharm.DpPrescription> values) {
      if (pscriptsBuilder_ == null) {
        ensurePscriptsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, pscripts_);
        onChanged();
      } else {
        pscriptsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder clearPscripts() {
      if (pscriptsBuilder_ == null) {
        pscripts_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        pscriptsBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public Builder removePscripts(int index) {
      if (pscriptsBuilder_ == null) {
        ensurePscriptsIsMutable();
        pscripts_.remove(index);
        onChanged();
      } else {
        pscriptsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public com.ywt.gapi.third.sinopharm.DpPrescription.Builder getPscriptsBuilder(
        int index) {
      return getPscriptsFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder getPscriptsOrBuilder(
        int index) {
      if (pscriptsBuilder_ == null) {
        return pscripts_.get(index);  } else {
        return pscriptsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public java.util.List<? extends com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder> 
         getPscriptsOrBuilderList() {
      if (pscriptsBuilder_ != null) {
        return pscriptsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(pscripts_);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public com.ywt.gapi.third.sinopharm.DpPrescription.Builder addPscriptsBuilder() {
      return getPscriptsFieldBuilder().addBuilder(
          com.ywt.gapi.third.sinopharm.DpPrescription.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public com.ywt.gapi.third.sinopharm.DpPrescription.Builder addPscriptsBuilder(
        int index) {
      return getPscriptsFieldBuilder().addBuilder(
          index, com.ywt.gapi.third.sinopharm.DpPrescription.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.third.sinopharm.DpPrescription pscripts = 3;</code>
     */
    public java.util.List<com.ywt.gapi.third.sinopharm.DpPrescription.Builder> 
         getPscriptsBuilderList() {
      return getPscriptsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.third.sinopharm.DpPrescription, com.ywt.gapi.third.sinopharm.DpPrescription.Builder, com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder> 
        getPscriptsFieldBuilder() {
      if (pscriptsBuilder_ == null) {
        pscriptsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.third.sinopharm.DpPrescription, com.ywt.gapi.third.sinopharm.DpPrescription.Builder, com.ywt.gapi.third.sinopharm.DpPrescriptionOrBuilder>(
                pscripts_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        pscripts_ = null;
      }
      return pscriptsBuilder_;
    }

    private com.ywt.gapi.third.sinopharm.ContactInfo contactInfo_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.third.sinopharm.ContactInfo, com.ywt.gapi.third.sinopharm.ContactInfo.Builder, com.ywt.gapi.third.sinopharm.ContactInfoOrBuilder> contactInfoBuilder_;
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     * @return Whether the contactInfo field is set.
     */
    public boolean hasContactInfo() {
      return contactInfoBuilder_ != null || contactInfo_ != null;
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     * @return The contactInfo.
     */
    public com.ywt.gapi.third.sinopharm.ContactInfo getContactInfo() {
      if (contactInfoBuilder_ == null) {
        return contactInfo_ == null ? com.ywt.gapi.third.sinopharm.ContactInfo.getDefaultInstance() : contactInfo_;
      } else {
        return contactInfoBuilder_.getMessage();
      }
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    public Builder setContactInfo(com.ywt.gapi.third.sinopharm.ContactInfo value) {
      if (contactInfoBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        contactInfo_ = value;
        onChanged();
      } else {
        contactInfoBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    public Builder setContactInfo(
        com.ywt.gapi.third.sinopharm.ContactInfo.Builder builderForValue) {
      if (contactInfoBuilder_ == null) {
        contactInfo_ = builderForValue.build();
        onChanged();
      } else {
        contactInfoBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    public Builder mergeContactInfo(com.ywt.gapi.third.sinopharm.ContactInfo value) {
      if (contactInfoBuilder_ == null) {
        if (contactInfo_ != null) {
          contactInfo_ =
            com.ywt.gapi.third.sinopharm.ContactInfo.newBuilder(contactInfo_).mergeFrom(value).buildPartial();
        } else {
          contactInfo_ = value;
        }
        onChanged();
      } else {
        contactInfoBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    public Builder clearContactInfo() {
      if (contactInfoBuilder_ == null) {
        contactInfo_ = null;
        onChanged();
      } else {
        contactInfo_ = null;
        contactInfoBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    public com.ywt.gapi.third.sinopharm.ContactInfo.Builder getContactInfoBuilder() {
      
      onChanged();
      return getContactInfoFieldBuilder().getBuilder();
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    public com.ywt.gapi.third.sinopharm.ContactInfoOrBuilder getContactInfoOrBuilder() {
      if (contactInfoBuilder_ != null) {
        return contactInfoBuilder_.getMessageOrBuilder();
      } else {
        return contactInfo_ == null ?
            com.ywt.gapi.third.sinopharm.ContactInfo.getDefaultInstance() : contactInfo_;
      }
    }
    /**
     * <code>.com.ywt.gapi.third.sinopharm.ContactInfo contactInfo = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.third.sinopharm.ContactInfo, com.ywt.gapi.third.sinopharm.ContactInfo.Builder, com.ywt.gapi.third.sinopharm.ContactInfoOrBuilder> 
        getContactInfoFieldBuilder() {
      if (contactInfoBuilder_ == null) {
        contactInfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.third.sinopharm.ContactInfo, com.ywt.gapi.third.sinopharm.ContactInfo.Builder, com.ywt.gapi.third.sinopharm.ContactInfoOrBuilder>(
                getContactInfo(),
                getParentForChildren(),
                isClean());
        contactInfo_ = null;
      }
      return contactInfoBuilder_;
    }
    @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.third.sinopharm.DrugMatchingRequest)
  }

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

  public static com.ywt.gapi.third.sinopharm.DrugMatchingRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.ywt.gapi.third.sinopharm.DrugMatchingRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

