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

import payment_pb2 as payment__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 payment_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 PaymentServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.PaymentAuthorize = channel.unary_unary(
                '/ucs.payments.PaymentService/PaymentAuthorize',
                request_serializer=payment__pb2.PaymentsAuthorizeRequest.SerializeToString,
                response_deserializer=payment__pb2.PaymentsAuthorizeResponse.FromString,
                _registered_method=True)
        self.PaymentSync = channel.unary_unary(
                '/ucs.payments.PaymentService/PaymentSync',
                request_serializer=payment__pb2.PaymentsSyncRequest.SerializeToString,
                response_deserializer=payment__pb2.PaymentsSyncResponse.FromString,
                _registered_method=True)
        self.RefundSync = channel.unary_unary(
                '/ucs.payments.PaymentService/RefundSync',
                request_serializer=payment__pb2.RefundsSyncRequest.SerializeToString,
                response_deserializer=payment__pb2.RefundsSyncResponse.FromString,
                _registered_method=True)
        self.VoidPayment = channel.unary_unary(
                '/ucs.payments.PaymentService/VoidPayment',
                request_serializer=payment__pb2.PaymentsVoidRequest.SerializeToString,
                response_deserializer=payment__pb2.PaymentsVoidResponse.FromString,
                _registered_method=True)
        self.IncomingWebhook = channel.unary_unary(
                '/ucs.payments.PaymentService/IncomingWebhook',
                request_serializer=payment__pb2.IncomingWebhookRequest.SerializeToString,
                response_deserializer=payment__pb2.IncomingWebhookResponse.FromString,
                _registered_method=True)
        self.Refund = channel.unary_unary(
                '/ucs.payments.PaymentService/Refund',
                request_serializer=payment__pb2.RefundsRequest.SerializeToString,
                response_deserializer=payment__pb2.RefundsResponse.FromString,
                _registered_method=True)
        self.PaymentCapture = channel.unary_unary(
                '/ucs.payments.PaymentService/PaymentCapture',
                request_serializer=payment__pb2.PaymentsCaptureRequest.SerializeToString,
                response_deserializer=payment__pb2.PaymentsCaptureResponse.FromString,
                _registered_method=True)


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

    def PaymentAuthorize(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 PaymentSync(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 RefundSync(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 VoidPayment(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 IncomingWebhook(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 Refund(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 PaymentCapture(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_PaymentServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'PaymentAuthorize': grpc.unary_unary_rpc_method_handler(
                    servicer.PaymentAuthorize,
                    request_deserializer=payment__pb2.PaymentsAuthorizeRequest.FromString,
                    response_serializer=payment__pb2.PaymentsAuthorizeResponse.SerializeToString,
            ),
            'PaymentSync': grpc.unary_unary_rpc_method_handler(
                    servicer.PaymentSync,
                    request_deserializer=payment__pb2.PaymentsSyncRequest.FromString,
                    response_serializer=payment__pb2.PaymentsSyncResponse.SerializeToString,
            ),
            'RefundSync': grpc.unary_unary_rpc_method_handler(
                    servicer.RefundSync,
                    request_deserializer=payment__pb2.RefundsSyncRequest.FromString,
                    response_serializer=payment__pb2.RefundsSyncResponse.SerializeToString,
            ),
            'VoidPayment': grpc.unary_unary_rpc_method_handler(
                    servicer.VoidPayment,
                    request_deserializer=payment__pb2.PaymentsVoidRequest.FromString,
                    response_serializer=payment__pb2.PaymentsVoidResponse.SerializeToString,
            ),
            'IncomingWebhook': grpc.unary_unary_rpc_method_handler(
                    servicer.IncomingWebhook,
                    request_deserializer=payment__pb2.IncomingWebhookRequest.FromString,
                    response_serializer=payment__pb2.IncomingWebhookResponse.SerializeToString,
            ),
            'Refund': grpc.unary_unary_rpc_method_handler(
                    servicer.Refund,
                    request_deserializer=payment__pb2.RefundsRequest.FromString,
                    response_serializer=payment__pb2.RefundsResponse.SerializeToString,
            ),
            'PaymentCapture': grpc.unary_unary_rpc_method_handler(
                    servicer.PaymentCapture,
                    request_deserializer=payment__pb2.PaymentsCaptureRequest.FromString,
                    response_serializer=payment__pb2.PaymentsCaptureResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ucs.payments.PaymentService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('ucs.payments.PaymentService', rpc_method_handlers)


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

    @staticmethod
    def PaymentAuthorize(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,
            '/ucs.payments.PaymentService/PaymentAuthorize',
            payment__pb2.PaymentsAuthorizeRequest.SerializeToString,
            payment__pb2.PaymentsAuthorizeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PaymentSync(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,
            '/ucs.payments.PaymentService/PaymentSync',
            payment__pb2.PaymentsSyncRequest.SerializeToString,
            payment__pb2.PaymentsSyncResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RefundSync(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,
            '/ucs.payments.PaymentService/RefundSync',
            payment__pb2.RefundsSyncRequest.SerializeToString,
            payment__pb2.RefundsSyncResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VoidPayment(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,
            '/ucs.payments.PaymentService/VoidPayment',
            payment__pb2.PaymentsVoidRequest.SerializeToString,
            payment__pb2.PaymentsVoidResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def IncomingWebhook(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,
            '/ucs.payments.PaymentService/IncomingWebhook',
            payment__pb2.IncomingWebhookRequest.SerializeToString,
            payment__pb2.IncomingWebhookResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Refund(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,
            '/ucs.payments.PaymentService/Refund',
            payment__pb2.RefundsRequest.SerializeToString,
            payment__pb2.RefundsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def PaymentCapture(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,
            '/ucs.payments.PaymentService/PaymentCapture',
            payment__pb2.PaymentsCaptureRequest.SerializeToString,
            payment__pb2.PaymentsCaptureResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
