# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

import kickredis.granite.kicker_pb2 as kicker__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.AddDevice = channel.unary_unary(
            "/kicker.KickerEngine/AddDevice",
            request_serializer=kicker__pb2.Device.SerializeToString,
            response_deserializer=kicker__pb2.Response.FromString,
        )
        self.AddQuery = channel.unary_stream(
            "/kicker.KickerEngine/AddQuery",
            request_serializer=kicker__pb2.Query.SerializeToString,
            response_deserializer=kicker__pb2.MatchResult.FromString,
        )
        self.PushData = channel.unary_unary(
            "/kicker.KickerEngine/PushData",
            request_serializer=kicker__pb2.Data.SerializeToString,
            response_deserializer=kicker__pb2.Response.FromString,
        )
        self.SynchronizeDeviceTime = channel.unary_unary(
            "/kicker.KickerEngine/SynchronizeDeviceTime",
            request_serializer=kicker__pb2.SynchronizeRequest.SerializeToString,
            response_deserializer=kicker__pb2.Response.FromString,
        )


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

    def AddDevice(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 AddQuery(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 PushData(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 SynchronizeDeviceTime(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_KickerEngineServicer_to_server(servicer, server):
    rpc_method_handlers = {
        "AddDevice": grpc.unary_unary_rpc_method_handler(
            servicer.AddDevice,
            request_deserializer=kicker__pb2.Device.FromString,
            response_serializer=kicker__pb2.Response.SerializeToString,
        ),
        "AddQuery": grpc.unary_stream_rpc_method_handler(
            servicer.AddQuery,
            request_deserializer=kicker__pb2.Query.FromString,
            response_serializer=kicker__pb2.MatchResult.SerializeToString,
        ),
        "PushData": grpc.unary_unary_rpc_method_handler(
            servicer.PushData,
            request_deserializer=kicker__pb2.Data.FromString,
            response_serializer=kicker__pb2.Response.SerializeToString,
        ),
        "SynchronizeDeviceTime": grpc.unary_unary_rpc_method_handler(
            servicer.SynchronizeDeviceTime,
            request_deserializer=kicker__pb2.SynchronizeRequest.FromString,
            response_serializer=kicker__pb2.Response.SerializeToString,
        ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
        "kicker.KickerEngine", rpc_method_handlers
    )
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def AddDevice(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/kicker.KickerEngine/AddDevice",
            kicker__pb2.Device.SerializeToString,
            kicker__pb2.Response.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def AddQuery(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_stream(
            request,
            target,
            "/kicker.KickerEngine/AddQuery",
            kicker__pb2.Query.SerializeToString,
            kicker__pb2.MatchResult.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def PushData(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/kicker.KickerEngine/PushData",
            kicker__pb2.Data.SerializeToString,
            kicker__pb2.Response.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )

    @staticmethod
    def SynchronizeDeviceTime(
        request,
        target,
        options=(),
        channel_credentials=None,
        call_credentials=None,
        compression=None,
        wait_for_ready=None,
        timeout=None,
        metadata=None,
    ):
        return grpc.experimental.unary_unary(
            request,
            target,
            "/kicker.KickerEngine/SynchronizeDeviceTime",
            kicker__pb2.SynchronizeRequest.SerializeToString,
            kicker__pb2.Response.FromString,
            options,
            channel_credentials,
            call_credentials,
            compression,
            wait_for_ready,
            timeout,
            metadata,
        )
