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

package com.ywt.gapi.system;

/**
 * <pre>
 * 对应 rpc 项目的 SystemServiceImpl 类
 * </pre>
 *
 * Protobuf service {@code com.ywt.gapi.system.SystemService}
 */
public  abstract class SystemService
    implements com.google.protobuf.Service {
  protected SystemService() {}

  public interface Interface {
    /**
     * <pre>
     *获取医院列表
     * </pre>
     *
     * <code>rpc getHospitalList(.com.ywt.gapi.system.HospitalListRequest) returns (.com.ywt.gapi.system.HospitalListResponse);</code>
     */
    public abstract void getHospitalList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.HospitalListRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.system.HospitalListResponse> done);

    /**
     * <pre>
     *获取地区
     * </pre>
     *
     * <code>rpc getAppAreaList(.com.ywt.gapi.system.AreaListRequest) returns (.com.ywt.gapi.system.AreaListResponse);</code>
     */
    public abstract void getAppAreaList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.AreaListRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.system.AreaListResponse> done);

  }

  public static com.google.protobuf.Service newReflectiveService(
      final Interface impl) {
    return new SystemService() {
      @java.lang.Override
      public  void getHospitalList(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.system.HospitalListRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.system.HospitalListResponse> done) {
        impl.getHospitalList(controller, request, done);
      }

      @java.lang.Override
      public  void getAppAreaList(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.system.AreaListRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.system.AreaListResponse> done) {
        impl.getAppAreaList(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.getHospitalList(controller, (com.ywt.gapi.system.HospitalListRequest)request);
          case 1:
            return impl.getAppAreaList(controller, (com.ywt.gapi.system.AreaListRequest)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.system.HospitalListRequest.getDefaultInstance();
          case 1:
            return com.ywt.gapi.system.AreaListRequest.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.system.HospitalListResponse.getDefaultInstance();
          case 1:
            return com.ywt.gapi.system.AreaListResponse.getDefaultInstance();
          default:
            throw new java.lang.AssertionError("Can't get here.");
        }
      }

    };
  }

  /**
   * <pre>
   *获取医院列表
   * </pre>
   *
   * <code>rpc getHospitalList(.com.ywt.gapi.system.HospitalListRequest) returns (.com.ywt.gapi.system.HospitalListResponse);</code>
   */
  public abstract void getHospitalList(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.system.HospitalListRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.system.HospitalListResponse> done);

  /**
   * <pre>
   *获取地区
   * </pre>
   *
   * <code>rpc getAppAreaList(.com.ywt.gapi.system.AreaListRequest) returns (.com.ywt.gapi.system.AreaListResponse);</code>
   */
  public abstract void getAppAreaList(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.system.AreaListRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.system.AreaListResponse> done);

  public static final
      com.google.protobuf.Descriptors.ServiceDescriptor
      getDescriptor() {
    return com.ywt.gapi.system.System.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.getHospitalList(controller, (com.ywt.gapi.system.HospitalListRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.system.HospitalListResponse>specializeCallback(
            done));
        return;
      case 1:
        this.getAppAreaList(controller, (com.ywt.gapi.system.AreaListRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.system.AreaListResponse>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.system.HospitalListRequest.getDefaultInstance();
      case 1:
        return com.ywt.gapi.system.AreaListRequest.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.system.HospitalListResponse.getDefaultInstance();
      case 1:
        return com.ywt.gapi.system.AreaListResponse.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.system.SystemService 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 getHospitalList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.HospitalListRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.system.HospitalListResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        com.ywt.gapi.system.HospitalListResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.system.HospitalListResponse.class,
          com.ywt.gapi.system.HospitalListResponse.getDefaultInstance()));
    }

    public  void getAppAreaList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.AreaListRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.system.AreaListResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(1),
        controller,
        request,
        com.ywt.gapi.system.AreaListResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.system.AreaListResponse.class,
          com.ywt.gapi.system.AreaListResponse.getDefaultInstance()));
    }
  }

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

  public interface BlockingInterface {
    public com.ywt.gapi.system.HospitalListResponse getHospitalList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.HospitalListRequest request)
        throws com.google.protobuf.ServiceException;

    public com.ywt.gapi.system.AreaListResponse getAppAreaList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.AreaListRequest 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.system.HospitalListResponse getHospitalList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.HospitalListRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.system.HospitalListResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        com.ywt.gapi.system.HospitalListResponse.getDefaultInstance());
    }


    public com.ywt.gapi.system.AreaListResponse getAppAreaList(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.system.AreaListRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.system.AreaListResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(1),
        controller,
        request,
        com.ywt.gapi.system.AreaListResponse.getDefaultInstance());
    }

  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.system.SystemService)
}

