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

import grpc_sample.grpclib.test_pb2 as test__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Simple = channel.unary_unary(
                '/fiot.FIOT/Simple',
                request_serializer=test__pb2.Param.SerializeToString,
                response_deserializer=test__pb2.Res.FromString,
                )
        self.StreamResp = channel.unary_stream(
                '/fiot.FIOT/StreamResp',
                request_serializer=test__pb2.Param.SerializeToString,
                response_deserializer=test__pb2.Res.FromString,
                )
        self.StreamReq = channel.stream_unary(
                '/fiot.FIOT/StreamReq',
                request_serializer=test__pb2.Param.SerializeToString,
                response_deserializer=test__pb2.Res.FromString,
                )
        self.BiStream = channel.stream_stream(
                '/fiot.FIOT/BiStream',
                request_serializer=test__pb2.Param.SerializeToString,
                response_deserializer=test__pb2.Res.FromString,
                )


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

    def Simple(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 StreamResp(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 StreamReq(self, request_iterator, 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 BiStream(self, request_iterator, 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_FIOTServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Simple': grpc.unary_unary_rpc_method_handler(
                    servicer.Simple,
                    request_deserializer=test__pb2.Param.FromString,
                    response_serializer=test__pb2.Res.SerializeToString,
            ),
            'StreamResp': grpc.unary_stream_rpc_method_handler(
                    servicer.StreamResp,
                    request_deserializer=test__pb2.Param.FromString,
                    response_serializer=test__pb2.Res.SerializeToString,
            ),
            'StreamReq': grpc.stream_unary_rpc_method_handler(
                    servicer.StreamReq,
                    request_deserializer=test__pb2.Param.FromString,
                    response_serializer=test__pb2.Res.SerializeToString,
            ),
            'BiStream': grpc.stream_stream_rpc_method_handler(
                    servicer.BiStream,
                    request_deserializer=test__pb2.Param.FromString,
                    response_serializer=test__pb2.Res.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'fiot.FIOT', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @staticmethod
    def Simple(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, '/fiot.FIOT/Simple',
            test__pb2.Param.SerializeToString,
            test__pb2.Res.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamResp(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_stream(request, target, '/fiot.FIOT/StreamResp',
            test__pb2.Param.SerializeToString,
            test__pb2.Res.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def StreamReq(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_unary(request_iterator, target, '/fiot.FIOT/StreamReq',
            test__pb2.Param.SerializeToString,
            test__pb2.Res.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def BiStream(request_iterator,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            insecure=False,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.stream_stream(request_iterator, target, '/fiot.FIOT/BiStream',
            test__pb2.Param.SerializeToString,
            test__pb2.Res.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
