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

package com.ywt.gapi.base.file;

/**
 * <pre>
 * 对应 base-service 项目的 file.js 文件
 * </pre>
 *
 * Protobuf service {@code com.ywt.gapi.base.file.FileService}
 */
public  abstract class FileService
    implements com.google.protobuf.Service {
  protected FileService() {}

  public interface Interface {
    /**
     * <code>rpc uploadFile(.com.ywt.gapi.base.file.UploadFileRequest) returns (.com.ywt.gapi.base.file.UploadFileResponse);</code>
     */
    public abstract void uploadFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadFileRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadFileResponse> done);

    /**
     * <code>rpc uploadImage(.com.ywt.gapi.base.file.UploadImageRequest) returns (.com.ywt.gapi.base.file.UploadImageResponse);</code>
     */
    public abstract void uploadImage(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadImageRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadImageResponse> done);

    /**
     * <code>rpc readFile(.com.ywt.gapi.base.file.ReadFileRequest) returns (.com.ywt.gapi.base.file.ReadFileResponse);</code>
     */
    public abstract void readFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done);

    /**
     * <pre>
     *根据bucket读取文件
     * </pre>
     *
     * <code>rpc readFileFromBucket(.com.ywt.gapi.base.file.ReadFileFromBucketRequest) returns (.com.ywt.gapi.base.file.ReadFileResponse);</code>
     */
    public abstract void readFileFromBucket(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileFromBucketRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done);

  }

  public static com.google.protobuf.Service newReflectiveService(
      final Interface impl) {
    return new FileService() {
      @java.lang.Override
      public  void uploadFile(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.base.file.UploadFileRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadFileResponse> done) {
        impl.uploadFile(controller, request, done);
      }

      @java.lang.Override
      public  void uploadImage(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.base.file.UploadImageRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadImageResponse> done) {
        impl.uploadImage(controller, request, done);
      }

      @java.lang.Override
      public  void readFile(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.base.file.ReadFileRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done) {
        impl.readFile(controller, request, done);
      }

      @java.lang.Override
      public  void readFileFromBucket(
          com.google.protobuf.RpcController controller,
          com.ywt.gapi.base.file.ReadFileFromBucketRequest request,
          com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done) {
        impl.readFileFromBucket(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.uploadFile(controller, (com.ywt.gapi.base.file.UploadFileRequest)request);
          case 1:
            return impl.uploadImage(controller, (com.ywt.gapi.base.file.UploadImageRequest)request);
          case 2:
            return impl.readFile(controller, (com.ywt.gapi.base.file.ReadFileRequest)request);
          case 3:
            return impl.readFileFromBucket(controller, (com.ywt.gapi.base.file.ReadFileFromBucketRequest)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.base.file.UploadFileRequest.getDefaultInstance();
          case 1:
            return com.ywt.gapi.base.file.UploadImageRequest.getDefaultInstance();
          case 2:
            return com.ywt.gapi.base.file.ReadFileRequest.getDefaultInstance();
          case 3:
            return com.ywt.gapi.base.file.ReadFileFromBucketRequest.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.base.file.UploadFileResponse.getDefaultInstance();
          case 1:
            return com.ywt.gapi.base.file.UploadImageResponse.getDefaultInstance();
          case 2:
            return com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance();
          case 3:
            return com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance();
          default:
            throw new java.lang.AssertionError("Can't get here.");
        }
      }

    };
  }

  /**
   * <code>rpc uploadFile(.com.ywt.gapi.base.file.UploadFileRequest) returns (.com.ywt.gapi.base.file.UploadFileResponse);</code>
   */
  public abstract void uploadFile(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.base.file.UploadFileRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadFileResponse> done);

  /**
   * <code>rpc uploadImage(.com.ywt.gapi.base.file.UploadImageRequest) returns (.com.ywt.gapi.base.file.UploadImageResponse);</code>
   */
  public abstract void uploadImage(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.base.file.UploadImageRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadImageResponse> done);

  /**
   * <code>rpc readFile(.com.ywt.gapi.base.file.ReadFileRequest) returns (.com.ywt.gapi.base.file.ReadFileResponse);</code>
   */
  public abstract void readFile(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.base.file.ReadFileRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done);

  /**
   * <pre>
   *根据bucket读取文件
   * </pre>
   *
   * <code>rpc readFileFromBucket(.com.ywt.gapi.base.file.ReadFileFromBucketRequest) returns (.com.ywt.gapi.base.file.ReadFileResponse);</code>
   */
  public abstract void readFileFromBucket(
      com.google.protobuf.RpcController controller,
      com.ywt.gapi.base.file.ReadFileFromBucketRequest request,
      com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done);

  public static final
      com.google.protobuf.Descriptors.ServiceDescriptor
      getDescriptor() {
    return com.ywt.gapi.base.file.File.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.uploadFile(controller, (com.ywt.gapi.base.file.UploadFileRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.base.file.UploadFileResponse>specializeCallback(
            done));
        return;
      case 1:
        this.uploadImage(controller, (com.ywt.gapi.base.file.UploadImageRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.base.file.UploadImageResponse>specializeCallback(
            done));
        return;
      case 2:
        this.readFile(controller, (com.ywt.gapi.base.file.ReadFileRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.base.file.ReadFileResponse>specializeCallback(
            done));
        return;
      case 3:
        this.readFileFromBucket(controller, (com.ywt.gapi.base.file.ReadFileFromBucketRequest)request,
          com.google.protobuf.RpcUtil.<com.ywt.gapi.base.file.ReadFileResponse>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.base.file.UploadFileRequest.getDefaultInstance();
      case 1:
        return com.ywt.gapi.base.file.UploadImageRequest.getDefaultInstance();
      case 2:
        return com.ywt.gapi.base.file.ReadFileRequest.getDefaultInstance();
      case 3:
        return com.ywt.gapi.base.file.ReadFileFromBucketRequest.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.base.file.UploadFileResponse.getDefaultInstance();
      case 1:
        return com.ywt.gapi.base.file.UploadImageResponse.getDefaultInstance();
      case 2:
        return com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance();
      case 3:
        return com.ywt.gapi.base.file.ReadFileResponse.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.base.file.FileService 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 uploadFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadFileRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadFileResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        com.ywt.gapi.base.file.UploadFileResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.base.file.UploadFileResponse.class,
          com.ywt.gapi.base.file.UploadFileResponse.getDefaultInstance()));
    }

    public  void uploadImage(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadImageRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.UploadImageResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(1),
        controller,
        request,
        com.ywt.gapi.base.file.UploadImageResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.base.file.UploadImageResponse.class,
          com.ywt.gapi.base.file.UploadImageResponse.getDefaultInstance()));
    }

    public  void readFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(2),
        controller,
        request,
        com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.base.file.ReadFileResponse.class,
          com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance()));
    }

    public  void readFileFromBucket(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileFromBucketRequest request,
        com.google.protobuf.RpcCallback<com.ywt.gapi.base.file.ReadFileResponse> done) {
      channel.callMethod(
        getDescriptor().getMethods().get(3),
        controller,
        request,
        com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance(),
        com.google.protobuf.RpcUtil.generalizeCallback(
          done,
          com.ywt.gapi.base.file.ReadFileResponse.class,
          com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance()));
    }
  }

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

  public interface BlockingInterface {
    public com.ywt.gapi.base.file.UploadFileResponse uploadFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadFileRequest request)
        throws com.google.protobuf.ServiceException;

    public com.ywt.gapi.base.file.UploadImageResponse uploadImage(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadImageRequest request)
        throws com.google.protobuf.ServiceException;

    public com.ywt.gapi.base.file.ReadFileResponse readFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileRequest request)
        throws com.google.protobuf.ServiceException;

    public com.ywt.gapi.base.file.ReadFileResponse readFileFromBucket(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileFromBucketRequest 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.base.file.UploadFileResponse uploadFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadFileRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.base.file.UploadFileResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(0),
        controller,
        request,
        com.ywt.gapi.base.file.UploadFileResponse.getDefaultInstance());
    }


    public com.ywt.gapi.base.file.UploadImageResponse uploadImage(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.UploadImageRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.base.file.UploadImageResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(1),
        controller,
        request,
        com.ywt.gapi.base.file.UploadImageResponse.getDefaultInstance());
    }


    public com.ywt.gapi.base.file.ReadFileResponse readFile(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.base.file.ReadFileResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(2),
        controller,
        request,
        com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance());
    }


    public com.ywt.gapi.base.file.ReadFileResponse readFileFromBucket(
        com.google.protobuf.RpcController controller,
        com.ywt.gapi.base.file.ReadFileFromBucketRequest request)
        throws com.google.protobuf.ServiceException {
      return (com.ywt.gapi.base.file.ReadFileResponse) channel.callBlockingMethod(
        getDescriptor().getMethods().get(3),
        controller,
        request,
        com.ywt.gapi.base.file.ReadFileResponse.getDefaultInstance());
    }

  }

  // @@protoc_insertion_point(class_scope:com.ywt.gapi.base.file.FileService)
}

