package com.ywt.gapi.message;

import static io.grpc.stub.ClientCalls.asyncUnaryCall;
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
import static io.grpc.stub.ClientCalls.futureUnaryCall;
import static io.grpc.MethodDescriptor.generateFullMethodName;
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;

/**
 * <pre>
 * 微信消息相关服务     // 对应 MsgService 项目的 WeChatMsgProvider 类
 * </pre>
 */
@javax.annotation.Generated(
    value = "by gRPC proto compiler (version 1.7.2-SNAPSHOT)",
    comments = "Source: message.proto")
public final class WeChatMessageServiceGrpc {

  private WeChatMessageServiceGrpc() {}

  public static final String SERVICE_NAME = "com.ywt.gapi.message.WeChatMessageService";

  // Static method descriptors that strictly reflect the proto.
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendTemplateMessageRequest,
      com.ywt.gapi.message.SendTemplateMessageResponse> METHOD_SEND_TEMPLATE_MESSAGE =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendTemplateMessageRequest, com.ywt.gapi.message.SendTemplateMessageResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendTemplateMessage"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendTemplateMessageRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendTemplateMessageResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendTemplateMessage"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendCustomMessageRequest,
      com.ywt.gapi.message.SendCustomMessageResponse> METHOD_SEND_CUSTOM_MESSAGE =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendCustomMessageRequest, com.ywt.gapi.message.SendCustomMessageResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendCustomMessage"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendCustomMessageRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendCustomMessageResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendCustomMessage"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendTemplateMessageAsyncRequest,
      com.ywt.gapi.message.SendTemplateMessageAsyncResponse> METHOD_SEND_TEMPLATE_MESSAGE_ASYNC =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendTemplateMessageAsyncRequest, com.ywt.gapi.message.SendTemplateMessageAsyncResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendTemplateMessageAsync"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendTemplateMessageAsyncRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendTemplateMessageAsyncResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendTemplateMessageAsync"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendMPTemplateMessageRequest,
      com.ywt.gapi.message.SendMPTemplateMessageResponse> METHOD_SEND_MPTEMPLATE_MESSAGE =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendMPTemplateMessageRequest, com.ywt.gapi.message.SendMPTemplateMessageResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendMPTemplateMessage"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPTemplateMessageRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPTemplateMessageResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendMPTemplateMessage"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest,
      com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse> METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest, com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendMPTemplateMessageByLogId"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendMPTemplateMessageByLogId"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendMPSubscribeMessageRequest,
      com.ywt.gapi.message.SendMPSubscribeMessageResponse> METHOD_SEND_MPSUBSCRIBE_MESSAGE =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendMPSubscribeMessageRequest, com.ywt.gapi.message.SendMPSubscribeMessageResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendMPSubscribeMessage"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPSubscribeMessageRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPSubscribeMessageResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendMPSubscribeMessage"))
          .build();
  @io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
  public static final io.grpc.MethodDescriptor<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest,
      com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse> METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID =
      io.grpc.MethodDescriptor.<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest, com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse>newBuilder()
          .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
          .setFullMethodName(generateFullMethodName(
              "com.ywt.gapi.message.WeChatMessageService", "sendMPSubscribeMessageByLogId"))
          .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest.getDefaultInstance()))
          .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
              com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse.getDefaultInstance()))
          .setSchemaDescriptor(new WeChatMessageServiceMethodDescriptorSupplier("sendMPSubscribeMessageByLogId"))
          .build();

  /**
   * Creates a new async stub that supports all call types for the service
   */
  public static WeChatMessageServiceStub newStub(io.grpc.Channel channel) {
    return new WeChatMessageServiceStub(channel);
  }

  /**
   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
   */
  public static WeChatMessageServiceBlockingStub newBlockingStub(
      io.grpc.Channel channel) {
    return new WeChatMessageServiceBlockingStub(channel);
  }

  /**
   * Creates a new ListenableFuture-style stub that supports unary calls on the service
   */
  public static WeChatMessageServiceFutureStub newFutureStub(
      io.grpc.Channel channel) {
    return new WeChatMessageServiceFutureStub(channel);
  }

  /**
   * <pre>
   * 微信消息相关服务     // 对应 MsgService 项目的 WeChatMsgProvider 类
   * </pre>
   */
  public static abstract class WeChatMessageServiceImplBase implements io.grpc.BindableService {

    /**
     * <pre>
     * 发送微信模板消息
     *Edit on 2018-10-22 17:15:37 by Walker
     *修改内容:MessageService中模板消息记录入库和发送两个方法拆分，这个方法只做消息记录，真正的发送方法是sendTemplateMessageAsync
     * </pre>
     */
    public void sendTemplateMessage(com.ywt.gapi.message.SendTemplateMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendTemplateMessageResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_TEMPLATE_MESSAGE, responseObserver);
    }

    /**
     * <pre>
     * 统一发送客服消息
     * </pre>
     */
    public void sendCustomMessage(com.ywt.gapi.message.SendCustomMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendCustomMessageResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_CUSTOM_MESSAGE, responseObserver);
    }

    /**
     * <pre>
     *异步方法发送模板消息。这个是真正发送模板消息的方法。
     * </pre>
     */
    public void sendTemplateMessageAsync(com.ywt.gapi.message.SendTemplateMessageAsyncRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendTemplateMessageAsyncResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_TEMPLATE_MESSAGE_ASYNC, responseObserver);
    }

    /**
     * <pre>
     *发送小程序模板消息（旧）
     * </pre>
     */
    public void sendMPTemplateMessage(com.ywt.gapi.message.SendMPTemplateMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_MPTEMPLATE_MESSAGE, responseObserver);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序模板消息（旧）
     * </pre>
     */
    public void sendMPTemplateMessageByLogId(com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID, responseObserver);
    }

    /**
     * <pre>
     *发送小程序订阅消息（新）
     * </pre>
     */
    public void sendMPSubscribeMessage(com.ywt.gapi.message.SendMPSubscribeMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_MPSUBSCRIBE_MESSAGE, responseObserver);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序订阅消息（新）
     * </pre>
     */
    public void sendMPSubscribeMessageByLogId(com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse> responseObserver) {
      asyncUnimplementedUnaryCall(METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID, responseObserver);
    }

    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
          .addMethod(
            METHOD_SEND_TEMPLATE_MESSAGE,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendTemplateMessageRequest,
                com.ywt.gapi.message.SendTemplateMessageResponse>(
                  this, METHODID_SEND_TEMPLATE_MESSAGE)))
          .addMethod(
            METHOD_SEND_CUSTOM_MESSAGE,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendCustomMessageRequest,
                com.ywt.gapi.message.SendCustomMessageResponse>(
                  this, METHODID_SEND_CUSTOM_MESSAGE)))
          .addMethod(
            METHOD_SEND_TEMPLATE_MESSAGE_ASYNC,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendTemplateMessageAsyncRequest,
                com.ywt.gapi.message.SendTemplateMessageAsyncResponse>(
                  this, METHODID_SEND_TEMPLATE_MESSAGE_ASYNC)))
          .addMethod(
            METHOD_SEND_MPTEMPLATE_MESSAGE,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendMPTemplateMessageRequest,
                com.ywt.gapi.message.SendMPTemplateMessageResponse>(
                  this, METHODID_SEND_MPTEMPLATE_MESSAGE)))
          .addMethod(
            METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest,
                com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse>(
                  this, METHODID_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID)))
          .addMethod(
            METHOD_SEND_MPSUBSCRIBE_MESSAGE,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendMPSubscribeMessageRequest,
                com.ywt.gapi.message.SendMPSubscribeMessageResponse>(
                  this, METHODID_SEND_MPSUBSCRIBE_MESSAGE)))
          .addMethod(
            METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID,
            asyncUnaryCall(
              new MethodHandlers<
                com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest,
                com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse>(
                  this, METHODID_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID)))
          .build();
    }
  }

  /**
   * <pre>
   * 微信消息相关服务     // 对应 MsgService 项目的 WeChatMsgProvider 类
   * </pre>
   */
  public static final class WeChatMessageServiceStub extends io.grpc.stub.AbstractStub<WeChatMessageServiceStub> {
    private WeChatMessageServiceStub(io.grpc.Channel channel) {
      super(channel);
    }

    private WeChatMessageServiceStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WeChatMessageServiceStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new WeChatMessageServiceStub(channel, callOptions);
    }

    /**
     * <pre>
     * 发送微信模板消息
     *Edit on 2018-10-22 17:15:37 by Walker
     *修改内容:MessageService中模板消息记录入库和发送两个方法拆分，这个方法只做消息记录，真正的发送方法是sendTemplateMessageAsync
     * </pre>
     */
    public void sendTemplateMessage(com.ywt.gapi.message.SendTemplateMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendTemplateMessageResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_TEMPLATE_MESSAGE, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     * 统一发送客服消息
     * </pre>
     */
    public void sendCustomMessage(com.ywt.gapi.message.SendCustomMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendCustomMessageResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_CUSTOM_MESSAGE, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     *异步方法发送模板消息。这个是真正发送模板消息的方法。
     * </pre>
     */
    public void sendTemplateMessageAsync(com.ywt.gapi.message.SendTemplateMessageAsyncRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendTemplateMessageAsyncResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_TEMPLATE_MESSAGE_ASYNC, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     *发送小程序模板消息（旧）
     * </pre>
     */
    public void sendMPTemplateMessage(com.ywt.gapi.message.SendMPTemplateMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_MPTEMPLATE_MESSAGE, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序模板消息（旧）
     * </pre>
     */
    public void sendMPTemplateMessageByLogId(com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     *发送小程序订阅消息（新）
     * </pre>
     */
    public void sendMPSubscribeMessage(com.ywt.gapi.message.SendMPSubscribeMessageRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_MPSUBSCRIBE_MESSAGE, getCallOptions()), request, responseObserver);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序订阅消息（新）
     * </pre>
     */
    public void sendMPSubscribeMessageByLogId(com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request,
        io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse> responseObserver) {
      asyncUnaryCall(
          getChannel().newCall(METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID, getCallOptions()), request, responseObserver);
    }
  }

  /**
   * <pre>
   * 微信消息相关服务     // 对应 MsgService 项目的 WeChatMsgProvider 类
   * </pre>
   */
  public static final class WeChatMessageServiceBlockingStub extends io.grpc.stub.AbstractStub<WeChatMessageServiceBlockingStub> {
    private WeChatMessageServiceBlockingStub(io.grpc.Channel channel) {
      super(channel);
    }

    private WeChatMessageServiceBlockingStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WeChatMessageServiceBlockingStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new WeChatMessageServiceBlockingStub(channel, callOptions);
    }

    /**
     * <pre>
     * 发送微信模板消息
     *Edit on 2018-10-22 17:15:37 by Walker
     *修改内容:MessageService中模板消息记录入库和发送两个方法拆分，这个方法只做消息记录，真正的发送方法是sendTemplateMessageAsync
     * </pre>
     */
    public com.ywt.gapi.message.SendTemplateMessageResponse sendTemplateMessage(com.ywt.gapi.message.SendTemplateMessageRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_TEMPLATE_MESSAGE, getCallOptions(), request);
    }

    /**
     * <pre>
     * 统一发送客服消息
     * </pre>
     */
    public com.ywt.gapi.message.SendCustomMessageResponse sendCustomMessage(com.ywt.gapi.message.SendCustomMessageRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_CUSTOM_MESSAGE, getCallOptions(), request);
    }

    /**
     * <pre>
     *异步方法发送模板消息。这个是真正发送模板消息的方法。
     * </pre>
     */
    public com.ywt.gapi.message.SendTemplateMessageAsyncResponse sendTemplateMessageAsync(com.ywt.gapi.message.SendTemplateMessageAsyncRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_TEMPLATE_MESSAGE_ASYNC, getCallOptions(), request);
    }

    /**
     * <pre>
     *发送小程序模板消息（旧）
     * </pre>
     */
    public com.ywt.gapi.message.SendMPTemplateMessageResponse sendMPTemplateMessage(com.ywt.gapi.message.SendMPTemplateMessageRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_MPTEMPLATE_MESSAGE, getCallOptions(), request);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序模板消息（旧）
     * </pre>
     */
    public com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse sendMPTemplateMessageByLogId(com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID, getCallOptions(), request);
    }

    /**
     * <pre>
     *发送小程序订阅消息（新）
     * </pre>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageResponse sendMPSubscribeMessage(com.ywt.gapi.message.SendMPSubscribeMessageRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_MPSUBSCRIBE_MESSAGE, getCallOptions(), request);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序订阅消息（新）
     * </pre>
     */
    public com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse sendMPSubscribeMessageByLogId(com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request) {
      return blockingUnaryCall(
          getChannel(), METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID, getCallOptions(), request);
    }
  }

  /**
   * <pre>
   * 微信消息相关服务     // 对应 MsgService 项目的 WeChatMsgProvider 类
   * </pre>
   */
  public static final class WeChatMessageServiceFutureStub extends io.grpc.stub.AbstractStub<WeChatMessageServiceFutureStub> {
    private WeChatMessageServiceFutureStub(io.grpc.Channel channel) {
      super(channel);
    }

    private WeChatMessageServiceFutureStub(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      super(channel, callOptions);
    }

    @java.lang.Override
    protected WeChatMessageServiceFutureStub build(io.grpc.Channel channel,
        io.grpc.CallOptions callOptions) {
      return new WeChatMessageServiceFutureStub(channel, callOptions);
    }

    /**
     * <pre>
     * 发送微信模板消息
     *Edit on 2018-10-22 17:15:37 by Walker
     *修改内容:MessageService中模板消息记录入库和发送两个方法拆分，这个方法只做消息记录，真正的发送方法是sendTemplateMessageAsync
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendTemplateMessageResponse> sendTemplateMessage(
        com.ywt.gapi.message.SendTemplateMessageRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_TEMPLATE_MESSAGE, getCallOptions()), request);
    }

    /**
     * <pre>
     * 统一发送客服消息
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendCustomMessageResponse> sendCustomMessage(
        com.ywt.gapi.message.SendCustomMessageRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_CUSTOM_MESSAGE, getCallOptions()), request);
    }

    /**
     * <pre>
     *异步方法发送模板消息。这个是真正发送模板消息的方法。
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendTemplateMessageAsyncResponse> sendTemplateMessageAsync(
        com.ywt.gapi.message.SendTemplateMessageAsyncRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_TEMPLATE_MESSAGE_ASYNC, getCallOptions()), request);
    }

    /**
     * <pre>
     *发送小程序模板消息（旧）
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendMPTemplateMessageResponse> sendMPTemplateMessage(
        com.ywt.gapi.message.SendMPTemplateMessageRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_MPTEMPLATE_MESSAGE, getCallOptions()), request);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序模板消息（旧）
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse> sendMPTemplateMessageByLogId(
        com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID, getCallOptions()), request);
    }

    /**
     * <pre>
     *发送小程序订阅消息（新）
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendMPSubscribeMessageResponse> sendMPSubscribeMessage(
        com.ywt.gapi.message.SendMPSubscribeMessageRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_MPSUBSCRIBE_MESSAGE, getCallOptions()), request);
    }

    /**
     * <pre>
     *根据日志表ID发送小程序订阅消息（新）
     * </pre>
     */
    public com.google.common.util.concurrent.ListenableFuture<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse> sendMPSubscribeMessageByLogId(
        com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest request) {
      return futureUnaryCall(
          getChannel().newCall(METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID, getCallOptions()), request);
    }
  }

  private static final int METHODID_SEND_TEMPLATE_MESSAGE = 0;
  private static final int METHODID_SEND_CUSTOM_MESSAGE = 1;
  private static final int METHODID_SEND_TEMPLATE_MESSAGE_ASYNC = 2;
  private static final int METHODID_SEND_MPTEMPLATE_MESSAGE = 3;
  private static final int METHODID_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID = 4;
  private static final int METHODID_SEND_MPSUBSCRIBE_MESSAGE = 5;
  private static final int METHODID_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID = 6;

  private static final class MethodHandlers<Req, Resp> implements
      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
    private final WeChatMessageServiceImplBase serviceImpl;
    private final int methodId;

    MethodHandlers(WeChatMessageServiceImplBase serviceImpl, int methodId) {
      this.serviceImpl = serviceImpl;
      this.methodId = methodId;
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        case METHODID_SEND_TEMPLATE_MESSAGE:
          serviceImpl.sendTemplateMessage((com.ywt.gapi.message.SendTemplateMessageRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendTemplateMessageResponse>) responseObserver);
          break;
        case METHODID_SEND_CUSTOM_MESSAGE:
          serviceImpl.sendCustomMessage((com.ywt.gapi.message.SendCustomMessageRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendCustomMessageResponse>) responseObserver);
          break;
        case METHODID_SEND_TEMPLATE_MESSAGE_ASYNC:
          serviceImpl.sendTemplateMessageAsync((com.ywt.gapi.message.SendTemplateMessageAsyncRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendTemplateMessageAsyncResponse>) responseObserver);
          break;
        case METHODID_SEND_MPTEMPLATE_MESSAGE:
          serviceImpl.sendMPTemplateMessage((com.ywt.gapi.message.SendMPTemplateMessageRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageResponse>) responseObserver);
          break;
        case METHODID_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID:
          serviceImpl.sendMPTemplateMessageByLogId((com.ywt.gapi.message.SendMPTemplateMessageByLogIdRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPTemplateMessageByLogIdResponse>) responseObserver);
          break;
        case METHODID_SEND_MPSUBSCRIBE_MESSAGE:
          serviceImpl.sendMPSubscribeMessage((com.ywt.gapi.message.SendMPSubscribeMessageRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageResponse>) responseObserver);
          break;
        case METHODID_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID:
          serviceImpl.sendMPSubscribeMessageByLogId((com.ywt.gapi.message.SendMPSubscribeMessageByLogIdRequest) request,
              (io.grpc.stub.StreamObserver<com.ywt.gapi.message.SendMPSubscribeMessageByLogIdResponse>) responseObserver);
          break;
        default:
          throw new AssertionError();
      }
    }

    @java.lang.Override
    @java.lang.SuppressWarnings("unchecked")
    public io.grpc.stub.StreamObserver<Req> invoke(
        io.grpc.stub.StreamObserver<Resp> responseObserver) {
      switch (methodId) {
        default:
          throw new AssertionError();
      }
    }
  }

  private static abstract class WeChatMessageServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
    WeChatMessageServiceBaseDescriptorSupplier() {}

    @java.lang.Override
    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
      return com.ywt.gapi.message.Message.getDescriptor();
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
      return getFileDescriptor().findServiceByName("WeChatMessageService");
    }
  }

  private static final class WeChatMessageServiceFileDescriptorSupplier
      extends WeChatMessageServiceBaseDescriptorSupplier {
    WeChatMessageServiceFileDescriptorSupplier() {}
  }

  private static final class WeChatMessageServiceMethodDescriptorSupplier
      extends WeChatMessageServiceBaseDescriptorSupplier
      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
    private final String methodName;

    WeChatMessageServiceMethodDescriptorSupplier(String methodName) {
      this.methodName = methodName;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
      return getServiceDescriptor().findMethodByName(methodName);
    }
  }

  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;

  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
    io.grpc.ServiceDescriptor result = serviceDescriptor;
    if (result == null) {
      synchronized (WeChatMessageServiceGrpc.class) {
        result = serviceDescriptor;
        if (result == null) {
          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
              .setSchemaDescriptor(new WeChatMessageServiceFileDescriptorSupplier())
              .addMethod(METHOD_SEND_TEMPLATE_MESSAGE)
              .addMethod(METHOD_SEND_CUSTOM_MESSAGE)
              .addMethod(METHOD_SEND_TEMPLATE_MESSAGE_ASYNC)
              .addMethod(METHOD_SEND_MPTEMPLATE_MESSAGE)
              .addMethod(METHOD_SEND_MPTEMPLATE_MESSAGE_BY_LOG_ID)
              .addMethod(METHOD_SEND_MPSUBSCRIBE_MESSAGE)
              .addMethod(METHOD_SEND_MPSUBSCRIBE_MESSAGE_BY_LOG_ID)
              .build();
        }
      }
    }
    return result;
  }
}
