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

from grpc_helper.api import common_pb2 as grpc__helper_dot_api_dot_common__pb2
from grpc_helper.api import config_pb2 as grpc__helper_dot_api_dot_config__pb2


class ConfigServiceStub(object):
    """Config service
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.get = channel.unary_unary(
                '/ConfigService/get',
                request_serializer=grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_config__pb2.ConfigStatus.FromString,
                )
        self.reset = channel.unary_unary(
                '/ConfigService/reset',
                request_serializer=grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_config__pb2.ConfigStatus.FromString,
                )
        self.set = channel.unary_unary(
                '/ConfigService/set',
                request_serializer=grpc__helper_dot_api_dot_config__pb2.ConfigUpdate.SerializeToString,
                response_deserializer=grpc__helper_dot_api_dot_config__pb2.ConfigStatus.FromString,
                )


class ConfigServiceServicer(object):
    """Config service
    """

    def get(self, request, context):
        """Get configuration items
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def reset(self, request, context):
        """Reset configuration items to their default value
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def set(self, request, context):
        """Update configuration items values
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ConfigServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'get': grpc.unary_unary_rpc_method_handler(
                    servicer.get,
                    request_deserializer=grpc__helper_dot_api_dot_common__pb2.Filter.FromString,
                    response_serializer=grpc__helper_dot_api_dot_config__pb2.ConfigStatus.SerializeToString,
            ),
            'reset': grpc.unary_unary_rpc_method_handler(
                    servicer.reset,
                    request_deserializer=grpc__helper_dot_api_dot_common__pb2.Filter.FromString,
                    response_serializer=grpc__helper_dot_api_dot_config__pb2.ConfigStatus.SerializeToString,
            ),
            'set': grpc.unary_unary_rpc_method_handler(
                    servicer.set,
                    request_deserializer=grpc__helper_dot_api_dot_config__pb2.ConfigUpdate.FromString,
                    response_serializer=grpc__helper_dot_api_dot_config__pb2.ConfigStatus.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ConfigService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ConfigService(object):
    """Config service
    """

    @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, '/ConfigService/get',
            grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
            grpc__helper_dot_api_dot_config__pb2.ConfigStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def reset(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, '/ConfigService/reset',
            grpc__helper_dot_api_dot_common__pb2.Filter.SerializeToString,
            grpc__helper_dot_api_dot_config__pb2.ConfigStatus.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, '/ConfigService/set',
            grpc__helper_dot_api_dot_config__pb2.ConfigUpdate.SerializeToString,
            grpc__helper_dot_api_dot_config__pb2.ConfigStatus.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
