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

from . import limit_pb2 as limit__pb2


class LimitInterfaceStub(object):
    """The Limit class contains data that allows users to place limits
    on the maximum number of running frames for a certain type of layer.

    -------- Services --------]

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/limit.LimitInterface/Create',
                request_serializer=limit__pb2.LimitCreateRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitCreateResponse.FromString,
                )
        self.Delete = channel.unary_unary(
                '/limit.LimitInterface/Delete',
                request_serializer=limit__pb2.LimitDeleteRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitDeleteResponse.FromString,
                )
        self.Find = channel.unary_unary(
                '/limit.LimitInterface/Find',
                request_serializer=limit__pb2.LimitFindRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitFindResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/limit.LimitInterface/Get',
                request_serializer=limit__pb2.LimitGetRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitGetResponse.FromString,
                )
        self.GetAll = channel.unary_unary(
                '/limit.LimitInterface/GetAll',
                request_serializer=limit__pb2.LimitGetAllRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitGetAllResponse.FromString,
                )
        self.Rename = channel.unary_unary(
                '/limit.LimitInterface/Rename',
                request_serializer=limit__pb2.LimitRenameRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitRenameResponse.FromString,
                )
        self.SetMaxValue = channel.unary_unary(
                '/limit.LimitInterface/SetMaxValue',
                request_serializer=limit__pb2.LimitSetMaxValueRequest.SerializeToString,
                response_deserializer=limit__pb2.LimitSetMaxValueResponse.FromString,
                )


class LimitInterfaceServicer(object):
    """The Limit class contains data that allows users to place limits
    on the maximum number of running frames for a certain type of layer.

    -------- Services --------]

    """

    def Create(self, request, context):
        """Create a new limit with a name and max value
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete the specified limit.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Find(self, request, context):
        """Find a limit by name
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get a limit by id
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def GetAll(self, request, context):
        """Get all limits
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Rename(self, request, context):
        """Rename an existing limit
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMaxValue(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_LimitInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=limit__pb2.LimitCreateRequest.FromString,
                    response_serializer=limit__pb2.LimitCreateResponse.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=limit__pb2.LimitDeleteRequest.FromString,
                    response_serializer=limit__pb2.LimitDeleteResponse.SerializeToString,
            ),
            'Find': grpc.unary_unary_rpc_method_handler(
                    servicer.Find,
                    request_deserializer=limit__pb2.LimitFindRequest.FromString,
                    response_serializer=limit__pb2.LimitFindResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=limit__pb2.LimitGetRequest.FromString,
                    response_serializer=limit__pb2.LimitGetResponse.SerializeToString,
            ),
            'GetAll': grpc.unary_unary_rpc_method_handler(
                    servicer.GetAll,
                    request_deserializer=limit__pb2.LimitGetAllRequest.FromString,
                    response_serializer=limit__pb2.LimitGetAllResponse.SerializeToString,
            ),
            'Rename': grpc.unary_unary_rpc_method_handler(
                    servicer.Rename,
                    request_deserializer=limit__pb2.LimitRenameRequest.FromString,
                    response_serializer=limit__pb2.LimitRenameResponse.SerializeToString,
            ),
            'SetMaxValue': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMaxValue,
                    request_deserializer=limit__pb2.LimitSetMaxValueRequest.FromString,
                    response_serializer=limit__pb2.LimitSetMaxValueResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'limit.LimitInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class LimitInterface(object):
    """The Limit class contains data that allows users to place limits
    on the maximum number of running frames for a certain type of layer.

    -------- Services --------]

    """

    @staticmethod
    def Create(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, '/limit.LimitInterface/Create',
            limit__pb2.LimitCreateRequest.SerializeToString,
            limit__pb2.LimitCreateResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Delete(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, '/limit.LimitInterface/Delete',
            limit__pb2.LimitDeleteRequest.SerializeToString,
            limit__pb2.LimitDeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Find(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, '/limit.LimitInterface/Find',
            limit__pb2.LimitFindRequest.SerializeToString,
            limit__pb2.LimitFindResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @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, '/limit.LimitInterface/Get',
            limit__pb2.LimitGetRequest.SerializeToString,
            limit__pb2.LimitGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def GetAll(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, '/limit.LimitInterface/GetAll',
            limit__pb2.LimitGetAllRequest.SerializeToString,
            limit__pb2.LimitGetAllResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Rename(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, '/limit.LimitInterface/Rename',
            limit__pb2.LimitRenameRequest.SerializeToString,
            limit__pb2.LimitRenameResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetMaxValue(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, '/limit.LimitInterface/SetMaxValue',
            limit__pb2.LimitSetMaxValueRequest.SerializeToString,
            limit__pb2.LimitSetMaxValueResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)