# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc
import warnings

from gRPC_impl.mytorch import tensor_pb2 as mytorch_dot_tensor__pb2
from gRPC_impl import shared_msg_types_pb2 as shared__msg__types__pb2

GRPC_GENERATED_VERSION = '1.71.0'
GRPC_VERSION = grpc.__version__
_version_not_supported = False

try:
    from grpc._utilities import first_version_is_lower
    _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
except ImportError:
    _version_not_supported = True

if _version_not_supported:
    raise RuntimeError(
        f'The grpc package installed is at version {GRPC_VERSION},'
        + f' but the generated code in mytorch/tensor_pb2_grpc.py depends on'
        + f' grpcio>={GRPC_GENERATED_VERSION}.'
        + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
        + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
    )


class TensorServiceStub(object):
    """/////////////////////////////////////////////////////////////////////////////////
    Service definition
    /////////////////////////////////////////////////////////////////////////////////
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.float = channel.unary_unary(
                '/mytorch.TensorService/float',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.long = channel.unary_unary(
                '/mytorch.TensorService/long',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.backward = channel.unary_unary(
                '/mytorch.TensorService/backward',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.to_cuda = channel.unary_unary(
                '/mytorch.TensorService/to_cuda',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.to_cpu = channel.unary_unary(
                '/mytorch.TensorService/to_cpu',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.sum = channel.unary_unary(
                '/mytorch.TensorService/sum',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.add = channel.unary_unary(
                '/mytorch.TensorService/add',
                request_serializer=shared__msg__types__pb2.TwoTensorIDs.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.equal = channel.unary_unary(
                '/mytorch.TensorService/equal',
                request_serializer=shared__msg__types__pb2.TwoTensorIDs.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.index = channel.unary_unary(
                '/mytorch.TensorService/index',
                request_serializer=shared__msg__types__pb2.TensorIDAndDim.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.unsqueeze = channel.unary_unary(
                '/mytorch.TensorService/unsqueeze',
                request_serializer=shared__msg__types__pb2.TensorIDAndDim.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.reshape = channel.unary_unary(
                '/mytorch.TensorService/reshape',
                request_serializer=shared__msg__types__pb2.ReshapeRequest.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.slice = channel.unary_unary(
                '/mytorch.TensorService/slice',
                request_serializer=mytorch_dot_tensor__pb2.SliceRequest.SerializeToString,
                response_deserializer=shared__msg__types__pb2.GrpcTensor.FromString,
                _registered_method=True)
        self.get_data = channel.unary_unary(
                '/mytorch.TensorService/get_data',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.SerializedTensorData.FromString,
                _registered_method=True)
        self.item = channel.unary_unary(
                '/mytorch.TensorService/item',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.FloatValue.FromString,
                _registered_method=True)
        self.get_shape = channel.unary_unary(
                '/mytorch.TensorService/get_shape',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.TensorShape.FromString,
                _registered_method=True)
        self.get_dtype = channel.unary_unary(
                '/mytorch.TensorService/get_dtype',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.Dtype.FromString,
                _registered_method=True)
        self.delete = channel.unary_unary(
                '/mytorch.TensorService/delete',
                request_serializer=shared__msg__types__pb2.UUID.SerializeToString,
                response_deserializer=shared__msg__types__pb2.Empty.FromString,
                _registered_method=True)
        self.TensorStreamingOp = channel.stream_stream(
                '/mytorch.TensorService/TensorStreamingOp',
                request_serializer=mytorch_dot_tensor__pb2.TensorStreamingRequest.SerializeToString,
                response_deserializer=mytorch_dot_tensor__pb2.TensorStreamingResponse.FromString,
                _registered_method=True)
        self.generic_call = channel.unary_unary(
                '/mytorch.TensorService/generic_call',
                request_serializer=shared__msg__types__pb2.JsonRequest.SerializeToString,
                response_deserializer=shared__msg__types__pb2.JsonResponse.FromString,
                _registered_method=True)


class TensorServiceServicer(object):
    """/////////////////////////////////////////////////////////////////////////////////
    Service definition
    /////////////////////////////////////////////////////////////////////////////////
    """

    def float(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def long(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def backward(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def to_cuda(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def to_cpu(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def sum(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def add(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def equal(self, request, context):
        """returns a boolean tensor
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def index(self, request, context):
        """handles indexing, e.g. tensor[0]
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def unsqueeze(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def reshape(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def slice(self, request, context):
        """handles indexing and slicing, e.g. tensor[0:2, 0:2, 5:]
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get_data(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def item(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get_shape(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def get_dtype(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def delete(self, request, context):
        """removes object from ObjectStorage and deletes it
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def TensorStreamingOp(self, request_iterator, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def generic_call(self, request, context):
        """Missing associated documentation comment in .proto file."""
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_TensorServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'float': grpc.unary_unary_rpc_method_handler(
                    servicer.float,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'long': grpc.unary_unary_rpc_method_handler(
                    servicer.long,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'backward': grpc.unary_unary_rpc_method_handler(
                    servicer.backward,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'to_cuda': grpc.unary_unary_rpc_method_handler(
                    servicer.to_cuda,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'to_cpu': grpc.unary_unary_rpc_method_handler(
                    servicer.to_cpu,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'sum': grpc.unary_unary_rpc_method_handler(
                    servicer.sum,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'add': grpc.unary_unary_rpc_method_handler(
                    servicer.add,
                    request_deserializer=shared__msg__types__pb2.TwoTensorIDs.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'equal': grpc.unary_unary_rpc_method_handler(
                    servicer.equal,
                    request_deserializer=shared__msg__types__pb2.TwoTensorIDs.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'index': grpc.unary_unary_rpc_method_handler(
                    servicer.index,
                    request_deserializer=shared__msg__types__pb2.TensorIDAndDim.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'unsqueeze': grpc.unary_unary_rpc_method_handler(
                    servicer.unsqueeze,
                    request_deserializer=shared__msg__types__pb2.TensorIDAndDim.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'reshape': grpc.unary_unary_rpc_method_handler(
                    servicer.reshape,
                    request_deserializer=shared__msg__types__pb2.ReshapeRequest.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'slice': grpc.unary_unary_rpc_method_handler(
                    servicer.slice,
                    request_deserializer=mytorch_dot_tensor__pb2.SliceRequest.FromString,
                    response_serializer=shared__msg__types__pb2.GrpcTensor.SerializeToString,
            ),
            'get_data': grpc.unary_unary_rpc_method_handler(
                    servicer.get_data,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.SerializedTensorData.SerializeToString,
            ),
            'item': grpc.unary_unary_rpc_method_handler(
                    servicer.item,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.FloatValue.SerializeToString,
            ),
            'get_shape': grpc.unary_unary_rpc_method_handler(
                    servicer.get_shape,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.TensorShape.SerializeToString,
            ),
            'get_dtype': grpc.unary_unary_rpc_method_handler(
                    servicer.get_dtype,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.Dtype.SerializeToString,
            ),
            'delete': grpc.unary_unary_rpc_method_handler(
                    servicer.delete,
                    request_deserializer=shared__msg__types__pb2.UUID.FromString,
                    response_serializer=shared__msg__types__pb2.Empty.SerializeToString,
            ),
            'TensorStreamingOp': grpc.stream_stream_rpc_method_handler(
                    servicer.TensorStreamingOp,
                    request_deserializer=mytorch_dot_tensor__pb2.TensorStreamingRequest.FromString,
                    response_serializer=mytorch_dot_tensor__pb2.TensorStreamingResponse.SerializeToString,
            ),
            'generic_call': grpc.unary_unary_rpc_method_handler(
                    servicer.generic_call,
                    request_deserializer=shared__msg__types__pb2.JsonRequest.FromString,
                    response_serializer=shared__msg__types__pb2.JsonResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'mytorch.TensorService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('mytorch.TensorService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class TensorService(object):
    """/////////////////////////////////////////////////////////////////////////////////
    Service definition
    /////////////////////////////////////////////////////////////////////////////////
    """

    @staticmethod
    def float(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/float',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def long(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/long',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def backward(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/backward',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def to_cuda(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/to_cuda',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def to_cpu(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/to_cpu',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def sum(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/sum',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def add(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/add',
            shared__msg__types__pb2.TwoTensorIDs.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def equal(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/equal',
            shared__msg__types__pb2.TwoTensorIDs.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def index(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/index',
            shared__msg__types__pb2.TensorIDAndDim.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def unsqueeze(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/unsqueeze',
            shared__msg__types__pb2.TensorIDAndDim.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def reshape(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/reshape',
            shared__msg__types__pb2.ReshapeRequest.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def slice(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/slice',
            mytorch_dot_tensor__pb2.SliceRequest.SerializeToString,
            shared__msg__types__pb2.GrpcTensor.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def get_data(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/get_data',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.SerializedTensorData.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def item(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/item',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.FloatValue.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def get_shape(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/get_shape',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.TensorShape.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def get_dtype(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/get_dtype',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.Dtype.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def delete(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/delete',
            shared__msg__types__pb2.UUID.SerializeToString,
            shared__msg__types__pb2.Empty.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def TensorStreamingOp(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(
            request_iterator,
            target,
            '/mytorch.TensorService/TensorStreamingOp',
            mytorch_dot_tensor__pb2.TensorStreamingRequest.SerializeToString,
            mytorch_dot_tensor__pb2.TensorStreamingResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def generic_call(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(
            request,
            target,
            '/mytorch.TensorService/generic_call',
            shared__msg__types__pb2.JsonRequest.SerializeToString,
            shared__msg__types__pb2.JsonResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
