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

from chirpstack_api.api import multicast_group_pb2 as chirpstack__api_dot_api_dot_multicast__group__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2


class MulticastGroupServiceStub(object):
    """MulticastGroupService is the service managing multicast-groups.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.Create = channel.unary_unary(
                '/api.MulticastGroupService/Create',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.CreateMulticastGroupRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.CreateMulticastGroupResponse.FromString,
                )
        self.Get = channel.unary_unary(
                '/api.MulticastGroupService/Get',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.GetMulticastGroupRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.GetMulticastGroupResponse.FromString,
                )
        self.Update = channel.unary_unary(
                '/api.MulticastGroupService/Update',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.UpdateMulticastGroupRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Delete = channel.unary_unary(
                '/api.MulticastGroupService/Delete',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.DeleteMulticastGroupRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.List = channel.unary_unary(
                '/api.MulticastGroupService/List',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupsRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupsResponse.FromString,
                )
        self.AddDevice = channel.unary_unary(
                '/api.MulticastGroupService/AddDevice',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.AddDeviceToMulticastGroupRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.RemoveDevice = channel.unary_unary(
                '/api.MulticastGroupService/RemoveDevice',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.RemoveDeviceFromMulticastGroupRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.AddGateway = channel.unary_unary(
                '/api.MulticastGroupService/AddGateway',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.AddGatewayToMulticastGroupRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.RemoveGateway = channel.unary_unary(
                '/api.MulticastGroupService/RemoveGateway',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.RemoveGatewayFromMulticastGroupRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.Enqueue = channel.unary_unary(
                '/api.MulticastGroupService/Enqueue',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.EnqueueMulticastGroupQueueItemRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.EnqueueMulticastGroupQueueItemResponse.FromString,
                )
        self.FlushQueue = channel.unary_unary(
                '/api.MulticastGroupService/FlushQueue',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.FlushMulticastGroupQueueRequest.SerializeToString,
                response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
                )
        self.ListQueue = channel.unary_unary(
                '/api.MulticastGroupService/ListQueue',
                request_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupQueueRequest.SerializeToString,
                response_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupQueueResponse.FromString,
                )


class MulticastGroupServiceServicer(object):
    """MulticastGroupService is the service managing multicast-groups.
    """

    def Create(self, request, context):
        """Create the given multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Get(self, request, context):
        """Get returns the multicast group for the given ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Update(self, request, context):
        """Update the given multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Delete(self, request, context):
        """Delete the multicast-group with the given ID.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def List(self, request, context):
        """List the available multicast groups.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddDevice(self, request, context):
        """Add a device to the multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveDevice(self, request, context):
        """Remove a device from the multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def AddGateway(self, request, context):
        """Add a gateway to the multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def RemoveGateway(self, request, context):
        """Remove a gateway from the multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def Enqueue(self, request, context):
        """Add the given item to the multicast group queue.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def FlushQueue(self, request, context):
        """Flush the queue for the given multicast group.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')

    def ListQueue(self, request, context):
        """List the items in the multicast group queue.
        """
        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
        context.set_details('Method not implemented!')
        raise NotImplementedError('Method not implemented!')


def add_MulticastGroupServiceServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'Create': grpc.unary_unary_rpc_method_handler(
                    servicer.Create,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.CreateMulticastGroupRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.CreateMulticastGroupResponse.SerializeToString,
            ),
            'Get': grpc.unary_unary_rpc_method_handler(
                    servicer.Get,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.GetMulticastGroupRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.GetMulticastGroupResponse.SerializeToString,
            ),
            'Update': grpc.unary_unary_rpc_method_handler(
                    servicer.Update,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.UpdateMulticastGroupRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Delete': grpc.unary_unary_rpc_method_handler(
                    servicer.Delete,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.DeleteMulticastGroupRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'List': grpc.unary_unary_rpc_method_handler(
                    servicer.List,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupsRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupsResponse.SerializeToString,
            ),
            'AddDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.AddDevice,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.AddDeviceToMulticastGroupRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RemoveDevice': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveDevice,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.RemoveDeviceFromMulticastGroupRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'AddGateway': grpc.unary_unary_rpc_method_handler(
                    servicer.AddGateway,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.AddGatewayToMulticastGroupRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'RemoveGateway': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveGateway,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.RemoveGatewayFromMulticastGroupRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'Enqueue': grpc.unary_unary_rpc_method_handler(
                    servicer.Enqueue,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.EnqueueMulticastGroupQueueItemRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.EnqueueMulticastGroupQueueItemResponse.SerializeToString,
            ),
            'FlushQueue': grpc.unary_unary_rpc_method_handler(
                    servicer.FlushQueue,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.FlushMulticastGroupQueueRequest.FromString,
                    response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
            ),
            'ListQueue': grpc.unary_unary_rpc_method_handler(
                    servicer.ListQueue,
                    request_deserializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupQueueRequest.FromString,
                    response_serializer=chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupQueueResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'api.MulticastGroupService', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class MulticastGroupService(object):
    """MulticastGroupService is the service managing multicast-groups.
    """

    @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, '/api.MulticastGroupService/Create',
            chirpstack__api_dot_api_dot_multicast__group__pb2.CreateMulticastGroupRequest.SerializeToString,
            chirpstack__api_dot_api_dot_multicast__group__pb2.CreateMulticastGroupResponse.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, '/api.MulticastGroupService/Get',
            chirpstack__api_dot_api_dot_multicast__group__pb2.GetMulticastGroupRequest.SerializeToString,
            chirpstack__api_dot_api_dot_multicast__group__pb2.GetMulticastGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Update(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, '/api.MulticastGroupService/Update',
            chirpstack__api_dot_api_dot_multicast__group__pb2.UpdateMulticastGroupRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.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, '/api.MulticastGroupService/Delete',
            chirpstack__api_dot_api_dot_multicast__group__pb2.DeleteMulticastGroupRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def List(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, '/api.MulticastGroupService/List',
            chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupsRequest.SerializeToString,
            chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupsResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddDevice(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, '/api.MulticastGroupService/AddDevice',
            chirpstack__api_dot_api_dot_multicast__group__pb2.AddDeviceToMulticastGroupRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveDevice(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, '/api.MulticastGroupService/RemoveDevice',
            chirpstack__api_dot_api_dot_multicast__group__pb2.RemoveDeviceFromMulticastGroupRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddGateway(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, '/api.MulticastGroupService/AddGateway',
            chirpstack__api_dot_api_dot_multicast__group__pb2.AddGatewayToMulticastGroupRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveGateway(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, '/api.MulticastGroupService/RemoveGateway',
            chirpstack__api_dot_api_dot_multicast__group__pb2.RemoveGatewayFromMulticastGroupRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def Enqueue(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, '/api.MulticastGroupService/Enqueue',
            chirpstack__api_dot_api_dot_multicast__group__pb2.EnqueueMulticastGroupQueueItemRequest.SerializeToString,
            chirpstack__api_dot_api_dot_multicast__group__pb2.EnqueueMulticastGroupQueueItemResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def FlushQueue(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, '/api.MulticastGroupService/FlushQueue',
            chirpstack__api_dot_api_dot_multicast__group__pb2.FlushMulticastGroupQueueRequest.SerializeToString,
            google_dot_protobuf_dot_empty__pb2.Empty.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def ListQueue(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, '/api.MulticastGroupService/ListQueue',
            chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupQueueRequest.SerializeToString,
            chirpstack__api_dot_api_dot_multicast__group__pb2.ListMulticastGroupQueueResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
