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

from cs3.admin.group.v1beta1 import group_api_pb2 as cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2


class GroupAPIStub(object):
    """Provides a write only API for managing groups.
    """

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

        Args:
            channel: A grpc.Channel.
        """
        self.CreateGroup = channel.unary_unary(
                '/cs3.admin.group.v1beta1.GroupAPI/CreateGroup',
                request_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.CreateGroupRequest.SerializeToString,
                response_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.CreateGroupResponse.FromString,
                )
        self.DeleteGroup = channel.unary_unary(
                '/cs3.admin.group.v1beta1.GroupAPI/DeleteGroup',
                request_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.DeleteGroupRequest.SerializeToString,
                response_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.DeleteGroupResponse.FromString,
                )
        self.AddUserToGroup = channel.unary_unary(
                '/cs3.admin.group.v1beta1.GroupAPI/AddUserToGroup',
                request_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.AddUserToGroupRequest.SerializeToString,
                response_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.AddUserToGroupResponse.FromString,
                )
        self.RemoveUserFromGroup = channel.unary_unary(
                '/cs3.admin.group.v1beta1.GroupAPI/RemoveUserFromGroup',
                request_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.RemoveUserFromGroupRequest.SerializeToString,
                response_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.RemoveUserFromGroupResponse.FromString,
                )


class GroupAPIServicer(object):
    """Provides a write only API for managing groups.
    """

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

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

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

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


def add_GroupAPIServicer_to_server(servicer, server):
    rpc_method_handlers = {
            'CreateGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.CreateGroup,
                    request_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.CreateGroupRequest.FromString,
                    response_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.CreateGroupResponse.SerializeToString,
            ),
            'DeleteGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.DeleteGroup,
                    request_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.DeleteGroupRequest.FromString,
                    response_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.DeleteGroupResponse.SerializeToString,
            ),
            'AddUserToGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.AddUserToGroup,
                    request_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.AddUserToGroupRequest.FromString,
                    response_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.AddUserToGroupResponse.SerializeToString,
            ),
            'RemoveUserFromGroup': grpc.unary_unary_rpc_method_handler(
                    servicer.RemoveUserFromGroup,
                    request_deserializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.RemoveUserFromGroupRequest.FromString,
                    response_serializer=cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.RemoveUserFromGroupResponse.SerializeToString,
            ),
    }
    generic_handler = grpc.method_handlers_generic_handler(
            'cs3.admin.group.v1beta1.GroupAPI', rpc_method_handlers)
    server.add_generic_rpc_handlers((generic_handler,))


 # This class is part of an EXPERIMENTAL API.
class GroupAPI(object):
    """Provides a write only API for managing groups.
    """

    @staticmethod
    def CreateGroup(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, '/cs3.admin.group.v1beta1.GroupAPI/CreateGroup',
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.CreateGroupRequest.SerializeToString,
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.CreateGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def DeleteGroup(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, '/cs3.admin.group.v1beta1.GroupAPI/DeleteGroup',
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.DeleteGroupRequest.SerializeToString,
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.DeleteGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def AddUserToGroup(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, '/cs3.admin.group.v1beta1.GroupAPI/AddUserToGroup',
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.AddUserToGroupRequest.SerializeToString,
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.AddUserToGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)

    @staticmethod
    def RemoveUserFromGroup(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, '/cs3.admin.group.v1beta1.GroupAPI/RemoveUserFromGroup',
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.RemoveUserFromGroupRequest.SerializeToString,
            cs3_dot_admin_dot_group_dot_v1beta1_dot_group__api__pb2.RemoveUserFromGroupResponse.FromString,
            options, channel_credentials,
            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
