// 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 {
private static final long serialVersionUID = 0L;
  // Use SendMPSubscribeMessageRequest.newBuilder() to construct.
  private SendMPSubscribeMessageRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendMPSubscribeMessageRequest() {
    touser_ = "";
    templateId_ = "";
    page_ = "";
    keywords_ = java.util.Collections.emptyList();
  }

  @Override
  @SuppressWarnings({"unused"})
  protected Object newInstance(
      UnusedPrivateParameter unused) {
    return new SendMPSubscribeMessageRequest();
  }

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

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

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

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

            page_ = s;
            break;
          }
          case 42: {
            if (!((mutable_bitField0_ & 0x00000001) != 0)) {
              keywords_ = new java.util.ArrayList<Keyword>();
              mutable_bitField0_ |= 0x00000001;
            }
            keywords_.add(
                input.readMessage(Keyword.parser(), extensionRegistry));
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000001) != 0)) {
        keywords_ = java.util.Collections.unmodifiableList(keywords_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_descriptor;
  }

  @Override
  protected FieldAccessorTable
      internalGetFieldAccessorTable() {
    return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            SendMPSubscribeMessageRequest.class, 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>
     * @return The key.
     */
    String getKey();
    /**
     * <code>string key = 1;</code>
     * @return The bytes for key.
     */
    com.google.protobuf.ByteString
        getKeyBytes();

    /**
     * <code>string value = 2;</code>
     * @return The value.
     */
    String getValue();
    /**
     * <code>string value = 2;</code>
     * @return The bytes for value.
     */
    com.google.protobuf.ByteString
        getValueBytes();

    /**
     * <code>string color = 3;</code>
     * @return The color.
     */
    String getColor();
    /**
     * <code>string color = 3;</code>
     * @return The bytes for color.
     */
    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 {
  private static final long serialVersionUID = 0L;
    // Use Keyword.newBuilder() to construct.
    private Keyword(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
      super(builder);
    }
    private Keyword() {
      key_ = "";
      value_ = "";
      color_ = "";
    }

    @Override
    @SuppressWarnings({"unused"})
    protected Object newInstance(
        UnusedPrivateParameter unused) {
      return new Keyword();
    }

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

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

              value_ = s;
              break;
            }
            case 26: {
              String s = input.readStringRequireUtf8();

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

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_Keyword_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              Keyword.class, Builder.class);
    }

    public static final int KEY_FIELD_NUMBER = 1;
    private volatile Object key_;
    /**
     * <code>string key = 1;</code>
     * @return The key.
     */
    @Override
    public String getKey() {
      Object ref = key_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        key_ = s;
        return s;
      }
    }
    /**
     * <code>string key = 1;</code>
     * @return The bytes for key.
     */
    @Override
    public com.google.protobuf.ByteString
        getKeyBytes() {
      Object ref = key_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        key_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int VALUE_FIELD_NUMBER = 2;
    private volatile Object value_;
    /**
     * <code>string value = 2;</code>
     * @return The value.
     */
    @Override
    public String getValue() {
      Object ref = value_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        value_ = s;
        return s;
      }
    }
    /**
     * <code>string value = 2;</code>
     * @return The bytes for value.
     */
    @Override
    public com.google.protobuf.ByteString
        getValueBytes() {
      Object ref = value_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        value_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

    public static final int COLOR_FIELD_NUMBER = 3;
    private volatile Object color_;
    /**
     * <code>string color = 3;</code>
     * @return The color.
     */
    @Override
    public String getColor() {
      Object ref = color_;
      if (ref instanceof String) {
        return (String) ref;
      } else {
        com.google.protobuf.ByteString bs = 
            (com.google.protobuf.ByteString) ref;
        String s = bs.toStringUtf8();
        color_ = s;
        return s;
      }
    }
    /**
     * <code>string color = 3;</code>
     * @return The bytes for color.
     */
    @Override
    public com.google.protobuf.ByteString
        getColorBytes() {
      Object ref = color_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (String) ref);
        color_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }

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

      memoizedIsInitialized = 1;
      return true;
    }

    @Override
    public void writeTo(com.google.protobuf.CodedOutputStream output)
                        throws java.io.IOException {
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) {
        com.google.protobuf.GeneratedMessageV3.writeString(output, 3, color_);
      }
      unknownFields.writeTo(output);
    }

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

      size = 0;
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_);
      }
      if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(color_)) {
        size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, color_);
      }
      size += unknownFields.getSerializedSize();
      memoizedSize = size;
      return size;
    }

    @Override
    public boolean equals(final Object obj) {
      if (obj == this) {
       return true;
      }
      if (!(obj instanceof Keyword)) {
        return super.equals(obj);
      }
      Keyword other = (Keyword) obj;

      if (!getKey()
          .equals(other.getKey())) return false;
      if (!getValue()
          .equals(other.getValue())) return false;
      if (!getColor()
          .equals(other.getColor())) return false;
      if (!unknownFields.equals(other.unknownFields)) return false;
      return true;
    }

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

    @Override
    public Builder newBuilderForType() { return newBuilder(); }
    public static Builder newBuilder() {
      return DEFAULT_INSTANCE.toBuilder();
    }
    public static Builder newBuilder(Keyword prototype) {
      return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
    }
    @Override
    public Builder toBuilder() {
      return this == DEFAULT_INSTANCE
          ? new Builder() : new Builder().mergeFrom(this);
    }

    @Override
    protected Builder newBuilderForType(
        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)
        KeywordOrBuilder {
      public static final com.google.protobuf.Descriptors.Descriptor
          getDescriptor() {
        return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_Keyword_descriptor;
      }

      @Override
      protected FieldAccessorTable
          internalGetFieldAccessorTable() {
        return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_Keyword_fieldAccessorTable
            .ensureFieldAccessorsInitialized(
                Keyword.class, Builder.class);
      }

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

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

        value_ = "";

        color_ = "";

        return this;
      }

      @Override
      public com.google.protobuf.Descriptors.Descriptor
          getDescriptorForType() {
        return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_Keyword_descriptor;
      }

      @Override
      public Keyword getDefaultInstanceForType() {
        return Keyword.getDefaultInstance();
      }

      @Override
      public Keyword build() {
        Keyword result = buildPartial();
        if (!result.isInitialized()) {
          throw newUninitializedMessageException(result);
        }
        return result;
      }

      @Override
      public Keyword buildPartial() {
        Keyword result = new Keyword(this);
        result.key_ = key_;
        result.value_ = value_;
        result.color_ = color_;
        onBuilt();
        return result;
      }

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

      public Builder mergeFrom(Keyword other) {
        if (other == 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();
        }
        this.mergeUnknownFields(other.unknownFields);
        onChanged();
        return this;
      }

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

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

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

      private Object value_ = "";
      /**
       * <code>string value = 2;</code>
       * @return The value.
       */
      public String getValue() {
        Object ref = value_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          value_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string value = 2;</code>
       * @return The bytes for value.
       */
      public com.google.protobuf.ByteString
          getValueBytes() {
        Object ref = value_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          value_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string value = 2;</code>
       * @param value The value to set.
       * @return This builder for chaining.
       */
      public Builder setValue(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        value_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string value = 2;</code>
       * @return This builder for chaining.
       */
      public Builder clearValue() {
        
        value_ = getDefaultInstance().getValue();
        onChanged();
        return this;
      }
      /**
       * <code>string value = 2;</code>
       * @param value The bytes for value to set.
       * @return This builder for chaining.
       */
      public Builder setValueBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        value_ = value;
        onChanged();
        return this;
      }

      private Object color_ = "";
      /**
       * <code>string color = 3;</code>
       * @return The color.
       */
      public String getColor() {
        Object ref = color_;
        if (!(ref instanceof String)) {
          com.google.protobuf.ByteString bs =
              (com.google.protobuf.ByteString) ref;
          String s = bs.toStringUtf8();
          color_ = s;
          return s;
        } else {
          return (String) ref;
        }
      }
      /**
       * <code>string color = 3;</code>
       * @return The bytes for color.
       */
      public com.google.protobuf.ByteString
          getColorBytes() {
        Object ref = color_;
        if (ref instanceof String) {
          com.google.protobuf.ByteString b = 
              com.google.protobuf.ByteString.copyFromUtf8(
                  (String) ref);
          color_ = b;
          return b;
        } else {
          return (com.google.protobuf.ByteString) ref;
        }
      }
      /**
       * <code>string color = 3;</code>
       * @param value The color to set.
       * @return This builder for chaining.
       */
      public Builder setColor(
          String value) {
        if (value == null) {
    throw new NullPointerException();
  }
  
        color_ = value;
        onChanged();
        return this;
      }
      /**
       * <code>string color = 3;</code>
       * @return This builder for chaining.
       */
      public Builder clearColor() {
        
        color_ = getDefaultInstance().getColor();
        onChanged();
        return this;
      }
      /**
       * <code>string color = 3;</code>
       * @param value The bytes for color to set.
       * @return This builder for chaining.
       */
      public Builder setColorBytes(
          com.google.protobuf.ByteString value) {
        if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
        
        color_ = value;
        onChanged();
        return this;
      }
      @Override
      public final Builder setUnknownFields(
          final com.google.protobuf.UnknownFieldSet unknownFields) {
        return super.setUnknownFields(unknownFields);
      }

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


      // @@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 Keyword DEFAULT_INSTANCE;
    static {
      DEFAULT_INSTANCE = new Keyword();
    }

    public static Keyword getDefaultInstance() {
      return DEFAULT_INSTANCE;
    }

    private static final com.google.protobuf.Parser<Keyword>
        PARSER = new com.google.protobuf.AbstractParser<Keyword>() {
      @Override
      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;
    }

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

    @Override
    public Keyword getDefaultInstanceForType() {
      return DEFAULT_INSTANCE;
    }

  }

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

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

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

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

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

    memoizedIsInitialized = 1;
    return true;
  }

  @Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (terminal_ != 0) {
      output.writeInt32(1, terminal_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(touser_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, touser_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, templateId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(page_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, page_);
    }
    for (int i = 0; i < keywords_.size(); i++) {
      output.writeMessage(5, keywords_.get(i));
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (terminal_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(1, terminal_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(touser_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, touser_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, templateId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(page_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, page_);
    }
    for (int i = 0; i < keywords_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, keywords_.get(i));
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @Override
  public boolean equals(final Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof SendMPSubscribeMessageRequest)) {
      return super.equals(obj);
    }
    SendMPSubscribeMessageRequest other = (SendMPSubscribeMessageRequest) obj;

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

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

  @Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(SendMPSubscribeMessageRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @Override
  protected Builder newBuilderForType(
      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 MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_descriptor;
    }

    @Override
    protected FieldAccessorTable
        internalGetFieldAccessorTable() {
      return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              SendMPSubscribeMessageRequest.class, Builder.class);
    }

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

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

      touser_ = "";

      templateId_ = "";

      page_ = "";

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

    @Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return MessageProto.internal_static_com_ywt_gapi_message_SendMPSubscribeMessageRequest_descriptor;
    }

    @Override
    public SendMPSubscribeMessageRequest getDefaultInstanceForType() {
      return SendMPSubscribeMessageRequest.getDefaultInstance();
    }

    @Override
    public SendMPSubscribeMessageRequest build() {
      SendMPSubscribeMessageRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @Override
    public SendMPSubscribeMessageRequest buildPartial() {
      SendMPSubscribeMessageRequest result = new SendMPSubscribeMessageRequest(this);
      int from_bitField0_ = bitField0_;
      result.terminal_ = terminal_;
      result.touser_ = touser_;
      result.templateId_ = templateId_;
      result.page_ = page_;
      if (keywordsBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          keywords_ = java.util.Collections.unmodifiableList(keywords_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.keywords_ = keywords_;
      } else {
        result.keywords_ = keywordsBuilder_.build();
      }
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(SendMPSubscribeMessageRequest other) {
      if (other == 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_ & ~0x00000001);
          } else {
            ensureKeywordsIsMutable();
            keywords_.addAll(other.keywords_);
          }
          onChanged();
        }
      } else {
        if (!other.keywords_.isEmpty()) {
          if (keywordsBuilder_.isEmpty()) {
            keywordsBuilder_.dispose();
            keywordsBuilder_ = null;
            keywords_ = other.keywords_;
            bitField0_ = (bitField0_ & ~0x00000001);
            keywordsBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getKeywordsFieldBuilder() : null;
          } else {
            keywordsBuilder_.addAllMessages(other.keywords_);
          }
        }
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

    @Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      SendMPSubscribeMessageRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (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>
     * @return The terminal.
     */
    @Override
    public int getTerminal() {
      return terminal_;
    }
    /**
     * <code>int32 terminal = 1;</code>
     * @param value The terminal to set.
     * @return This builder for chaining.
     */
    public Builder setTerminal(int value) {
      
      terminal_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>int32 terminal = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearTerminal() {
      
      terminal_ = 0;
      onChanged();
      return this;
    }

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

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

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

    private java.util.List<Keyword> keywords_ =
      java.util.Collections.emptyList();
    private void ensureKeywordsIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        keywords_ = new java.util.ArrayList<Keyword>(keywords_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        Keyword, Keyword.Builder, KeywordOrBuilder> keywordsBuilder_;

    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public java.util.List<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 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, 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, 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(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, 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(
        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, 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(
        Iterable<? extends 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_ & ~0x00000001);
        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 Keyword.Builder getKeywordsBuilder(
        int index) {
      return getKeywordsFieldBuilder().getBuilder(index);
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public 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 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 Keyword.Builder addKeywordsBuilder() {
      return getKeywordsFieldBuilder().addBuilder(
          Keyword.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public Keyword.Builder addKeywordsBuilder(
        int index) {
      return getKeywordsFieldBuilder().addBuilder(
          index, Keyword.getDefaultInstance());
    }
    /**
     * <code>repeated .com.ywt.gapi.message.SendMPSubscribeMessageRequest.Keyword keywords = 5;</code>
     */
    public java.util.List<Keyword.Builder>
         getKeywordsBuilderList() {
      return getKeywordsFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        Keyword, Keyword.Builder, KeywordOrBuilder>
        getKeywordsFieldBuilder() {
      if (keywordsBuilder_ == null) {
        keywordsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            Keyword, Keyword.Builder, KeywordOrBuilder>(
                keywords_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        keywords_ = null;
      }
      return keywordsBuilder_;
    }
    @Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:com.ywt.gapi.message.SendMPSubscribeMessageRequest)
  }

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

  public static SendMPSubscribeMessageRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<SendMPSubscribeMessageRequest>
      PARSER = new com.google.protobuf.AbstractParser<SendMPSubscribeMessageRequest>() {
    @Override
    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;
  }

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

  @Override
  public SendMPSubscribeMessageRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

