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

package com.ywt.gapi.message;

/**
 * <pre>
 *发送小程序订阅消息请求结构体
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.message.SendMPSubscribeMessageRequest}
 */
public  final class SendMPSubscribeMessageRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.message.SendMPSubscribeMessageRequest)
    SendMPSubscribeMessageRequestOrBuilder {
  // Use SendMPSubscribeMessageRequest.newBuilder() to construct.
  private SendMPSubscribeMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendMPSubscribeMessageRequest() {
    terminal_ = 0;
    touser_ = "";
    templateId_ = "";
    page_ = "";
    keywords_ = java.util.Collections.emptyList();
  }

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

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

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

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

            page_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) {
              keywords_ = new java.util.ArrayList<com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword>();
              mutable_bitField0_ |= 0x00000010;
            }
            keywords_.add(
                input.readMessage(com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.parser(), extensionRegistry));
            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_ & 0x00000010) == 0x00000010)) {
        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_SendMPSubscribeMessageRequest_descriptor;
  }

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

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

    /**
     * <code>string key = 1;</code>
     */
    java.lang.String getKey();
    /**
     * <code>string key = 1;</code>
     */
    com.google.protobuf.ByteString
        getKeyBytes();

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

    /**
     * <code>string color = 3;</code>
     */
    java.lang.String getColor();
    /**
     * <code>string color = 3;</code>
     */
    com.google.protobuf.ByteString
        getColorBytes();
  }
  /**
   * Protobuf type {@code com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword}
   */
  public  static final class Keyword extends
      com.google.protobuf.GeneratedMessageV3 implements
      // @@protoc_insertion_point(message_implements:com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword)
      KeywordOrBuilder {
    // Use Keyword.newBuilder() to construct.
    private Keyword(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Keyword() {
      key_ = "";
      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();

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

              value_ = s;
              break;
            }
            case 26: {
              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_SendMPSubscribeMessageRequest_Keyword_descriptor;
    }

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

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

    public static final int VALUE_FIELD_NUMBER = 2;
    private volatile java.lang.Object value_;
    /**
     * <code>string value = 2;</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 = 2;</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 = 3;
    private volatile java.lang.Object color_;
    /**
     * <code>string color = 3;</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 = 3;</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 (!getKeyBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
      }
      if (!getValueBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
      }
      if (!getColorBytes().isEmpty()) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, color_);
      }
    }

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

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

      boolean result = true;
      result = result && getKey()
          .equals(other.getKey());
      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) + KEY_FIELD_NUMBER;
      hash = (53 * hash) + getKey().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.SendMPSubscribeMessageRequest.Keyword parseFrom(
        java.nio.ByteBuffer data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword parseFrom(
        com.google.protobuf.ByteString data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword parseFrom(byte[] data)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return PARSER.parseFrom(data);
    }
    public static com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword parseFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseWithIOException(PARSER, input);
    }
    public static com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword parseDelimitedFrom(java.io.InputStream input)
        throws java.io.IOException {
      return com.google.protobuf.GeneratedMessageV3
          .parseDelimitedWithIOException(PARSER, input);
    }
    public static com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword}
     */
    public static final class Builder extends
        com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
        // @@protoc_insertion_point(builder_implements:com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword)
        com.ywt.gapi.message.SendMPSubscribeMessageRequest.KeywordOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_Keyword_descriptor;
      }

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

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

        value_ = "";

        color_ = "";

        return this;
      }

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

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

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

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

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

      private java.lang.Object key_ = "";
      /**
       * <code>string key = 1;</code>
       */
      public java.lang.String getKey() {
        java.lang.Object ref = key_;
        if (!(ref instanceof java.lang.String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          java.lang.String s = bs.toStringUtf8();
          key_ = s;
          return s;
        } else {
          return (java.lang.String) ref;
        }
      }
      /**
       * <code>string key = 1;</code>
       */
      public com.google.protobuf.ByteString
          getKeyBytes() {
        java.lang.Object ref = key_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (java.lang.String) ref);
          key_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string key = 1;</code>
       */
      public Builder setKey(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        key_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string key = 1;</code>
       */
      public Builder clearKey() {
        
        key_ = getDefaultInstance().getKey();
        onChanged();
        return this;
      }
      /**
       * <code>string key = 1;</code>
       */
      public Builder setKeyBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        key_ = value;
        onChanged();
        return this;
      }

      private java.lang.Object value_ = "";
      /**
       * <code>string value = 2;</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 = 2;</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 = 2;</code>
       */
      public Builder setValue(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        value_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string value = 2;</code>
       */
      public Builder clearValue() {
        
        value_ = getDefaultInstance().getValue();
        onChanged();
        return this;
      }
      /**
       * <code>string value = 2;</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 = 3;</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 = 3;</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 = 3;</code>
       */
      public Builder setColor(
          java.lang.String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        color_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string color = 3;</code>
       */
      public Builder clearColor() {
        
        color_ = getDefaultInstance().getColor();
        onChanged();
        return this;
      }
      /**
       * <code>string color = 3;</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.SendMPSubscribeMessageRequest.Keyword)
    }

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

    public static com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

  private int bitField0_;
  public static final int TERMINAL_FIELD_NUMBER = 1;
  private int terminal_;
  /**
   * <code>int32 terminal = 1;</code>
   */
  public int getTerminal() {
    return terminal_;
  }

  public static final int TOUSER_FIELD_NUMBER = 2;
  private volatile java.lang.Object touser_;
  /**
   * <pre>
   *接收者（用户）的 openid
   * </pre>
   *
   * <code>string touser = 2;</code>
   */
  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 TEMPLATEID_FIELD_NUMBER = 3;
  private volatile java.lang.Object templateId_;
  /**
   * <pre>
   *所需下发的模板消息的id
   * </pre>
   *
   * <code>string templateId = 3;</code>
   */
  public java.lang.String getTemplateId() {
    java.lang.Object ref = templateId_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      templateId_ = s;
      return s;
    }
  }
  /**
   * <pre>
   *所需下发的模板消息的id
   * </pre>
   *
   * <code>string templateId = 3;</code>
   */
  public com.google.protobuf.ByteString
      getTemplateIdBytes() {
    java.lang.Object ref = templateId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      templateId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

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

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

  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 (terminal_ != 0) {
      output.writeInt32(1, terminal_);
    }
    if (!getTouserBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, touser_);
    }
    if (!getTemplateIdBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_);
    }
    if (!getPageBytes().isEmpty()) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, page_);
    }
    for (int i = 0; i < keywords_.size(); i++) {
      output.writeMessage(5, keywords_.get(i));
    }
  }

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

    size = 0;
    if (terminal_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, terminal_);
    }
    if (!getTouserBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, touser_);
    }
    if (!getTemplateIdBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_);
    }
    if (!getPageBytes().isEmpty()) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, page_);
    }
    for (int i = 0; i < keywords_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, keywords_.get(i));
    }
    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.SendMPSubscribeMessageRequest)) {
      return super.equals(obj);
    }
    com.ywt.gapi.message.SendMPSubscribeMessageRequest other = (com.ywt.gapi.message.SendMPSubscribeMessageRequest) obj;

    boolean result = true;
    result = result && (getTerminal()
        == other.getTerminal());
    result = result && getTouser()
        .equals(other.getTouser());
    result = result && getTemplateId()
        .equals(other.getTemplateId());
    result = result && getPage()
        .equals(other.getPage());
    result = result && getKeywordsList()
        .equals(other.getKeywordsList());
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + TERMINAL_FIELD_NUMBER;
    hash = (53 * hash) + getTerminal();
    hash = (37 * hash) + TOUSER_FIELD_NUMBER;
    hash = (53 * hash) + getTouser().hashCode();
    hash = (37 * hash) + TEMPLATEID_FIELD_NUMBER;
    hash = (53 * hash) + getTemplateId().hashCode();
    hash = (37 * hash) + PAGE_FIELD_NUMBER;
    hash = (53 * hash) + getPage().hashCode();
    if (getKeywordsCount() > 0) {
      hash = (37 * hash) + KEYWORDS_FIELD_NUMBER;
      hash = (53 * hash) + getKeywordsList().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *发送小程序订阅消息请求结构体
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.message.SendMPSubscribeMessageRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.message.SendMPSubscribeMessageRequest)
      com.ywt.gapi.message.SendMPSubscribeMessageRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.message.Message.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_descriptor;
    }

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

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

      touser_ = "";

      templateId_ = "";

      page_ = "";

      if (keywordsBuilder_ == null) {
        keywords_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
      } else {
        keywordsBuilder_.clear();
      }
      return this;
    }

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

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

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

    public com.ywt.gapi.message.SendMPSubscribeMessageRequest buildPartial() {
      com.ywt.gapi.message.SendMPSubscribeMessageRequest result = new com.ywt.gapi.message.SendMPSubscribeMessageRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.terminal_ = terminal_;
      result.touser_ = touser_;
      result.templateId_ = templateId_;
      result.page_ = page_;
      if (keywordsBuilder_ == null) {
        if (((bitField0_ & 0x00000010) == 0x00000010)) {
          keywords_ = java.util.Collections.unmodifiableList(keywords_);
          bitField0_ = (bitField0_ & ~0x00000010);
        }
        result.keywords_ = keywords_;
      } else {
        result.keywords_ = keywordsBuilder_.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.SendMPSubscribeMessageRequest) {
        return mergeFrom((com.ywt.gapi.message.SendMPSubscribeMessageRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.ywt.gapi.message.SendMPSubscribeMessageRequest other) {
      if (other == com.ywt.gapi.message.SendMPSubscribeMessageRequest.getDefaultInstance()) return this;
      if (other.getTerminal() != 0) {
        setTerminal(other.getTerminal());
      }
      if (!other.getTouser().isEmpty()) {
        touser_ = other.touser_;
        onChanged();
      }
      if (!other.getTemplateId().isEmpty()) {
        templateId_ = other.templateId_;
        onChanged();
      }
      if (!other.getPage().isEmpty()) {
        page_ = other.page_;
        onChanged();
      }
      if (keywordsBuilder_ == null) {
        if (!other.keywords_.isEmpty()) {
          if (keywords_.isEmpty()) {
            keywords_ = other.keywords_;
            bitField0_ = (bitField0_ & ~0x00000010);
          } else {
            ensureKeywordsIsMutable();
            keywords_.addAll(other.keywords_);
          }
          onChanged();
        }
      } else {
        if (!other.keywords_.isEmpty()) {
          if (keywordsBuilder_.isEmpty()) {
            keywordsBuilder_.dispose();
            keywordsBuilder_ = null;
            keywords_ = other.keywords_;
            bitField0_ = (bitField0_ & ~0x00000010);
            keywordsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getKeywordsFieldBuilder() : null;
          } else {
            keywordsBuilder_.addAllMessages(other.keywords_);
          }
        }
      }
      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.SendMPSubscribeMessageRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.ywt.gapi.message.SendMPSubscribeMessageRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private int terminal_ ;
    /**
     * <code>int32 terminal = 1;</code>
     */
    public int getTerminal() {
      return terminal_;
    }
    /**
     * <code>int32 terminal = 1;</code>
     */
    public Builder setTerminal(int value) {
      
      terminal_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 terminal = 1;</code>
     */
    public Builder clearTerminal() {
      
      terminal_ = 0;
      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 templateId_ = "";
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     */
    public java.lang.String getTemplateId() {
      java.lang.Object ref = templateId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        templateId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     */
    public com.google.protobuf.ByteString
        getTemplateIdBytes() {
      java.lang.Object ref = templateId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        templateId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     */
    public Builder setTemplateId(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      templateId_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     */
    public Builder clearTemplateId() {
      
      templateId_ = getDefaultInstance().getTemplateId();
      onChanged();
      return this;
    }
    /**
     * <pre>
     *所需下发的模板消息的id
     * </pre>
     *
     * <code>string templateId = 3;</code>
     */
    public Builder setTemplateIdBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      templateId_ = value;
      onChanged();
      return this;
    }

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

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

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

    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public java.util.List<com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword> getKeywordsList() {
      if (keywordsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(keywords_);
      } else {
        return keywordsBuilder_.getMessageList();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public int getKeywordsCount() {
      if (keywordsBuilder_ == null) {
        return keywords_.size();
      } else {
        return keywordsBuilder_.getCount();
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword getKeywords(int index) {
      if (keywordsBuilder_ == null) {
        return keywords_.get(index);
      } else {
        return keywordsBuilder_.getMessage(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder setKeywords(
        int index, com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder setKeywords(
        int index, com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder addKeywords(com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder addKeywords(
        int index, com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder addKeywords(
        com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder addKeywords(
        int index, com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder addAllKeywords(
        java.lang.Iterable<? extends com.ywt.gapi.message.SendMPSubscribeMessageRequest.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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Builder clearKeywords() {
      if (keywordsBuilder_ == null) {
        keywords_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000010);
        onChanged();
      } else {
        keywordsBuilder_.clear();
      }
      return this;
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</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.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.Builder getKeywordsBuilder(
        int index) {
      return getKeywordsFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageRequest.KeywordOrBuilder getKeywordsOrBuilder(
        int index) {
      if (keywordsBuilder_ == null) {
        return keywords_.get(index);  } else {
        return keywordsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public java.util.List<? extends com.ywt.gapi.message.SendMPSubscribeMessageRequest.KeywordOrBuilder> 
         getKeywordsOrBuilderList() {
      if (keywordsBuilder_ != null) {
        return keywordsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(keywords_);
      }
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.Builder addKeywordsBuilder() {
      return getKeywordsFieldBuilder().addBuilder(
          com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.Builder addKeywordsBuilder(
        int index) {
      return getKeywordsFieldBuilder().addBuilder(
          index, com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public java.util.List<com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.Builder> 
         getKeywordsBuilderList() {
      return getKeywordsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword, com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendMPSubscribeMessageRequest.KeywordOrBuilder> 
        getKeywordsFieldBuilder() {
      if (keywordsBuilder_ == null) {
        keywordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword, com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword.Builder, com.ywt.gapi.message.SendMPSubscribeMessageRequest.KeywordOrBuilder>(
                keywords_,
                ((bitField0_ & 0x00000010) == 0x00000010),
                getParentForChildren(),
                isClean());
        keywords_ = null;
      }
      return keywordsBuilder_;
    }
    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.SendMPSubscribeMessageRequest)
  }

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

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

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

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

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

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

}

