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

from a3m.server.rpc.proto import (
    a3m_pb2 as a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2,
)


class TransferStub:
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Submit = channel.unary_unary(
            "/a3m.Transfer/Submit",
            request_serializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.SubmitRequest.SerializeToString,
            response_deserializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.SubmitReply.FromString,
        )
        self.Read = channel.unary_unary(
            "/a3m.Transfer/Read",
            request_serializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ReadRequest.SerializeToString,
            response_deserializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ReadReply.FromString,
        )
        self.ListTasks = channel.unary_unary(
            "/a3m.Transfer/ListTasks",
            request_serializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ListTasksRequest.SerializeToString,
            response_deserializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ListTasksReply.FromString,
        )


class TransferServicer:
    """Missing associated documentation comment in .proto file."""

    def Submit(self, request, context):
        """Submits a new transfer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def Read(self, request, context):
        """Reads the status of a given transfer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")

    def ListTasks(self, request, context):
        """Lists all tasks in a given transfer.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details("Method not implemented!")
        raise NotImplementedError("Method not implemented!")


def add_TransferServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "Submit": grpc.unary_unary_rpc_method_handler(
            servicer.Submit,
            request_deserializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.SubmitRequest.FromString,
            response_serializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.SubmitReply.SerializeToString,
        ),
        "Read": grpc.unary_unary_rpc_method_handler(
            servicer.Read,
            request_deserializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ReadRequest.FromString,
            response_serializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ReadReply.SerializeToString,
        ),
        "ListTasks": grpc.unary_unary_rpc_method_handler(
            servicer.ListTasks,
            request_deserializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ListTasksRequest.FromString,
            response_serializer=a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ListTasksReply.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "a3m.Transfer", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


# This class is part of an EXPERIMENTAL API.
class Transfer:
    """Missing associated documentation comment in .proto file."""

    @staticmethod
    def Submit(
        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,
            "/a3m.Transfer/Submit",
            a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.SubmitRequest.SerializeToString,
            a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.SubmitReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def Read(
        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,
            "/a3m.Transfer/Read",
            a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ReadRequest.SerializeToString,
            a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ReadReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def ListTasks(
        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,
            "/a3m.Transfer/ListTasks",
            a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ListTasksRequest.SerializeToString,
            a3m_dot_server_dot_rpc_dot_proto_dot_a3m__pb2.ListTasksReply.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
