# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from protocode import acv_filestore_rpc_pb2 as acv__filestore__rpc__pb2


class ACVFileStoreStub(object):
  """//////////////////////////////////////////////////////////////////////////////
  Services
  //////////////////////////////////////////////////////////////////////////////

  """

  def __init__(self, channel):
    """Constructor.

    Args:
      channel: A grpc.Channel.
    """
    self.AddFileStore = channel.unary_unary(
        '/acv.proto.acv.ACVFileStore/AddFileStore',
        request_serializer=acv__filestore__rpc__pb2.AddFileStoreRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.AddFileStoreResponse.FromString,
        )
    self.RemoveFileStore = channel.unary_unary(
        '/acv.proto.acv.ACVFileStore/RemoveFileStore',
        request_serializer=acv__filestore__rpc__pb2.RemoveFileStoreRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.RemoveFileStoreResponse.FromString,
        )
    self.ListFileStores = channel.unary_unary(
        '/acv.proto.acv.ACVFileStore/ListFileStores',
        request_serializer=acv__filestore__rpc__pb2.ListFileStoresRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.ListFileStoresResponse.FromString,
        )
    self.PutFileStoreDirectory = channel.unary_unary(
        '/acv.proto.acv.ACVFileStore/PutFileStoreDirectory',
        request_serializer=acv__filestore__rpc__pb2.PutFileStoreDirectoryRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.PutFileStoreDirectoryResponse.FromString,
        )
    self.PutFileStoreFile = channel.stream_unary(
        '/acv.proto.acv.ACVFileStore/PutFileStoreFile',
        request_serializer=acv__filestore__rpc__pb2.PutFileStoreFileRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.PutFileStoreFileResponse.FromString,
        )
    self.GetFileStoreFile = channel.unary_stream(
        '/acv.proto.acv.ACVFileStore/GetFileStoreFile',
        request_serializer=acv__filestore__rpc__pb2.GetFileStoreFileRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.GetFileStoreFileResponse.FromString,
        )
    self.RemoveFileStorePath = channel.unary_unary(
        '/acv.proto.acv.ACVFileStore/RemoveFileStorePath',
        request_serializer=acv__filestore__rpc__pb2.RemoveFileStorePathRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.RemoveFileStorePathResponse.FromString,
        )
    self.ListFileStorePaths = channel.unary_unary(
        '/acv.proto.acv.ACVFileStore/ListFileStorePaths',
        request_serializer=acv__filestore__rpc__pb2.ListFileStorePathsRequest.SerializeToString,
        response_deserializer=acv__filestore__rpc__pb2.ListFileStorePathsResponse.FromString,
        )


class ACVFileStoreServicer(object):
  """//////////////////////////////////////////////////////////////////////////////
  Services
  //////////////////////////////////////////////////////////////////////////////

  """

  def AddFileStore(self, request, context):
    """Adds a file store. This file store is initially empty.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RemoveFileStore(self, request, context):
    """Removes a file store. Any existing contents in this file store will be
    removed.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListFileStores(self, request, context):
    """Lists the file stores.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PutFileStoreDirectory(self, request, context):
    """Puts an empty directory to a file store. Any parent directories are
    created.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PutFileStoreFile(self, request_iterator, context):
    """Puts a file to a file store. Any parent directories are created.
    Input: header [file_fragment ...]
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetFileStoreFile(self, request, context):
    """Gets the contents of a file from a file store.
    Output: header [file_fragment ...]
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def RemoveFileStorePath(self, request, context):
    """Removes a path from a file store. If this path is a directory, then any
    children in it are removed.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def ListFileStorePaths(self, request, context):
    """Lists the paths from a file store.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_ACVFileStoreServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'AddFileStore': grpc.unary_unary_rpc_method_handler(
          servicer.AddFileStore,
          request_deserializer=acv__filestore__rpc__pb2.AddFileStoreRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.AddFileStoreResponse.SerializeToString,
      ),
      'RemoveFileStore': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveFileStore,
          request_deserializer=acv__filestore__rpc__pb2.RemoveFileStoreRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.RemoveFileStoreResponse.SerializeToString,
      ),
      'ListFileStores': grpc.unary_unary_rpc_method_handler(
          servicer.ListFileStores,
          request_deserializer=acv__filestore__rpc__pb2.ListFileStoresRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.ListFileStoresResponse.SerializeToString,
      ),
      'PutFileStoreDirectory': grpc.unary_unary_rpc_method_handler(
          servicer.PutFileStoreDirectory,
          request_deserializer=acv__filestore__rpc__pb2.PutFileStoreDirectoryRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.PutFileStoreDirectoryResponse.SerializeToString,
      ),
      'PutFileStoreFile': grpc.stream_unary_rpc_method_handler(
          servicer.PutFileStoreFile,
          request_deserializer=acv__filestore__rpc__pb2.PutFileStoreFileRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.PutFileStoreFileResponse.SerializeToString,
      ),
      'GetFileStoreFile': grpc.unary_stream_rpc_method_handler(
          servicer.GetFileStoreFile,
          request_deserializer=acv__filestore__rpc__pb2.GetFileStoreFileRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.GetFileStoreFileResponse.SerializeToString,
      ),
      'RemoveFileStorePath': grpc.unary_unary_rpc_method_handler(
          servicer.RemoveFileStorePath,
          request_deserializer=acv__filestore__rpc__pb2.RemoveFileStorePathRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.RemoveFileStorePathResponse.SerializeToString,
      ),
      'ListFileStorePaths': grpc.unary_unary_rpc_method_handler(
          servicer.ListFileStorePaths,
          request_deserializer=acv__filestore__rpc__pb2.ListFileStorePathsRequest.FromString,
          response_serializer=acv__filestore__rpc__pb2.ListFileStorePathsResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'acv.proto.acv.ACVFileStore', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
