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

from ..proto import base_pb2 as proto_dot_base__pb2
from ..proto import register_pb2 as proto_dot_register__pb2


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

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

        Args:
            channel: A grpc.Channel.
        """
        self.Get = channel.unary_unary(
                '/reg.Register/Get',
                request_serializer=proto_dot_register__pb2.RegisterId.SerializeToString,
                response_deserializer=proto_dot_register__pb2.RegisterValue.FromString,
                )
        self.Set = channel.unary_unary(
                '/reg.Register/Set',
                request_serializer=proto_dot_register__pb2.RegisterIdValuePair.SerializeToString,
                response_deserializer=proto_dot_base__pb2.Boolean.FromString,
                )
        self.Size = channel.unary_unary(
                '/reg.Register/Size',
                request_serializer=proto_dot_base__pb2.Empty.SerializeToString,
                response_deserializer=proto_dot_base__pb2.UnsignedNumberValue.FromString,
                )


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

    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 Size(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_RegisterServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=proto_dot_register__pb2.RegisterId.FromString,
                    response_serializer=proto_dot_register__pb2.RegisterValue.SerializeToString,
            ),
            'Set': grpc.unary_unary_rpc_method_handler(
                    servicer.Set,
                    request_deserializer=proto_dot_register__pb2.RegisterIdValuePair.FromString,
                    response_serializer=proto_dot_base__pb2.Boolean.SerializeToString,
            ),
            'Size': grpc.unary_unary_rpc_method_handler(
                    servicer.Size,
                    request_deserializer=proto_dot_base__pb2.Empty.FromString,
                    response_serializer=proto_dot_base__pb2.UnsignedNumberValue.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'reg.Register', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


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

    @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, '/reg.Register/Get',
            proto_dot_register__pb2.RegisterId.SerializeToString,
            proto_dot_register__pb2.RegisterValue.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, '/reg.Register/Set',
            proto_dot_register__pb2.RegisterIdValuePair.SerializeToString,
            proto_dot_base__pb2.Boolean.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Size(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, '/reg.Register/Size',
            proto_dot_base__pb2.Empty.SerializeToString,
            proto_dot_base__pb2.UnsignedNumberValue.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
