// 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.CreateMedConOrderRequest}
 */
public  final class CreateMedConOrderRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.drug.CreateMedConOrderRequest)
    CreateMedConOrderRequestOrBuilder {
  // Use CreateMedConOrderRequest.newBuilder() to construct.
  private CreateMedConOrderRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private CreateMedConOrderRequest() {
    createType_ = 0;
    medConList_ = java.util.Collections.emptyList();
    patientName_ = "";
    mobile_ = "";
    pharmacyId_ = 0;
    userId_ = 0;
    hospitalId_ = 0;
    invoiceRequired_ = false;
    deptName_ = "";
    doctorName_ = "";
    medConsumablesDoctorsId_ = 0;
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
  }
  private CreateMedConOrderRequest(
      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 8: {

            createType_ = input.readInt32();
            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              medConList_ = new java.util.ArrayList<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons>();
              mutable_bitField0_ |= 0x00000002;
            }
            medConList_.add(
                input.readMessage(com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.parser(), extensionRegistry));
            break;
          }
          case 26: {
            java.lang.String s = input.readStringRequireUtf8();

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

            mobile_ = s;
            break;
          }
          case 40: {

            pharmacyId_ = input.readInt32();
            break;
          }
          case 48: {

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

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

            invoiceRequired_ = input.readBool();
            break;
          }
          case 74: {
            com.ywt.gapi.drug.MedInvoice.Builder subBuilder = null;
            if (medInvoice_ != null) {
              subBuilder = medInvoice_.toBuilder();
            }
            medInvoice_ = input.readMessage(com.ywt.gapi.drug.MedInvoice.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(medInvoice_);
              medInvoice_ = subBuilder.buildPartial();
            }

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

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

            doctorName_ = s;
            break;
          }
          case 96: {

            medConsumablesDoctorsId_ = input.readInt32();
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
        medConList_ = java.util.Collections.unmodifiableList(medConList_);
      }
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.drug.DrugOuterClass.internal_static_com_ywt_gapi_drug_CreateMedConOrderRequest_descriptor;
  }

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

  public interface MedConsOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>int32 id = 1;</code>
     */
    int getId();

    /**
     * <code>string code = 2;</code>
     */
    java.lang.String getCode();
    /**
     * <code>string code = 2;</code>
     */
    com.google.protobuf.ByteString
        getCodeBytes();

    /**
     * <code>int32 quantity = 3;</code>
     */
    int getQuantity();
  }
  /**
   * Protobuf type {@code com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons}
   */
  public  static final class MedCons extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons)
      MedConsOrBuilder {
    // Use MedCons.newBuilder() to construct.
    private MedCons(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private MedCons() {
      id_ = 0;
      code_ = "";
      quantity_ = 0;
    }

    @java.lang.Override
    public final com.google.protobuf.UnknownFieldSet
    getUnknownFields() {
      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
    }
    private MedCons(
        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 8: {

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

              code_ = s;
              break;
            }
            case 24: {

              quantity_ = input.readInt32();
              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_CreateMedConOrderRequest_MedCons_descriptor;
    }

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

    public static final int ID_FIELD_NUMBER = 1;
    private int id_;
    /**
     * <code>int32 id = 1;</code>
     */
    public int getId() {
      return id_;
    }

    public static final int CODE_FIELD_NUMBER = 2;
    private volatile java.lang.Object code_;
    /**
     * <code>string code = 2;</code>
     */
    public java.lang.String getCode() {
      java.lang.Object ref = code_;
      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();
        code_ = s;
        return s;
      }
    }
    /**
     * <code>string code = 2;</code>
     */
    public com.google.protobuf.ByteString
        getCodeBytes() {
      java.lang.Object ref = code_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        code_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int QUANTITY_FIELD_NUMBER = 3;
    private int quantity_;
    /**
     * <code>int32 quantity = 3;</code>
     */
    public int getQuantity() {
      return quantity_;
    }

    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 (id_ != 0) {
        output.writeInt32(1, id_);
      }
      if (!getCodeBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, code_);
      }
      if (quantity_ != 0) {
        output.writeInt32(3, quantity_);
      }
    }

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

      size = 0;
      if (id_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(1, id_);
      }
      if (!getCodeBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, code_);
      }
      if (quantity_ != 0) {
        size += com.google.protobuf.CodedOutputStream
          .computeInt32Size(3, quantity_);
      }
      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.CreateMedConOrderRequest.MedCons)) {
        return super.equals(obj);
      }
      com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons other = (com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons) obj;

      boolean result = true;
      result = result && (getId()
          == other.getId());
      result = result && getCode()
          .equals(other.getCode());
      result = result && (getQuantity()
          == other.getQuantity());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + ID_FIELD_NUMBER;
      hash = (53 * hash) + getId();
      hash = (37 * hash) + CODE_FIELD_NUMBER;
      hash = (53 * hash) + getCode().hashCode();
      hash = (37 * hash) + QUANTITY_FIELD_NUMBER;
      hash = (53 * hash) + getQuantity();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

      // Construct using com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.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();
        id_ = 0;

        code_ = "";

        quantity_ = 0;

        return this;
      }

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

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

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

      public com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons buildPartial() {
        com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons result = new com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons(this);
        result.id_ = id_;
        result.code_ = code_;
        result.quantity_ = quantity_;
        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.CreateMedConOrderRequest.MedCons) {
          return mergeFrom((com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons other) {
        if (other == com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.getDefaultInstance()) return this;
        if (other.getId() != 0) {
          setId(other.getId());
        }
        if (!other.getCode().isEmpty()) {
          code_ = other.code_;
          onChanged();
        }
        if (other.getQuantity() != 0) {
          setQuantity(other.getQuantity());
        }
        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.CreateMedConOrderRequest.MedCons parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private int id_ ;
      /**
       * <code>int32 id = 1;</code>
       */
      public int getId() {
        return id_;
      }
      /**
       * <code>int32 id = 1;</code>
       */
      public Builder setId(int value) {
        
        id_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 id = 1;</code>
       */
      public Builder clearId() {
        
        id_ = 0;
        onChanged();
        return this;
      }

      private java.lang.Object code_ = "";
      /**
       * <code>string code = 2;</code>
       */
      public java.lang.String getCode() {
        java.lang.Object ref = code_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          code_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string code = 2;</code>
       */
      public com.google.protobuf.ByteString
          getCodeBytes() {
        java.lang.Object ref = code_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          code_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string code = 2;</code>
       */
      public Builder setCode(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        code_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string code = 2;</code>
       */
      public Builder clearCode() {
        
        code_ = getDefaultInstance().getCode();
        onChanged();
        return this;
      }
      /**
       * <code>string code = 2;</code>
       */
      public Builder setCodeBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        code_ = value;
        onChanged();
        return this;
      }

      private int quantity_ ;
      /**
       * <code>int32 quantity = 3;</code>
       */
      public int getQuantity() {
        return quantity_;
      }
      /**
       * <code>int32 quantity = 3;</code>
       */
      public Builder setQuantity(int value) {
        
        quantity_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>int32 quantity = 3;</code>
       */
      public Builder clearQuantity() {
        
        quantity_ = 0;
        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.CreateMedConOrderRequest.MedCons)
    }

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

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

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

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

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

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

  }

  private int bitField0_;
  public static final int CREATETYPE_FIELD_NUMBER = 1;
  private int createType_;
  /**
   * <pre>
   *创建方式 1,  患者；2, 收费员
   * </pre>
   *
   * <code>int32 createType = 1;</code>
   */
  public int getCreateType() {
    return createType_;
  }

  public static final int MEDCONLIST_FIELD_NUMBER = 2;
  private java.util.List<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons> medConList_;
  /**
   * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
   */
  public java.util.List<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons> getMedConListList() {
    return medConList_;
  }
  /**
   * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
   */
  public java.util.List<? extends com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder> 
      getMedConListOrBuilderList() {
    return medConList_;
  }
  /**
   * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
   */
  public int getMedConListCount() {
    return medConList_.size();
  }
  /**
   * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
   */
  public com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons getMedConList(int index) {
    return medConList_.get(index);
  }
  /**
   * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
   */
  public com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder getMedConListOrBuilder(
      int index) {
    return medConList_.get(index);
  }

  public static final int PATIENTNAME_FIELD_NUMBER = 3;
  private volatile java.lang.Object patientName_;
  /**
   * <code>string patientName = 3;</code>
   */
  public java.lang.String getPatientName() {
    java.lang.Object ref = patientName_;
    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();
      patientName_ = s;
      return s;
    }
  }
  /**
   * <code>string patientName = 3;</code>
   */
  public com.google.protobuf.ByteString
      getPatientNameBytes() {
    java.lang.Object ref = patientName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      patientName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MOBILE_FIELD_NUMBER = 4;
  private volatile java.lang.Object mobile_;
  /**
   * <code>string mobile = 4;</code>
   */
  public java.lang.String getMobile() {
    java.lang.Object ref = mobile_;
    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();
      mobile_ = s;
      return s;
    }
  }
  /**
   * <code>string mobile = 4;</code>
   */
  public com.google.protobuf.ByteString
      getMobileBytes() {
    java.lang.Object ref = mobile_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      mobile_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PHARMACYID_FIELD_NUMBER = 5;
  private int pharmacyId_;
  /**
   * <code>int32 pharmacyId = 5;</code>
   */
  public int getPharmacyId() {
    return pharmacyId_;
  }

  public static final int USERID_FIELD_NUMBER = 6;
  private int userId_;
  /**
   * <code>int32 userId = 6;</code>
   */
  public int getUserId() {
    return userId_;
  }

  public static final int HOSPITALID_FIELD_NUMBER = 7;
  private int hospitalId_;
  /**
   * <code>int32 hospitalId = 7;</code>
   */
  public int getHospitalId() {
    return hospitalId_;
  }

  public static final int INVOICEREQUIRED_FIELD_NUMBER = 8;
  private boolean invoiceRequired_;
  /**
   * <pre>
   * 是否需要开具发票
   * </pre>
   *
   * <code>bool invoiceRequired = 8;</code>
   */
  public boolean getInvoiceRequired() {
    return invoiceRequired_;
  }

  public static final int MEDINVOICE_FIELD_NUMBER = 9;
  private com.ywt.gapi.drug.MedInvoice medInvoice_;
  /**
   * <pre>
   * 发票内容
   * </pre>
   *
   * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
   */
  public boolean hasMedInvoice() {
    return medInvoice_ != null;
  }
  /**
   * <pre>
   * 发票内容
   * </pre>
   *
   * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
   */
  public com.ywt.gapi.drug.MedInvoice getMedInvoice() {
    return medInvoice_ == null ? com.ywt.gapi.drug.MedInvoice.getDefaultInstance() : medInvoice_;
  }
  /**
   * <pre>
   * 发票内容
   * </pre>
   *
   * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
   */
  public com.ywt.gapi.drug.MedInvoiceOrBuilder getMedInvoiceOrBuilder() {
    return getMedInvoice();
  }

  public static final int DEPTNAME_FIELD_NUMBER = 10;
  private volatile java.lang.Object deptName_;
  /**
   * <code>string deptName = 10;</code>
   */
  public java.lang.String getDeptName() {
    java.lang.Object ref = deptName_;
    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();
      deptName_ = s;
      return s;
    }
  }
  /**
   * <code>string deptName = 10;</code>
   */
  public com.google.protobuf.ByteString
      getDeptNameBytes() {
    java.lang.Object ref = deptName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      deptName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DOCTORNAME_FIELD_NUMBER = 11;
  private volatile java.lang.Object doctorName_;
  /**
   * <code>string doctorName = 11;</code>
   */
  public java.lang.String getDoctorName() {
    java.lang.Object ref = doctorName_;
    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();
      doctorName_ = s;
      return s;
    }
  }
  /**
   * <code>string doctorName = 11;</code>
   */
  public com.google.protobuf.ByteString
      getDoctorNameBytes() {
    java.lang.Object ref = doctorName_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      doctorName_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MEDCONSUMABLESDOCTORSID_FIELD_NUMBER = 12;
  private int medConsumablesDoctorsId_;
  /**
   * <pre>
   * 耗材医生信息表ID
   * </pre>
   *
   * <code>int32 medConsumablesDoctorsId = 12;</code>
   */
  public int getMedConsumablesDoctorsId() {
    return medConsumablesDoctorsId_;
  }

  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 (createType_ != 0) {
      output.writeInt32(1, createType_);
    }
    for (int i = 0; i < medConList_.size(); i++) {
      output.writeMessage(2, medConList_.get(i));
    }
    if (!getPatientNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, patientName_);
    }
    if (!getMobileBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, mobile_);
    }
    if (pharmacyId_ != 0) {
      output.writeInt32(5, pharmacyId_);
    }
    if (userId_ != 0) {
      output.writeInt32(6, userId_);
    }
    if (hospitalId_ != 0) {
      output.writeInt32(7, hospitalId_);
    }
    if (invoiceRequired_ != false) {
      output.writeBool(8, invoiceRequired_);
    }
    if (medInvoice_ != null) {
      output.writeMessage(9, getMedInvoice());
    }
    if (!getDeptNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, deptName_);
    }
    if (!getDoctorNameBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 11, doctorName_);
    }
    if (medConsumablesDoctorsId_ != 0) {
      output.writeInt32(12, medConsumablesDoctorsId_);
    }
  }

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

    size = 0;
    if (createType_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, createType_);
    }
    for (int i = 0; i < medConList_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, medConList_.get(i));
    }
    if (!getPatientNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, patientName_);
    }
    if (!getMobileBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, mobile_);
    }
    if (pharmacyId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(5, pharmacyId_);
    }
    if (userId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, userId_);
    }
    if (hospitalId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(7, hospitalId_);
    }
    if (invoiceRequired_ != false) {
      size += com.google.protobuf.CodedOutputStream
        .computeBoolSize(8, invoiceRequired_);
    }
    if (medInvoice_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, getMedInvoice());
    }
    if (!getDeptNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, deptName_);
    }
    if (!getDoctorNameBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, doctorName_);
    }
    if (medConsumablesDoctorsId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(12, medConsumablesDoctorsId_);
    }
    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.CreateMedConOrderRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.drug.CreateMedConOrderRequest other = (com.ywt.gapi.drug.CreateMedConOrderRequest) obj;

    boolean result = true;
    result = result && (getCreateType()
        == other.getCreateType());
    result = result && getMedConListList()
        .equals(other.getMedConListList());
    result = result && getPatientName()
        .equals(other.getPatientName());
    result = result && getMobile()
        .equals(other.getMobile());
    result = result && (getPharmacyId()
        == other.getPharmacyId());
    result = result && (getUserId()
        == other.getUserId());
    result = result && (getHospitalId()
        == other.getHospitalId());
    result = result && (getInvoiceRequired()
        == other.getInvoiceRequired());
    result = result && (hasMedInvoice() == other.hasMedInvoice());
    if (hasMedInvoice()) {
      result = result && getMedInvoice()
          .equals(other.getMedInvoice());
    }
    result = result && getDeptName()
        .equals(other.getDeptName());
    result = result && getDoctorName()
        .equals(other.getDoctorName());
    result = result && (getMedConsumablesDoctorsId()
        == other.getMedConsumablesDoctorsId());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + CREATETYPE_FIELD_NUMBER;
    hash = (53 * hash) + getCreateType();
    if (getMedConListCount() > 0) {
      hash = (37 * hash) + MEDCONLIST_FIELD_NUMBER;
      hash = (53 * hash) + getMedConListList().hashCode();
    }
    hash = (37 * hash) + PATIENTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getPatientName().hashCode();
    hash = (37 * hash) + MOBILE_FIELD_NUMBER;
    hash = (53 * hash) + getMobile().hashCode();
    hash = (37 * hash) + PHARMACYID_FIELD_NUMBER;
    hash = (53 * hash) + getPharmacyId();
    hash = (37 * hash) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserId();
    hash = (37 * hash) + HOSPITALID_FIELD_NUMBER;
    hash = (53 * hash) + getHospitalId();
    hash = (37 * hash) + INVOICEREQUIRED_FIELD_NUMBER;
    hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
        getInvoiceRequired());
    if (hasMedInvoice()) {
      hash = (37 * hash) + MEDINVOICE_FIELD_NUMBER;
      hash = (53 * hash) + getMedInvoice().hashCode();
    }
    hash = (37 * hash) + DEPTNAME_FIELD_NUMBER;
    hash = (53 * hash) + getDeptName().hashCode();
    hash = (37 * hash) + DOCTORNAME_FIELD_NUMBER;
    hash = (53 * hash) + getDoctorName().hashCode();
    hash = (37 * hash) + MEDCONSUMABLESDOCTORSID_FIELD_NUMBER;
    hash = (53 * hash) + getMedConsumablesDoctorsId();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

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

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

      if (medConListBuilder_ == null) {
        medConList_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        medConListBuilder_.clear();
      }
      patientName_ = "";

      mobile_ = "";

      pharmacyId_ = 0;

      userId_ = 0;

      hospitalId_ = 0;

      invoiceRequired_ = false;

      if (medInvoiceBuilder_ == null) {
        medInvoice_ = null;
      } else {
        medInvoice_ = null;
        medInvoiceBuilder_ = null;
      }
      deptName_ = "";

      doctorName_ = "";

      medConsumablesDoctorsId_ = 0;

      return this;
    }

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

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

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

    public com.ywt.gapi.drug.CreateMedConOrderRequest buildPartial() {
      com.ywt.gapi.drug.CreateMedConOrderRequest result = new com.ywt.gapi.drug.CreateMedConOrderRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.createType_ = createType_;
      if (medConListBuilder_ == null) {
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          medConList_ = java.util.Collections.unmodifiableList(medConList_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.medConList_ = medConList_;
      } else {
        result.medConList_ = medConListBuilder_.build();
      }
      result.patientName_ = patientName_;
      result.mobile_ = mobile_;
      result.pharmacyId_ = pharmacyId_;
      result.userId_ = userId_;
      result.hospitalId_ = hospitalId_;
      result.invoiceRequired_ = invoiceRequired_;
      if (medInvoiceBuilder_ == null) {
        result.medInvoice_ = medInvoice_;
      } else {
        result.medInvoice_ = medInvoiceBuilder_.build();
      }
      result.deptName_ = deptName_;
      result.doctorName_ = doctorName_;
      result.medConsumablesDoctorsId_ = medConsumablesDoctorsId_;
      result.bitField0_ = to_bitField0_;
      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.CreateMedConOrderRequest) {
        return mergeFrom((com.ywt.gapi.drug.CreateMedConOrderRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.drug.CreateMedConOrderRequest other) {
      if (other == com.ywt.gapi.drug.CreateMedConOrderRequest.getDefaultInstance()) return this;
      if (other.getCreateType() != 0) {
        setCreateType(other.getCreateType());
      }
      if (medConListBuilder_ == null) {
        if (!other.medConList_.isEmpty()) {
          if (medConList_.isEmpty()) {
            medConList_ = other.medConList_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureMedConListIsMutable();
            medConList_.addAll(other.medConList_);
          }
          onChanged();
        }
      } else {
        if (!other.medConList_.isEmpty()) {
          if (medConListBuilder_.isEmpty()) {
            medConListBuilder_.dispose();
            medConListBuilder_ = null;
            medConList_ = other.medConList_;
            bitField0_ = (bitField0_ & ~0x00000002);
            medConListBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getMedConListFieldBuilder() : null;
          } else {
            medConListBuilder_.addAllMessages(other.medConList_);
          }
        }
      }
      if (!other.getPatientName().isEmpty()) {
        patientName_ = other.patientName_;
        onChanged();
      }
      if (!other.getMobile().isEmpty()) {
        mobile_ = other.mobile_;
        onChanged();
      }
      if (other.getPharmacyId() != 0) {
        setPharmacyId(other.getPharmacyId());
      }
      if (other.getUserId() != 0) {
        setUserId(other.getUserId());
      }
      if (other.getHospitalId() != 0) {
        setHospitalId(other.getHospitalId());
      }
      if (other.getInvoiceRequired() != false) {
        setInvoiceRequired(other.getInvoiceRequired());
      }
      if (other.hasMedInvoice()) {
        mergeMedInvoice(other.getMedInvoice());
      }
      if (!other.getDeptName().isEmpty()) {
        deptName_ = other.deptName_;
        onChanged();
      }
      if (!other.getDoctorName().isEmpty()) {
        doctorName_ = other.doctorName_;
        onChanged();
      }
      if (other.getMedConsumablesDoctorsId() != 0) {
        setMedConsumablesDoctorsId(other.getMedConsumablesDoctorsId());
      }
      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.CreateMedConOrderRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.drug.CreateMedConOrderRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private int createType_ ;
    /**
     * <pre>
     *创建方式 1,  患者；2, 收费员
     * </pre>
     *
     * <code>int32 createType = 1;</code>
     */
    public int getCreateType() {
      return createType_;
    }
    /**
     * <pre>
     *创建方式 1,  患者；2, 收费员
     * </pre>
     *
     * <code>int32 createType = 1;</code>
     */
    public Builder setCreateType(int value) {
      
      createType_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *创建方式 1,  患者；2, 收费员
     * </pre>
     *
     * <code>int32 createType = 1;</code>
     */
    public Builder clearCreateType() {
      
      createType_ = 0;
      onChanged();
      return this;
    }

    private java.util.List<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons> medConList_ =
      java.util.Collections.emptyList();
    private void ensureMedConListIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        medConList_ = new java.util.ArrayList<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons>(medConList_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder, com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder> medConListBuilder_;

    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public java.util.List<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons> getMedConListList() {
      if (medConListBuilder_ == null) {
        return java.util.Collections.unmodifiableList(medConList_);
      } else {
        return medConListBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public int getMedConListCount() {
      if (medConListBuilder_ == null) {
        return medConList_.size();
      } else {
        return medConListBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons getMedConList(int index) {
      if (medConListBuilder_ == null) {
        return medConList_.get(index);
      } else {
        return medConListBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder setMedConList(
        int index, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons value) {
      if (medConListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureMedConListIsMutable();
        medConList_.set(index, value);
        onChanged();
      } else {
        medConListBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder setMedConList(
        int index, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder builderForValue) {
      if (medConListBuilder_ == null) {
        ensureMedConListIsMutable();
        medConList_.set(index, builderForValue.build());
        onChanged();
      } else {
        medConListBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder addMedConList(com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons value) {
      if (medConListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureMedConListIsMutable();
        medConList_.add(value);
        onChanged();
      } else {
        medConListBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder addMedConList(
        int index, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons value) {
      if (medConListBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureMedConListIsMutable();
        medConList_.add(index, value);
        onChanged();
      } else {
        medConListBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder addMedConList(
        com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder builderForValue) {
      if (medConListBuilder_ == null) {
        ensureMedConListIsMutable();
        medConList_.add(builderForValue.build());
        onChanged();
      } else {
        medConListBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder addMedConList(
        int index, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder builderForValue) {
      if (medConListBuilder_ == null) {
        ensureMedConListIsMutable();
        medConList_.add(index, builderForValue.build());
        onChanged();
      } else {
        medConListBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder addAllMedConList(
        java.lang.Iterable<? extends com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons> values) {
      if (medConListBuilder_ == null) {
        ensureMedConListIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, medConList_);
        onChanged();
      } else {
        medConListBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder clearMedConList() {
      if (medConListBuilder_ == null) {
        medConList_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        medConListBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public Builder removeMedConList(int index) {
      if (medConListBuilder_ == null) {
        ensureMedConListIsMutable();
        medConList_.remove(index);
        onChanged();
      } else {
        medConListBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder getMedConListBuilder(
        int index) {
      return getMedConListFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder getMedConListOrBuilder(
        int index) {
      if (medConListBuilder_ == null) {
        return medConList_.get(index);  } else {
        return medConListBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public java.util.List<? extends com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder> 
         getMedConListOrBuilderList() {
      if (medConListBuilder_ != null) {
        return medConListBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(medConList_);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder addMedConListBuilder() {
      return getMedConListFieldBuilder().addBuilder(
          com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder addMedConListBuilder(
        int index) {
      return getMedConListFieldBuilder().addBuilder(
          index, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons medConList = 2;</code>
     */
    public java.util.List<com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder> 
         getMedConListBuilderList() {
      return getMedConListFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder, com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder> 
        getMedConListFieldBuilder() {
      if (medConListBuilder_ == null) {
        medConListBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons, com.ywt.gapi.drug.CreateMedConOrderRequest.MedCons.Builder, com.ywt.gapi.drug.CreateMedConOrderRequest.MedConsOrBuilder>(
                medConList_,
                ((bitField0_ & 0x00000002) == 0x00000002),
                getParentForChildren(),
                isClean());
        medConList_ = null;
      }
      return medConListBuilder_;
    }

    private java.lang.Object patientName_ = "";
    /**
     * <code>string patientName = 3;</code>
     */
    public java.lang.String getPatientName() {
      java.lang.Object ref = patientName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        patientName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string patientName = 3;</code>
     */
    public com.google.protobuf.ByteString
        getPatientNameBytes() {
      java.lang.Object ref = patientName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        patientName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string patientName = 3;</code>
     */
    public Builder setPatientName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      patientName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string patientName = 3;</code>
     */
    public Builder clearPatientName() {
      
      patientName_ = getDefaultInstance().getPatientName();
      onChanged();
      return this;
    }
    /**
     * <code>string patientName = 3;</code>
     */
    public Builder setPatientNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      patientName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object mobile_ = "";
    /**
     * <code>string mobile = 4;</code>
     */
    public java.lang.String getMobile() {
      java.lang.Object ref = mobile_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        mobile_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public com.google.protobuf.ByteString
        getMobileBytes() {
      java.lang.Object ref = mobile_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        mobile_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public Builder setMobile(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      mobile_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public Builder clearMobile() {
      
      mobile_ = getDefaultInstance().getMobile();
      onChanged();
      return this;
    }
    /**
     * <code>string mobile = 4;</code>
     */
    public Builder setMobileBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      mobile_ = value;
      onChanged();
      return this;
    }

    private int pharmacyId_ ;
    /**
     * <code>int32 pharmacyId = 5;</code>
     */
    public int getPharmacyId() {
      return pharmacyId_;
    }
    /**
     * <code>int32 pharmacyId = 5;</code>
     */
    public Builder setPharmacyId(int value) {
      
      pharmacyId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 pharmacyId = 5;</code>
     */
    public Builder clearPharmacyId() {
      
      pharmacyId_ = 0;
      onChanged();
      return this;
    }

    private int userId_ ;
    /**
     * <code>int32 userId = 6;</code>
     */
    public int getUserId() {
      return userId_;
    }
    /**
     * <code>int32 userId = 6;</code>
     */
    public Builder setUserId(int value) {
      
      userId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 userId = 6;</code>
     */
    public Builder clearUserId() {
      
      userId_ = 0;
      onChanged();
      return this;
    }

    private int hospitalId_ ;
    /**
     * <code>int32 hospitalId = 7;</code>
     */
    public int getHospitalId() {
      return hospitalId_;
    }
    /**
     * <code>int32 hospitalId = 7;</code>
     */
    public Builder setHospitalId(int value) {
      
      hospitalId_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 hospitalId = 7;</code>
     */
    public Builder clearHospitalId() {
      
      hospitalId_ = 0;
      onChanged();
      return this;
    }

    private boolean invoiceRequired_ ;
    /**
     * <pre>
     * 是否需要开具发票
     * </pre>
     *
     * <code>bool invoiceRequired = 8;</code>
     */
    public boolean getInvoiceRequired() {
      return invoiceRequired_;
    }
    /**
     * <pre>
     * 是否需要开具发票
     * </pre>
     *
     * <code>bool invoiceRequired = 8;</code>
     */
    public Builder setInvoiceRequired(boolean value) {
      
      invoiceRequired_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 是否需要开具发票
     * </pre>
     *
     * <code>bool invoiceRequired = 8;</code>
     */
    public Builder clearInvoiceRequired() {
      
      invoiceRequired_ = false;
      onChanged();
      return this;
    }

    private com.ywt.gapi.drug.MedInvoice medInvoice_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.drug.MedInvoice, com.ywt.gapi.drug.MedInvoice.Builder, com.ywt.gapi.drug.MedInvoiceOrBuilder> medInvoiceBuilder_;
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public boolean hasMedInvoice() {
      return medInvoiceBuilder_ != null || medInvoice_ != null;
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public com.ywt.gapi.drug.MedInvoice getMedInvoice() {
      if (medInvoiceBuilder_ == null) {
        return medInvoice_ == null ? com.ywt.gapi.drug.MedInvoice.getDefaultInstance() : medInvoice_;
      } else {
        return medInvoiceBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public Builder setMedInvoice(com.ywt.gapi.drug.MedInvoice value) {
      if (medInvoiceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        medInvoice_ = value;
        onChanged();
      } else {
        medInvoiceBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public Builder setMedInvoice(
        com.ywt.gapi.drug.MedInvoice.Builder builderForValue) {
      if (medInvoiceBuilder_ == null) {
        medInvoice_ = builderForValue.build();
        onChanged();
      } else {
        medInvoiceBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public Builder mergeMedInvoice(com.ywt.gapi.drug.MedInvoice value) {
      if (medInvoiceBuilder_ == null) {
        if (medInvoice_ != null) {
          medInvoice_ =
            com.ywt.gapi.drug.MedInvoice.newBuilder(medInvoice_).mergeFrom(value).buildPartial();
        } else {
          medInvoice_ = value;
        }
        onChanged();
      } else {
        medInvoiceBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public Builder clearMedInvoice() {
      if (medInvoiceBuilder_ == null) {
        medInvoice_ = null;
        onChanged();
      } else {
        medInvoice_ = null;
        medInvoiceBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public com.ywt.gapi.drug.MedInvoice.Builder getMedInvoiceBuilder() {
      
      onChanged();
      return getMedInvoiceFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    public com.ywt.gapi.drug.MedInvoiceOrBuilder getMedInvoiceOrBuilder() {
      if (medInvoiceBuilder_ != null) {
        return medInvoiceBuilder_.getMessageOrBuilder();
      } else {
        return medInvoice_ == null ?
            com.ywt.gapi.drug.MedInvoice.getDefaultInstance() : medInvoice_;
      }
    }
    /**
     * <pre>
     * 发票内容
     * </pre>
     *
     * <code>.com.ywt.gapi.drug.MedInvoice medInvoice = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.drug.MedInvoice, com.ywt.gapi.drug.MedInvoice.Builder, com.ywt.gapi.drug.MedInvoiceOrBuilder> 
        getMedInvoiceFieldBuilder() {
      if (medInvoiceBuilder_ == null) {
        medInvoiceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.drug.MedInvoice, com.ywt.gapi.drug.MedInvoice.Builder, com.ywt.gapi.drug.MedInvoiceOrBuilder>(
                getMedInvoice(),
                getParentForChildren(),
                isClean());
        medInvoice_ = null;
      }
      return medInvoiceBuilder_;
    }

    private java.lang.Object deptName_ = "";
    /**
     * <code>string deptName = 10;</code>
     */
    public java.lang.String getDeptName() {
      java.lang.Object ref = deptName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        deptName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string deptName = 10;</code>
     */
    public com.google.protobuf.ByteString
        getDeptNameBytes() {
      java.lang.Object ref = deptName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        deptName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string deptName = 10;</code>
     */
    public Builder setDeptName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      deptName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string deptName = 10;</code>
     */
    public Builder clearDeptName() {
      
      deptName_ = getDefaultInstance().getDeptName();
      onChanged();
      return this;
    }
    /**
     * <code>string deptName = 10;</code>
     */
    public Builder setDeptNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      deptName_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object doctorName_ = "";
    /**
     * <code>string doctorName = 11;</code>
     */
    public java.lang.String getDoctorName() {
      java.lang.Object ref = doctorName_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        doctorName_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string doctorName = 11;</code>
     */
    public com.google.protobuf.ByteString
        getDoctorNameBytes() {
      java.lang.Object ref = doctorName_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        doctorName_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string doctorName = 11;</code>
     */
    public Builder setDoctorName(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      doctorName_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string doctorName = 11;</code>
     */
    public Builder clearDoctorName() {
      
      doctorName_ = getDefaultInstance().getDoctorName();
      onChanged();
      return this;
    }
    /**
     * <code>string doctorName = 11;</code>
     */
    public Builder setDoctorNameBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      doctorName_ = value;
      onChanged();
      return this;
    }

    private int medConsumablesDoctorsId_ ;
    /**
     * <pre>
     * 耗材医生信息表ID
     * </pre>
     *
     * <code>int32 medConsumablesDoctorsId = 12;</code>
     */
    public int getMedConsumablesDoctorsId() {
      return medConsumablesDoctorsId_;
    }
    /**
     * <pre>
     * 耗材医生信息表ID
     * </pre>
     *
     * <code>int32 medConsumablesDoctorsId = 12;</code>
     */
    public Builder setMedConsumablesDoctorsId(int value) {
      
      medConsumablesDoctorsId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 耗材医生信息表ID
     * </pre>
     *
     * <code>int32 medConsumablesDoctorsId = 12;</code>
     */
    public Builder clearMedConsumablesDoctorsId() {
      
      medConsumablesDoctorsId_ = 0;
      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.CreateMedConOrderRequest)
  }

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

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

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

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

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

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

}

