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

package com.ywt.gapi.message;

/**
 * <pre>
 * 发送经销商邮件request
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.message.SendMerchantEmailRequest}
 */
public  final class SendMerchantEmailRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.message.SendMerchantEmailRequest)
    SendMerchantEmailRequestOrBuilder {
  // Use SendMerchantEmailRequest.newBuilder() to construct.
  private SendMerchantEmailRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendMerchantEmailRequest() {
    merchantId_ = 0;
    applyId_ = 0;
    email_ = "";
    tplId_ = 0;
  }

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

            merchantId_ = input.readInt32();
            break;
          }
          case 16: {

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

            email_ = s;
            break;
          }
          case 32: {

            tplId_ = 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.message.Message.internal_static_com_ywt_gapi_message_SendMerchantEmailRequest_descriptor;
  }

  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendMerchantEmailRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.message.SendMerchantEmailRequest.class, com.ywt.gapi.message.SendMerchantEmailRequest.Builder.class);
  }

  public static final int MERCHANTID_FIELD_NUMBER = 1;
  private int merchantId_;
  /**
   * <pre>
   * 经销商id
   * </pre>
   *
   * <code>int32 merchantId = 1;</code>
   */
  public int getMerchantId() {
    return merchantId_;
  }

  public static final int APPLYID_FIELD_NUMBER = 2;
  private int applyId_;
  /**
   * <pre>
   * 提交记录id
   * </pre>
   *
   * <code>int32 applyId = 2;</code>
   */
  public int getApplyId() {
    return applyId_;
  }

  public static final int EMAIL_FIELD_NUMBER = 3;
  private volatile java.lang.Object email_;
  /**
   * <pre>
   * 接收邮箱地址
   * </pre>
   *
   * <code>string email = 3;</code>
   */
  public java.lang.String getEmail() {
    java.lang.Object ref = email_;
    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();
      email_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 接收邮箱地址
   * </pre>
   *
   * <code>string email = 3;</code>
   */
  public com.google.protobuf.ByteString
      getEmailBytes() {
    java.lang.Object ref = email_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      email_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TPLID_FIELD_NUMBER = 4;
  private int tplId_;
  /**
   * <pre>
   * 邮件模板id：1-提交记录某月份的重点医生数据；2-上月重点医生数据
   * </pre>
   *
   * <code>int32 tplId = 4;</code>
   */
  public int getTplId() {
    return tplId_;
  }

  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 (merchantId_ != 0) {
      output.writeInt32(1, merchantId_);
    }
    if (applyId_ != 0) {
      output.writeInt32(2, applyId_);
    }
    if (!getEmailBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, email_);
    }
    if (tplId_ != 0) {
      output.writeInt32(4, tplId_);
    }
  }

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

    size = 0;
    if (merchantId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, merchantId_);
    }
    if (applyId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(2, applyId_);
    }
    if (!getEmailBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, email_);
    }
    if (tplId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(4, tplId_);
    }
    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.message.SendMerchantEmailRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.message.SendMerchantEmailRequest other = (com.ywt.gapi.message.SendMerchantEmailRequest) obj;

    boolean result = true;
    result = result && (getMerchantId()
        == other.getMerchantId());
    result = result && (getApplyId()
        == other.getApplyId());
    result = result && getEmail()
        .equals(other.getEmail());
    result = result && (getTplId()
        == other.getTplId());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + MERCHANTID_FIELD_NUMBER;
    hash = (53 * hash) + getMerchantId();
    hash = (37 * hash) + APPLYID_FIELD_NUMBER;
    hash = (53 * hash) + getApplyId();
    hash = (37 * hash) + EMAIL_FIELD_NUMBER;
    hash = (53 * hash) + getEmail().hashCode();
    hash = (37 * hash) + TPLID_FIELD_NUMBER;
    hash = (53 * hash) + getTplId();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.message.SendMerchantEmailRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest 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.message.SendMerchantEmailRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest 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.message.SendMerchantEmailRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest 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.message.SendMerchantEmailRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest 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.message.SendMerchantEmailRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.message.SendMerchantEmailRequest 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.message.SendMerchantEmailRequest 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>
   * 发送经销商邮件request
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.message.SendMerchantEmailRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.message.SendMerchantEmailRequest)
      com.ywt.gapi.message.SendMerchantEmailRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendMerchantEmailRequest_descriptor;
    }

    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendMerchantEmailRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.message.SendMerchantEmailRequest.class, com.ywt.gapi.message.SendMerchantEmailRequest.Builder.class);
    }

    // Construct using com.ywt.gapi.message.SendMerchantEmailRequest.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();
      merchantId_ = 0;

      applyId_ = 0;

      email_ = "";

      tplId_ = 0;

      return this;
    }

    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendMerchantEmailRequest_descriptor;
    }

    public com.ywt.gapi.message.SendMerchantEmailRequest getDefaultInstanceForType() {
      return com.ywt.gapi.message.SendMerchantEmailRequest.getDefaultInstance();
    }

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

    public com.ywt.gapi.message.SendMerchantEmailRequest buildPartial() {
      com.ywt.gapi.message.SendMerchantEmailRequest result = new com.ywt.gapi.message.SendMerchantEmailRequest(this);
      result.merchantId_ = merchantId_;
      result.applyId_ = applyId_;
      result.email_ = email_;
      result.tplId_ = tplId_;
      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.message.SendMerchantEmailRequest) {
        return mergeFrom((com.ywt.gapi.message.SendMerchantEmailRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.message.SendMerchantEmailRequest other) {
      if (other == com.ywt.gapi.message.SendMerchantEmailRequest.getDefaultInstance()) return this;
      if (other.getMerchantId() != 0) {
        setMerchantId(other.getMerchantId());
      }
      if (other.getApplyId() != 0) {
        setApplyId(other.getApplyId());
      }
      if (!other.getEmail().isEmpty()) {
        email_ = other.email_;
        onChanged();
      }
      if (other.getTplId() != 0) {
        setTplId(other.getTplId());
      }
      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.message.SendMerchantEmailRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.message.SendMerchantEmailRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private int merchantId_ ;
    /**
     * <pre>
     * 经销商id
     * </pre>
     *
     * <code>int32 merchantId = 1;</code>
     */
    public int getMerchantId() {
      return merchantId_;
    }
    /**
     * <pre>
     * 经销商id
     * </pre>
     *
     * <code>int32 merchantId = 1;</code>
     */
    public Builder setMerchantId(int value) {
      
      merchantId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 经销商id
     * </pre>
     *
     * <code>int32 merchantId = 1;</code>
     */
    public Builder clearMerchantId() {
      
      merchantId_ = 0;
      onChanged();
      return this;
    }

    private int applyId_ ;
    /**
     * <pre>
     * 提交记录id
     * </pre>
     *
     * <code>int32 applyId = 2;</code>
     */
    public int getApplyId() {
      return applyId_;
    }
    /**
     * <pre>
     * 提交记录id
     * </pre>
     *
     * <code>int32 applyId = 2;</code>
     */
    public Builder setApplyId(int value) {
      
      applyId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 提交记录id
     * </pre>
     *
     * <code>int32 applyId = 2;</code>
     */
    public Builder clearApplyId() {
      
      applyId_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object email_ = "";
    /**
     * <pre>
     * 接收邮箱地址
     * </pre>
     *
     * <code>string email = 3;</code>
     */
    public java.lang.String getEmail() {
      java.lang.Object ref = email_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        email_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 接收邮箱地址
     * </pre>
     *
     * <code>string email = 3;</code>
     */
    public com.google.protobuf.ByteString
        getEmailBytes() {
      java.lang.Object ref = email_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        email_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 接收邮箱地址
     * </pre>
     *
     * <code>string email = 3;</code>
     */
    public Builder setEmail(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      email_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 接收邮箱地址
     * </pre>
     *
     * <code>string email = 3;</code>
     */
    public Builder clearEmail() {
      
      email_ = getDefaultInstance().getEmail();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 接收邮箱地址
     * </pre>
     *
     * <code>string email = 3;</code>
     */
    public Builder setEmailBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      email_ = value;
      onChanged();
      return this;
    }

    private int tplId_ ;
    /**
     * <pre>
     * 邮件模板id：1-提交记录某月份的重点医生数据；2-上月重点医生数据
     * </pre>
     *
     * <code>int32 tplId = 4;</code>
     */
    public int getTplId() {
      return tplId_;
    }
    /**
     * <pre>
     * 邮件模板id：1-提交记录某月份的重点医生数据；2-上月重点医生数据
     * </pre>
     *
     * <code>int32 tplId = 4;</code>
     */
    public Builder setTplId(int value) {
      
      tplId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 邮件模板id：1-提交记录某月份的重点医生数据；2-上月重点医生数据
     * </pre>
     *
     * <code>int32 tplId = 4;</code>
     */
    public Builder clearTplId() {
      
      tplId_ = 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.message.SendMerchantEmailRequest)
  }

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

  public static com.ywt.gapi.message.SendMerchantEmailRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  public com.ywt.gapi.message.SendMerchantEmailRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

