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

import comunication.grpc_protos.BlockMining_pb2 as BlockMining__pb2


class BlockMiningStub(object):
    """*
    Block Mining service. It permit to say that
    "A block is mined"
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.sendVictoryNotification = channel.unary_unary(
                '/BlockMining/sendVictoryNotification',
                request_serializer=BlockMining__pb2.BlockMiningRequest.SerializeToString,
                response_deserializer=BlockMining__pb2.BlockMiningResponse.FromString,
                )


class BlockMiningServicer(object):
    """*
    Block Mining service. It permit to say that
    "A block is mined"
    """

    def sendVictoryNotification(self, request, context):
        """*
        Send Victory of Miner Game Notification
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_BlockMiningServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'sendVictoryNotification': grpc.unary_unary_rpc_method_handler(
                    servicer.sendVictoryNotification,
                    request_deserializer=BlockMining__pb2.BlockMiningRequest.FromString,
                    response_serializer=BlockMining__pb2.BlockMiningResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'BlockMining', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class BlockMining(object):
    """*
    Block Mining service. It permit to say that
    "A block is mined"
    """

    @staticmethod
    def sendVictoryNotification(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, '/BlockMining/sendVictoryNotification',
            BlockMining__pb2.BlockMiningRequest.SerializeToString,
            BlockMining__pb2.BlockMiningResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
