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

package com.ywt.gapi.taihe.outpaitent;

/**
 * Protobuf type {@code com.ywt.gapi.taihe.outpaitent.OutpatientOrderDetail}
 */
public  final class OutpatientOrderDetail extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.taihe.outpaitent.OutpatientOrderDetail)
    OutpatientOrderDetailOrBuilder {
private static final long serialVersionUID = 0L;
  // Use OutpatientOrderDetail.newBuilder() to construct.
  private OutpatientOrderDetail(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private OutpatientOrderDetail() {
    itemCode_ = "";
    itemName_ = "";
    itemType_ = "";
    itemPrice_ = 0;
    itemNumber_ = "";
    itemTotalFee_ = 0;
    itemUnit_ = "";
    itemSpec_ = "";
  }

  @Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private OutpatientOrderDetail(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new 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;
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
          case 10: {
            String s = input.readStringRequireUtf8();

            itemCode_ = s;
            break;
          }
          case 18: {
            String s = input.readStringRequireUtf8();

            itemName_ = s;
            break;
          }
          case 26: {
            String s = input.readStringRequireUtf8();

            itemType_ = s;
            break;
          }
          case 32: {

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

            itemNumber_ = s;
            break;
          }
          case 48: {

            itemTotalFee_ = input.readInt32();
            break;
          }
          case 58: {
            String s = input.readStringRequireUtf8();

            itemUnit_ = s;
            break;
          }
          case 66: {
            String s = input.readStringRequireUtf8();

            itemSpec_ = s;
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return TaiheOutpatient.internal_static_com_ywt_gapi_taihe_outpaitent_OutpatientOrderDetail_descriptor;
  }

  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return TaiheOutpatient.internal_static_com_ywt_gapi_taihe_outpaitent_OutpatientOrderDetail_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            OutpatientOrderDetail.class, Builder.class);
  }

  public static final int ITEMCODE_FIELD_NUMBER = 1;
  private volatile Object itemCode_;
  /**
   * <code>string itemCode = 1;</code>
   */
  public String getItemCode() {
    Object ref = itemCode_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      itemCode_ = s;
      return s;
    }
  }
  /**
   * <code>string itemCode = 1;</code>
   */
  public com.google.protobuf.ByteString
      getItemCodeBytes() {
    Object ref = itemCode_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      itemCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ITEMNAME_FIELD_NUMBER = 2;
  private volatile Object itemName_;
  /**
   * <code>string itemName = 2;</code>
   */
  public String getItemName() {
    Object ref = itemName_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      itemName_ = s;
      return s;
    }
  }
  /**
   * <code>string itemName = 2;</code>
   */
  public com.google.protobuf.ByteString
      getItemNameBytes() {
    Object ref = itemName_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      itemName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ITEMTYPE_FIELD_NUMBER = 3;
  private volatile Object itemType_;
  /**
   * <code>string itemType = 3;</code>
   */
  public String getItemType() {
    Object ref = itemType_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      itemType_ = s;
      return s;
    }
  }
  /**
   * <code>string itemType = 3;</code>
   */
  public com.google.protobuf.ByteString
      getItemTypeBytes() {
    Object ref = itemType_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      itemType_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ITEMPRICE_FIELD_NUMBER = 4;
  private int itemPrice_;
  /**
   * <code>int32 itemPrice = 4;</code>
   */
  public int getItemPrice() {
    return itemPrice_;
  }

  public static final int ITEMNUMBER_FIELD_NUMBER = 5;
  private volatile Object itemNumber_;
  /**
   * <code>string itemNumber = 5;</code>
   */
  public String getItemNumber() {
    Object ref = itemNumber_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      itemNumber_ = s;
      return s;
    }
  }
  /**
   * <code>string itemNumber = 5;</code>
   */
  public com.google.protobuf.ByteString
      getItemNumberBytes() {
    Object ref = itemNumber_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      itemNumber_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ITEMTOTALFEE_FIELD_NUMBER = 6;
  private int itemTotalFee_;
  /**
   * <code>int32 itemTotalFee = 6;</code>
   */
  public int getItemTotalFee() {
    return itemTotalFee_;
  }

  public static final int ITEMUNIT_FIELD_NUMBER = 7;
  private volatile Object itemUnit_;
  /**
   * <code>string itemUnit = 7;</code>
   */
  public String getItemUnit() {
    Object ref = itemUnit_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      itemUnit_ = s;
      return s;
    }
  }
  /**
   * <code>string itemUnit = 7;</code>
   */
  public com.google.protobuf.ByteString
      getItemUnitBytes() {
    Object ref = itemUnit_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      itemUnit_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int ITEMSPEC_FIELD_NUMBER = 8;
  private volatile Object itemSpec_;
  /**
   * <code>string itemSpec = 8;</code>
   */
  public String getItemSpec() {
    Object ref = itemSpec_;
    if (ref instanceof String) {
      return (String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      String s = bs.toStringUtf8();
      itemSpec_ = s;
      return s;
    }
  }
  /**
   * <code>string itemSpec = 8;</code>
   */
  public com.google.protobuf.ByteString
      getItemSpecBytes() {
    Object ref = itemSpec_;
    if (ref instanceof String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (String) ref);
      itemSpec_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 (!getItemCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, itemCode_);
    }
    if (!getItemNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, itemName_);
    }
    if (!getItemTypeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, itemType_);
    }
    if (itemPrice_ != 0) {
      output.writeInt32(4, itemPrice_);
    }
    if (!getItemNumberBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, itemNumber_);
    }
    if (itemTotalFee_ != 0) {
      output.writeInt32(6, itemTotalFee_);
    }
    if (!getItemUnitBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, itemUnit_);
    }
    if (!getItemSpecBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, itemSpec_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!getItemCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, itemCode_);
    }
    if (!getItemNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, itemName_);
    }
    if (!getItemTypeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, itemType_);
    }
    if (itemPrice_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(4, itemPrice_);
    }
    if (!getItemNumberBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, itemNumber_);
    }
    if (itemTotalFee_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, itemTotalFee_);
    }
    if (!getItemUnitBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, itemUnit_);
    }
    if (!getItemSpecBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, itemSpec_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof OutpatientOrderDetail)) {
      return super.equals(obj);
    }
    OutpatientOrderDetail other = (OutpatientOrderDetail) obj;

    boolean result = true;
    result = result && getItemCode()
        .equals(other.getItemCode());
    result = result && getItemName()
        .equals(other.getItemName());
    result = result && getItemType()
        .equals(other.getItemType());
    result = result && (getItemPrice()
        == other.getItemPrice());
    result = result && getItemNumber()
        .equals(other.getItemNumber());
    result = result && (getItemTotalFee()
        == other.getItemTotalFee());
    result = result && getItemUnit()
        .equals(other.getItemUnit());
    result = result && getItemSpec()
        .equals(other.getItemSpec());
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + ITEMCODE_FIELD_NUMBER;
    hash = (53 * hash) + getItemCode().hashCode();
    hash = (37 * hash) + ITEMNAME_FIELD_NUMBER;
    hash = (53 * hash) + getItemName().hashCode();
    hash = (37 * hash) + ITEMTYPE_FIELD_NUMBER;
    hash = (53 * hash) + getItemType().hashCode();
    hash = (37 * hash) + ITEMPRICE_FIELD_NUMBER;
    hash = (53 * hash) + getItemPrice();
    hash = (37 * hash) + ITEMNUMBER_FIELD_NUMBER;
    hash = (53 * hash) + getItemNumber().hashCode();
    hash = (37 * hash) + ITEMTOTALFEE_FIELD_NUMBER;
    hash = (53 * hash) + getItemTotalFee();
    hash = (37 * hash) + ITEMUNIT_FIELD_NUMBER;
    hash = (53 * hash) + getItemUnit().hashCode();
    hash = (37 * hash) + ITEMSPEC_FIELD_NUMBER;
    hash = (53 * hash) + getItemSpec().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static OutpatientOrderDetail parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static OutpatientOrderDetail parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static OutpatientOrderDetail parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static OutpatientOrderDetail parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static OutpatientOrderDetail parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static OutpatientOrderDetail parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static OutpatientOrderDetail parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static OutpatientOrderDetail 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 OutpatientOrderDetail parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static OutpatientOrderDetail 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 OutpatientOrderDetail parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static OutpatientOrderDetail 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(OutpatientOrderDetail prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * Protobuf type {@code com.ywt.gapi.taihe.outpaitent.OutpatientOrderDetail}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.taihe.outpaitent.OutpatientOrderDetail)
      OutpatientOrderDetailOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return TaiheOutpatient.internal_static_com_ywt_gapi_taihe_outpaitent_OutpatientOrderDetail_descriptor;
    }

    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return TaiheOutpatient.internal_static_com_ywt_gapi_taihe_outpaitent_OutpatientOrderDetail_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              OutpatientOrderDetail.class, Builder.class);
    }

    // Construct using com.ywt.gapi.taihe.outpaitent.OutpatientOrderDetail.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

      itemName_ = "";

      itemType_ = "";

      itemPrice_ = 0;

      itemNumber_ = "";

      itemTotalFee_ = 0;

      itemUnit_ = "";

      itemSpec_ = "";

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return TaiheOutpatient.internal_static_com_ywt_gapi_taihe_outpaitent_OutpatientOrderDetail_descriptor;
    }

    public OutpatientOrderDetail getDefaultInstanceForType() {
      return OutpatientOrderDetail.getDefaultInstance();
    }

    public OutpatientOrderDetail build() {
      OutpatientOrderDetail result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    public OutpatientOrderDetail buildPartial() {
      OutpatientOrderDetail result = new OutpatientOrderDetail(this);
      result.itemCode_ = itemCode_;
      result.itemName_ = itemName_;
      result.itemType_ = itemType_;
      result.itemPrice_ = itemPrice_;
      result.itemNumber_ = itemNumber_;
      result.itemTotalFee_ = itemTotalFee_;
      result.itemUnit_ = itemUnit_;
      result.itemSpec_ = itemSpec_;
      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 OutpatientOrderDetail) {
        return mergeFrom((OutpatientOrderDetail)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(OutpatientOrderDetail other) {
      if (other == OutpatientOrderDetail.getDefaultInstance()) return this;
      if (!other.getItemCode().isEmpty()) {
        itemCode_ = other.itemCode_;
        onChanged();
      }
      if (!other.getItemName().isEmpty()) {
        itemName_ = other.itemName_;
        onChanged();
      }
      if (!other.getItemType().isEmpty()) {
        itemType_ = other.itemType_;
        onChanged();
      }
      if (other.getItemPrice() != 0) {
        setItemPrice(other.getItemPrice());
      }
      if (!other.getItemNumber().isEmpty()) {
        itemNumber_ = other.itemNumber_;
        onChanged();
      }
      if (other.getItemTotalFee() != 0) {
        setItemTotalFee(other.getItemTotalFee());
      }
      if (!other.getItemUnit().isEmpty()) {
        itemUnit_ = other.itemUnit_;
        onChanged();
      }
      if (!other.getItemSpec().isEmpty()) {
        itemSpec_ = other.itemSpec_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      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 {
      OutpatientOrderDetail parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (OutpatientOrderDetail) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private Object itemCode_ = "";
    /**
     * <code>string itemCode = 1;</code>
     */
    public String getItemCode() {
      Object ref = itemCode_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        itemCode_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string itemCode = 1;</code>
     */
    public com.google.protobuf.ByteString
        getItemCodeBytes() {
      Object ref = itemCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        itemCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string itemCode = 1;</code>
     */
    public Builder setItemCode(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      itemCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string itemCode = 1;</code>
     */
    public Builder clearItemCode() {
      
      itemCode_ = getDefaultInstance().getItemCode();
      onChanged();
      return this;
    }
    /**
     * <code>string itemCode = 1;</code>
     */
    public Builder setItemCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      itemCode_ = value;
      onChanged();
      return this;
    }

    private Object itemName_ = "";
    /**
     * <code>string itemName = 2;</code>
     */
    public String getItemName() {
      Object ref = itemName_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        itemName_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string itemName = 2;</code>
     */
    public com.google.protobuf.ByteString
        getItemNameBytes() {
      Object ref = itemName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        itemName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string itemName = 2;</code>
     */
    public Builder setItemName(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      itemName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string itemName = 2;</code>
     */
    public Builder clearItemName() {
      
      itemName_ = getDefaultInstance().getItemName();
      onChanged();
      return this;
    }
    /**
     * <code>string itemName = 2;</code>
     */
    public Builder setItemNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      itemName_ = value;
      onChanged();
      return this;
    }

    private Object itemType_ = "";
    /**
     * <code>string itemType = 3;</code>
     */
    public String getItemType() {
      Object ref = itemType_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        itemType_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string itemType = 3;</code>
     */
    public com.google.protobuf.ByteString
        getItemTypeBytes() {
      Object ref = itemType_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        itemType_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string itemType = 3;</code>
     */
    public Builder setItemType(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      itemType_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string itemType = 3;</code>
     */
    public Builder clearItemType() {
      
      itemType_ = getDefaultInstance().getItemType();
      onChanged();
      return this;
    }
    /**
     * <code>string itemType = 3;</code>
     */
    public Builder setItemTypeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      itemType_ = value;
      onChanged();
      return this;
    }

    private int itemPrice_ ;
    /**
     * <code>int32 itemPrice = 4;</code>
     */
    public int getItemPrice() {
      return itemPrice_;
    }
    /**
     * <code>int32 itemPrice = 4;</code>
     */
    public Builder setItemPrice(int value) {
      
      itemPrice_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 itemPrice = 4;</code>
     */
    public Builder clearItemPrice() {
      
      itemPrice_ = 0;
      onChanged();
      return this;
    }

    private Object itemNumber_ = "";
    /**
     * <code>string itemNumber = 5;</code>
     */
    public String getItemNumber() {
      Object ref = itemNumber_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        itemNumber_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string itemNumber = 5;</code>
     */
    public com.google.protobuf.ByteString
        getItemNumberBytes() {
      Object ref = itemNumber_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        itemNumber_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string itemNumber = 5;</code>
     */
    public Builder setItemNumber(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      itemNumber_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string itemNumber = 5;</code>
     */
    public Builder clearItemNumber() {
      
      itemNumber_ = getDefaultInstance().getItemNumber();
      onChanged();
      return this;
    }
    /**
     * <code>string itemNumber = 5;</code>
     */
    public Builder setItemNumberBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      itemNumber_ = value;
      onChanged();
      return this;
    }

    private int itemTotalFee_ ;
    /**
     * <code>int32 itemTotalFee = 6;</code>
     */
    public int getItemTotalFee() {
      return itemTotalFee_;
    }
    /**
     * <code>int32 itemTotalFee = 6;</code>
     */
    public Builder setItemTotalFee(int value) {
      
      itemTotalFee_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 itemTotalFee = 6;</code>
     */
    public Builder clearItemTotalFee() {
      
      itemTotalFee_ = 0;
      onChanged();
      return this;
    }

    private Object itemUnit_ = "";
    /**
     * <code>string itemUnit = 7;</code>
     */
    public String getItemUnit() {
      Object ref = itemUnit_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        itemUnit_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string itemUnit = 7;</code>
     */
    public com.google.protobuf.ByteString
        getItemUnitBytes() {
      Object ref = itemUnit_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        itemUnit_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string itemUnit = 7;</code>
     */
    public Builder setItemUnit(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      itemUnit_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string itemUnit = 7;</code>
     */
    public Builder clearItemUnit() {
      
      itemUnit_ = getDefaultInstance().getItemUnit();
      onChanged();
      return this;
    }
    /**
     * <code>string itemUnit = 7;</code>
     */
    public Builder setItemUnitBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      itemUnit_ = value;
      onChanged();
      return this;
    }

    private Object itemSpec_ = "";
    /**
     * <code>string itemSpec = 8;</code>
     */
    public String getItemSpec() {
      Object ref = itemSpec_;
      if (!(ref instanceof String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        itemSpec_ = s;
        return s;
      } else {
        return (String) ref;
      }
    }
    /**
     * <code>string itemSpec = 8;</code>
     */
    public com.google.protobuf.ByteString
        getItemSpecBytes() {
      Object ref = itemSpec_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        itemSpec_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string itemSpec = 8;</code>
     */
    public Builder setItemSpec(
        String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      itemSpec_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string itemSpec = 8;</code>
     */
    public Builder clearItemSpec() {
      
      itemSpec_ = getDefaultInstance().getItemSpec();
      onChanged();
      return this;
    }
    /**
     * <code>string itemSpec = 8;</code>
     */
    public Builder setItemSpecBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      itemSpec_ = value;
      onChanged();
      return this;
    }
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.taihe.outpaitent.OutpatientOrderDetail)
  }

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

  public static OutpatientOrderDetail getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public OutpatientOrderDetail getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

