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

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from python_pachyderm.proto.v2.transaction import transaction_pb2 as python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2


class APIStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.BatchTransaction = channel.unary_unary(
                '/transaction_v2.API/BatchTransaction',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.BatchTransactionRequest.SerializeToString,
                response_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
                )
        self.StartTransaction = channel.unary_unary(
                '/transaction_v2.API/StartTransaction',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.StartTransactionRequest.SerializeToString,
                response_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.Transaction.FromString,
                )
        self.InspectTransaction = channel.unary_unary(
                '/transaction_v2.API/InspectTransaction',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.InspectTransactionRequest.SerializeToString,
                response_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
                )
        self.DeleteTransaction = channel.unary_unary(
                '/transaction_v2.API/DeleteTransaction',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.DeleteTransactionRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ListTransaction = channel.unary_unary(
                '/transaction_v2.API/ListTransaction',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.ListTransactionRequest.SerializeToString,
                response_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfos.FromString,
                )
        self.FinishTransaction = channel.unary_unary(
                '/transaction_v2.API/FinishTransaction',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.FinishTransactionRequest.SerializeToString,
                response_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
                )
        self.DeleteAll = channel.unary_unary(
                '/transaction_v2.API/DeleteAll',
                request_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.DeleteAllRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )


class APIServicer(object):
    """Missing associated documentation comment in .proto file."""

    def BatchTransaction(self, request, context):
        """Transaction rpcs
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def StartTransaction(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 InspectTransaction(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 DeleteTransaction(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 ListTransaction(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 FinishTransaction(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 DeleteAll(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_APIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'BatchTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.BatchTransaction,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.BatchTransactionRequest.FromString,
                    response_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.SerializeToString,
            ),
            'StartTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.StartTransaction,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.StartTransactionRequest.FromString,
                    response_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.Transaction.SerializeToString,
            ),
            'InspectTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.InspectTransaction,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.InspectTransactionRequest.FromString,
                    response_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.SerializeToString,
            ),
            'DeleteTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteTransaction,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.DeleteTransactionRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ListTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.ListTransaction,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.ListTransactionRequest.FromString,
                    response_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfos.SerializeToString,
            ),
            'FinishTransaction': grpc.unary_unary_rpc_method_handler(
                    servicer.FinishTransaction,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.FinishTransactionRequest.FromString,
                    response_serializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.SerializeToString,
            ),
            'DeleteAll': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteAll,
                    request_deserializer=python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.DeleteAllRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'transaction_v2.API', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def BatchTransaction(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, '/transaction_v2.API/BatchTransaction',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.BatchTransactionRequest.SerializeToString,
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StartTransaction(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, '/transaction_v2.API/StartTransaction',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.StartTransactionRequest.SerializeToString,
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.Transaction.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def InspectTransaction(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, '/transaction_v2.API/InspectTransaction',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.InspectTransactionRequest.SerializeToString,
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteTransaction(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, '/transaction_v2.API/DeleteTransaction',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.DeleteTransactionRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListTransaction(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, '/transaction_v2.API/ListTransaction',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.ListTransactionRequest.SerializeToString,
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfos.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FinishTransaction(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, '/transaction_v2.API/FinishTransaction',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.FinishTransactionRequest.SerializeToString,
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.TransactionInfo.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteAll(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, '/transaction_v2.API/DeleteAll',
            python__pachyderm_dot_proto_dot_v2_dot_transaction_dot_transaction__pb2.DeleteAllRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
