# 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 checkpoint_pb2 as checkpoint_dot_checkpoint__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 checkpoint/checkpoint_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 CheckpointServiceStub(object):
    """Checkpoint Service - Manages checkpoint creation, storage, and rollback
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateCheckpoint = channel.unary_unary(
                '/omium.checkpoint.v1.CheckpointService/CreateCheckpoint',
                request_serializer=checkpoint_dot_checkpoint__pb2.CreateCheckpointRequest.SerializeToString,
                response_deserializer=checkpoint_dot_checkpoint__pb2.CreateCheckpointResponse.FromString,
                _registered_method=True)
        self.GetCheckpoint = channel.unary_unary(
                '/omium.checkpoint.v1.CheckpointService/GetCheckpoint',
                request_serializer=checkpoint_dot_checkpoint__pb2.GetCheckpointRequest.SerializeToString,
                response_deserializer=checkpoint_dot_checkpoint__pb2.GetCheckpointResponse.FromString,
                _registered_method=True)
        self.ListCheckpoints = channel.unary_unary(
                '/omium.checkpoint.v1.CheckpointService/ListCheckpoints',
                request_serializer=checkpoint_dot_checkpoint__pb2.ListCheckpointsRequest.SerializeToString,
                response_deserializer=checkpoint_dot_checkpoint__pb2.ListCheckpointsResponse.FromString,
                _registered_method=True)
        self.RollbackToCheckpoint = channel.unary_unary(
                '/omium.checkpoint.v1.CheckpointService/RollbackToCheckpoint',
                request_serializer=checkpoint_dot_checkpoint__pb2.RollbackToCheckpointRequest.SerializeToString,
                response_deserializer=checkpoint_dot_checkpoint__pb2.RollbackToCheckpointResponse.FromString,
                _registered_method=True)
        self.DeleteCheckpoint = channel.unary_unary(
                '/omium.checkpoint.v1.CheckpointService/DeleteCheckpoint',
                request_serializer=checkpoint_dot_checkpoint__pb2.DeleteCheckpointRequest.SerializeToString,
                response_deserializer=checkpoint_dot_checkpoint__pb2.DeleteCheckpointResponse.FromString,
                _registered_method=True)
        self.VerifyCheckpoint = channel.unary_unary(
                '/omium.checkpoint.v1.CheckpointService/VerifyCheckpoint',
                request_serializer=checkpoint_dot_checkpoint__pb2.VerifyCheckpointRequest.SerializeToString,
                response_deserializer=checkpoint_dot_checkpoint__pb2.VerifyCheckpointResponse.FromString,
                _registered_method=True)


class CheckpointServiceServicer(object):
    """Checkpoint Service - Manages checkpoint creation, storage, and rollback
    """

    def CreateCheckpoint(self, request, context):
        """Create a new checkpoint for an execution
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetCheckpoint(self, request, context):
        """Get checkpoint details
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListCheckpoints(self, request, context):
        """List checkpoints for an execution
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RollbackToCheckpoint(self, request, context):
        """Rollback execution to a specific checkpoint
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def DeleteCheckpoint(self, request, context):
        """Delete a checkpoint
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def VerifyCheckpoint(self, request, context):
        """Verify checkpoint integrity
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_CheckpointServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateCheckpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateCheckpoint,
                    request_deserializer=checkpoint_dot_checkpoint__pb2.CreateCheckpointRequest.FromString,
                    response_serializer=checkpoint_dot_checkpoint__pb2.CreateCheckpointResponse.SerializeToString,
            ),
            'GetCheckpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.GetCheckpoint,
                    request_deserializer=checkpoint_dot_checkpoint__pb2.GetCheckpointRequest.FromString,
                    response_serializer=checkpoint_dot_checkpoint__pb2.GetCheckpointResponse.SerializeToString,
            ),
            'ListCheckpoints': grpc.unary_unary_rpc_method_handler(
                    servicer.ListCheckpoints,
                    request_deserializer=checkpoint_dot_checkpoint__pb2.ListCheckpointsRequest.FromString,
                    response_serializer=checkpoint_dot_checkpoint__pb2.ListCheckpointsResponse.SerializeToString,
            ),
            'RollbackToCheckpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.RollbackToCheckpoint,
                    request_deserializer=checkpoint_dot_checkpoint__pb2.RollbackToCheckpointRequest.FromString,
                    response_serializer=checkpoint_dot_checkpoint__pb2.RollbackToCheckpointResponse.SerializeToString,
            ),
            'DeleteCheckpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteCheckpoint,
                    request_deserializer=checkpoint_dot_checkpoint__pb2.DeleteCheckpointRequest.FromString,
                    response_serializer=checkpoint_dot_checkpoint__pb2.DeleteCheckpointResponse.SerializeToString,
            ),
            'VerifyCheckpoint': grpc.unary_unary_rpc_method_handler(
                    servicer.VerifyCheckpoint,
                    request_deserializer=checkpoint_dot_checkpoint__pb2.VerifyCheckpointRequest.FromString,
                    response_serializer=checkpoint_dot_checkpoint__pb2.VerifyCheckpointResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'omium.checkpoint.v1.CheckpointService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))
    server.add_registered_method_handlers('omium.checkpoint.v1.CheckpointService', rpc_method_handlers)


 # This class is part of an EXPERIMENTAL API.
class CheckpointService(object):
    """Checkpoint Service - Manages checkpoint creation, storage, and rollback
    """

    @staticmethod
    def CreateCheckpoint(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,
            '/omium.checkpoint.v1.CheckpointService/CreateCheckpoint',
            checkpoint_dot_checkpoint__pb2.CreateCheckpointRequest.SerializeToString,
            checkpoint_dot_checkpoint__pb2.CreateCheckpointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def GetCheckpoint(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,
            '/omium.checkpoint.v1.CheckpointService/GetCheckpoint',
            checkpoint_dot_checkpoint__pb2.GetCheckpointRequest.SerializeToString,
            checkpoint_dot_checkpoint__pb2.GetCheckpointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def ListCheckpoints(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,
            '/omium.checkpoint.v1.CheckpointService/ListCheckpoints',
            checkpoint_dot_checkpoint__pb2.ListCheckpointsRequest.SerializeToString,
            checkpoint_dot_checkpoint__pb2.ListCheckpointsResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def RollbackToCheckpoint(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,
            '/omium.checkpoint.v1.CheckpointService/RollbackToCheckpoint',
            checkpoint_dot_checkpoint__pb2.RollbackToCheckpointRequest.SerializeToString,
            checkpoint_dot_checkpoint__pb2.RollbackToCheckpointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def DeleteCheckpoint(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,
            '/omium.checkpoint.v1.CheckpointService/DeleteCheckpoint',
            checkpoint_dot_checkpoint__pb2.DeleteCheckpointRequest.SerializeToString,
            checkpoint_dot_checkpoint__pb2.DeleteCheckpointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)

    @staticmethod
    def VerifyCheckpoint(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,
            '/omium.checkpoint.v1.CheckpointService/VerifyCheckpoint',
            checkpoint_dot_checkpoint__pb2.VerifyCheckpointRequest.SerializeToString,
            checkpoint_dot_checkpoint__pb2.VerifyCheckpointResponse.FromString,
            options,
            channel_credentials,
            insecure,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
            _registered_method=True)
