# 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 eg.interp import events_pb2 as eg_dot_interp_dot_events__pb2

GRPC_GENERATED_VERSION = '1.66.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 eg.interp.events_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 AgentStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Upload = channel.stream_unary(
                '/eg.interp.events.Agent/Upload',
                request_serializer=eg_dot_interp_dot_events__pb2.RunUploadChunk.SerializeToString,
                response_deserializer=eg_dot_interp_dot_events__pb2.RunUploadResponse.FromString,
                _registered_method=True)
        self.Cancel = channel.unary_unary(
                '/eg.interp.events.Agent/Cancel',
                request_serializer=eg_dot_interp_dot_events__pb2.RunCancelRequest.SerializeToString,
                response_deserializer=eg_dot_interp_dot_events__pb2.RunCancelResponse.FromString,
                _registered_method=True)
        self.Logs = channel.unary_stream(
                '/eg.interp.events.Agent/Logs',
                request_serializer=eg_dot_interp_dot_events__pb2.RunLogRequest.SerializeToString,
                response_deserializer=eg_dot_interp_dot_events__pb2.RunLogResponse.FromString,
                _registered_method=True)
        self.Watch = channel.unary_stream(
                '/eg.interp.events.Agent/Watch',
                request_serializer=eg_dot_interp_dot_events__pb2.RunWatchRequest.SerializeToString,
                response_deserializer=eg_dot_interp_dot_events__pb2.Message.FromString,
                _registered_method=True)


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

    def Upload(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 Cancel(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 Logs(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 Watch(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_AgentServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Upload': grpc.stream_unary_rpc_method_handler(
                    servicer.Upload,
                    request_deserializer=eg_dot_interp_dot_events__pb2.RunUploadChunk.FromString,
                    response_serializer=eg_dot_interp_dot_events__pb2.RunUploadResponse.SerializeToString,
            ),
            'Cancel': grpc.unary_unary_rpc_method_handler(
                    servicer.Cancel,
                    request_deserializer=eg_dot_interp_dot_events__pb2.RunCancelRequest.FromString,
                    response_serializer=eg_dot_interp_dot_events__pb2.RunCancelResponse.SerializeToString,
            ),
            'Logs': grpc.unary_stream_rpc_method_handler(
                    servicer.Logs,
                    request_deserializer=eg_dot_interp_dot_events__pb2.RunLogRequest.FromString,
                    response_serializer=eg_dot_interp_dot_events__pb2.RunLogResponse.SerializeToString,
            ),
            'Watch': grpc.unary_stream_rpc_method_handler(
                    servicer.Watch,
                    request_deserializer=eg_dot_interp_dot_events__pb2.RunWatchRequest.FromString,
                    response_serializer=eg_dot_interp_dot_events__pb2.Message.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'eg.interp.events.Agent', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('eg.interp.events.Agent', rpc_method_handlers)


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

    @staticmethod
    def Upload(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_unary(
            request_iterator,
            target,
            '/eg.interp.events.Agent/Upload',
            eg_dot_interp_dot_events__pb2.RunUploadChunk.SerializeToString,
            eg_dot_interp_dot_events__pb2.RunUploadResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Cancel(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,
            '/eg.interp.events.Agent/Cancel',
            eg_dot_interp_dot_events__pb2.RunCancelRequest.SerializeToString,
            eg_dot_interp_dot_events__pb2.RunCancelResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Logs(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_stream(
            request,
            target,
            '/eg.interp.events.Agent/Logs',
            eg_dot_interp_dot_events__pb2.RunLogRequest.SerializeToString,
            eg_dot_interp_dot_events__pb2.RunLogResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def Watch(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_stream(
            request,
            target,
            '/eg.interp.events.Agent/Watch',
            eg_dot_interp_dot_events__pb2.RunWatchRequest.SerializeToString,
            eg_dot_interp_dot_events__pb2.Message.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Dispatch = channel.unary_unary(
                '/eg.interp.events.Events/Dispatch',
                request_serializer=eg_dot_interp_dot_events__pb2.DispatchRequest.SerializeToString,
                response_deserializer=eg_dot_interp_dot_events__pb2.DispatchResponse.FromString,
                _registered_method=True)


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

    def Dispatch(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_EventsServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Dispatch': grpc.unary_unary_rpc_method_handler(
                    servicer.Dispatch,
                    request_deserializer=eg_dot_interp_dot_events__pb2.DispatchRequest.FromString,
                    response_serializer=eg_dot_interp_dot_events__pb2.DispatchResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'eg.interp.events.Events', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('eg.interp.events.Events', rpc_method_handlers)


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

    @staticmethod
    def Dispatch(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,
            '/eg.interp.events.Events/Dispatch',
            eg_dot_interp_dot_events__pb2.DispatchRequest.SerializeToString,
            eg_dot_interp_dot_events__pb2.DispatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Dispatch = channel.unary_unary(
                '/eg.interp.events.Runner/Dispatch',
                request_serializer=eg_dot_interp_dot_events__pb2.DispatchRequest.SerializeToString,
                response_deserializer=eg_dot_interp_dot_events__pb2.DispatchResponse.FromString,
                _registered_method=True)


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

    def Dispatch(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_RunnerServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Dispatch': grpc.unary_unary_rpc_method_handler(
                    servicer.Dispatch,
                    request_deserializer=eg_dot_interp_dot_events__pb2.DispatchRequest.FromString,
                    response_serializer=eg_dot_interp_dot_events__pb2.DispatchResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'eg.interp.events.Runner', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('eg.interp.events.Runner', rpc_method_handlers)


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

    @staticmethod
    def Dispatch(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,
            '/eg.interp.events.Runner/Dispatch',
            eg_dot_interp_dot_events__pb2.DispatchRequest.SerializeToString,
            eg_dot_interp_dot_events__pb2.DispatchResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
