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

package com.ywt.gapi.message;

/**
 * <pre>
 *消息中心服务      // 对应 rpc 项目的 MessageServiceImpl 类
 * </pre>
 *
 * Protobuf service {@code com.ywt.gapi.message.MessageService}
 */
public  abstract class MessageService
    implements com.google.protobuf.Service {
  protected MessageService() {}

  public interface Interface {
    /**
     * <pre>
     *发送短信验证码
     * </pre>
     *
     * <code>rpc sendSmsCode(.com.ywt.gapi.message.SendSmsCodeRequest) returns (.com.ywt.gapi.message.SendSmsCodeResponse);</code>
     */
    public abstract void sendSmsCode(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.SendSmsCodeRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.message.SendSmsCodeResponse> done);

    /**
     * <pre>
     *通知用户收到处方单
     * </pre>
     *
     * <code>rpc notifyAfterCreatePrescription(.com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest) returns (.com.ywt.gapi.Result);</code>
     */
    public abstract void notifyAfterCreatePrescription(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.Result> done);

  }

  public static com.google.protobuf.Service newReflectiveService(
      final Interface impl) {
    return new MessageService() {
      @java.lang.Override
      public  void sendSmsCode(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.message.SendSmsCodeRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.message.SendSmsCodeResponse> done) {
        impl.sendSmsCode(controller, request, done);
      }

      @java.lang.Override
      public  void notifyAfterCreatePrescription(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.Result> done) {
        impl.notifyAfterCreatePrescription(controller, request, done);
      }

    };
  }

  public static com.google.protobuf.BlockingService
      newReflectiveBlockingService(final BlockingInterface impl) {
    return new com.google.protobuf.BlockingService() {
      public final com.google.protobuf.Descriptors.ServiceDescriptor
          getDescriptorForType() {
        return getDescriptor();
      }

      public final com.google.protobuf.Message callBlockingMethod(
          com.google.protobuf.Descriptors.MethodDescriptor method,
          com.google.protobuf.RpcController controller,
          com.google.protobuf.Message request)
          throws com.google.protobuf.ServiceException {
        if (method.getService() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "Service.callBlockingMethod() given method descriptor for " +
            "wrong service type.");
        }
        switch(method.getIndex()) {
          case 0:
            return impl.sendSmsCode(controller, (com.ywt.gapi.message.SendSmsCodeRequest)request);
          case 1:
            return impl.notifyAfterCreatePrescription(controller, (com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest)request);
          default:
            throw new java.lang.AssertionError("Can't get here.");
        }
      }

      public final com.google.protobuf.Message
          getRequestPrototype(
          com.google.protobuf.Descriptors.MethodDescriptor method) {
        if (method.getService() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "Service.getRequestPrototype() given method " +
            "descriptor for wrong service type.");
        }
        switch(method.getIndex()) {
          case 0:
            return com.ywt.gapi.message.SendSmsCodeRequest.getDefaultInstance();
          case 1:
            return com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest.getDefaultInstance();
          default:
            throw new java.lang.AssertionError("Can't get here.");
        }
      }

      public final com.google.protobuf.Message
          getResponsePrototype(
          com.google.protobuf.Descriptors.MethodDescriptor method) {
        if (method.getService() != getDescriptor()) {
          throw new java.lang.IllegalArgumentException(
            "Service.getResponsePrototype() given method " +
            "descriptor for wrong service type.");
        }
        switch(method.getIndex()) {
          case 0:
            return com.ywt.gapi.message.SendSmsCodeResponse.getDefaultInstance();
          case 1:
            return com.ywt.gapi.Result.getDefaultInstance();
          default:
            throw new java.lang.AssertionError("Can't get here.");
        }
      }

    };
  }

  /**
   * <pre>
   *发送短信验证码
   * </pre>
   *
   * <code>rpc sendSmsCode(.com.ywt.gapi.message.SendSmsCodeRequest) returns (.com.ywt.gapi.message.SendSmsCodeResponse);</code>
   */
  public abstract void sendSmsCode(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.message.SendSmsCodeRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.message.SendSmsCodeResponse> done);

  /**
   * <pre>
   *通知用户收到处方单
   * </pre>
   *
   * <code>rpc notifyAfterCreatePrescription(.com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest) returns (.com.ywt.gapi.Result);</code>
   */
  public abstract void notifyAfterCreatePrescription(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.Result> done);

  public static final
      com.google.protobuf.Descriptors.ServiceDescriptor
      getDescriptor() {
    return com.ywt.gapi.message.Message.getDescriptor().getServices().get(0);
  }
  public final com.google.protobuf.Descriptors.ServiceDescriptor
      getDescriptorForType() {
    return getDescriptor();
  }

  public final void callMethod(
      com.google.protobuf.Descriptors.MethodDescriptor method,
      com.google.protobuf.RpcController controller,
      com.google.protobuf.Message request,
      com.google.protobuf.RpcCallback<
        com.google.protobuf.Message> done) {
    if (method.getService() != getDescriptor()) {
      throw new java.lang.IllegalArgumentException(
        "Service.callMethod() given method descriptor for wrong " +
        "service type.");
    }
    switch(method.getIndex()) {
      case 0:
        this.sendSmsCode(controller, (com.ywt.gapi.message.SendSmsCodeRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.message.SendSmsCodeResponse>specializeCallback(
            done));
        return;
      case 1:
        this.notifyAfterCreatePrescription(controller, (com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.Result>specializeCallback(
            done));
        return;
      default:
        throw new java.lang.AssertionError("Can't get here.");
    }
  }

  public final com.google.protobuf.Message
      getRequestPrototype(
      com.google.protobuf.Descriptors.MethodDescriptor method) {
    if (method.getService() != getDescriptor()) {
      throw new java.lang.IllegalArgumentException(
        "Service.getRequestPrototype() given method " +
        "descriptor for wrong service type.");
    }
    switch(method.getIndex()) {
      case 0:
        return com.ywt.gapi.message.SendSmsCodeRequest.getDefaultInstance();
      case 1:
        return com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest.getDefaultInstance();
      default:
        throw new java.lang.AssertionError("Can't get here.");
    }
  }

  public final com.google.protobuf.Message
      getResponsePrototype(
      com.google.protobuf.Descriptors.MethodDescriptor method) {
    if (method.getService() != getDescriptor()) {
      throw new java.lang.IllegalArgumentException(
        "Service.getResponsePrototype() given method " +
        "descriptor for wrong service type.");
    }
    switch(method.getIndex()) {
      case 0:
        return com.ywt.gapi.message.SendSmsCodeResponse.getDefaultInstance();
      case 1:
        return com.ywt.gapi.Result.getDefaultInstance();
      default:
        throw new java.lang.AssertionError("Can't get here.");
    }
  }

  public static Stub newStub(
      com.google.protobuf.RpcChannel channel) {
    return new Stub(channel);
  }

  public static final class Stub extends com.ywt.gapi.message.MessageService implements Interface {
    private Stub(com.google.protobuf.RpcChannel channel) {
      this.channel = channel;
    }

    private final com.google.protobuf.RpcChannel channel;

    public com.google.protobuf.RpcChannel getChannel() {
      return channel;
    }

    public  void sendSmsCode(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.SendSmsCodeRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.message.SendSmsCodeResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        com.ywt.gapi.message.SendSmsCodeResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.message.SendSmsCodeResponse.class,
          com.ywt.gapi.message.SendSmsCodeResponse.getDefaultInstance()));
    }

    public  void notifyAfterCreatePrescription(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.Result> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(1),
        controller,
        request,
        com.ywt.gapi.Result.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.Result.class,
          com.ywt.gapi.Result.getDefaultInstance()));
    }
  }

  public static BlockingInterface newBlockingStub(
      com.google.protobuf.BlockingRpcChannel channel) {
    return new BlockingStub(channel);
  }

  public interface BlockingInterface {
    public com.ywt.gapi.message.SendSmsCodeResponse sendSmsCode(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.SendSmsCodeRequest request)
        throws com.google.protobuf.ServiceException;

    public com.ywt.gapi.Result notifyAfterCreatePrescription(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest request)
        throws com.google.protobuf.ServiceException;
  }

  private static final class BlockingStub implements BlockingInterface {
    private BlockingStub(com.google.protobuf.BlockingRpcChannel channel) {
      this.channel = channel;
    }

    private final com.google.protobuf.BlockingRpcChannel channel;

    public com.ywt.gapi.message.SendSmsCodeResponse sendSmsCode(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.SendSmsCodeRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.message.SendSmsCodeResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        com.ywt.gapi.message.SendSmsCodeResponse.getDefaultInstance());
    }


    public com.ywt.gapi.Result notifyAfterCreatePrescription(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.message.NotifyAfterCreatePrescriptionRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.Result) channel.callBlockingMethod(
        getDescriptor().getMethods().get(1),
        controller,
        request,
        com.ywt.gapi.Result.getDefaultInstance());
    }

  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.message.MessageService)
}

