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

from . import subscription_pb2 as subscription__pb2


class SubscriptionInterfaceStub(object):
    """Subscriptions
    A subscription is what a show sets up when they want to use hosts in
    an allocation.

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

    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Delete = channel.unary_unary(
                '/subscription.SubscriptionInterface/Delete',
                request_serializer=subscription__pb2.SubscriptionDeleteRequest.SerializeToString,
                response_deserializer=subscription__pb2.SubscriptionDeleteResponse.FromString,
                )
        self.Find = channel.unary_unary(
                '/subscription.SubscriptionInterface/Find',
                request_serializer=subscription__pb2.SubscriptionFindRequest.SerializeToString,
                response_deserializer=subscription__pb2.SubscriptionFindResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/subscription.SubscriptionInterface/Get',
                request_serializer=subscription__pb2.SubscriptionGetRequest.SerializeToString,
                response_deserializer=subscription__pb2.SubscriptionGetResponse.FromString,
                )
        self.SetBurst = channel.unary_unary(
                '/subscription.SubscriptionInterface/SetBurst',
                request_serializer=subscription__pb2.SubscriptionSetBurstRequest.SerializeToString,
                response_deserializer=subscription__pb2.SubscriptionSetBurstResponse.FromString,
                )
        self.SetSize = channel.unary_unary(
                '/subscription.SubscriptionInterface/SetSize',
                request_serializer=subscription__pb2.SubscriptionSetSizeRequest.SerializeToString,
                response_deserializer=subscription__pb2.SubscriptionSetSizeResponse.FromString,
                )


class SubscriptionInterfaceServicer(object):
    """Subscriptions
    A subscription is what a show sets up when they want to use hosts in
    an allocation.

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

    """

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

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

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

    def SetBurst(self, request, context):
        """Set the burst size of a subscription
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def SetSize(self, request, context):
        """Set the size of a subscription
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_SubscriptionInterfaceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=subscription__pb2.SubscriptionDeleteRequest.FromString,
                    response_serializer=subscription__pb2.SubscriptionDeleteResponse.SerializeToString,
            ),
            'Find': grpc.unary_unary_rpc_method_handler(
                    servicer.Find,
                    request_deserializer=subscription__pb2.SubscriptionFindRequest.FromString,
                    response_serializer=subscription__pb2.SubscriptionFindResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=subscription__pb2.SubscriptionGetRequest.FromString,
                    response_serializer=subscription__pb2.SubscriptionGetResponse.SerializeToString,
            ),
            'SetBurst': grpc.unary_unary_rpc_method_handler(
                    servicer.SetBurst,
                    request_deserializer=subscription__pb2.SubscriptionSetBurstRequest.FromString,
                    response_serializer=subscription__pb2.SubscriptionSetBurstResponse.SerializeToString,
            ),
            'SetSize': grpc.unary_unary_rpc_method_handler(
                    servicer.SetSize,
                    request_deserializer=subscription__pb2.SubscriptionSetSizeRequest.FromString,
                    response_serializer=subscription__pb2.SubscriptionSetSizeResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'subscription.SubscriptionInterface', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class SubscriptionInterface(object):
    """Subscriptions
    A subscription is what a show sets up when they want to use hosts in
    an allocation.

    -------- 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, '/subscription.SubscriptionInterface/Delete',
            subscription__pb2.SubscriptionDeleteRequest.SerializeToString,
            subscription__pb2.SubscriptionDeleteResponse.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, '/subscription.SubscriptionInterface/Find',
            subscription__pb2.SubscriptionFindRequest.SerializeToString,
            subscription__pb2.SubscriptionFindResponse.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, '/subscription.SubscriptionInterface/Get',
            subscription__pb2.SubscriptionGetRequest.SerializeToString,
            subscription__pb2.SubscriptionGetResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetBurst(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, '/subscription.SubscriptionInterface/SetBurst',
            subscription__pb2.SubscriptionSetBurstRequest.SerializeToString,
            subscription__pb2.SubscriptionSetBurstResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def SetSize(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, '/subscription.SubscriptionInterface/SetSize',
            subscription__pb2.SubscriptionSetSizeRequest.SerializeToString,
            subscription__pb2.SubscriptionSetSizeResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)