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

package com.ywt.gapi.message;

/**
 * <pre>
 * 通用微信公众号模板消息发送方法，使用内部定义的模板消息编号，需要指定发送的公众号
 * 发送微信模板消息请求
 * refer: https://mp.weixin.qq.com/wiki?t=resource/res_main&amp;id=mp1433751277
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.message.SendTemplateMessageRequest}
 */
public  final class SendTemplateMessageRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.message.SendTemplateMessageRequest)
    SendTemplateMessageRequestOrBuilder {
  // Use SendTemplateMessageRequest.newBuilder() to construct.
  private SendTemplateMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendTemplateMessageRequest() {
    templateCode_ = "";
    toUser_ = "";
    url_ = "";
    miniProgram_ = "";
    data_ = "";
    userId_ = 0;
    keywords_ = java.util.Collections.emptyList();
  }

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

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

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

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

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

            data_ = s;
            break;
          }
          case 48: {

            userId_ = input.readInt32();
            break;
          }
          case 58: {
            if (!((mutable_bitField0_ & 0x00000040) == 0x00000040)) {
              keywords_ = new java.util.ArrayList<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword>();
              mutable_bitField0_ |= 0x00000040;
            }
            keywords_.add(
                input.readMessage(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.parser(), extensionRegistry));
            break;
          }
          case 66: {
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder subBuilder = null;
            if (firstKeyword_ != null) {
              subBuilder = firstKeyword_.toBuilder();
            }
            firstKeyword_ = input.readMessage(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(firstKeyword_);
              firstKeyword_ = subBuilder.buildPartial();
            }

            break;
          }
          case 74: {
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder subBuilder = null;
            if (remarkKeyword_ != null) {
              subBuilder = remarkKeyword_.toBuilder();
            }
            remarkKeyword_ = input.readMessage(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(remarkKeyword_);
              remarkKeyword_ = subBuilder.buildPartial();
            }

            break;
          }
          case 82: {
            com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.Builder subBuilder = null;
            if (mpParam_ != null) {
              subBuilder = mpParam_.toBuilder();
            }
            mpParam_ = input.readMessage(com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(mpParam_);
              mpParam_ = subBuilder.buildPartial();
            }

            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_ & 0x00000040) == 0x00000040)) {
        keywords_ = java.util.Collections.unmodifiableList(keywords_);
      }
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendTemplateMessageRequest_descriptor;
  }

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

  public interface KeywordOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.ywt.gapi.message.SendTemplateMessageRequest.Keyword)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string value = 1;</code>
     */
    java.lang.String getValue();
    /**
     * <code>string value = 1;</code>
     */
    com.google.protobuf.ByteString
        getValueBytes();

    /**
     * <code>string color = 2;</code>
     */
    java.lang.String getColor();
    /**
     * <code>string color = 2;</code>
     */
    com.google.protobuf.ByteString
        getColorBytes();
  }
  /**
   * Protobuf type {@code com.ywt.gapi.message.SendTemplateMessageRequest.Keyword}
   */
  public  static final class Keyword extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.ywt.gapi.message.SendTemplateMessageRequest.Keyword)
      KeywordOrBuilder {
    // Use Keyword.newBuilder() to construct.
    private Keyword(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Keyword() {
      value_ = "";
      color_ = "";
    }

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

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

              color_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendTemplateMessageRequest_Keyword_descriptor;
    }

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

    public static final int VALUE_FIELD_NUMBER = 1;
    private volatile java.lang.Object value_;
    /**
     * <code>string value = 1;</code>
     */
    public java.lang.String getValue() {
      java.lang.Object ref = value_;
      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();
        value_ = s;
        return s;
      }
    }
    /**
     * <code>string value = 1;</code>
     */
    public com.google.protobuf.ByteString
        getValueBytes() {
      java.lang.Object ref = value_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        value_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

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

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

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getValueBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, value_);
      }
      if (!getColorBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, color_);
      }
    }

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

      size = 0;
      if (!getValueBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, value_);
      }
      if (!getColorBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, color_);
      }
      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.SendTemplateMessageRequest.Keyword)) {
        return super.equals(obj);
      }
      com.ywt.gapi.message.SendTemplateMessageRequest.Keyword other = (com.ywt.gapi.message.SendTemplateMessageRequest.Keyword) obj;

      boolean result = true;
      result = result && getValue()
          .equals(other.getValue());
      result = result && getColor()
          .equals(other.getColor());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + VALUE_FIELD_NUMBER;
      hash = (53 * hash) + getValue().hashCode();
      hash = (37 * hash) + COLOR_FIELD_NUMBER;
      hash = (53 * hash) + getColor().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

      // Construct using com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.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();
        value_ = "";

        color_ = "";

        return this;
      }

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

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

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

      public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword buildPartial() {
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword result = new com.ywt.gapi.message.SendTemplateMessageRequest.Keyword(this);
        result.value_ = value_;
        result.color_ = color_;
        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.SendTemplateMessageRequest.Keyword) {
          return mergeFrom((com.ywt.gapi.message.SendTemplateMessageRequest.Keyword)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword other) {
        if (other == com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance()) return this;
        if (!other.getValue().isEmpty()) {
          value_ = other.value_;
          onChanged();
        }
        if (!other.getColor().isEmpty()) {
          color_ = other.color_;
          onChanged();
        }
        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.SendTemplateMessageRequest.Keyword parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.ywt.gapi.message.SendTemplateMessageRequest.Keyword) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object value_ = "";
      /**
       * <code>string value = 1;</code>
       */
      public java.lang.String getValue() {
        java.lang.Object ref = value_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          value_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string value = 1;</code>
       */
      public com.google.protobuf.ByteString
          getValueBytes() {
        java.lang.Object ref = value_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          value_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string value = 1;</code>
       */
      public Builder setValue(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        value_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string value = 1;</code>
       */
      public Builder clearValue() {
        
        value_ = getDefaultInstance().getValue();
        onChanged();
        return this;
      }
      /**
       * <code>string value = 1;</code>
       */
      public Builder setValueBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        value_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object color_ = "";
      /**
       * <code>string color = 2;</code>
       */
      public java.lang.String getColor() {
        java.lang.Object ref = color_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          color_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string color = 2;</code>
       */
      public com.google.protobuf.ByteString
          getColorBytes() {
        java.lang.Object ref = color_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          color_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string color = 2;</code>
       */
      public Builder setColor(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        color_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string color = 2;</code>
       */
      public Builder clearColor() {
        
        color_ = getDefaultInstance().getColor();
        onChanged();
        return this;
      }
      /**
       * <code>string color = 2;</code>
       */
      public Builder setColorBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        color_ = value;
        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.SendTemplateMessageRequest.Keyword)
    }

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

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

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

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

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

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

  }

  public interface MiniProgramParamOrBuilder extends
      // @@protoc_insertion_point(interface_extends:com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam)
      com.google.protobuf.MessageOrBuilder {

    /**
     * <code>string appid = 1;</code>
     */
    java.lang.String getAppid();
    /**
     * <code>string appid = 1;</code>
     */
    com.google.protobuf.ByteString
        getAppidBytes();

    /**
     * <code>string pagepath = 2;</code>
     */
    java.lang.String getPagepath();
    /**
     * <code>string pagepath = 2;</code>
     */
    com.google.protobuf.ByteString
        getPagepathBytes();
  }
  /**
   * Protobuf type {@code com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam}
   */
  public  static final class MiniProgramParam extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam)
      MiniProgramParamOrBuilder {
    // Use MiniProgramParam.newBuilder() to construct.
    private MiniProgramParam(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private MiniProgramParam() {
      appid_ = "";
      pagepath_ = "";
    }

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

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

              pagepath_ = s;
              break;
            }
          }
        }
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(this);
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(
            e).setUnfinishedMessage(this);
      } finally {
        makeExtensionsImmutable();
      }
    }
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendTemplateMessageRequest_MiniProgramParam_descriptor;
    }

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

    public static final int APPID_FIELD_NUMBER = 1;
    private volatile java.lang.Object appid_;
    /**
     * <code>string appid = 1;</code>
     */
    public java.lang.String getAppid() {
      java.lang.Object ref = appid_;
      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();
        appid_ = s;
        return s;
      }
    }
    /**
     * <code>string appid = 1;</code>
     */
    public com.google.protobuf.ByteString
        getAppidBytes() {
      java.lang.Object ref = appid_;
      if (ref instanceof java.lang.String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        appid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

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

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

      memoizedIsInitialized = 1;
      return true;
    }

    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!getAppidBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, appid_);
      }
      if (!getPagepathBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pagepath_);
      }
    }

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

      size = 0;
      if (!getAppidBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, appid_);
      }
      if (!getPagepathBytes().isEmpty()) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pagepath_);
      }
      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.SendTemplateMessageRequest.MiniProgramParam)) {
        return super.equals(obj);
      }
      com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam other = (com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam) obj;

      boolean result = true;
      result = result && getAppid()
          .equals(other.getAppid());
      result = result && getPagepath()
          .equals(other.getPagepath());
      return result;
    }

    @java.lang.Override
    public int hashCode() {
      if (memoizedHashCode != 0) {
        return memoizedHashCode;
      }
      int hash = 41;
      hash = (19 * hash) + getDescriptor().hashCode();
      hash = (37 * hash) + APPID_FIELD_NUMBER;
      hash = (53 * hash) + getAppid().hashCode();
      hash = (37 * hash) + PAGEPATH_FIELD_NUMBER;
      hash = (53 * hash) + getPagepath().hashCode();
      hash = (29 * hash) + unknownFields.hashCode();
      memoizedHashCode = hash;
      return hash;
    }

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

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

      // Construct using com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.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();
        appid_ = "";

        pagepath_ = "";

        return this;
      }

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

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

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

      public com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam buildPartial() {
        com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam result = new com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam(this);
        result.appid_ = appid_;
        result.pagepath_ = pagepath_;
        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.SendTemplateMessageRequest.MiniProgramParam) {
          return mergeFrom((com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam)other);
        } else {
          super.mergeFrom(other);
          return this;
        }
      }

      public Builder mergeFrom(com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam other) {
        if (other == com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.getDefaultInstance()) return this;
        if (!other.getAppid().isEmpty()) {
          appid_ = other.appid_;
          onChanged();
        }
        if (!other.getPagepath().isEmpty()) {
          pagepath_ = other.pagepath_;
          onChanged();
        }
        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.SendTemplateMessageRequest.MiniProgramParam parsedMessage = null;
        try {
          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
          parsedMessage = (com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam) e.getUnfinishedMessage();
          throw e.unwrapIOException();
        } finally {
          if (parsedMessage != null) {
            mergeFrom(parsedMessage);
          }
        }
        return this;
      }

      private java.lang.Object appid_ = "";
      /**
       * <code>string appid = 1;</code>
       */
      public java.lang.String getAppid() {
        java.lang.Object ref = appid_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          appid_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string appid = 1;</code>
       */
      public com.google.protobuf.ByteString
          getAppidBytes() {
        java.lang.Object ref = appid_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          appid_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string appid = 1;</code>
       */
      public Builder setAppid(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        appid_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string appid = 1;</code>
       */
      public Builder clearAppid() {
        
        appid_ = getDefaultInstance().getAppid();
        onChanged();
        return this;
      }
      /**
       * <code>string appid = 1;</code>
       */
      public Builder setAppidBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        appid_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object pagepath_ = "";
      /**
       * <code>string pagepath = 2;</code>
       */
      public java.lang.String getPagepath() {
        java.lang.Object ref = pagepath_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          pagepath_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string pagepath = 2;</code>
       */
      public com.google.protobuf.ByteString
          getPagepathBytes() {
        java.lang.Object ref = pagepath_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          pagepath_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string pagepath = 2;</code>
       */
      public Builder setPagepath(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        pagepath_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string pagepath = 2;</code>
       */
      public Builder clearPagepath() {
        
        pagepath_ = getDefaultInstance().getPagepath();
        onChanged();
        return this;
      }
      /**
       * <code>string pagepath = 2;</code>
       */
      public Builder setPagepathBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        pagepath_ = value;
        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.SendTemplateMessageRequest.MiniProgramParam)
    }

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

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

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

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

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

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

  }

  private int bitField0_;
  public static final int TEMPLATECODE_FIELD_NUMBER = 1;
  private volatile java.lang.Object templateCode_;
  /**
   * <pre>
   * 内部定义的模板消息编号，定义在template_msg_config表
   * </pre>
   *
   * <code>string templateCode = 1;</code>
   */
  public java.lang.String getTemplateCode() {
    java.lang.Object ref = templateCode_;
    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();
      templateCode_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 内部定义的模板消息编号，定义在template_msg_config表
   * </pre>
   *
   * <code>string templateCode = 1;</code>
   */
  public com.google.protobuf.ByteString
      getTemplateCodeBytes() {
    java.lang.Object ref = templateCode_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      templateCode_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TOUSER_FIELD_NUMBER = 2;
  private volatile java.lang.Object toUser_;
  /**
   * <pre>
   * 接受模板消息的用户openId
   * </pre>
   *
   * <code>string toUser = 2;</code>
   */
  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>
   */
  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 URL_FIELD_NUMBER = 3;
  private volatile java.lang.Object url_;
  /**
   * <pre>
   * 模板跳转链接（可选）
   * </pre>
   *
   * <code>string url = 3;</code>
   */
  public java.lang.String getUrl() {
    java.lang.Object ref = url_;
    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();
      url_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 模板跳转链接（可选）
   * </pre>
   *
   * <code>string url = 3;</code>
   */
  public com.google.protobuf.ByteString
      getUrlBytes() {
    java.lang.Object ref = url_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      url_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MINIPROGRAM_FIELD_NUMBER = 4;
  private volatile java.lang.Object miniProgram_;
  /**
   * <pre>
   * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
   * </pre>
   *
   * <code>string miniProgram = 4;</code>
   */
  public java.lang.String getMiniProgram() {
    java.lang.Object ref = miniProgram_;
    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();
      miniProgram_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
   * </pre>
   *
   * <code>string miniProgram = 4;</code>
   */
  public com.google.protobuf.ByteString
      getMiniProgramBytes() {
    java.lang.Object ref = miniProgram_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      miniProgram_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_FIELD_NUMBER = 5;
  private volatile java.lang.Object data_;
  /**
   * <pre>
   * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
   * </pre>
   *
   * <code>string data = 5;</code>
   */
  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>
   * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
   * </pre>
   *
   * <code>string data = 5;</code>
   */
  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 USERID_FIELD_NUMBER = 6;
  private int userId_;
  /**
   * <pre>
   *用户id
   * </pre>
   *
   * <code>int32 userId = 6;</code>
   */
  public int getUserId() {
    return userId_;
  }

  public static final int KEYWORDS_FIELD_NUMBER = 7;
  private java.util.List<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword> keywords_;
  /**
   * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
   */
  public java.util.List<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword> getKeywordsList() {
    return keywords_;
  }
  /**
   * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
   */
  public java.util.List<? extends com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> 
      getKeywordsOrBuilderList() {
    return keywords_;
  }
  /**
   * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
   */
  public int getKeywordsCount() {
    return keywords_.size();
  }
  /**
   * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword getKeywords(int index) {
    return keywords_.get(index);
  }
  /**
   * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder getKeywordsOrBuilder(
      int index) {
    return keywords_.get(index);
  }

  public static final int FIRSTKEYWORD_FIELD_NUMBER = 8;
  private com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword_;
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
   */
  public boolean hasFirstKeyword() {
    return firstKeyword_ != null;
  }
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword getFirstKeyword() {
    return firstKeyword_ == null ? com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance() : firstKeyword_;
  }
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder getFirstKeywordOrBuilder() {
    return getFirstKeyword();
  }

  public static final int REMARKKEYWORD_FIELD_NUMBER = 9;
  private com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword_;
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
   */
  public boolean hasRemarkKeyword() {
    return remarkKeyword_ != null;
  }
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword getRemarkKeyword() {
    return remarkKeyword_ == null ? com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance() : remarkKeyword_;
  }
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder getRemarkKeywordOrBuilder() {
    return getRemarkKeyword();
  }

  public static final int MPPARAM_FIELD_NUMBER = 10;
  private com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam_;
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
   */
  public boolean hasMpParam() {
    return mpParam_ != null;
  }
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam getMpParam() {
    return mpParam_ == null ? com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.getDefaultInstance() : mpParam_;
  }
  /**
   * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
   */
  public com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParamOrBuilder getMpParamOrBuilder() {
    return getMpParam();
  }

  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 (!getTemplateCodeBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, templateCode_);
    }
    if (!getToUserBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, toUser_);
    }
    if (!getUrlBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, url_);
    }
    if (!getMiniProgramBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, miniProgram_);
    }
    if (!getDataBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, data_);
    }
    if (userId_ != 0) {
      output.writeInt32(6, userId_);
    }
    for (int i = 0; i < keywords_.size(); i++) {
      output.writeMessage(7, keywords_.get(i));
    }
    if (firstKeyword_ != null) {
      output.writeMessage(8, getFirstKeyword());
    }
    if (remarkKeyword_ != null) {
      output.writeMessage(9, getRemarkKeyword());
    }
    if (mpParam_ != null) {
      output.writeMessage(10, getMpParam());
    }
  }

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

    size = 0;
    if (!getTemplateCodeBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, templateCode_);
    }
    if (!getToUserBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, toUser_);
    }
    if (!getUrlBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, url_);
    }
    if (!getMiniProgramBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, miniProgram_);
    }
    if (!getDataBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, data_);
    }
    if (userId_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, userId_);
    }
    for (int i = 0; i < keywords_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(7, keywords_.get(i));
    }
    if (firstKeyword_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(8, getFirstKeyword());
    }
    if (remarkKeyword_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(9, getRemarkKeyword());
    }
    if (mpParam_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(10, getMpParam());
    }
    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.SendTemplateMessageRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.message.SendTemplateMessageRequest other = (com.ywt.gapi.message.SendTemplateMessageRequest) obj;

    boolean result = true;
    result = result && getTemplateCode()
        .equals(other.getTemplateCode());
    result = result && getToUser()
        .equals(other.getToUser());
    result = result && getUrl()
        .equals(other.getUrl());
    result = result && getMiniProgram()
        .equals(other.getMiniProgram());
    result = result && getData()
        .equals(other.getData());
    result = result && (getUserId()
        == other.getUserId());
    result = result && getKeywordsList()
        .equals(other.getKeywordsList());
    result = result && (hasFirstKeyword() == other.hasFirstKeyword());
    if (hasFirstKeyword()) {
      result = result && getFirstKeyword()
          .equals(other.getFirstKeyword());
    }
    result = result && (hasRemarkKeyword() == other.hasRemarkKeyword());
    if (hasRemarkKeyword()) {
      result = result && getRemarkKeyword()
          .equals(other.getRemarkKeyword());
    }
    result = result && (hasMpParam() == other.hasMpParam());
    if (hasMpParam()) {
      result = result && getMpParam()
          .equals(other.getMpParam());
    }
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TEMPLATECODE_FIELD_NUMBER;
    hash = (53 * hash) + getTemplateCode().hashCode();
    hash = (37 * hash) + TOUSER_FIELD_NUMBER;
    hash = (53 * hash) + getToUser().hashCode();
    hash = (37 * hash) + URL_FIELD_NUMBER;
    hash = (53 * hash) + getUrl().hashCode();
    hash = (37 * hash) + MINIPROGRAM_FIELD_NUMBER;
    hash = (53 * hash) + getMiniProgram().hashCode();
    hash = (37 * hash) + DATA_FIELD_NUMBER;
    hash = (53 * hash) + getData().hashCode();
    hash = (37 * hash) + USERID_FIELD_NUMBER;
    hash = (53 * hash) + getUserId();
    if (getKeywordsCount() > 0) {
      hash = (37 * hash) + KEYWORDS_FIELD_NUMBER;
      hash = (53 * hash) + getKeywordsList().hashCode();
    }
    if (hasFirstKeyword()) {
      hash = (37 * hash) + FIRSTKEYWORD_FIELD_NUMBER;
      hash = (53 * hash) + getFirstKeyword().hashCode();
    }
    if (hasRemarkKeyword()) {
      hash = (37 * hash) + REMARKKEYWORD_FIELD_NUMBER;
      hash = (53 * hash) + getRemarkKeyword().hashCode();
    }
    if (hasMpParam()) {
      hash = (37 * hash) + MPPARAM_FIELD_NUMBER;
      hash = (53 * hash) + getMpParam().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.ywt.gapi.message.SendTemplateMessageRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest 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.SendTemplateMessageRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest 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.SendTemplateMessageRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest 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.SendTemplateMessageRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest 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.SendTemplateMessageRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.ywt.gapi.message.SendTemplateMessageRequest 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.SendTemplateMessageRequest 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>
   * 通用微信公众号模板消息发送方法，使用内部定义的模板消息编号，需要指定发送的公众号
   * 发送微信模板消息请求
   * refer: https://mp.weixin.qq.com/wiki?t=resource/res_main&amp;id=mp1433751277
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.message.SendTemplateMessageRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.message.SendTemplateMessageRequest)
      com.ywt.gapi.message.SendTemplateMessageRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendTemplateMessageRequest_descriptor;
    }

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

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

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

      toUser_ = "";

      url_ = "";

      miniProgram_ = "";

      data_ = "";

      userId_ = 0;

      if (keywordsBuilder_ == null) {
        keywords_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
      } else {
        keywordsBuilder_.clear();
      }
      if (firstKeywordBuilder_ == null) {
        firstKeyword_ = null;
      } else {
        firstKeyword_ = null;
        firstKeywordBuilder_ = null;
      }
      if (remarkKeywordBuilder_ == null) {
        remarkKeyword_ = null;
      } else {
        remarkKeyword_ = null;
        remarkKeywordBuilder_ = null;
      }
      if (mpParamBuilder_ == null) {
        mpParam_ = null;
      } else {
        mpParam_ = null;
        mpParamBuilder_ = null;
      }
      return this;
    }

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

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

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

    public com.ywt.gapi.message.SendTemplateMessageRequest buildPartial() {
      com.ywt.gapi.message.SendTemplateMessageRequest result = new com.ywt.gapi.message.SendTemplateMessageRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.templateCode_ = templateCode_;
      result.toUser_ = toUser_;
      result.url_ = url_;
      result.miniProgram_ = miniProgram_;
      result.data_ = data_;
      result.userId_ = userId_;
      if (keywordsBuilder_ == null) {
        if (((bitField0_ & 0x00000040) == 0x00000040)) {
          keywords_ = java.util.Collections.unmodifiableList(keywords_);
          bitField0_ = (bitField0_ & ~0x00000040);
        }
        result.keywords_ = keywords_;
      } else {
        result.keywords_ = keywordsBuilder_.build();
      }
      if (firstKeywordBuilder_ == null) {
        result.firstKeyword_ = firstKeyword_;
      } else {
        result.firstKeyword_ = firstKeywordBuilder_.build();
      }
      if (remarkKeywordBuilder_ == null) {
        result.remarkKeyword_ = remarkKeyword_;
      } else {
        result.remarkKeyword_ = remarkKeywordBuilder_.build();
      }
      if (mpParamBuilder_ == null) {
        result.mpParam_ = mpParam_;
      } else {
        result.mpParam_ = mpParamBuilder_.build();
      }
      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.message.SendTemplateMessageRequest) {
        return mergeFrom((com.ywt.gapi.message.SendTemplateMessageRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.message.SendTemplateMessageRequest other) {
      if (other == com.ywt.gapi.message.SendTemplateMessageRequest.getDefaultInstance()) return this;
      if (!other.getTemplateCode().isEmpty()) {
        templateCode_ = other.templateCode_;
        onChanged();
      }
      if (!other.getToUser().isEmpty()) {
        toUser_ = other.toUser_;
        onChanged();
      }
      if (!other.getUrl().isEmpty()) {
        url_ = other.url_;
        onChanged();
      }
      if (!other.getMiniProgram().isEmpty()) {
        miniProgram_ = other.miniProgram_;
        onChanged();
      }
      if (!other.getData().isEmpty()) {
        data_ = other.data_;
        onChanged();
      }
      if (other.getUserId() != 0) {
        setUserId(other.getUserId());
      }
      if (keywordsBuilder_ == null) {
        if (!other.keywords_.isEmpty()) {
          if (keywords_.isEmpty()) {
            keywords_ = other.keywords_;
            bitField0_ = (bitField0_ & ~0x00000040);
          } else {
            ensureKeywordsIsMutable();
            keywords_.addAll(other.keywords_);
          }
          onChanged();
        }
      } else {
        if (!other.keywords_.isEmpty()) {
          if (keywordsBuilder_.isEmpty()) {
            keywordsBuilder_.dispose();
            keywordsBuilder_ = null;
            keywords_ = other.keywords_;
            bitField0_ = (bitField0_ & ~0x00000040);
            keywordsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getKeywordsFieldBuilder() : null;
          } else {
            keywordsBuilder_.addAllMessages(other.keywords_);
          }
        }
      }
      if (other.hasFirstKeyword()) {
        mergeFirstKeyword(other.getFirstKeyword());
      }
      if (other.hasRemarkKeyword()) {
        mergeRemarkKeyword(other.getRemarkKeyword());
      }
      if (other.hasMpParam()) {
        mergeMpParam(other.getMpParam());
      }
      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.SendTemplateMessageRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.message.SendTemplateMessageRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private java.lang.Object templateCode_ = "";
    /**
     * <pre>
     * 内部定义的模板消息编号，定义在template_msg_config表
     * </pre>
     *
     * <code>string templateCode = 1;</code>
     */
    public java.lang.String getTemplateCode() {
      java.lang.Object ref = templateCode_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        templateCode_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 内部定义的模板消息编号，定义在template_msg_config表
     * </pre>
     *
     * <code>string templateCode = 1;</code>
     */
    public com.google.protobuf.ByteString
        getTemplateCodeBytes() {
      java.lang.Object ref = templateCode_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        templateCode_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 内部定义的模板消息编号，定义在template_msg_config表
     * </pre>
     *
     * <code>string templateCode = 1;</code>
     */
    public Builder setTemplateCode(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      templateCode_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 内部定义的模板消息编号，定义在template_msg_config表
     * </pre>
     *
     * <code>string templateCode = 1;</code>
     */
    public Builder clearTemplateCode() {
      
      templateCode_ = getDefaultInstance().getTemplateCode();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 内部定义的模板消息编号，定义在template_msg_config表
     * </pre>
     *
     * <code>string templateCode = 1;</code>
     */
    public Builder setTemplateCodeBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      templateCode_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object toUser_ = "";
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string toUser = 2;</code>
     */
    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>
     */
    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>
     */
    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>
     */
    public Builder clearToUser() {
      
      toUser_ = getDefaultInstance().getToUser();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string toUser = 2;</code>
     */
    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 url_ = "";
    /**
     * <pre>
     * 模板跳转链接（可选）
     * </pre>
     *
     * <code>string url = 3;</code>
     */
    public java.lang.String getUrl() {
      java.lang.Object ref = url_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        url_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 模板跳转链接（可选）
     * </pre>
     *
     * <code>string url = 3;</code>
     */
    public com.google.protobuf.ByteString
        getUrlBytes() {
      java.lang.Object ref = url_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        url_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 模板跳转链接（可选）
     * </pre>
     *
     * <code>string url = 3;</code>
     */
    public Builder setUrl(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      url_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 模板跳转链接（可选）
     * </pre>
     *
     * <code>string url = 3;</code>
     */
    public Builder clearUrl() {
      
      url_ = getDefaultInstance().getUrl();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 模板跳转链接（可选）
     * </pre>
     *
     * <code>string url = 3;</code>
     */
    public Builder setUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      url_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object miniProgram_ = "";
    /**
     * <pre>
     * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
     * </pre>
     *
     * <code>string miniProgram = 4;</code>
     */
    public java.lang.String getMiniProgram() {
      java.lang.Object ref = miniProgram_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        miniProgram_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
     * </pre>
     *
     * <code>string miniProgram = 4;</code>
     */
    public com.google.protobuf.ByteString
        getMiniProgramBytes() {
      java.lang.Object ref = miniProgram_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        miniProgram_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
     * </pre>
     *
     * <code>string miniProgram = 4;</code>
     */
    public Builder setMiniProgram(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      miniProgram_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
     * </pre>
     *
     * <code>string miniProgram = 4;</code>
     */
    public Builder clearMiniProgram() {
      
      miniProgram_ = getDefaultInstance().getMiniProgram();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 跳小程序所需数据（可选）包含参数：appid - 所需跳转到的小程序appid（该小程序appid必须与发模板消息的公众号是绑定关联关系，暂不支持小游戏）; pagepath - 所需跳转到小程序的具体页面路径，支持带参数,（示例index?foo=bar），暂不支持小游戏
     * </pre>
     *
     * <code>string miniProgram = 4;</code>
     */
    public Builder setMiniProgramBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      miniProgram_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object data_ = "";
    /**
     * <pre>
     * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
     * </pre>
     *
     * <code>string data = 5;</code>
     */
    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>
     * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
     * </pre>
     *
     * <code>string data = 5;</code>
     */
    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>
     * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
     * </pre>
     *
     * <code>string data = 5;</code>
     */
    public Builder setData(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      data_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
     * </pre>
     *
     * <code>string data = 5;</code>
     */
    public Builder clearData() {
      
      data_ = getDefaultInstance().getData();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 模板数据，json格式，参数内可以通过value设定值，通过color设置颜色（可选）
     * </pre>
     *
     * <code>string data = 5;</code>
     */
    public Builder setDataBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      data_ = value;
      onChanged();
      return this;
    }

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

    private java.util.List<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword> keywords_ =
      java.util.Collections.emptyList();
    private void ensureKeywordsIsMutable() {
      if (!((bitField0_ & 0x00000040) == 0x00000040)) {
        keywords_ = new java.util.ArrayList<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword>(keywords_);
        bitField0_ |= 0x00000040;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> keywordsBuilder_;

    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public java.util.List<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword> getKeywordsList() {
      if (keywordsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(keywords_);
      } else {
        return keywordsBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public int getKeywordsCount() {
      if (keywordsBuilder_ == null) {
        return keywords_.size();
      } else {
        return keywordsBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword getKeywords(int index) {
      if (keywordsBuilder_ == null) {
        return keywords_.get(index);
      } else {
        return keywordsBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder setKeywords(
        int index, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (keywordsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureKeywordsIsMutable();
        keywords_.set(index, value);
        onChanged();
      } else {
        keywordsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder setKeywords(
        int index, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder builderForValue) {
      if (keywordsBuilder_ == null) {
        ensureKeywordsIsMutable();
        keywords_.set(index, builderForValue.build());
        onChanged();
      } else {
        keywordsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder addKeywords(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (keywordsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureKeywordsIsMutable();
        keywords_.add(value);
        onChanged();
      } else {
        keywordsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder addKeywords(
        int index, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (keywordsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureKeywordsIsMutable();
        keywords_.add(index, value);
        onChanged();
      } else {
        keywordsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder addKeywords(
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder builderForValue) {
      if (keywordsBuilder_ == null) {
        ensureKeywordsIsMutable();
        keywords_.add(builderForValue.build());
        onChanged();
      } else {
        keywordsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder addKeywords(
        int index, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder builderForValue) {
      if (keywordsBuilder_ == null) {
        ensureKeywordsIsMutable();
        keywords_.add(index, builderForValue.build());
        onChanged();
      } else {
        keywordsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder addAllKeywords(
        java.lang.Iterable<? extends com.ywt.gapi.message.SendTemplateMessageRequest.Keyword> values) {
      if (keywordsBuilder_ == null) {
        ensureKeywordsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, keywords_);
        onChanged();
      } else {
        keywordsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder clearKeywords() {
      if (keywordsBuilder_ == null) {
        keywords_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000040);
        onChanged();
      } else {
        keywordsBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public Builder removeKeywords(int index) {
      if (keywordsBuilder_ == null) {
        ensureKeywordsIsMutable();
        keywords_.remove(index);
        onChanged();
      } else {
        keywordsBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder getKeywordsBuilder(
        int index) {
      return getKeywordsFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder getKeywordsOrBuilder(
        int index) {
      if (keywordsBuilder_ == null) {
        return keywords_.get(index);  } else {
        return keywordsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public java.util.List<? extends com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> 
         getKeywordsOrBuilderList() {
      if (keywordsBuilder_ != null) {
        return keywordsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(keywords_);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder addKeywordsBuilder() {
      return getKeywordsFieldBuilder().addBuilder(
          com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder addKeywordsBuilder(
        int index) {
      return getKeywordsFieldBuilder().addBuilder(
          index, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendTemplateMessageRequest.Keyword keywords = 7;</code>
     */
    public java.util.List<com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder> 
         getKeywordsBuilderList() {
      return getKeywordsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> 
        getKeywordsFieldBuilder() {
      if (keywordsBuilder_ == null) {
        keywordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder>(
                keywords_,
                ((bitField0_ & 0x00000040) == 0x00000040),
                getParentForChildren(),
                isClean());
        keywords_ = null;
      }
      return keywordsBuilder_;
    }

    private com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> firstKeywordBuilder_;
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public boolean hasFirstKeyword() {
      return firstKeywordBuilder_ != null || firstKeyword_ != null;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword getFirstKeyword() {
      if (firstKeywordBuilder_ == null) {
        return firstKeyword_ == null ? com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance() : firstKeyword_;
      } else {
        return firstKeywordBuilder_.getMessage();
      }
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public Builder setFirstKeyword(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (firstKeywordBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        firstKeyword_ = value;
        onChanged();
      } else {
        firstKeywordBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public Builder setFirstKeyword(
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder builderForValue) {
      if (firstKeywordBuilder_ == null) {
        firstKeyword_ = builderForValue.build();
        onChanged();
      } else {
        firstKeywordBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public Builder mergeFirstKeyword(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (firstKeywordBuilder_ == null) {
        if (firstKeyword_ != null) {
          firstKeyword_ =
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.newBuilder(firstKeyword_).mergeFrom(value).buildPartial();
        } else {
          firstKeyword_ = value;
        }
        onChanged();
      } else {
        firstKeywordBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public Builder clearFirstKeyword() {
      if (firstKeywordBuilder_ == null) {
        firstKeyword_ = null;
        onChanged();
      } else {
        firstKeyword_ = null;
        firstKeywordBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder getFirstKeywordBuilder() {
      
      onChanged();
      return getFirstKeywordFieldBuilder().getBuilder();
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder getFirstKeywordOrBuilder() {
      if (firstKeywordBuilder_ != null) {
        return firstKeywordBuilder_.getMessageOrBuilder();
      } else {
        return firstKeyword_ == null ?
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance() : firstKeyword_;
      }
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword firstKeyword = 8;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> 
        getFirstKeywordFieldBuilder() {
      if (firstKeywordBuilder_ == null) {
        firstKeywordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder>(
                getFirstKeyword(),
                getParentForChildren(),
                isClean());
        firstKeyword_ = null;
      }
      return firstKeywordBuilder_;
    }

    private com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> remarkKeywordBuilder_;
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public boolean hasRemarkKeyword() {
      return remarkKeywordBuilder_ != null || remarkKeyword_ != null;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword getRemarkKeyword() {
      if (remarkKeywordBuilder_ == null) {
        return remarkKeyword_ == null ? com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance() : remarkKeyword_;
      } else {
        return remarkKeywordBuilder_.getMessage();
      }
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public Builder setRemarkKeyword(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (remarkKeywordBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        remarkKeyword_ = value;
        onChanged();
      } else {
        remarkKeywordBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public Builder setRemarkKeyword(
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder builderForValue) {
      if (remarkKeywordBuilder_ == null) {
        remarkKeyword_ = builderForValue.build();
        onChanged();
      } else {
        remarkKeywordBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public Builder mergeRemarkKeyword(com.ywt.gapi.message.SendTemplateMessageRequest.Keyword value) {
      if (remarkKeywordBuilder_ == null) {
        if (remarkKeyword_ != null) {
          remarkKeyword_ =
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.newBuilder(remarkKeyword_).mergeFrom(value).buildPartial();
        } else {
          remarkKeyword_ = value;
        }
        onChanged();
      } else {
        remarkKeywordBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public Builder clearRemarkKeyword() {
      if (remarkKeywordBuilder_ == null) {
        remarkKeyword_ = null;
        onChanged();
      } else {
        remarkKeyword_ = null;
        remarkKeywordBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder getRemarkKeywordBuilder() {
      
      onChanged();
      return getRemarkKeywordFieldBuilder().getBuilder();
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder getRemarkKeywordOrBuilder() {
      if (remarkKeywordBuilder_ != null) {
        return remarkKeywordBuilder_.getMessageOrBuilder();
      } else {
        return remarkKeyword_ == null ?
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.getDefaultInstance() : remarkKeyword_;
      }
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.Keyword remarkKeyword = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder> 
        getRemarkKeywordFieldBuilder() {
      if (remarkKeywordBuilder_ == null) {
        remarkKeywordBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.message.SendTemplateMessageRequest.Keyword, com.ywt.gapi.message.SendTemplateMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.KeywordOrBuilder>(
                getRemarkKeyword(),
                getParentForChildren(),
                isClean());
        remarkKeyword_ = null;
      }
      return remarkKeywordBuilder_;
    }

    private com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam, com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParamOrBuilder> mpParamBuilder_;
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public boolean hasMpParam() {
      return mpParamBuilder_ != null || mpParam_ != null;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam getMpParam() {
      if (mpParamBuilder_ == null) {
        return mpParam_ == null ? com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.getDefaultInstance() : mpParam_;
      } else {
        return mpParamBuilder_.getMessage();
      }
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public Builder setMpParam(com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam value) {
      if (mpParamBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        mpParam_ = value;
        onChanged();
      } else {
        mpParamBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public Builder setMpParam(
        com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.Builder builderForValue) {
      if (mpParamBuilder_ == null) {
        mpParam_ = builderForValue.build();
        onChanged();
      } else {
        mpParamBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public Builder mergeMpParam(com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam value) {
      if (mpParamBuilder_ == null) {
        if (mpParam_ != null) {
          mpParam_ =
            com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.newBuilder(mpParam_).mergeFrom(value).buildPartial();
        } else {
          mpParam_ = value;
        }
        onChanged();
      } else {
        mpParamBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public Builder clearMpParam() {
      if (mpParamBuilder_ == null) {
        mpParam_ = null;
        onChanged();
      } else {
        mpParam_ = null;
        mpParamBuilder_ = null;
      }

      return this;
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.Builder getMpParamBuilder() {
      
      onChanged();
      return getMpParamFieldBuilder().getBuilder();
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    public com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParamOrBuilder getMpParamOrBuilder() {
      if (mpParamBuilder_ != null) {
        return mpParamBuilder_.getMessageOrBuilder();
      } else {
        return mpParam_ == null ?
            com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.getDefaultInstance() : mpParam_;
      }
    }
    /**
     * <code>.com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam mpParam = 10;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam, com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParamOrBuilder> 
        getMpParamFieldBuilder() {
      if (mpParamBuilder_ == null) {
        mpParamBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam, com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParam.Builder, com.ywt.gapi.message.SendTemplateMessageRequest.MiniProgramParamOrBuilder>(
                getMpParam(),
                getParentForChildren(),
                isClean());
        mpParam_ = null;
      }
      return mpParamBuilder_;
    }
    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.SendTemplateMessageRequest)
  }

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

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

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

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

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

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

}

