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

from . import renderPartition_pb2 as renderPartition__pb2


class RenderPartitionInterfaceStub(object):
    """-------- Services --------]

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Delete = channel.unary_unary(
                '/renderPartition.RenderPartitionInterface/Delete',
                request_serializer=renderPartition__pb2.RenderPartDeleteRequest.SerializeToString,
                response_deserializer=renderPartition__pb2.RenderPartDeleteResponse.FromString,
                )
        self.SetMaxResources = channel.unary_unary(
                '/renderPartition.RenderPartitionInterface/SetMaxResources',
                request_serializer=renderPartition__pb2.RenderPartSetMaxResourcesRequest.SerializeToString,
                response_deserializer=renderPartition__pb2.RenderPartSetMaxResourcesResponse.FromString,
                )


class RenderPartitionInterfaceServicer(object):
    """-------- Services --------]

    """

    def Delete(self, request, context):
        """Deletes the host local setup.  Any proc that is running from this should be killed or else the counts
        could be off.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetMaxResources(self, request, context):
        """Reset the maximum amount of cores and memory for this render partition.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_RenderPartitionInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=renderPartition__pb2.RenderPartDeleteRequest.FromString,
                    response_serializer=renderPartition__pb2.RenderPartDeleteResponse.SerializeToString,
            ),
            'SetMaxResources': grpc.unary_unary_rpc_method_handler(
                    servicer.SetMaxResources,
                    request_deserializer=renderPartition__pb2.RenderPartSetMaxResourcesRequest.FromString,
                    response_serializer=renderPartition__pb2.RenderPartSetMaxResourcesResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'renderPartition.RenderPartitionInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class RenderPartitionInterface(object):
    """-------- Services --------]

    """

    @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, '/renderPartition.RenderPartitionInterface/Delete',
            renderPartition__pb2.RenderPartDeleteRequest.SerializeToString,
            renderPartition__pb2.RenderPartDeleteResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetMaxResources(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, '/renderPartition.RenderPartitionInterface/SetMaxResources',
            renderPartition__pb2.RenderPartSetMaxResourcesRequest.SerializeToString,
            renderPartition__pb2.RenderPartSetMaxResourcesResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)