# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from python2sky.proto.common import common_pb2 as common_dot_common__pb2
from python2sky.proto.register import Register_pb2 as register_dot_Register__pb2


class RegisterStub(object):
    """register service for ApplicationCode, this service is called when service starts.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.doServiceRegister = channel.unary_unary(
                '/Register/doServiceRegister',
                request_serializer=register_dot_Register__pb2.Services.SerializeToString,
                response_deserializer=register_dot_Register__pb2.ServiceRegisterMapping.FromString,
                )
        self.doServiceInstanceRegister = channel.unary_unary(
                '/Register/doServiceInstanceRegister',
                request_serializer=register_dot_Register__pb2.ServiceInstances.SerializeToString,
                response_deserializer=register_dot_Register__pb2.ServiceInstanceRegisterMapping.FromString,
                )
        self.doEndpointRegister = channel.unary_unary(
                '/Register/doEndpointRegister',
                request_serializer=register_dot_Register__pb2.Endpoints.SerializeToString,
                response_deserializer=register_dot_Register__pb2.EndpointMapping.FromString,
                )
        self.doNetworkAddressRegister = channel.unary_unary(
                '/Register/doNetworkAddressRegister',
                request_serializer=register_dot_Register__pb2.NetAddresses.SerializeToString,
                response_deserializer=register_dot_Register__pb2.NetAddressMapping.FromString,
                )
        self.doServiceAndNetworkAddressMappingRegister = channel.unary_unary(
                '/Register/doServiceAndNetworkAddressMappingRegister',
                request_serializer=register_dot_Register__pb2.ServiceAndNetworkAddressMappings.SerializeToString,
                response_deserializer=common_dot_common__pb2.Commands.FromString,
                )


class RegisterServicer(object):
    """register service for ApplicationCode, this service is called when service starts.
    """

    def doServiceRegister(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 doServiceInstanceRegister(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 doEndpointRegister(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 doNetworkAddressRegister(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 doServiceAndNetworkAddressMappingRegister(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 = {
            'doServiceRegister': grpc.unary_unary_rpc_method_handler(
                    servicer.doServiceRegister,
                    request_deserializer=register_dot_Register__pb2.Services.FromString,
                    response_serializer=register_dot_Register__pb2.ServiceRegisterMapping.SerializeToString,
            ),
            'doServiceInstanceRegister': grpc.unary_unary_rpc_method_handler(
                    servicer.doServiceInstanceRegister,
                    request_deserializer=register_dot_Register__pb2.ServiceInstances.FromString,
                    response_serializer=register_dot_Register__pb2.ServiceInstanceRegisterMapping.SerializeToString,
            ),
            'doEndpointRegister': grpc.unary_unary_rpc_method_handler(
                    servicer.doEndpointRegister,
                    request_deserializer=register_dot_Register__pb2.Endpoints.FromString,
                    response_serializer=register_dot_Register__pb2.EndpointMapping.SerializeToString,
            ),
            'doNetworkAddressRegister': grpc.unary_unary_rpc_method_handler(
                    servicer.doNetworkAddressRegister,
                    request_deserializer=register_dot_Register__pb2.NetAddresses.FromString,
                    response_serializer=register_dot_Register__pb2.NetAddressMapping.SerializeToString,
            ),
            'doServiceAndNetworkAddressMappingRegister': grpc.unary_unary_rpc_method_handler(
                    servicer.doServiceAndNetworkAddressMappingRegister,
                    request_deserializer=register_dot_Register__pb2.ServiceAndNetworkAddressMappings.FromString,
                    response_serializer=common_dot_common__pb2.Commands.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'Register', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class Register(object):
    """register service for ApplicationCode, this service is called when service starts.
    """

    @staticmethod
    def doServiceRegister(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Register/doServiceRegister',
            register_dot_Register__pb2.Services.SerializeToString,
            register_dot_Register__pb2.ServiceRegisterMapping.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def doServiceInstanceRegister(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Register/doServiceInstanceRegister',
            register_dot_Register__pb2.ServiceInstances.SerializeToString,
            register_dot_Register__pb2.ServiceInstanceRegisterMapping.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def doEndpointRegister(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Register/doEndpointRegister',
            register_dot_Register__pb2.Endpoints.SerializeToString,
            register_dot_Register__pb2.EndpointMapping.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def doNetworkAddressRegister(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Register/doNetworkAddressRegister',
            register_dot_Register__pb2.NetAddresses.SerializeToString,
            register_dot_Register__pb2.NetAddressMapping.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def doServiceAndNetworkAddressMappingRegister(request,
            target,
            options=(),
            channel_credentials=None,
            call_credentials=None,
            compression=None,
            wait_for_ready=None,
            timeout=None,
            metadata=None):
        return grpc.experimental.unary_unary(request, target, '/Register/doServiceAndNetworkAddressMappingRegister',
            register_dot_Register__pb2.ServiceAndNetworkAddressMappings.SerializeToString,
            common_dot_common__pb2.Commands.FromString,
            options, channel_credentials,
            call_credentials, compression, wait_for_ready, timeout, metadata)
