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

import fan_pb2 as fan__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.GetAllFansId = channel.unary_unary(
                '/reachy.sdk.fan.FanControllerService/GetAllFansId',
                request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
                response_deserializer=fan__pb2.FansId.FromString,
                )
        self.GetFansState = channel.unary_unary(
                '/reachy.sdk.fan.FanControllerService/GetFansState',
                request_serializer=fan__pb2.FansStateRequest.SerializeToString,
                response_deserializer=fan__pb2.FansState.FromString,
                )
        self.SendFansCommands = channel.unary_unary(
                '/reachy.sdk.fan.FanControllerService/SendFansCommands',
                request_serializer=fan__pb2.FansCommand.SerializeToString,
                response_deserializer=fan__pb2.FansCommandAck.FromString,
                )


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

    def GetAllFansId(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 GetFansState(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 SendFansCommands(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_FanControllerServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'GetAllFansId': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAllFansId,
                    request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                    response_serializer=fan__pb2.FansId.SerializeToString,
            ),
            'GetFansState': grpc.unary_unary_rpc_method_handler(
                    servicer.GetFansState,
                    request_deserializer=fan__pb2.FansStateRequest.FromString,
                    response_serializer=fan__pb2.FansState.SerializeToString,
            ),
            'SendFansCommands': grpc.unary_unary_rpc_method_handler(
                    servicer.SendFansCommands,
                    request_deserializer=fan__pb2.FansCommand.FromString,
                    response_serializer=fan__pb2.FansCommandAck.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'reachy.sdk.fan.FanControllerService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def GetAllFansId(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, '/reachy.sdk.fan.FanControllerService/GetAllFansId',
            google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            fan__pb2.FansId.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetFansState(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, '/reachy.sdk.fan.FanControllerService/GetFansState',
            fan__pb2.FansStateRequest.SerializeToString,
            fan__pb2.FansState.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SendFansCommands(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, '/reachy.sdk.fan.FanControllerService/SendFansCommands',
            fan__pb2.FansCommand.SerializeToString,
            fan__pb2.FansCommandAck.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
