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

package com.ywt.gapi.drug;

/**
 * <pre>
 *药品信息
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.drug.Drug}
 */
public  final class Drug extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.drug.Drug)
    DrugOrBuilder {
  // Use Drug.newBuilder() to construct.
  private Drug(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private Drug() {
    drugCode_ = "";
    drugCode3Th_ = "";
    oneDosage_ = 0D;
    oneDosageUnit_ = "";
    amount_ = 0;
    units_ = "";
    frequencyCode_ = "";
    frequency_ = "";
    frequencyQty_ = 0;
    usageCode_ = "";
    usage_ = "";
    price_ = 0;
    drugName_ = "";
    drugSpec_ = "";
    pinYinCode_ = "";
    drugId_ = 0;
    productName_ = "";
    producer_ = "";
    newDrug_ = 0;
    pharmacy_ = 0;
    drugType_ = 0;
    outpatientSpec_ = false;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private Drug(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    int mutable_bitField0_ = 0;
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          default: {
            if (!input.skipField(tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

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

            drugCode3Th_ = s;
            break;
          }
          case 25: {

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

            oneDosageUnit_ = s;
            break;
          }
          case 40: {

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

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

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

            frequency_ = s;
            break;
          }
          case 72: {

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

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

            usage_ = s;
            break;
          }
          case 104: {

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

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

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

            pinYinCode_ = s;
            break;
          }
          case 136: {

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

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

            producer_ = s;
            break;
          }
          case 160: {

            newDrug_ = input.readInt32();
            break;
          }
          case 168: {

            pharmacy_ = input.readInt32();
            break;
          }
          case 176: {

            drugType_ = input.readInt32();
            break;
          }
          case 184: {

            outpatientSpec_ = input.readBool();
            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 {
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_Drug_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_Drug_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.drug.Drug.class, com.ywt.gapi.drug.Drug.Builder.class);
  }

  public static final int DRUGCODE_FIELD_NUMBER = 1;
  private volatile java.lang.Object drugCode_;
  /**
   * <pre>
   *药品编码
   * </pre>
   *
   * <code>string drugCode = 1;</code>
   */
  public java.lang.String getDrugCode() {
    java.lang.Object ref = drugCode_;
    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();
      drugCode_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *药品编码
   * </pre>
   *
   * <code>string drugCode = 1;</code>
   */
  public com.google.protobuf.ByteString
      getDrugCodeBytes() {
    java.lang.Object ref = drugCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      drugCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DRUGCODE3TH_FIELD_NUMBER = 2;
  private volatile java.lang.Object drugCode3Th_;
  /**
   * <pre>
   *第三方公司药品编码
   * </pre>
   *
   * <code>string drugCode3th = 2;</code>
   */
  public java.lang.String getDrugCode3Th() {
    java.lang.Object ref = drugCode3Th_;
    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();
      drugCode3Th_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *第三方公司药品编码
   * </pre>
   *
   * <code>string drugCode3th = 2;</code>
   */
  public com.google.protobuf.ByteString
      getDrugCode3ThBytes() {
    java.lang.Object ref = drugCode3Th_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      drugCode3Th_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ONEDOSAGE_FIELD_NUMBER = 3;
  private double oneDosage_;
  /**
   * <pre>
   *单次服用剂量
   * </pre>
   *
   * <code>double oneDosage = 3;</code>
   */
  public double getOneDosage() {
    return oneDosage_;
  }

  public static final int ONEDOSAGEUNIT_FIELD_NUMBER = 4;
  private volatile java.lang.Object oneDosageUnit_;
  /**
   * <pre>
   *单次服用剂量单位
   * </pre>
   *
   * <code>string oneDosageUnit = 4;</code>
   */
  public java.lang.String getOneDosageUnit() {
    java.lang.Object ref = oneDosageUnit_;
    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();
      oneDosageUnit_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *单次服用剂量单位
   * </pre>
   *
   * <code>string oneDosageUnit = 4;</code>
   */
  public com.google.protobuf.ByteString
      getOneDosageUnitBytes() {
    java.lang.Object ref = oneDosageUnit_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      oneDosageUnit_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int AMOUNT_FIELD_NUMBER = 5;
  private int amount_;
  /**
   * <pre>
   *整包装数量
   * </pre>
   *
   * <code>int32 amount = 5;</code>
   */
  public int getAmount() {
    return amount_;
  }

  public static final int UNITS_FIELD_NUMBER = 6;
  private volatile java.lang.Object units_;
  /**
   * <pre>
   *整包装单位
   * </pre>
   *
   * <code>string units = 6;</code>
   */
  public java.lang.String getUnits() {
    java.lang.Object ref = units_;
    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();
      units_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *整包装单位
   * </pre>
   *
   * <code>string units = 6;</code>
   */
  public com.google.protobuf.ByteString
      getUnitsBytes() {
    java.lang.Object ref = units_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      units_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FREQUENCYCODE_FIELD_NUMBER = 7;
  private volatile java.lang.Object frequencyCode_;
  /**
   * <pre>
   *频次编码
   * </pre>
   *
   * <code>string frequencyCode = 7;</code>
   */
  public java.lang.String getFrequencyCode() {
    java.lang.Object ref = frequencyCode_;
    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();
      frequencyCode_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *频次编码
   * </pre>
   *
   * <code>string frequencyCode = 7;</code>
   */
  public com.google.protobuf.ByteString
      getFrequencyCodeBytes() {
    java.lang.Object ref = frequencyCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      frequencyCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FREQUENCY_FIELD_NUMBER = 8;
  private volatile java.lang.Object frequency_;
  /**
   * <pre>
   *频次说明
   * </pre>
   *
   * <code>string frequency = 8;</code>
   */
  public java.lang.String getFrequency() {
    java.lang.Object ref = frequency_;
    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();
      frequency_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *频次说明
   * </pre>
   *
   * <code>string frequency = 8;</code>
   */
  public com.google.protobuf.ByteString
      getFrequencyBytes() {
    java.lang.Object ref = frequency_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      frequency_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FREQUENCYQTY_FIELD_NUMBER = 9;
  private int frequencyQty_;
  /**
   * <pre>
   *频次数量
   * </pre>
   *
   * <code>int32 frequencyQty = 9;</code>
   */
  public int getFrequencyQty() {
    return frequencyQty_;
  }

  public static final int USAGECODE_FIELD_NUMBER = 10;
  private volatile java.lang.Object usageCode_;
  /**
   * <pre>
   *用法编码
   * </pre>
   *
   * <code>string usageCode = 10;</code>
   */
  public java.lang.String getUsageCode() {
    java.lang.Object ref = usageCode_;
    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();
      usageCode_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *用法编码
   * </pre>
   *
   * <code>string usageCode = 10;</code>
   */
  public com.google.protobuf.ByteString
      getUsageCodeBytes() {
    java.lang.Object ref = usageCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      usageCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int USAGE_FIELD_NUMBER = 11;
  private volatile java.lang.Object usage_;
  /**
   * <pre>
   *用法说明
   * </pre>
   *
   * <code>string usage = 11;</code>
   */
  public java.lang.String getUsage() {
    java.lang.Object ref = usage_;
    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();
      usage_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *用法说明
   * </pre>
   *
   * <code>string usage = 11;</code>
   */
  public com.google.protobuf.ByteString
      getUsageBytes() {
    java.lang.Object ref = usage_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      usage_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PRICE_FIELD_NUMBER = 13;
  private int price_;
  /**
   * <pre>
   *价格
   * </pre>
   *
   * <code>int32 price = 13;</code>
   */
  public int getPrice() {
    return price_;
  }

  public static final int DRUGNAME_FIELD_NUMBER = 14;
  private volatile java.lang.Object drugName_;
  /**
   * <pre>
   *药品名称
   * </pre>
   *
   * <code>string drugName = 14;</code>
   */
  public java.lang.String getDrugName() {
    java.lang.Object ref = drugName_;
    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();
      drugName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *药品名称
   * </pre>
   *
   * <code>string drugName = 14;</code>
   */
  public com.google.protobuf.ByteString
      getDrugNameBytes() {
    java.lang.Object ref = drugName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      drugName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DRUGSPEC_FIELD_NUMBER = 15;
  private volatile java.lang.Object drugSpec_;
  /**
   * <pre>
   *药品包装规格
   * </pre>
   *
   * <code>string drugSpec = 15;</code>
   */
  public java.lang.String getDrugSpec() {
    java.lang.Object ref = drugSpec_;
    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();
      drugSpec_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *药品包装规格
   * </pre>
   *
   * <code>string drugSpec = 15;</code>
   */
  public com.google.protobuf.ByteString
      getDrugSpecBytes() {
    java.lang.Object ref = drugSpec_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      drugSpec_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PINYINCODE_FIELD_NUMBER = 16;
  private volatile java.lang.Object pinYinCode_;
  /**
   * <pre>
   *拼音编码
   * </pre>
   *
   * <code>string pinYinCode = 16;</code>
   */
  public java.lang.String getPinYinCode() {
    java.lang.Object ref = pinYinCode_;
    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();
      pinYinCode_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *拼音编码
   * </pre>
   *
   * <code>string pinYinCode = 16;</code>
   */
  public com.google.protobuf.ByteString
      getPinYinCodeBytes() {
    java.lang.Object ref = pinYinCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      pinYinCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DRUGID_FIELD_NUMBER = 17;
  private int drugId_;
  /**
   * <pre>
   *唯一标识
   * </pre>
   *
   * <code>int32 drugId = 17;</code>
   */
  public int getDrugId() {
    return drugId_;
  }

  public static final int PRODUCTNAME_FIELD_NUMBER = 18;
  private volatile java.lang.Object productName_;
  /**
   * <pre>
   *商品名
   * </pre>
   *
   * <code>string productName = 18;</code>
   */
  public java.lang.String getProductName() {
    java.lang.Object ref = productName_;
    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();
      productName_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *商品名
   * </pre>
   *
   * <code>string productName = 18;</code>
   */
  public com.google.protobuf.ByteString
      getProductNameBytes() {
    java.lang.Object ref = productName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      productName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PRODUCER_FIELD_NUMBER = 19;
  private volatile java.lang.Object producer_;
  /**
   * <pre>
   *厂家
   * </pre>
   *
   * <code>string producer = 19;</code>
   */
  public java.lang.String getProducer() {
    java.lang.Object ref = producer_;
    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();
      producer_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *厂家
   * </pre>
   *
   * <code>string producer = 19;</code>
   */
  public com.google.protobuf.ByteString
      getProducerBytes() {
    java.lang.Object ref = producer_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      producer_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int NEWDRUG_FIELD_NUMBER = 20;
  private int newDrug_;
  /**
   * <pre>
   *是否是新药，0-不是，1-是
   * </pre>
   *
   * <code>int32 newDrug = 20;</code>
   */
  public int getNewDrug() {
    return newDrug_;
  }

  public static final int PHARMACY_FIELD_NUMBER = 21;
  private int pharmacy_;
  /**
   * <pre>
   *药品目录药房（1-广三生殖药房，2-太和医院药房）
   * </pre>
   *
   * <code>int32 pharmacy = 21;</code>
   */
  public int getPharmacy() {
    return pharmacy_;
  }

  public static final int DRUGTYPE_FIELD_NUMBER = 22;
  private int drugType_;
  /**
   * <code>int32 drugType = 22;</code>
   */
  public int getDrugType() {
    return drugType_;
  }

  public static final int OUTPATIENTSPEC_FIELD_NUMBER = 23;
  private boolean outpatientSpec_;
  /**
   * <pre>
   *是否是门特药
   * </pre>
   *
   * <code>bool outpatientSpec = 23;</code>
   */
  public boolean getOutpatientSpec() {
    return outpatientSpec_;
  }

  private byte memoizedIsInitialized = -1;
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!getDrugCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, drugCode_);
    }
    if (!getDrugCode3ThBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, drugCode3Th_);
    }
    if (oneDosage_ != 0D) {
      output.writeDouble(3, oneDosage_);
    }
    if (!getOneDosageUnitBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, oneDosageUnit_);
    }
    if (amount_ != 0) {
      output.writeInt32(5, amount_);
    }
    if (!getUnitsBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, units_);
    }
    if (!getFrequencyCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, frequencyCode_);
    }
    if (!getFrequencyBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, frequency_);
    }
    if (frequencyQty_ != 0) {
      output.writeInt32(9, frequencyQty_);
    }
    if (!getUsageCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, usageCode_);
    }
    if (!getUsageBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, usage_);
    }
    if (price_ != 0) {
      output.writeInt32(13, price_);
    }
    if (!getDrugNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 14, drugName_);
    }
    if (!getDrugSpecBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 15, drugSpec_);
    }
    if (!getPinYinCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 16, pinYinCode_);
    }
    if (drugId_ != 0) {
      output.writeInt32(17, drugId_);
    }
    if (!getProductNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 18, productName_);
    }
    if (!getProducerBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 19, producer_);
    }
    if (newDrug_ != 0) {
      output.writeInt32(20, newDrug_);
    }
    if (pharmacy_ != 0) {
      output.writeInt32(21, pharmacy_);
    }
    if (drugType_ != 0) {
      output.writeInt32(22, drugType_);
    }
    if (outpatientSpec_ != false) {
      output.writeBool(23, outpatientSpec_);
    }
  }

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

    size = 0;
    if (!getDrugCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, drugCode_);
    }
    if (!getDrugCode3ThBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, drugCode3Th_);
    }
    if (oneDosage_ != 0D) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(3, oneDosage_);
    }
    if (!getOneDosageUnitBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, oneDosageUnit_);
    }
    if (amount_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(5, amount_);
    }
    if (!getUnitsBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, units_);
    }
    if (!getFrequencyCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, frequencyCode_);
    }
    if (!getFrequencyBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, frequency_);
    }
    if (frequencyQty_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(9, frequencyQty_);
    }
    if (!getUsageCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, usageCode_);
    }
    if (!getUsageBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, usage_);
    }
    if (price_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(13, price_);
    }
    if (!getDrugNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, drugName_);
    }
    if (!getDrugSpecBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, drugSpec_);
    }
    if (!getPinYinCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, pinYinCode_);
    }
    if (drugId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(17, drugId_);
    }
    if (!getProductNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(18, productName_);
    }
    if (!getProducerBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, producer_);
    }
    if (newDrug_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(20, newDrug_);
    }
    if (pharmacy_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(21, pharmacy_);
    }
    if (drugType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(22, drugType_);
    }
    if (outpatientSpec_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(23, outpatientSpec_);
    }
    memoizedSize = size;
    return size;
  }

  private static final long serialVersionUID = 0L;
  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.drug.Drug)) {
      return super.equals(obj);
    }
    com.ywt.gapi.drug.Drug other = (com.ywt.gapi.drug.Drug) obj;

    boolean result = true;
    result = result && getDrugCode()
        .equals(other.getDrugCode());
    result = result && getDrugCode3Th()
        .equals(other.getDrugCode3Th());
    result = result && (
        java.lang.Double.doubleToLongBits(getOneDosage())
        == java.lang.Double.doubleToLongBits(
            other.getOneDosage()));
    result = result && getOneDosageUnit()
        .equals(other.getOneDosageUnit());
    result = result && (getAmount()
        == other.getAmount());
    result = result && getUnits()
        .equals(other.getUnits());
    result = result && getFrequencyCode()
        .equals(other.getFrequencyCode());
    result = result && getFrequency()
        .equals(other.getFrequency());
    result = result && (getFrequencyQty()
        == other.getFrequencyQty());
    result = result && getUsageCode()
        .equals(other.getUsageCode());
    result = result && getUsage()
        .equals(other.getUsage());
    result = result && (getPrice()
        == other.getPrice());
    result = result && getDrugName()
        .equals(other.getDrugName());
    result = result && getDrugSpec()
        .equals(other.getDrugSpec());
    result = result && getPinYinCode()
        .equals(other.getPinYinCode());
    result = result && (getDrugId()
        == other.getDrugId());
    result = result && getProductName()
        .equals(other.getProductName());
    result = result && getProducer()
        .equals(other.getProducer());
    result = result && (getNewDrug()
        == other.getNewDrug());
    result = result && (getPharmacy()
        == other.getPharmacy());
    result = result && (getDrugType()
        == other.getDrugType());
    result = result && (getOutpatientSpec()
        == other.getOutpatientSpec());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + DRUGCODE_FIELD_NUMBER;
    hash = (53 * hash) + getDrugCode().hashCode();
    hash = (37 * hash) + DRUGCODE3TH_FIELD_NUMBER;
    hash = (53 * hash) + getDrugCode3Th().hashCode();
    hash = (37 * hash) + ONEDOSAGE_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
        java.lang.Double.doubleToLongBits(getOneDosage()));
    hash = (37 * hash) + ONEDOSAGEUNIT_FIELD_NUMBER;
    hash = (53 * hash) + getOneDosageUnit().hashCode();
    hash = (37 * hash) + AMOUNT_FIELD_NUMBER;
    hash = (53 * hash) + getAmount();
    hash = (37 * hash) + UNITS_FIELD_NUMBER;
    hash = (53 * hash) + getUnits().hashCode();
    hash = (37 * hash) + FREQUENCYCODE_FIELD_NUMBER;
    hash = (53 * hash) + getFrequencyCode().hashCode();
    hash = (37 * hash) + FREQUENCY_FIELD_NUMBER;
    hash = (53 * hash) + getFrequency().hashCode();
    hash = (37 * hash) + FREQUENCYQTY_FIELD_NUMBER;
    hash = (53 * hash) + getFrequencyQty();
    hash = (37 * hash) + USAGECODE_FIELD_NUMBER;
    hash = (53 * hash) + getUsageCode().hashCode();
    hash = (37 * hash) + USAGE_FIELD_NUMBER;
    hash = (53 * hash) + getUsage().hashCode();
    hash = (37 * hash) + PRICE_FIELD_NUMBER;
    hash = (53 * hash) + getPrice();
    hash = (37 * hash) + DRUGNAME_FIELD_NUMBER;
    hash = (53 * hash) + getDrugName().hashCode();
    hash = (37 * hash) + DRUGSPEC_FIELD_NUMBER;
    hash = (53 * hash) + getDrugSpec().hashCode();
    hash = (37 * hash) + PINYINCODE_FIELD_NUMBER;
    hash = (53 * hash) + getPinYinCode().hashCode();
    hash = (37 * hash) + DRUGID_FIELD_NUMBER;
    hash = (53 * hash) + getDrugId();
    hash = (37 * hash) + PRODUCTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getProductName().hashCode();
    hash = (37 * hash) + PRODUCER_FIELD_NUMBER;
    hash = (53 * hash) + getProducer().hashCode();
    hash = (37 * hash) + NEWDRUG_FIELD_NUMBER;
    hash = (53 * hash) + getNewDrug();
    hash = (37 * hash) + PHARMACY_FIELD_NUMBER;
    hash = (53 * hash) + getPharmacy();
    hash = (37 * hash) + DRUGTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getDrugType();
    hash = (37 * hash) + OUTPATIENTSPEC_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getOutpatientSpec());
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.drug.Drug prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *药品信息
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.drug.Drug}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.drug.Drug)
      com.ywt.gapi.drug.DrugOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_Drug_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_Drug_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.drug.Drug.class, com.ywt.gapi.drug.Drug.Builder.class);
    }

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

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

      drugCode3Th_ = "";

      oneDosage_ = 0D;

      oneDosageUnit_ = "";

      amount_ = 0;

      units_ = "";

      frequencyCode_ = "";

      frequency_ = "";

      frequencyQty_ = 0;

      usageCode_ = "";

      usage_ = "";

      price_ = 0;

      drugName_ = "";

      drugSpec_ = "";

      pinYinCode_ = "";

      drugId_ = 0;

      productName_ = "";

      producer_ = "";

      newDrug_ = 0;

      pharmacy_ = 0;

      drugType_ = 0;

      outpatientSpec_ = false;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_Drug_descriptor;
    }

    public com.ywt.gapi.drug.Drug getDefaultInstanceForType() {
      return com.ywt.gapi.drug.Drug.getDefaultInstance();
    }

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

    public com.ywt.gapi.drug.Drug buildPartial() {
      com.ywt.gapi.drug.Drug result = new com.ywt.gapi.drug.Drug(this);
      result.drugCode_ = drugCode_;
      result.drugCode3Th_ = drugCode3Th_;
      result.oneDosage_ = oneDosage_;
      result.oneDosageUnit_ = oneDosageUnit_;
      result.amount_ = amount_;
      result.units_ = units_;
      result.frequencyCode_ = frequencyCode_;
      result.frequency_ = frequency_;
      result.frequencyQty_ = frequencyQty_;
      result.usageCode_ = usageCode_;
      result.usage_ = usage_;
      result.price_ = price_;
      result.drugName_ = drugName_;
      result.drugSpec_ = drugSpec_;
      result.pinYinCode_ = pinYinCode_;
      result.drugId_ = drugId_;
      result.productName_ = productName_;
      result.producer_ = producer_;
      result.newDrug_ = newDrug_;
      result.pharmacy_ = pharmacy_;
      result.drugType_ = drugType_;
      result.outpatientSpec_ = outpatientSpec_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.ywt.gapi.drug.Drug other) {
      if (other == com.ywt.gapi.drug.Drug.getDefaultInstance()) return this;
      if (!other.getDrugCode().isEmpty()) {
        drugCode_ = other.drugCode_;
        onChanged();
      }
      if (!other.getDrugCode3Th().isEmpty()) {
        drugCode3Th_ = other.drugCode3Th_;
        onChanged();
      }
      if (other.getOneDosage() != 0D) {
        setOneDosage(other.getOneDosage());
      }
      if (!other.getOneDosageUnit().isEmpty()) {
        oneDosageUnit_ = other.oneDosageUnit_;
        onChanged();
      }
      if (other.getAmount() != 0) {
        setAmount(other.getAmount());
      }
      if (!other.getUnits().isEmpty()) {
        units_ = other.units_;
        onChanged();
      }
      if (!other.getFrequencyCode().isEmpty()) {
        frequencyCode_ = other.frequencyCode_;
        onChanged();
      }
      if (!other.getFrequency().isEmpty()) {
        frequency_ = other.frequency_;
        onChanged();
      }
      if (other.getFrequencyQty() != 0) {
        setFrequencyQty(other.getFrequencyQty());
      }
      if (!other.getUsageCode().isEmpty()) {
        usageCode_ = other.usageCode_;
        onChanged();
      }
      if (!other.getUsage().isEmpty()) {
        usage_ = other.usage_;
        onChanged();
      }
      if (other.getPrice() != 0) {
        setPrice(other.getPrice());
      }
      if (!other.getDrugName().isEmpty()) {
        drugName_ = other.drugName_;
        onChanged();
      }
      if (!other.getDrugSpec().isEmpty()) {
        drugSpec_ = other.drugSpec_;
        onChanged();
      }
      if (!other.getPinYinCode().isEmpty()) {
        pinYinCode_ = other.pinYinCode_;
        onChanged();
      }
      if (other.getDrugId() != 0) {
        setDrugId(other.getDrugId());
      }
      if (!other.getProductName().isEmpty()) {
        productName_ = other.productName_;
        onChanged();
      }
      if (!other.getProducer().isEmpty()) {
        producer_ = other.producer_;
        onChanged();
      }
      if (other.getNewDrug() != 0) {
        setNewDrug(other.getNewDrug());
      }
      if (other.getPharmacy() != 0) {
        setPharmacy(other.getPharmacy());
      }
      if (other.getDrugType() != 0) {
        setDrugType(other.getDrugType());
      }
      if (other.getOutpatientSpec() != false) {
        setOutpatientSpec(other.getOutpatientSpec());
      }
      onChanged();
      return this;
    }

    public final boolean isInitialized() {
      return true;
    }

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

    private java.lang.Object drugCode_ = "";
    /**
     * <pre>
     *药品编码
     * </pre>
     *
     * <code>string drugCode = 1;</code>
     */
    public java.lang.String getDrugCode() {
      java.lang.Object ref = drugCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        drugCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *药品编码
     * </pre>
     *
     * <code>string drugCode = 1;</code>
     */
    public com.google.protobuf.ByteString
        getDrugCodeBytes() {
      java.lang.Object ref = drugCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        drugCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *药品编码
     * </pre>
     *
     * <code>string drugCode = 1;</code>
     */
    public Builder setDrugCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      drugCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品编码
     * </pre>
     *
     * <code>string drugCode = 1;</code>
     */
    public Builder clearDrugCode() {
      
      drugCode_ = getDefaultInstance().getDrugCode();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品编码
     * </pre>
     *
     * <code>string drugCode = 1;</code>
     */
    public Builder setDrugCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      drugCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object drugCode3Th_ = "";
    /**
     * <pre>
     *第三方公司药品编码
     * </pre>
     *
     * <code>string drugCode3th = 2;</code>
     */
    public java.lang.String getDrugCode3Th() {
      java.lang.Object ref = drugCode3Th_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        drugCode3Th_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *第三方公司药品编码
     * </pre>
     *
     * <code>string drugCode3th = 2;</code>
     */
    public com.google.protobuf.ByteString
        getDrugCode3ThBytes() {
      java.lang.Object ref = drugCode3Th_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        drugCode3Th_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *第三方公司药品编码
     * </pre>
     *
     * <code>string drugCode3th = 2;</code>
     */
    public Builder setDrugCode3Th(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      drugCode3Th_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *第三方公司药品编码
     * </pre>
     *
     * <code>string drugCode3th = 2;</code>
     */
    public Builder clearDrugCode3Th() {
      
      drugCode3Th_ = getDefaultInstance().getDrugCode3Th();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *第三方公司药品编码
     * </pre>
     *
     * <code>string drugCode3th = 2;</code>
     */
    public Builder setDrugCode3ThBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      drugCode3Th_ = value;
      onChanged();
      return this;
    }

    private double oneDosage_ ;
    /**
     * <pre>
     *单次服用剂量
     * </pre>
     *
     * <code>double oneDosage = 3;</code>
     */
    public double getOneDosage() {
      return oneDosage_;
    }
    /**
     * <pre>
     *单次服用剂量
     * </pre>
     *
     * <code>double oneDosage = 3;</code>
     */
    public Builder setOneDosage(double value) {
      
      oneDosage_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *单次服用剂量
     * </pre>
     *
     * <code>double oneDosage = 3;</code>
     */
    public Builder clearOneDosage() {
      
      oneDosage_ = 0D;
      onChanged();
      return this;
    }

    private java.lang.Object oneDosageUnit_ = "";
    /**
     * <pre>
     *单次服用剂量单位
     * </pre>
     *
     * <code>string oneDosageUnit = 4;</code>
     */
    public java.lang.String getOneDosageUnit() {
      java.lang.Object ref = oneDosageUnit_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        oneDosageUnit_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *单次服用剂量单位
     * </pre>
     *
     * <code>string oneDosageUnit = 4;</code>
     */
    public com.google.protobuf.ByteString
        getOneDosageUnitBytes() {
      java.lang.Object ref = oneDosageUnit_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        oneDosageUnit_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *单次服用剂量单位
     * </pre>
     *
     * <code>string oneDosageUnit = 4;</code>
     */
    public Builder setOneDosageUnit(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      oneDosageUnit_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *单次服用剂量单位
     * </pre>
     *
     * <code>string oneDosageUnit = 4;</code>
     */
    public Builder clearOneDosageUnit() {
      
      oneDosageUnit_ = getDefaultInstance().getOneDosageUnit();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *单次服用剂量单位
     * </pre>
     *
     * <code>string oneDosageUnit = 4;</code>
     */
    public Builder setOneDosageUnitBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      oneDosageUnit_ = value;
      onChanged();
      return this;
    }

    private int amount_ ;
    /**
     * <pre>
     *整包装数量
     * </pre>
     *
     * <code>int32 amount = 5;</code>
     */
    public int getAmount() {
      return amount_;
    }
    /**
     * <pre>
     *整包装数量
     * </pre>
     *
     * <code>int32 amount = 5;</code>
     */
    public Builder setAmount(int value) {
      
      amount_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *整包装数量
     * </pre>
     *
     * <code>int32 amount = 5;</code>
     */
    public Builder clearAmount() {
      
      amount_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object units_ = "";
    /**
     * <pre>
     *整包装单位
     * </pre>
     *
     * <code>string units = 6;</code>
     */
    public java.lang.String getUnits() {
      java.lang.Object ref = units_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        units_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *整包装单位
     * </pre>
     *
     * <code>string units = 6;</code>
     */
    public com.google.protobuf.ByteString
        getUnitsBytes() {
      java.lang.Object ref = units_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        units_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *整包装单位
     * </pre>
     *
     * <code>string units = 6;</code>
     */
    public Builder setUnits(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      units_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *整包装单位
     * </pre>
     *
     * <code>string units = 6;</code>
     */
    public Builder clearUnits() {
      
      units_ = getDefaultInstance().getUnits();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *整包装单位
     * </pre>
     *
     * <code>string units = 6;</code>
     */
    public Builder setUnitsBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      units_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object frequencyCode_ = "";
    /**
     * <pre>
     *频次编码
     * </pre>
     *
     * <code>string frequencyCode = 7;</code>
     */
    public java.lang.String getFrequencyCode() {
      java.lang.Object ref = frequencyCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        frequencyCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *频次编码
     * </pre>
     *
     * <code>string frequencyCode = 7;</code>
     */
    public com.google.protobuf.ByteString
        getFrequencyCodeBytes() {
      java.lang.Object ref = frequencyCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        frequencyCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *频次编码
     * </pre>
     *
     * <code>string frequencyCode = 7;</code>
     */
    public Builder setFrequencyCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      frequencyCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *频次编码
     * </pre>
     *
     * <code>string frequencyCode = 7;</code>
     */
    public Builder clearFrequencyCode() {
      
      frequencyCode_ = getDefaultInstance().getFrequencyCode();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *频次编码
     * </pre>
     *
     * <code>string frequencyCode = 7;</code>
     */
    public Builder setFrequencyCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      frequencyCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object frequency_ = "";
    /**
     * <pre>
     *频次说明
     * </pre>
     *
     * <code>string frequency = 8;</code>
     */
    public java.lang.String getFrequency() {
      java.lang.Object ref = frequency_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        frequency_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *频次说明
     * </pre>
     *
     * <code>string frequency = 8;</code>
     */
    public com.google.protobuf.ByteString
        getFrequencyBytes() {
      java.lang.Object ref = frequency_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        frequency_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *频次说明
     * </pre>
     *
     * <code>string frequency = 8;</code>
     */
    public Builder setFrequency(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      frequency_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *频次说明
     * </pre>
     *
     * <code>string frequency = 8;</code>
     */
    public Builder clearFrequency() {
      
      frequency_ = getDefaultInstance().getFrequency();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *频次说明
     * </pre>
     *
     * <code>string frequency = 8;</code>
     */
    public Builder setFrequencyBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      frequency_ = value;
      onChanged();
      return this;
    }

    private int frequencyQty_ ;
    /**
     * <pre>
     *频次数量
     * </pre>
     *
     * <code>int32 frequencyQty = 9;</code>
     */
    public int getFrequencyQty() {
      return frequencyQty_;
    }
    /**
     * <pre>
     *频次数量
     * </pre>
     *
     * <code>int32 frequencyQty = 9;</code>
     */
    public Builder setFrequencyQty(int value) {
      
      frequencyQty_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *频次数量
     * </pre>
     *
     * <code>int32 frequencyQty = 9;</code>
     */
    public Builder clearFrequencyQty() {
      
      frequencyQty_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object usageCode_ = "";
    /**
     * <pre>
     *用法编码
     * </pre>
     *
     * <code>string usageCode = 10;</code>
     */
    public java.lang.String getUsageCode() {
      java.lang.Object ref = usageCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        usageCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *用法编码
     * </pre>
     *
     * <code>string usageCode = 10;</code>
     */
    public com.google.protobuf.ByteString
        getUsageCodeBytes() {
      java.lang.Object ref = usageCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        usageCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *用法编码
     * </pre>
     *
     * <code>string usageCode = 10;</code>
     */
    public Builder setUsageCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      usageCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *用法编码
     * </pre>
     *
     * <code>string usageCode = 10;</code>
     */
    public Builder clearUsageCode() {
      
      usageCode_ = getDefaultInstance().getUsageCode();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *用法编码
     * </pre>
     *
     * <code>string usageCode = 10;</code>
     */
    public Builder setUsageCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      usageCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object usage_ = "";
    /**
     * <pre>
     *用法说明
     * </pre>
     *
     * <code>string usage = 11;</code>
     */
    public java.lang.String getUsage() {
      java.lang.Object ref = usage_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        usage_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *用法说明
     * </pre>
     *
     * <code>string usage = 11;</code>
     */
    public com.google.protobuf.ByteString
        getUsageBytes() {
      java.lang.Object ref = usage_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        usage_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *用法说明
     * </pre>
     *
     * <code>string usage = 11;</code>
     */
    public Builder setUsage(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      usage_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *用法说明
     * </pre>
     *
     * <code>string usage = 11;</code>
     */
    public Builder clearUsage() {
      
      usage_ = getDefaultInstance().getUsage();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *用法说明
     * </pre>
     *
     * <code>string usage = 11;</code>
     */
    public Builder setUsageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      usage_ = value;
      onChanged();
      return this;
    }

    private int price_ ;
    /**
     * <pre>
     *价格
     * </pre>
     *
     * <code>int32 price = 13;</code>
     */
    public int getPrice() {
      return price_;
    }
    /**
     * <pre>
     *价格
     * </pre>
     *
     * <code>int32 price = 13;</code>
     */
    public Builder setPrice(int value) {
      
      price_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *价格
     * </pre>
     *
     * <code>int32 price = 13;</code>
     */
    public Builder clearPrice() {
      
      price_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object drugName_ = "";
    /**
     * <pre>
     *药品名称
     * </pre>
     *
     * <code>string drugName = 14;</code>
     */
    public java.lang.String getDrugName() {
      java.lang.Object ref = drugName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        drugName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *药品名称
     * </pre>
     *
     * <code>string drugName = 14;</code>
     */
    public com.google.protobuf.ByteString
        getDrugNameBytes() {
      java.lang.Object ref = drugName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        drugName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *药品名称
     * </pre>
     *
     * <code>string drugName = 14;</code>
     */
    public Builder setDrugName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      drugName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品名称
     * </pre>
     *
     * <code>string drugName = 14;</code>
     */
    public Builder clearDrugName() {
      
      drugName_ = getDefaultInstance().getDrugName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品名称
     * </pre>
     *
     * <code>string drugName = 14;</code>
     */
    public Builder setDrugNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      drugName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object drugSpec_ = "";
    /**
     * <pre>
     *药品包装规格
     * </pre>
     *
     * <code>string drugSpec = 15;</code>
     */
    public java.lang.String getDrugSpec() {
      java.lang.Object ref = drugSpec_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        drugSpec_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *药品包装规格
     * </pre>
     *
     * <code>string drugSpec = 15;</code>
     */
    public com.google.protobuf.ByteString
        getDrugSpecBytes() {
      java.lang.Object ref = drugSpec_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        drugSpec_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *药品包装规格
     * </pre>
     *
     * <code>string drugSpec = 15;</code>
     */
    public Builder setDrugSpec(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      drugSpec_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品包装规格
     * </pre>
     *
     * <code>string drugSpec = 15;</code>
     */
    public Builder clearDrugSpec() {
      
      drugSpec_ = getDefaultInstance().getDrugSpec();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品包装规格
     * </pre>
     *
     * <code>string drugSpec = 15;</code>
     */
    public Builder setDrugSpecBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      drugSpec_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object pinYinCode_ = "";
    /**
     * <pre>
     *拼音编码
     * </pre>
     *
     * <code>string pinYinCode = 16;</code>
     */
    public java.lang.String getPinYinCode() {
      java.lang.Object ref = pinYinCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        pinYinCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *拼音编码
     * </pre>
     *
     * <code>string pinYinCode = 16;</code>
     */
    public com.google.protobuf.ByteString
        getPinYinCodeBytes() {
      java.lang.Object ref = pinYinCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        pinYinCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *拼音编码
     * </pre>
     *
     * <code>string pinYinCode = 16;</code>
     */
    public Builder setPinYinCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      pinYinCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *拼音编码
     * </pre>
     *
     * <code>string pinYinCode = 16;</code>
     */
    public Builder clearPinYinCode() {
      
      pinYinCode_ = getDefaultInstance().getPinYinCode();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *拼音编码
     * </pre>
     *
     * <code>string pinYinCode = 16;</code>
     */
    public Builder setPinYinCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      pinYinCode_ = value;
      onChanged();
      return this;
    }

    private int drugId_ ;
    /**
     * <pre>
     *唯一标识
     * </pre>
     *
     * <code>int32 drugId = 17;</code>
     */
    public int getDrugId() {
      return drugId_;
    }
    /**
     * <pre>
     *唯一标识
     * </pre>
     *
     * <code>int32 drugId = 17;</code>
     */
    public Builder setDrugId(int value) {
      
      drugId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *唯一标识
     * </pre>
     *
     * <code>int32 drugId = 17;</code>
     */
    public Builder clearDrugId() {
      
      drugId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object productName_ = "";
    /**
     * <pre>
     *商品名
     * </pre>
     *
     * <code>string productName = 18;</code>
     */
    public java.lang.String getProductName() {
      java.lang.Object ref = productName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        productName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *商品名
     * </pre>
     *
     * <code>string productName = 18;</code>
     */
    public com.google.protobuf.ByteString
        getProductNameBytes() {
      java.lang.Object ref = productName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        productName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *商品名
     * </pre>
     *
     * <code>string productName = 18;</code>
     */
    public Builder setProductName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      productName_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *商品名
     * </pre>
     *
     * <code>string productName = 18;</code>
     */
    public Builder clearProductName() {
      
      productName_ = getDefaultInstance().getProductName();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *商品名
     * </pre>
     *
     * <code>string productName = 18;</code>
     */
    public Builder setProductNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      productName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object producer_ = "";
    /**
     * <pre>
     *厂家
     * </pre>
     *
     * <code>string producer = 19;</code>
     */
    public java.lang.String getProducer() {
      java.lang.Object ref = producer_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        producer_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *厂家
     * </pre>
     *
     * <code>string producer = 19;</code>
     */
    public com.google.protobuf.ByteString
        getProducerBytes() {
      java.lang.Object ref = producer_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        producer_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *厂家
     * </pre>
     *
     * <code>string producer = 19;</code>
     */
    public Builder setProducer(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      producer_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *厂家
     * </pre>
     *
     * <code>string producer = 19;</code>
     */
    public Builder clearProducer() {
      
      producer_ = getDefaultInstance().getProducer();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *厂家
     * </pre>
     *
     * <code>string producer = 19;</code>
     */
    public Builder setProducerBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      producer_ = value;
      onChanged();
      return this;
    }

    private int newDrug_ ;
    /**
     * <pre>
     *是否是新药，0-不是，1-是
     * </pre>
     *
     * <code>int32 newDrug = 20;</code>
     */
    public int getNewDrug() {
      return newDrug_;
    }
    /**
     * <pre>
     *是否是新药，0-不是，1-是
     * </pre>
     *
     * <code>int32 newDrug = 20;</code>
     */
    public Builder setNewDrug(int value) {
      
      newDrug_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *是否是新药，0-不是，1-是
     * </pre>
     *
     * <code>int32 newDrug = 20;</code>
     */
    public Builder clearNewDrug() {
      
      newDrug_ = 0;
      onChanged();
      return this;
    }

    private int pharmacy_ ;
    /**
     * <pre>
     *药品目录药房（1-广三生殖药房，2-太和医院药房）
     * </pre>
     *
     * <code>int32 pharmacy = 21;</code>
     */
    public int getPharmacy() {
      return pharmacy_;
    }
    /**
     * <pre>
     *药品目录药房（1-广三生殖药房，2-太和医院药房）
     * </pre>
     *
     * <code>int32 pharmacy = 21;</code>
     */
    public Builder setPharmacy(int value) {
      
      pharmacy_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *药品目录药房（1-广三生殖药房，2-太和医院药房）
     * </pre>
     *
     * <code>int32 pharmacy = 21;</code>
     */
    public Builder clearPharmacy() {
      
      pharmacy_ = 0;
      onChanged();
      return this;
    }

    private int drugType_ ;
    /**
     * <code>int32 drugType = 22;</code>
     */
    public int getDrugType() {
      return drugType_;
    }
    /**
     * <code>int32 drugType = 22;</code>
     */
    public Builder setDrugType(int value) {
      
      drugType_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 drugType = 22;</code>
     */
    public Builder clearDrugType() {
      
      drugType_ = 0;
      onChanged();
      return this;
    }

    private boolean outpatientSpec_ ;
    /**
     * <pre>
     *是否是门特药
     * </pre>
     *
     * <code>bool outpatientSpec = 23;</code>
     */
    public boolean getOutpatientSpec() {
      return outpatientSpec_;
    }
    /**
     * <pre>
     *是否是门特药
     * </pre>
     *
     * <code>bool outpatientSpec = 23;</code>
     */
    public Builder setOutpatientSpec(boolean value) {
      
      outpatientSpec_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *是否是门特药
     * </pre>
     *
     * <code>bool outpatientSpec = 23;</code>
     */
    public Builder clearOutpatientSpec() {
      
      outpatientSpec_ = false;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }

    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return this;
    }


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.drug.Drug)
  }

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

  public static com.ywt.gapi.drug.Drug getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.ywt.gapi.drug.Drug getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

