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

from kuksa.val import kuksa_pb2 as kuksa_dot_val_dot_kuksa__pb2


class kuksa_grpc_ifStub(object):
    """The connecting service definition.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.get = channel.unary_unary(
                '/kuksa.kuksa_grpc_if/get',
                request_serializer=kuksa_dot_val_dot_kuksa__pb2.GetRequest.SerializeToString,
                response_deserializer=kuksa_dot_val_dot_kuksa__pb2.GetResponse.FromString,
                )
        self.set = channel.unary_unary(
                '/kuksa.kuksa_grpc_if/set',
                request_serializer=kuksa_dot_val_dot_kuksa__pb2.SetRequest.SerializeToString,
                response_deserializer=kuksa_dot_val_dot_kuksa__pb2.SetResponse.FromString,
                )
        self.subscribe = channel.stream_stream(
                '/kuksa.kuksa_grpc_if/subscribe',
                request_serializer=kuksa_dot_val_dot_kuksa__pb2.SubscribeRequest.SerializeToString,
                response_deserializer=kuksa_dot_val_dot_kuksa__pb2.SubscribeResponse.FromString,
                )
        self.authorize = channel.unary_unary(
                '/kuksa.kuksa_grpc_if/authorize',
                request_serializer=kuksa_dot_val_dot_kuksa__pb2.AuthRequest.SerializeToString,
                response_deserializer=kuksa_dot_val_dot_kuksa__pb2.AuthResponse.FromString,
                )


class kuksa_grpc_ifServicer(object):
    """The connecting service definition.
    """

    def get(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 set(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 subscribe(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 authorize(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_kuksa_grpc_ifServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=kuksa_dot_val_dot_kuksa__pb2.GetRequest.FromString,
                    response_serializer=kuksa_dot_val_dot_kuksa__pb2.GetResponse.SerializeToString,
            ),
            'set': grpc.unary_unary_rpc_method_handler(
                    servicer.set,
                    request_deserializer=kuksa_dot_val_dot_kuksa__pb2.SetRequest.FromString,
                    response_serializer=kuksa_dot_val_dot_kuksa__pb2.SetResponse.SerializeToString,
            ),
            'subscribe': grpc.stream_stream_rpc_method_handler(
                    servicer.subscribe,
                    request_deserializer=kuksa_dot_val_dot_kuksa__pb2.SubscribeRequest.FromString,
                    response_serializer=kuksa_dot_val_dot_kuksa__pb2.SubscribeResponse.SerializeToString,
            ),
            'authorize': grpc.unary_unary_rpc_method_handler(
                    servicer.authorize,
                    request_deserializer=kuksa_dot_val_dot_kuksa__pb2.AuthRequest.FromString,
                    response_serializer=kuksa_dot_val_dot_kuksa__pb2.AuthResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'kuksa.kuksa_grpc_if', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class kuksa_grpc_if(object):
    """The connecting service definition.
    """

    @staticmethod
    def get(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, '/kuksa.kuksa_grpc_if/get',
            kuksa_dot_val_dot_kuksa__pb2.GetRequest.SerializeToString,
            kuksa_dot_val_dot_kuksa__pb2.GetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def set(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, '/kuksa.kuksa_grpc_if/set',
            kuksa_dot_val_dot_kuksa__pb2.SetRequest.SerializeToString,
            kuksa_dot_val_dot_kuksa__pb2.SetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def subscribe(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, '/kuksa.kuksa_grpc_if/subscribe',
            kuksa_dot_val_dot_kuksa__pb2.SubscribeRequest.SerializeToString,
            kuksa_dot_val_dot_kuksa__pb2.SubscribeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def authorize(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, '/kuksa.kuksa_grpc_if/authorize',
            kuksa_dot_val_dot_kuksa__pb2.AuthRequest.SerializeToString,
            kuksa_dot_val_dot_kuksa__pb2.AuthResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
