# Path: tenable_io/api/base.py
# class BaseApi(object):
# 
#     def __init__(self, client):
#         self._client = client
# 
# Path: tenable_io/api/models.py
# class Group(BaseModel):
# 
#     def __init__(
#             self,
#             id=None,
#             name=None,
#             permissions=None,
#             user_count=None,
#     ):
#         self.id = id
#         self.name = name
#         self.permissions = permissions
#         self.user_count = user_count
# 
# class GroupList(BaseModel):
# 
#     def __init__(
#             self,
#             groups=None,
#     ):
#         self._groups = None
# 
#         self.groups = groups
# 
#     @property
#     def groups(self):
#         return self._groups
# 
#     @groups.setter
#     @BaseModel._model_list(Group)
#     def groups(self, groups):
#         self._groups = groups
# 
# class UserList(BaseModel):
# 
#     def __init__(
#             self,
#             users=None,
#     ):
#         self._users = None
#         self.users = users
# 
#     @property
#     def users(self):
#         return self._users
# 
#     @users.setter
#     @BaseModel._model_list(User)
#     def users(self, users):
#         self._users = users


from tenable_io.api.base import BaseApi
from tenable_io.api.models import Group, GroupList, UserList
        return True

    def delete_user(self, group_id, user_id):
        """Delete a user from the group.

        :param group_id: The group ID.
        :param user_id: The user ID.
        :raise TenableIOApiException:  When API error is encountered.
        :return: True if successful.
        """
        self._client.delete('groups/%(group_id)s/users/%(user_id)s', {'group_id': group_id, 'user_id': user_id})
        return True

    def edit(self, group_id, name):
        """Edit a group.

        :param group_id: The group ID.
        :param name: The group name.
        :return: True if successful.
        """
        self._client.put('groups/%(group_id)s', {'name': name}, {'group_id': group_id})
        return True

    def list(self):
        """Return the group list.

        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Grouplist`.
        """
        response = self._client.get('groups')

# Path: tenable_io/api/base.py
# class BaseApi(object):
# 
#     def __init__(self, client):
#         self._client = client
# 
# Path: tenable_io/api/models.py
# class Group(BaseModel):
# 
#     def __init__(
#             self,
#             id=None,
#             name=None,
#             permissions=None,
#             user_count=None,
#     ):
#         self.id = id
#         self.name = name
#         self.permissions = permissions
#         self.user_count = user_count
# 
# class GroupList(BaseModel):
# 
#     def __init__(
#             self,
#             groups=None,
#     ):
#         self._groups = None
# 
#         self.groups = groups
# 
#     @property
#     def groups(self):
#         return self._groups
# 
#     @groups.setter
#     @BaseModel._model_list(Group)
#     def groups(self, groups):
#         self._groups = groups
# 
# class UserList(BaseModel):
# 
#     def __init__(
#             self,
#             users=None,
#     ):
#         self._users = None
#         self.users = users
# 
#     @property
#     def users(self):
#         return self._users
# 
#     @users.setter
#     @BaseModel._model_list(User)
#     def users(self, users):
#         self._users = users


# Path: tenable_io/api/groups.py
from tenable_io.api.base import BaseApi
from tenable_io.api.models import Group, GroupList, UserList

        return True

    def delete_user(self, group_id, user_id):
        """Delete a user from the group.

        :param group_id: The group ID.
        :param user_id: The user ID.
        :raise TenableIOApiException:  When API error is encountered.
        :return: True if successful.
        """
        self._client.delete('groups/%(group_id)s/users/%(user_id)s', {'group_id': group_id, 'user_id': user_id})
        return True

    def edit(self, group_id, name):
        """Edit a group.

        :param group_id: The group ID.
        :param name: The group name.
        :return: True if successful.
        """
        self._client.put('groups/%(group_id)s', {'name': name}, {'group_id': group_id})
        return True

    def list(self):
        """Return the group list.

        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Grouplist`.
        """
        response = self._client.get('groups')

        return GroupList.from_json(response.text)