# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc

from ..uac import GroupV2_pb2 as uac_dot_GroupV2__pb2


class GroupServiceStub(object):
  # missing associated documentation comment in .proto file
  pass

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

    Args:
      channel: A grpc.Channel.
    """
    self.getGroupById = channel.unary_unary(
        '/ai.verta.uac.GroupService/getGroupById',
        request_serializer=uac_dot_GroupV2__pb2.GetGroupById.SerializeToString,
        response_deserializer=uac_dot_GroupV2__pb2.GetGroupById.Response.FromString,
        )
    self.searchGroups = channel.unary_unary(
        '/ai.verta.uac.GroupService/searchGroups',
        request_serializer=uac_dot_GroupV2__pb2.SearchGroups.SerializeToString,
        response_deserializer=uac_dot_GroupV2__pb2.SearchGroups.Response.FromString,
        )
    self.setGroup = channel.unary_unary(
        '/ai.verta.uac.GroupService/setGroup',
        request_serializer=uac_dot_GroupV2__pb2.SetGroup.SerializeToString,
        response_deserializer=uac_dot_GroupV2__pb2.SetGroup.Response.FromString,
        )
    self.deleteGroup = channel.unary_unary(
        '/ai.verta.uac.GroupService/deleteGroup',
        request_serializer=uac_dot_GroupV2__pb2.DeleteGroup.SerializeToString,
        response_deserializer=uac_dot_GroupV2__pb2.DeleteGroup.Response.FromString,
        )
    self.addUsers = channel.unary_unary(
        '/ai.verta.uac.GroupService/addUsers',
        request_serializer=uac_dot_GroupV2__pb2.AddGroupUsers.SerializeToString,
        response_deserializer=uac_dot_GroupV2__pb2.AddGroupUsers.Response.FromString,
        )
    self.removeUsers = channel.unary_unary(
        '/ai.verta.uac.GroupService/removeUsers',
        request_serializer=uac_dot_GroupV2__pb2.RemoveGroupUsers.SerializeToString,
        response_deserializer=uac_dot_GroupV2__pb2.RemoveGroupUsers.Response.FromString,
        )


class GroupServiceServicer(object):
  # missing associated documentation comment in .proto file
  pass

  def getGroupById(self, request, context):
    """Gets information from a given group
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def searchGroups(self, request, context):
    """Lists the groups that the provided user is a member of, or all groups if user isn't specified
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

  def setGroup(self, request, context):
    """Create or update 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 an existing group
    """
    context.set_code(grpc.StatusCode.UNIMPLEMENTED)
    context.set_details('Method not implemented!')
    raise NotImplementedError('Method not implemented!')

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

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


def add_GroupServiceServicer_to_server(servicer, server):
  rpc_method_handlers = {
      'getGroupById': grpc.unary_unary_rpc_method_handler(
          servicer.getGroupById,
          request_deserializer=uac_dot_GroupV2__pb2.GetGroupById.FromString,
          response_serializer=uac_dot_GroupV2__pb2.GetGroupById.Response.SerializeToString,
      ),
      'searchGroups': grpc.unary_unary_rpc_method_handler(
          servicer.searchGroups,
          request_deserializer=uac_dot_GroupV2__pb2.SearchGroups.FromString,
          response_serializer=uac_dot_GroupV2__pb2.SearchGroups.Response.SerializeToString,
      ),
      'setGroup': grpc.unary_unary_rpc_method_handler(
          servicer.setGroup,
          request_deserializer=uac_dot_GroupV2__pb2.SetGroup.FromString,
          response_serializer=uac_dot_GroupV2__pb2.SetGroup.Response.SerializeToString,
      ),
      'deleteGroup': grpc.unary_unary_rpc_method_handler(
          servicer.deleteGroup,
          request_deserializer=uac_dot_GroupV2__pb2.DeleteGroup.FromString,
          response_serializer=uac_dot_GroupV2__pb2.DeleteGroup.Response.SerializeToString,
      ),
      'addUsers': grpc.unary_unary_rpc_method_handler(
          servicer.addUsers,
          request_deserializer=uac_dot_GroupV2__pb2.AddGroupUsers.FromString,
          response_serializer=uac_dot_GroupV2__pb2.AddGroupUsers.Response.SerializeToString,
      ),
      'removeUsers': grpc.unary_unary_rpc_method_handler(
          servicer.removeUsers,
          request_deserializer=uac_dot_GroupV2__pb2.RemoveGroupUsers.FromString,
          response_serializer=uac_dot_GroupV2__pb2.RemoveGroupUsers.Response.SerializeToString,
      ),
  }
  generic_handler = grpc.method_handlers_generic_handler(
      'ai.verta.uac.GroupService', rpc_method_handlers)
  server.add_generic_rpc_handlers((generic_handler,))
