# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
"""Client and server classes corresponding to protobuf-defined services."""
import grpc

from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
from fabric_protos_python.peer import snapshot_pb2 as peer_dot_snapshot__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Generate = channel.unary_unary(
                '/protos.Snapshot/Generate',
                request_serializer=peer_dot_snapshot__pb2.SignedSnapshotRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Cancel = channel.unary_unary(
                '/protos.Snapshot/Cancel',
                request_serializer=peer_dot_snapshot__pb2.SignedSnapshotRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.QueryPendings = channel.unary_unary(
                '/protos.Snapshot/QueryPendings',
                request_serializer=peer_dot_snapshot__pb2.SignedSnapshotRequest.SerializeToString,
                response_deserializer=peer_dot_snapshot__pb2.QueryPendingSnapshotsResponse.FromString,
                )


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

    def Generate(self, request, context):
        """Generate a snapshot reqeust. SignedSnapshotRequest contains marshalled bytes for SnaphostRequest
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Cancel(self, request, context):
        """Cancel a snapshot reqeust. SignedSnapshotRequest contains marshalled bytes for SnaphostRequest
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def QueryPendings(self, request, context):
        """Query pending snapshots query. SignedSnapshotRequest contains marshalled bytes for SnaphostQuery
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SnapshotServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Generate': grpc.unary_unary_rpc_method_handler(
                    servicer.Generate,
                    request_deserializer=peer_dot_snapshot__pb2.SignedSnapshotRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Cancel': grpc.unary_unary_rpc_method_handler(
                    servicer.Cancel,
                    request_deserializer=peer_dot_snapshot__pb2.SignedSnapshotRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'QueryPendings': grpc.unary_unary_rpc_method_handler(
                    servicer.QueryPendings,
                    request_deserializer=peer_dot_snapshot__pb2.SignedSnapshotRequest.FromString,
                    response_serializer=peer_dot_snapshot__pb2.QueryPendingSnapshotsResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'protos.Snapshot', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Generate(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, '/protos.Snapshot/Generate',
            peer_dot_snapshot__pb2.SignedSnapshotRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/protos.Snapshot/Cancel',
            peer_dot_snapshot__pb2.SignedSnapshotRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def QueryPendings(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, '/protos.Snapshot/QueryPendings',
            peer_dot_snapshot__pb2.SignedSnapshotRequest.SerializeToString,
            peer_dot_snapshot__pb2.QueryPendingSnapshotsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
