# 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 . import service_pb2 as service__pb2

GRPC_GENERATED_VERSION = '1.78.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},'
        + ' but the generated code in service_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 SandboxServiceStub(object):
    """Missing associated documentation comment in .proto file."""

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

        Args:
            channel: A grpc.Channel.
        """
        self.Ping = channel.unary_unary(
                '/agbox.v1.SandboxService/Ping',
                request_serializer=service__pb2.PingRequest.SerializeToString,
                response_deserializer=service__pb2.PingResponse.FromString,
                _registered_method=True)
        self.CreateSandbox = channel.unary_unary(
                '/agbox.v1.SandboxService/CreateSandbox',
                request_serializer=service__pb2.CreateSandboxRequest.SerializeToString,
                response_deserializer=service__pb2.CreateSandboxResponse.FromString,
                _registered_method=True)
        self.GetSandbox = channel.unary_unary(
                '/agbox.v1.SandboxService/GetSandbox',
                request_serializer=service__pb2.GetSandboxRequest.SerializeToString,
                response_deserializer=service__pb2.GetSandboxResponse.FromString,
                _registered_method=True)
        self.ListSandboxes = channel.unary_unary(
                '/agbox.v1.SandboxService/ListSandboxes',
                request_serializer=service__pb2.ListSandboxesRequest.SerializeToString,
                response_deserializer=service__pb2.ListSandboxesResponse.FromString,
                _registered_method=True)
        self.ResumeSandbox = channel.unary_unary(
                '/agbox.v1.SandboxService/ResumeSandbox',
                request_serializer=service__pb2.ResumeSandboxRequest.SerializeToString,
                response_deserializer=service__pb2.AcceptedResponse.FromString,
                _registered_method=True)
        self.StopSandbox = channel.unary_unary(
                '/agbox.v1.SandboxService/StopSandbox',
                request_serializer=service__pb2.StopSandboxRequest.SerializeToString,
                response_deserializer=service__pb2.AcceptedResponse.FromString,
                _registered_method=True)
        self.DeleteSandbox = channel.unary_unary(
                '/agbox.v1.SandboxService/DeleteSandbox',
                request_serializer=service__pb2.DeleteSandboxRequest.SerializeToString,
                response_deserializer=service__pb2.AcceptedResponse.FromString,
                _registered_method=True)
        self.DeleteSandboxes = channel.unary_unary(
                '/agbox.v1.SandboxService/DeleteSandboxes',
                request_serializer=service__pb2.DeleteSandboxesRequest.SerializeToString,
                response_deserializer=service__pb2.DeleteSandboxesResponse.FromString,
                _registered_method=True)
        self.SubscribeSandboxEvents = channel.unary_stream(
                '/agbox.v1.SandboxService/SubscribeSandboxEvents',
                request_serializer=service__pb2.SubscribeSandboxEventsRequest.SerializeToString,
                response_deserializer=service__pb2.SandboxEvent.FromString,
                _registered_method=True)
        self.CreateExec = channel.unary_unary(
                '/agbox.v1.SandboxService/CreateExec',
                request_serializer=service__pb2.CreateExecRequest.SerializeToString,
                response_deserializer=service__pb2.CreateExecResponse.FromString,
                _registered_method=True)
        self.CancelExec = channel.unary_unary(
                '/agbox.v1.SandboxService/CancelExec',
                request_serializer=service__pb2.CancelExecRequest.SerializeToString,
                response_deserializer=service__pb2.AcceptedResponse.FromString,
                _registered_method=True)
        self.GetExec = channel.unary_unary(
                '/agbox.v1.SandboxService/GetExec',
                request_serializer=service__pb2.GetExecRequest.SerializeToString,
                response_deserializer=service__pb2.GetExecResponse.FromString,
                _registered_method=True)
        self.ListActiveExecs = channel.unary_unary(
                '/agbox.v1.SandboxService/ListActiveExecs',
                request_serializer=service__pb2.ListActiveExecsRequest.SerializeToString,
                response_deserializer=service__pb2.ListActiveExecsResponse.FromString,
                _registered_method=True)


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

    def Ping(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 CreateSandbox(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 GetSandbox(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 ListSandboxes(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 ResumeSandbox(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 StopSandbox(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 DeleteSandbox(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 DeleteSandboxes(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 SubscribeSandboxEvents(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 CreateExec(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 CancelExec(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 GetExec(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 ListActiveExecs(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_SandboxServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Ping': grpc.unary_unary_rpc_method_handler(
                    servicer.Ping,
                    request_deserializer=service__pb2.PingRequest.FromString,
                    response_serializer=service__pb2.PingResponse.SerializeToString,
            ),
            'CreateSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateSandbox,
                    request_deserializer=service__pb2.CreateSandboxRequest.FromString,
                    response_serializer=service__pb2.CreateSandboxResponse.SerializeToString,
            ),
            'GetSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.GetSandbox,
                    request_deserializer=service__pb2.GetSandboxRequest.FromString,
                    response_serializer=service__pb2.GetSandboxResponse.SerializeToString,
            ),
            'ListSandboxes': grpc.unary_unary_rpc_method_handler(
                    servicer.ListSandboxes,
                    request_deserializer=service__pb2.ListSandboxesRequest.FromString,
                    response_serializer=service__pb2.ListSandboxesResponse.SerializeToString,
            ),
            'ResumeSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.ResumeSandbox,
                    request_deserializer=service__pb2.ResumeSandboxRequest.FromString,
                    response_serializer=service__pb2.AcceptedResponse.SerializeToString,
            ),
            'StopSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.StopSandbox,
                    request_deserializer=service__pb2.StopSandboxRequest.FromString,
                    response_serializer=service__pb2.AcceptedResponse.SerializeToString,
            ),
            'DeleteSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteSandbox,
                    request_deserializer=service__pb2.DeleteSandboxRequest.FromString,
                    response_serializer=service__pb2.AcceptedResponse.SerializeToString,
            ),
            'DeleteSandboxes': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteSandboxes,
                    request_deserializer=service__pb2.DeleteSandboxesRequest.FromString,
                    response_serializer=service__pb2.DeleteSandboxesResponse.SerializeToString,
            ),
            'SubscribeSandboxEvents': grpc.unary_stream_rpc_method_handler(
                    servicer.SubscribeSandboxEvents,
                    request_deserializer=service__pb2.SubscribeSandboxEventsRequest.FromString,
                    response_serializer=service__pb2.SandboxEvent.SerializeToString,
            ),
            'CreateExec': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateExec,
                    request_deserializer=service__pb2.CreateExecRequest.FromString,
                    response_serializer=service__pb2.CreateExecResponse.SerializeToString,
            ),
            'CancelExec': grpc.unary_unary_rpc_method_handler(
                    servicer.CancelExec,
                    request_deserializer=service__pb2.CancelExecRequest.FromString,
                    response_serializer=service__pb2.AcceptedResponse.SerializeToString,
            ),
            'GetExec': grpc.unary_unary_rpc_method_handler(
                    servicer.GetExec,
                    request_deserializer=service__pb2.GetExecRequest.FromString,
                    response_serializer=service__pb2.GetExecResponse.SerializeToString,
            ),
            'ListActiveExecs': grpc.unary_unary_rpc_method_handler(
                    servicer.ListActiveExecs,
                    request_deserializer=service__pb2.ListActiveExecsRequest.FromString,
                    response_serializer=service__pb2.ListActiveExecsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'agbox.v1.SandboxService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('agbox.v1.SandboxService', rpc_method_handlers)


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

    @staticmethod
    def Ping(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,
            '/agbox.v1.SandboxService/Ping',
            service__pb2.PingRequest.SerializeToString,
            service__pb2.PingResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateSandbox(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,
            '/agbox.v1.SandboxService/CreateSandbox',
            service__pb2.CreateSandboxRequest.SerializeToString,
            service__pb2.CreateSandboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetSandbox(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,
            '/agbox.v1.SandboxService/GetSandbox',
            service__pb2.GetSandboxRequest.SerializeToString,
            service__pb2.GetSandboxResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListSandboxes(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,
            '/agbox.v1.SandboxService/ListSandboxes',
            service__pb2.ListSandboxesRequest.SerializeToString,
            service__pb2.ListSandboxesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ResumeSandbox(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,
            '/agbox.v1.SandboxService/ResumeSandbox',
            service__pb2.ResumeSandboxRequest.SerializeToString,
            service__pb2.AcceptedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def StopSandbox(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,
            '/agbox.v1.SandboxService/StopSandbox',
            service__pb2.StopSandboxRequest.SerializeToString,
            service__pb2.AcceptedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteSandbox(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,
            '/agbox.v1.SandboxService/DeleteSandbox',
            service__pb2.DeleteSandboxRequest.SerializeToString,
            service__pb2.AcceptedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteSandboxes(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,
            '/agbox.v1.SandboxService/DeleteSandboxes',
            service__pb2.DeleteSandboxesRequest.SerializeToString,
            service__pb2.DeleteSandboxesResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SubscribeSandboxEvents(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,
            '/agbox.v1.SandboxService/SubscribeSandboxEvents',
            service__pb2.SubscribeSandboxEventsRequest.SerializeToString,
            service__pb2.SandboxEvent.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CreateExec(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,
            '/agbox.v1.SandboxService/CreateExec',
            service__pb2.CreateExecRequest.SerializeToString,
            service__pb2.CreateExecResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def CancelExec(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,
            '/agbox.v1.SandboxService/CancelExec',
            service__pb2.CancelExecRequest.SerializeToString,
            service__pb2.AcceptedResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetExec(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,
            '/agbox.v1.SandboxService/GetExec',
            service__pb2.GetExecRequest.SerializeToString,
            service__pb2.GetExecResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListActiveExecs(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,
            '/agbox.v1.SandboxService/ListActiveExecs',
            service__pb2.ListActiveExecsRequest.SerializeToString,
            service__pb2.ListActiveExecsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
