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

package com.ywt.gapi.base.wechat;

/**
 * <pre>
 *根据终端类型发送小程序模板消息请求结构体
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest}
 */
public final class SendMPTemplateMsgByTerminalRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest)
    SendMPTemplateMsgByTerminalRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SendMPTemplateMsgByTerminalRequest.newBuilder() to construct.
  private SendMPTemplateMsgByTerminalRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendMPTemplateMsgByTerminalRequest() {
    touser_ = "";
    templateId_ = "";
    page_ = "";
    formId_ = "";
    data_ = "";
    emphasisKeyword_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private SendMPTemplateMsgByTerminalRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 8: {

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

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

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

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

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

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

            emphasisKeyword_ = s;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.base.wechat.WechatProto.internal_static_com_ywt_gapi_base_wechat_SendMPTemplateMsgByTerminalRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.ywt.gapi.base.wechat.WechatProto.internal_static_com_ywt_gapi_base_wechat_SendMPTemplateMsgByTerminalRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.class, com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.Builder.class);
  }

  public static final int TERMINAL_FIELD_NUMBER = 1;
  private int terminal_;
  /**
   * <code>int32 terminal = 1;</code>
   * @return The terminal.
   */
  @java.lang.Override
  public int getTerminal() {
    return terminal_;
  }

  public static final int TOUSER_FIELD_NUMBER = 2;
  private volatile java.lang.Object touser_;
  /**
   * <pre>
   *接收者（用户）的 openid
   * </pre>
   *
   * <code>string touser = 2;</code>
   * @return The touser.
   */
  @java.lang.Override
  public java.lang.String getTouser() {
    java.lang.Object ref = touser_;
    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();
      touser_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *接收者（用户）的 openid
   * </pre>
   *
   * <code>string touser = 2;</code>
   * @return The bytes for touser.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTouserBytes() {
    java.lang.Object ref = touser_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      touser_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TEMPLATEID_FIELD_NUMBER = 3;
  private volatile java.lang.Object templateId_;
  /**
   * <pre>
   *所需下发的模板消息的id
   * </pre>
   *
   * <code>string templateId = 3;</code>
   * @return The templateId.
   */
  @java.lang.Override
  public java.lang.String getTemplateId() {
    java.lang.Object ref = templateId_;
    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();
      templateId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *所需下发的模板消息的id
   * </pre>
   *
   * <code>string templateId = 3;</code>
   * @return The bytes for templateId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTemplateIdBytes() {
    java.lang.Object ref = templateId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      templateId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PAGE_FIELD_NUMBER = 4;
  private volatile java.lang.Object page_;
  /**
   * <pre>
   *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
   * </pre>
   *
   * <code>string page = 4;</code>
   * @return The page.
   */
  @java.lang.Override
  public java.lang.String getPage() {
    java.lang.Object ref = page_;
    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();
      page_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
   * </pre>
   *
   * <code>string page = 4;</code>
   * @return The bytes for page.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getPageBytes() {
    java.lang.Object ref = page_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      page_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FORMID_FIELD_NUMBER = 5;
  private volatile java.lang.Object formId_;
  /**
   * <pre>
   *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
   * </pre>
   *
   * <code>string formId = 5;</code>
   * @return The formId.
   */
  @java.lang.Override
  public java.lang.String getFormId() {
    java.lang.Object ref = formId_;
    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();
      formId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
   * </pre>
   *
   * <code>string formId = 5;</code>
   * @return The bytes for formId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getFormIdBytes() {
    java.lang.Object ref = formId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      formId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_FIELD_NUMBER = 6;
  private volatile java.lang.Object data_;
  /**
   * <pre>
   *模板内容，不填则下发空模板
   * </pre>
   *
   * <code>string data = 6;</code>
   * @return The data.
   */
  @java.lang.Override
  public java.lang.String getData() {
    java.lang.Object ref = data_;
    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();
      data_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *模板内容，不填则下发空模板
   * </pre>
   *
   * <code>string data = 6;</code>
   * @return The bytes for data.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDataBytes() {
    java.lang.Object ref = data_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      data_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int EMPHASISKEYWORD_FIELD_NUMBER = 7;
  private volatile java.lang.Object emphasisKeyword_;
  /**
   * <pre>
   *模板需要放大的关键词，不填则默认无放大
   * </pre>
   *
   * <code>string emphasisKeyword = 7;</code>
   * @return The emphasisKeyword.
   */
  @java.lang.Override
  public java.lang.String getEmphasisKeyword() {
    java.lang.Object ref = emphasisKeyword_;
    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();
      emphasisKeyword_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *模板需要放大的关键词，不填则默认无放大
   * </pre>
   *
   * <code>string emphasisKeyword = 7;</code>
   * @return The bytes for emphasisKeyword.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getEmphasisKeywordBytes() {
    java.lang.Object ref = emphasisKeyword_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      emphasisKeyword_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (terminal_ != 0) {
      output.writeInt32(1, terminal_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(touser_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, touser_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(page_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, page_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, formId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, data_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emphasisKeyword_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, emphasisKeyword_);
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (terminal_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, terminal_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(touser_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, touser_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(page_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, page_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(formId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, formId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, data_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(emphasisKeyword_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, emphasisKeyword_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest other = (com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest) obj;

    if (getTerminal()
        != other.getTerminal()) return false;
    if (!getTouser()
        .equals(other.getTouser())) return false;
    if (!getTemplateId()
        .equals(other.getTemplateId())) return false;
    if (!getPage()
        .equals(other.getPage())) return false;
    if (!getFormId()
        .equals(other.getFormId())) return false;
    if (!getData()
        .equals(other.getData())) return false;
    if (!getEmphasisKeyword()
        .equals(other.getEmphasisKeyword())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TERMINAL_FIELD_NUMBER;
    hash = (53 * hash) + getTerminal();
    hash = (37 * hash) + TOUSER_FIELD_NUMBER;
    hash = (53 * hash) + getTouser().hashCode();
    hash = (37 * hash) + TEMPLATEID_FIELD_NUMBER;
    hash = (53 * hash) + getTemplateId().hashCode();
    hash = (37 * hash) + PAGE_FIELD_NUMBER;
    hash = (53 * hash) + getPage().hashCode();
    hash = (37 * hash) + FORMID_FIELD_NUMBER;
    hash = (53 * hash) + getFormId().hashCode();
    hash = (37 * hash) + DATA_FIELD_NUMBER;
    hash = (53 * hash) + getData().hashCode();
    hash = (37 * hash) + EMPHASISKEYWORD_FIELD_NUMBER;
    hash = (53 * hash) + getEmphasisKeyword().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *根据终端类型发送小程序模板消息请求结构体
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest)
      com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.base.wechat.WechatProto.internal_static_com_ywt_gapi_base_wechat_SendMPTemplateMsgByTerminalRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.ywt.gapi.base.wechat.WechatProto.internal_static_com_ywt_gapi_base_wechat_SendMPTemplateMsgByTerminalRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.class, com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.Builder.class);
    }

    // Construct using com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

      touser_ = "";

      templateId_ = "";

      page_ = "";

      formId_ = "";

      data_ = "";

      emphasisKeyword_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.ywt.gapi.base.wechat.WechatProto.internal_static_com_ywt_gapi_base_wechat_SendMPTemplateMsgByTerminalRequest_descriptor;
    }

    @java.lang.Override
    public com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest getDefaultInstanceForType() {
      return com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest buildPartial() {
      com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest result = new com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest(this);
      result.terminal_ = terminal_;
      result.touser_ = touser_;
      result.templateId_ = templateId_;
      result.page_ = page_;
      result.formId_ = formId_;
      result.data_ = data_;
      result.emphasisKeyword_ = emphasisKeyword_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest other) {
      if (other == com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest.getDefaultInstance()) return this;
      if (other.getTerminal() != 0) {
        setTerminal(other.getTerminal());
      }
      if (!other.getTouser().isEmpty()) {
        touser_ = other.touser_;
        onChanged();
      }
      if (!other.getTemplateId().isEmpty()) {
        templateId_ = other.templateId_;
        onChanged();
      }
      if (!other.getPage().isEmpty()) {
        page_ = other.page_;
        onChanged();
      }
      if (!other.getFormId().isEmpty()) {
        formId_ = other.formId_;
        onChanged();
      }
      if (!other.getData().isEmpty()) {
        data_ = other.data_;
        onChanged();
      }
      if (!other.getEmphasisKeyword().isEmpty()) {
        emphasisKeyword_ = other.emphasisKeyword_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

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

    private int terminal_ ;
    /**
     * <code>int32 terminal = 1;</code>
     * @return The terminal.
     */
    @java.lang.Override
    public int getTerminal() {
      return terminal_;
    }
    /**
     * <code>int32 terminal = 1;</code>
     * @param value The terminal to set.
     * @return This builder for chaining.
     */
    public Builder setTerminal(int value) {
      
      terminal_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 terminal = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearTerminal() {
      
      terminal_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object touser_ = "";
    /**
     * <pre>
     *接收者（用户）的 openid
     * </pre>
     *
     * <code>string touser = 2;</code>
     * @return The touser.
     */
    public java.lang.String getTouser() {
      java.lang.Object ref = touser_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        touser_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *接收者（用户）的 openid
     * </pre>
     *
     * <code>string touser = 2;</code>
     * @return The bytes for touser.
     */
    public com.google.protobuf.ByteString
        getTouserBytes() {
      java.lang.Object ref = touser_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        touser_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *接收者（用户）的 openid
     * </pre>
     *
     * <code>string touser = 2;</code>
     * @param value The touser to set.
     * @return This builder for chaining.
     */
    public Builder setTouser(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      touser_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *接收者（用户）的 openid
     * </pre>
     *
     * <code>string touser = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearTouser() {
      
      touser_ = getDefaultInstance().getTouser();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *接收者（用户）的 openid
     * </pre>
     *
     * <code>string touser = 2;</code>
     * @param value The bytes for touser to set.
     * @return This builder for chaining.
     */
    public Builder setTouserBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      touser_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object templateId_ = "";
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     * @return The templateId.
     */
    public java.lang.String getTemplateId() {
      java.lang.Object ref = templateId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        templateId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     * @return The bytes for templateId.
     */
    public com.google.protobuf.ByteString
        getTemplateIdBytes() {
      java.lang.Object ref = templateId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        templateId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     * @param value The templateId to set.
     * @return This builder for chaining.
     */
    public Builder setTemplateId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      templateId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearTemplateId() {
      
      templateId_ = getDefaultInstance().getTemplateId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     * @param value The bytes for templateId to set.
     * @return This builder for chaining.
     */
    public Builder setTemplateIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      templateId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object page_ = "";
    /**
     * <pre>
     *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
     * </pre>
     *
     * <code>string page = 4;</code>
     * @return The page.
     */
    public java.lang.String getPage() {
      java.lang.Object ref = page_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        page_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
     * </pre>
     *
     * <code>string page = 4;</code>
     * @return The bytes for page.
     */
    public com.google.protobuf.ByteString
        getPageBytes() {
      java.lang.Object ref = page_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        page_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
     * </pre>
     *
     * <code>string page = 4;</code>
     * @param value The page to set.
     * @return This builder for chaining.
     */
    public Builder setPage(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      page_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
     * </pre>
     *
     * <code>string page = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearPage() {
      
      page_ = getDefaultInstance().getPage();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *点击模板卡片后的跳转页面，仅限本小程序内的页面。支持带参数,（示例index?foo=bar）。该字段不填则模板无跳转
     * </pre>
     *
     * <code>string page = 4;</code>
     * @param value The bytes for page to set.
     * @return This builder for chaining.
     */
    public Builder setPageBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      page_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object formId_ = "";
    /**
     * <pre>
     *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
     * </pre>
     *
     * <code>string formId = 5;</code>
     * @return The formId.
     */
    public java.lang.String getFormId() {
      java.lang.Object ref = formId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        formId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
     * </pre>
     *
     * <code>string formId = 5;</code>
     * @return The bytes for formId.
     */
    public com.google.protobuf.ByteString
        getFormIdBytes() {
      java.lang.Object ref = formId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        formId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
     * </pre>
     *
     * <code>string formId = 5;</code>
     * @param value The formId to set.
     * @return This builder for chaining.
     */
    public Builder setFormId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      formId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
     * </pre>
     *
     * <code>string formId = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearFormId() {
      
      formId_ = getDefaultInstance().getFormId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *表单提交场景下，为 submit 事件带上的 formId；支付场景下，为本次支付的 prepay_id
     * </pre>
     *
     * <code>string formId = 5;</code>
     * @param value The bytes for formId to set.
     * @return This builder for chaining.
     */
    public Builder setFormIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      formId_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object data_ = "";
    /**
     * <pre>
     *模板内容，不填则下发空模板
     * </pre>
     *
     * <code>string data = 6;</code>
     * @return The data.
     */
    public java.lang.String getData() {
      java.lang.Object ref = data_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        data_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *模板内容，不填则下发空模板
     * </pre>
     *
     * <code>string data = 6;</code>
     * @return The bytes for data.
     */
    public com.google.protobuf.ByteString
        getDataBytes() {
      java.lang.Object ref = data_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        data_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *模板内容，不填则下发空模板
     * </pre>
     *
     * <code>string data = 6;</code>
     * @param value The data to set.
     * @return This builder for chaining.
     */
    public Builder setData(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *模板内容，不填则下发空模板
     * </pre>
     *
     * <code>string data = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearData() {
      
      data_ = getDefaultInstance().getData();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *模板内容，不填则下发空模板
     * </pre>
     *
     * <code>string data = 6;</code>
     * @param value The bytes for data to set.
     * @return This builder for chaining.
     */
    public Builder setDataBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      data_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object emphasisKeyword_ = "";
    /**
     * <pre>
     *模板需要放大的关键词，不填则默认无放大
     * </pre>
     *
     * <code>string emphasisKeyword = 7;</code>
     * @return The emphasisKeyword.
     */
    public java.lang.String getEmphasisKeyword() {
      java.lang.Object ref = emphasisKeyword_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        emphasisKeyword_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *模板需要放大的关键词，不填则默认无放大
     * </pre>
     *
     * <code>string emphasisKeyword = 7;</code>
     * @return The bytes for emphasisKeyword.
     */
    public com.google.protobuf.ByteString
        getEmphasisKeywordBytes() {
      java.lang.Object ref = emphasisKeyword_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        emphasisKeyword_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *模板需要放大的关键词，不填则默认无放大
     * </pre>
     *
     * <code>string emphasisKeyword = 7;</code>
     * @param value The emphasisKeyword to set.
     * @return This builder for chaining.
     */
    public Builder setEmphasisKeyword(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      emphasisKeyword_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *模板需要放大的关键词，不填则默认无放大
     * </pre>
     *
     * <code>string emphasisKeyword = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearEmphasisKeyword() {
      
      emphasisKeyword_ = getDefaultInstance().getEmphasisKeyword();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *模板需要放大的关键词，不填则默认无放大
     * </pre>
     *
     * <code>string emphasisKeyword = 7;</code>
     * @param value The bytes for emphasisKeyword to set.
     * @return This builder for chaining.
     */
    public Builder setEmphasisKeywordBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      emphasisKeyword_ = value;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest)
  }

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

  public static com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.ywt.gapi.base.wechat.SendMPTemplateMsgByTerminalRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

