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

package com.ywt.gapi.base.wechat;

/**
 * <pre>
 *发送公众号模板消息请求
 * </pre>
 *
 * Protobuf type {@code com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest}
 */
public final class SendOfficialTemplateMsgByTerminalRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest)
    SendOfficialTemplateMsgByTerminalRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use SendOfficialTemplateMsgByTerminalRequest.newBuilder() to construct.
  private SendOfficialTemplateMsgByTerminalRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private SendOfficialTemplateMsgByTerminalRequest() {
    openid_ = "";
    templateid_ = "";
    url_ = "";
    data_ = "";
    miniProgram_ = "";
  }

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

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

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

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

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

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

            miniProgram_ = s;
            break;
          }
          case 48: {

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

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

  public static final int OPENID_FIELD_NUMBER = 1;
  private volatile java.lang.Object openid_;
  /**
   * <pre>
   * 接受模板消息的用户openId
   * </pre>
   *
   * <code>string openid = 1;</code>
   * @return The openid.
   */
  @java.lang.Override
  public java.lang.String getOpenid() {
    java.lang.Object ref = openid_;
    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();
      openid_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * 接受模板消息的用户openId
   * </pre>
   *
   * <code>string openid = 1;</code>
   * @return The bytes for openid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getOpenidBytes() {
    java.lang.Object ref = openid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      openid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int TEMPLATEID_FIELD_NUMBER = 2;
  private volatile java.lang.Object templateid_;
  /**
   * <code>string templateid = 2;</code>
   * @return The templateid.
   */
  @java.lang.Override
  public java.lang.String getTemplateid() {
    java.lang.Object ref = templateid_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      templateid_ = s;
      return s;
    }
  }
  /**
   * <code>string templateid = 2;</code>
   * @return The bytes for templateid.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getTemplateidBytes() {
    java.lang.Object ref = templateid_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      templateid_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int URL_FIELD_NUMBER = 3;
  private volatile java.lang.Object url_;
  /**
   * <code>string url = 3;</code>
   * @return The url.
   */
  @java.lang.Override
  public java.lang.String getUrl() {
    java.lang.Object ref = url_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      url_ = s;
      return s;
    }
  }
  /**
   * <code>string url = 3;</code>
   * @return The bytes for url.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getUrlBytes() {
    java.lang.Object ref = url_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      url_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DATA_FIELD_NUMBER = 4;
  private volatile java.lang.Object data_;
  /**
   * <code>string data = 4;</code>
   * @return The data.
   */
  @java.lang.Override
  public java.lang.String getData() {
    java.lang.Object ref = data_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      data_ = s;
      return s;
    }
  }
  /**
   * <code>string data = 4;</code>
   * @return The bytes for data.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDataBytes() {
    java.lang.Object ref = data_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      data_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int MINIPROGRAM_FIELD_NUMBER = 5;
  private volatile java.lang.Object miniProgram_;
  /**
   * <code>string miniProgram = 5;</code>
   * @return The miniProgram.
   */
  @java.lang.Override
  public java.lang.String getMiniProgram() {
    java.lang.Object ref = miniProgram_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      miniProgram_ = s;
      return s;
    }
  }
  /**
   * <code>string miniProgram = 5;</code>
   * @return The bytes for miniProgram.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getMiniProgramBytes() {
    java.lang.Object ref = miniProgram_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      miniProgram_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

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

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(openid_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, openid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateid_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, templateid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, url_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, data_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(miniProgram_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, miniProgram_);
    }
    if (terminal_ != 0) {
      output.writeInt32(6, terminal_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(openid_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, openid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(templateid_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, templateid_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(url_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, url_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(data_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, data_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(miniProgram_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, miniProgram_);
    }
    if (terminal_ != 0) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt32Size(6, terminal_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

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

    if (!getOpenid()
        .equals(other.getOpenid())) return false;
    if (!getTemplateid()
        .equals(other.getTemplateid())) return false;
    if (!getUrl()
        .equals(other.getUrl())) return false;
    if (!getData()
        .equals(other.getData())) return false;
    if (!getMiniProgram()
        .equals(other.getMiniProgram())) return false;
    if (getTerminal()
        != other.getTerminal()) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + OPENID_FIELD_NUMBER;
    hash = (53 * hash) + getOpenid().hashCode();
    hash = (37 * hash) + TEMPLATEID_FIELD_NUMBER;
    hash = (53 * hash) + getTemplateid().hashCode();
    hash = (37 * hash) + URL_FIELD_NUMBER;
    hash = (53 * hash) + getUrl().hashCode();
    hash = (37 * hash) + DATA_FIELD_NUMBER;
    hash = (53 * hash) + getData().hashCode();
    hash = (37 * hash) + MINIPROGRAM_FIELD_NUMBER;
    hash = (53 * hash) + getMiniProgram().hashCode();
    hash = (37 * hash) + TERMINAL_FIELD_NUMBER;
    hash = (53 * hash) + getTerminal();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

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

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   *发送公众号模板消息请求
   * </pre>
   *
   * Protobuf type {@code com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest)
      com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.ywt.gapi.base.wechat.WechatProto.internal_static_com_ywt_gapi_base_wechat_SendOfficialTemplateMsgByTerminalRequest_descriptor;
    }

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

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

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

      templateid_ = "";

      url_ = "";

      data_ = "";

      miniProgram_ = "";

      terminal_ = 0;

      return this;
    }

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

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

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

    @java.lang.Override
    public com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest buildPartial() {
      com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest result = new com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest(this);
      result.openid_ = openid_;
      result.templateid_ = templateid_;
      result.url_ = url_;
      result.data_ = data_;
      result.miniProgram_ = miniProgram_;
      result.terminal_ = terminal_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest other) {
      if (other == com.ywt.gapi.base.wechat.SendOfficialTemplateMsgByTerminalRequest.getDefaultInstance()) return this;
      if (!other.getOpenid().isEmpty()) {
        openid_ = other.openid_;
        onChanged();
      }
      if (!other.getTemplateid().isEmpty()) {
        templateid_ = other.templateid_;
        onChanged();
      }
      if (!other.getUrl().isEmpty()) {
        url_ = other.url_;
        onChanged();
      }
      if (!other.getData().isEmpty()) {
        data_ = other.data_;
        onChanged();
      }
      if (!other.getMiniProgram().isEmpty()) {
        miniProgram_ = other.miniProgram_;
        onChanged();
      }
      if (other.getTerminal() != 0) {
        setTerminal(other.getTerminal());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

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

    private java.lang.Object openid_ = "";
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string openid = 1;</code>
     * @return The openid.
     */
    public java.lang.String getOpenid() {
      java.lang.Object ref = openid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        openid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string openid = 1;</code>
     * @return The bytes for openid.
     */
    public com.google.protobuf.ByteString
        getOpenidBytes() {
      java.lang.Object ref = openid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        openid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string openid = 1;</code>
     * @param value The openid to set.
     * @return This builder for chaining.
     */
    public Builder setOpenid(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      openid_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string openid = 1;</code>
     * @return This builder for chaining.
     */
    public Builder clearOpenid() {
      
      openid_ = getDefaultInstance().getOpenid();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * 接受模板消息的用户openId
     * </pre>
     *
     * <code>string openid = 1;</code>
     * @param value The bytes for openid to set.
     * @return This builder for chaining.
     */
    public Builder setOpenidBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      openid_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object templateid_ = "";
    /**
     * <code>string templateid = 2;</code>
     * @return The templateid.
     */
    public java.lang.String getTemplateid() {
      java.lang.Object ref = templateid_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        templateid_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string templateid = 2;</code>
     * @return The bytes for templateid.
     */
    public com.google.protobuf.ByteString
        getTemplateidBytes() {
      java.lang.Object ref = templateid_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        templateid_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string templateid = 2;</code>
     * @param value The templateid to set.
     * @return This builder for chaining.
     */
    public Builder setTemplateid(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      templateid_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string templateid = 2;</code>
     * @return This builder for chaining.
     */
    public Builder clearTemplateid() {
      
      templateid_ = getDefaultInstance().getTemplateid();
      onChanged();
      return this;
    }
    /**
     * <code>string templateid = 2;</code>
     * @param value The bytes for templateid to set.
     * @return This builder for chaining.
     */
    public Builder setTemplateidBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      templateid_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object url_ = "";
    /**
     * <code>string url = 3;</code>
     * @return The url.
     */
    public java.lang.String getUrl() {
      java.lang.Object ref = url_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        url_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string url = 3;</code>
     * @return The bytes for url.
     */
    public com.google.protobuf.ByteString
        getUrlBytes() {
      java.lang.Object ref = url_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        url_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string url = 3;</code>
     * @param value The url to set.
     * @return This builder for chaining.
     */
    public Builder setUrl(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      url_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string url = 3;</code>
     * @return This builder for chaining.
     */
    public Builder clearUrl() {
      
      url_ = getDefaultInstance().getUrl();
      onChanged();
      return this;
    }
    /**
     * <code>string url = 3;</code>
     * @param value The bytes for url to set.
     * @return This builder for chaining.
     */
    public Builder setUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      url_ = value;
      onChanged();
      return this;
    }

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

    private java.lang.Object miniProgram_ = "";
    /**
     * <code>string miniProgram = 5;</code>
     * @return The miniProgram.
     */
    public java.lang.String getMiniProgram() {
      java.lang.Object ref = miniProgram_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        miniProgram_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <code>string miniProgram = 5;</code>
     * @return The bytes for miniProgram.
     */
    public com.google.protobuf.ByteString
        getMiniProgramBytes() {
      java.lang.Object ref = miniProgram_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        miniProgram_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <code>string miniProgram = 5;</code>
     * @param value The miniProgram to set.
     * @return This builder for chaining.
     */
    public Builder setMiniProgram(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      miniProgram_ = value;
      onChanged();
      return this;
    }
    /**
     * <code>string miniProgram = 5;</code>
     * @return This builder for chaining.
     */
    public Builder clearMiniProgram() {
      
      miniProgram_ = getDefaultInstance().getMiniProgram();
      onChanged();
      return this;
    }
    /**
     * <code>string miniProgram = 5;</code>
     * @param value The bytes for miniProgram to set.
     * @return This builder for chaining.
     */
    public Builder setMiniProgramBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      miniProgram_ = value;
      onChanged();
      return this;
    }

    private int terminal_ ;
    /**
     * <code>int32 terminal = 6;</code>
     * @return The terminal.
     */
    @java.lang.Override
    public int getTerminal() {
      return terminal_;
    }
    /**
     * <code>int32 terminal = 6;</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 = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearTerminal() {
      
      terminal_ = 0;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


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

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

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

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

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

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

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

}

