# 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 ganvil.protocol.v1 import ganvil_pb2 as ganvil_dot_protocol_dot_v1_dot_ganvil__pb2

GRPC_GENERATED_VERSION = '1.74.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 ganvil/protocol/v1/ganvil_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 PluginServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.ExecuteActions = channel.unary_unary(
                '/protocol.v1.PluginService/ExecuteActions',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteActionsRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteActionsResponse.FromString,
                _registered_method=True)
        self.ExecuteFilters = channel.unary_unary(
                '/protocol.v1.PluginService/ExecuteFilters',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteFiltersRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteFiltersResponse.FromString,
                _registered_method=True)
        self.GetPlugin = channel.unary_unary(
                '/protocol.v1.PluginService/GetPlugin',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.GetPluginRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.GetPluginResponse.FromString,
                _registered_method=True)
        self.OnPrClosed = channel.unary_unary(
                '/protocol.v1.PluginService/OnPrClosed',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrClosedRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrClosedResponse.FromString,
                _registered_method=True)
        self.OnPrCreated = channel.unary_unary(
                '/protocol.v1.PluginService/OnPrCreated',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrCreatedRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrCreatedResponse.FromString,
                _registered_method=True)
        self.OnPrMerged = channel.unary_unary(
                '/protocol.v1.PluginService/OnPrMerged',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrMergedRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrMergedResponse.FromString,
                _registered_method=True)
        self.Shutdown = channel.unary_unary(
                '/protocol.v1.PluginService/Shutdown',
                request_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ShutdownRequest.SerializeToString,
                response_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ShutdownResponse.FromString,
                _registered_method=True)


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

    def ExecuteActions(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 ExecuteFilters(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 GetPlugin(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 OnPrClosed(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 OnPrCreated(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 OnPrMerged(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 Shutdown(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_PluginServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'ExecuteActions': grpc.unary_unary_rpc_method_handler(
                    servicer.ExecuteActions,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteActionsRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteActionsResponse.SerializeToString,
            ),
            'ExecuteFilters': grpc.unary_unary_rpc_method_handler(
                    servicer.ExecuteFilters,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteFiltersRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteFiltersResponse.SerializeToString,
            ),
            'GetPlugin': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPlugin,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.GetPluginRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.GetPluginResponse.SerializeToString,
            ),
            'OnPrClosed': grpc.unary_unary_rpc_method_handler(
                    servicer.OnPrClosed,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrClosedRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrClosedResponse.SerializeToString,
            ),
            'OnPrCreated': grpc.unary_unary_rpc_method_handler(
                    servicer.OnPrCreated,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrCreatedRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrCreatedResponse.SerializeToString,
            ),
            'OnPrMerged': grpc.unary_unary_rpc_method_handler(
                    servicer.OnPrMerged,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrMergedRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrMergedResponse.SerializeToString,
            ),
            'Shutdown': grpc.unary_unary_rpc_method_handler(
                    servicer.Shutdown,
                    request_deserializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ShutdownRequest.FromString,
                    response_serializer=ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ShutdownResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protocol.v1.PluginService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('protocol.v1.PluginService', rpc_method_handlers)


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

    @staticmethod
    def ExecuteActions(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,
            '/protocol.v1.PluginService/ExecuteActions',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteActionsRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteActionsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExecuteFilters(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,
            '/protocol.v1.PluginService/ExecuteFilters',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteFiltersRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ExecuteFiltersResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPlugin(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,
            '/protocol.v1.PluginService/GetPlugin',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.GetPluginRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.GetPluginResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OnPrClosed(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,
            '/protocol.v1.PluginService/OnPrClosed',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrClosedRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrClosedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OnPrCreated(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,
            '/protocol.v1.PluginService/OnPrCreated',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrCreatedRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrCreatedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def OnPrMerged(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,
            '/protocol.v1.PluginService/OnPrMerged',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrMergedRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.OnPrMergedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Shutdown(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,
            '/protocol.v1.PluginService/Shutdown',
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ShutdownRequest.SerializeToString,
            ganvil_dot_protocol_dot_v1_dot_ganvil__pb2.ShutdownResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
