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

from tensorboard.uploader.proto import write_service_pb2 as tensorboard_dot_uploader_dot_proto_dot_write__service__pb2


class TensorBoardWriterServiceStub(object):
  """Service for writing data to TensorBoard.dev.
  """

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

    Args:
      channel: A grpc.Channel.
    """
    self.CreateExperiment = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/CreateExperiment',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.CreateExperimentRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.CreateExperimentResponse.FromString,
        )
    self.UpdateExperiment = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/UpdateExperiment',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.UpdateExperimentRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.UpdateExperimentResponse.FromString,
        )
    self.DeleteExperiment = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/DeleteExperiment',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteExperimentRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteExperimentResponse.FromString,
        )
    self.PurgeData = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/PurgeData',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.PurgeDataRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.PurgeDataResponse.FromString,
        )
    self.WriteScalar = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/WriteScalar',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteScalarRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteScalarResponse.FromString,
        )
    self.WriteTensor = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/WriteTensor',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteTensorRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteTensorResponse.FromString,
        )
    self.GetOrCreateBlobSequence = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/GetOrCreateBlobSequence',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetOrCreateBlobSequenceRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetOrCreateBlobSequenceResponse.FromString,
        )
    self.GetBlobMetadata = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/GetBlobMetadata',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetBlobMetadataRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetBlobMetadataResponse.FromString,
        )
    self.WriteBlob = channel.stream_stream(
        '/tensorboard.service.TensorBoardWriterService/WriteBlob',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteBlobRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteBlobResponse.FromString,
        )
    self.DeleteOwnUser = channel.unary_unary(
        '/tensorboard.service.TensorBoardWriterService/DeleteOwnUser',
        request_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteOwnUserRequest.SerializeToString,
        response_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteOwnUserResponse.FromString,
        )


class TensorBoardWriterServiceServicer(object):
  """Service for writing data to TensorBoard.dev.
  """

  def CreateExperiment(self, request, context):
    """Request for a new location to write TensorBoard readable events.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def UpdateExperiment(self, request, context):
    """Request to mutate metadata associated with an experiment.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteExperiment(self, request, context):
    """Request that an experiment be deleted, along with all tags and scalars
    that it contains. This call may only be made by the original owner of the
    experiment.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def PurgeData(self, request, context):
    """Request that unreachable data be purged. Used only for testing;
    disabled in production.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WriteScalar(self, request, context):
    """Request additional scalar data be stored in TensorBoard.dev.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WriteTensor(self, request, context):
    """Request additional tensor data be stored in TensorBoard.dev.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetOrCreateBlobSequence(self, request, context):
    """Request to obtain a specific BlobSequence entry, creating it if needed,
    to be subsequently populated with blobs.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def GetBlobMetadata(self, request, context):
    """Request the current status of blob data being stored in TensorBoard.dev,
    to support resumable uploads.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def WriteBlob(self, request_iterator, context):
    """Request additional blob data be stored in TensorBoard.dev.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def DeleteOwnUser(self, request, context):
    """Request that the calling user and all their data be permanently deleted.
    Used for testing purposes.
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')


def add_TensorBoardWriterServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'CreateExperiment': grpc.unary_unary_rpc_method_handler(
          servicer.CreateExperiment,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.CreateExperimentRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.CreateExperimentResponse.SerializeToString,
      ),
      'UpdateExperiment': grpc.unary_unary_rpc_method_handler(
          servicer.UpdateExperiment,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.UpdateExperimentRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.UpdateExperimentResponse.SerializeToString,
      ),
      'DeleteExperiment': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteExperiment,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteExperimentRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteExperimentResponse.SerializeToString,
      ),
      'PurgeData': grpc.unary_unary_rpc_method_handler(
          servicer.PurgeData,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.PurgeDataRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.PurgeDataResponse.SerializeToString,
      ),
      'WriteScalar': grpc.unary_unary_rpc_method_handler(
          servicer.WriteScalar,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteScalarRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteScalarResponse.SerializeToString,
      ),
      'WriteTensor': grpc.unary_unary_rpc_method_handler(
          servicer.WriteTensor,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteTensorRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteTensorResponse.SerializeToString,
      ),
      'GetOrCreateBlobSequence': grpc.unary_unary_rpc_method_handler(
          servicer.GetOrCreateBlobSequence,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetOrCreateBlobSequenceRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetOrCreateBlobSequenceResponse.SerializeToString,
      ),
      'GetBlobMetadata': grpc.unary_unary_rpc_method_handler(
          servicer.GetBlobMetadata,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetBlobMetadataRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.GetBlobMetadataResponse.SerializeToString,
      ),
      'WriteBlob': grpc.stream_stream_rpc_method_handler(
          servicer.WriteBlob,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteBlobRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.WriteBlobResponse.SerializeToString,
      ),
      'DeleteOwnUser': grpc.unary_unary_rpc_method_handler(
          servicer.DeleteOwnUser,
          request_deserializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteOwnUserRequest.FromString,
          response_serializer=tensorboard_dot_uploader_dot_proto_dot_write__service__pb2.DeleteOwnUserResponse.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'tensorboard.service.TensorBoardWriterService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
