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

import compute_pb2 as compute__pb2


class ComputeServiceStub(object):
    """SERVICE
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.validateName = channel.unary_unary(
                '/ComputeService/validateName',
                request_serializer=compute__pb2.NameRequest.SerializeToString,
                response_deserializer=compute__pb2.NameResponse.FromString,
                )
        self.retrieveImages = channel.unary_stream(
                '/ComputeService/retrieveImages',
                request_serializer=compute__pb2.ImageRequest.SerializeToString,
                response_deserializer=compute__pb2.ImageResponse.FromString,
                )
        self.validateCapacity = channel.unary_unary(
                '/ComputeService/validateCapacity',
                request_serializer=compute__pb2.CapacityRequest.SerializeToString,
                response_deserializer=compute__pb2.CapacityResponse.FromString,
                )


class ComputeServiceServicer(object):
    """SERVICE
    """

    def validateName(self, request, context):
        """UNARY
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def retrieveImages(self, request, context):
        """SERVER STREAMING
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def validateCapacity(self, request, context):
        """UNARY
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_ComputeServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'validateName': grpc.unary_unary_rpc_method_handler(
                    servicer.validateName,
                    request_deserializer=compute__pb2.NameRequest.FromString,
                    response_serializer=compute__pb2.NameResponse.SerializeToString,
            ),
            'retrieveImages': grpc.unary_stream_rpc_method_handler(
                    servicer.retrieveImages,
                    request_deserializer=compute__pb2.ImageRequest.FromString,
                    response_serializer=compute__pb2.ImageResponse.SerializeToString,
            ),
            'validateCapacity': grpc.unary_unary_rpc_method_handler(
                    servicer.validateCapacity,
                    request_deserializer=compute__pb2.CapacityRequest.FromString,
                    response_serializer=compute__pb2.CapacityResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'ComputeService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class ComputeService(object):
    """SERVICE
    """

    @staticmethod
    def validateName(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, '/ComputeService/validateName',
            compute__pb2.NameRequest.SerializeToString,
            compute__pb2.NameResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def retrieveImages(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_stream(request, target, '/ComputeService/retrieveImages',
            compute__pb2.ImageRequest.SerializeToString,
            compute__pb2.ImageResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def validateCapacity(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, '/ComputeService/validateCapacity',
            compute__pb2.CapacityRequest.SerializeToString,
            compute__pb2.CapacityResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
