# 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 sandbox_pb2 as sandbox__pb2

GRPC_GENERATED_VERSION = '1.78.1'
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 sandbox_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.StartSandbox = channel.unary_unary(
                '/sandbox.SandboxService/StartSandbox',
                request_serializer=sandbox__pb2.StartRequest.SerializeToString,
                response_deserializer=sandbox__pb2.StartResponse.FromString,
                _registered_method=True)
        self.StopSandbox = channel.unary_unary(
                '/sandbox.SandboxService/StopSandbox',
                request_serializer=sandbox__pb2.StopRequest.SerializeToString,
                response_deserializer=sandbox__pb2.StopResponse.FromString,
                _registered_method=True)
        self.ExecCommand = channel.unary_unary(
                '/sandbox.SandboxService/ExecCommand',
                request_serializer=sandbox__pb2.ExecRequest.SerializeToString,
                response_deserializer=sandbox__pb2.ExecResponse.FromString,
                _registered_method=True)
        self.GetStatus = channel.unary_unary(
                '/sandbox.SandboxService/GetStatus',
                request_serializer=sandbox__pb2.StatusRequest.SerializeToString,
                response_deserializer=sandbox__pb2.StatusResponse.FromString,
                _registered_method=True)
        self.GetMetrics = channel.unary_unary(
                '/sandbox.SandboxService/GetMetrics',
                request_serializer=sandbox__pb2.MetricsRequest.SerializeToString,
                response_deserializer=sandbox__pb2.MetricsResponse.FromString,
                _registered_method=True)
        self.SnapshotSandbox = channel.unary_unary(
                '/sandbox.SandboxService/SnapshotSandbox',
                request_serializer=sandbox__pb2.SnapshotRequest.SerializeToString,
                response_deserializer=sandbox__pb2.SnapshotResponse.FromString,
                _registered_method=True)
        self.ResumeSandbox = channel.unary_unary(
                '/sandbox.SandboxService/ResumeSandbox',
                request_serializer=sandbox__pb2.ResumeRequest.SerializeToString,
                response_deserializer=sandbox__pb2.ResumeResponse.FromString,
                _registered_method=True)
        self.RunPython = channel.unary_unary(
                '/sandbox.SandboxService/RunPython',
                request_serializer=sandbox__pb2.RunPythonRequest.SerializeToString,
                response_deserializer=sandbox__pb2.RunPythonResponse.FromString,
                _registered_method=True)
        self.GetPlatformInfo = channel.unary_unary(
                '/sandbox.SandboxService/GetPlatformInfo',
                request_serializer=sandbox__pb2.GetPlatformInfoRequest.SerializeToString,
                response_deserializer=sandbox__pb2.GetPlatformInfoResponse.FromString,
                _registered_method=True)


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

    def StartSandbox(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 ExecCommand(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 GetStatus(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 GetMetrics(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 SnapshotSandbox(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 RunPython(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 GetPlatformInfo(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 = {
            'StartSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.StartSandbox,
                    request_deserializer=sandbox__pb2.StartRequest.FromString,
                    response_serializer=sandbox__pb2.StartResponse.SerializeToString,
            ),
            'StopSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.StopSandbox,
                    request_deserializer=sandbox__pb2.StopRequest.FromString,
                    response_serializer=sandbox__pb2.StopResponse.SerializeToString,
            ),
            'ExecCommand': grpc.unary_unary_rpc_method_handler(
                    servicer.ExecCommand,
                    request_deserializer=sandbox__pb2.ExecRequest.FromString,
                    response_serializer=sandbox__pb2.ExecResponse.SerializeToString,
            ),
            'GetStatus': grpc.unary_unary_rpc_method_handler(
                    servicer.GetStatus,
                    request_deserializer=sandbox__pb2.StatusRequest.FromString,
                    response_serializer=sandbox__pb2.StatusResponse.SerializeToString,
            ),
            'GetMetrics': grpc.unary_unary_rpc_method_handler(
                    servicer.GetMetrics,
                    request_deserializer=sandbox__pb2.MetricsRequest.FromString,
                    response_serializer=sandbox__pb2.MetricsResponse.SerializeToString,
            ),
            'SnapshotSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.SnapshotSandbox,
                    request_deserializer=sandbox__pb2.SnapshotRequest.FromString,
                    response_serializer=sandbox__pb2.SnapshotResponse.SerializeToString,
            ),
            'ResumeSandbox': grpc.unary_unary_rpc_method_handler(
                    servicer.ResumeSandbox,
                    request_deserializer=sandbox__pb2.ResumeRequest.FromString,
                    response_serializer=sandbox__pb2.ResumeResponse.SerializeToString,
            ),
            'RunPython': grpc.unary_unary_rpc_method_handler(
                    servicer.RunPython,
                    request_deserializer=sandbox__pb2.RunPythonRequest.FromString,
                    response_serializer=sandbox__pb2.RunPythonResponse.SerializeToString,
            ),
            'GetPlatformInfo': grpc.unary_unary_rpc_method_handler(
                    servicer.GetPlatformInfo,
                    request_deserializer=sandbox__pb2.GetPlatformInfoRequest.FromString,
                    response_serializer=sandbox__pb2.GetPlatformInfoResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'sandbox.SandboxService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('sandbox.SandboxService', rpc_method_handlers)


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

    @staticmethod
    def StartSandbox(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,
            '/sandbox.SandboxService/StartSandbox',
            sandbox__pb2.StartRequest.SerializeToString,
            sandbox__pb2.StartResponse.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,
            '/sandbox.SandboxService/StopSandbox',
            sandbox__pb2.StopRequest.SerializeToString,
            sandbox__pb2.StopResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ExecCommand(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,
            '/sandbox.SandboxService/ExecCommand',
            sandbox__pb2.ExecRequest.SerializeToString,
            sandbox__pb2.ExecResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetStatus(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,
            '/sandbox.SandboxService/GetStatus',
            sandbox__pb2.StatusRequest.SerializeToString,
            sandbox__pb2.StatusResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetMetrics(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,
            '/sandbox.SandboxService/GetMetrics',
            sandbox__pb2.MetricsRequest.SerializeToString,
            sandbox__pb2.MetricsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def SnapshotSandbox(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,
            '/sandbox.SandboxService/SnapshotSandbox',
            sandbox__pb2.SnapshotRequest.SerializeToString,
            sandbox__pb2.SnapshotResponse.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,
            '/sandbox.SandboxService/ResumeSandbox',
            sandbox__pb2.ResumeRequest.SerializeToString,
            sandbox__pb2.ResumeResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RunPython(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,
            '/sandbox.SandboxService/RunPython',
            sandbox__pb2.RunPythonRequest.SerializeToString,
            sandbox__pb2.RunPythonResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetPlatformInfo(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,
            '/sandbox.SandboxService/GetPlatformInfo',
            sandbox__pb2.GetPlatformInfoRequest.SerializeToString,
            sandbox__pb2.GetPlatformInfoResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
