# Path: tenable_io/api/base.py
# class BaseApi(object):
# 
#     def __init__(self, client):
#         self._client = client
# 
# class BaseRequest(object):
# 
#     def as_payload(self, filter_=None):
#         return payload_filter(self.__dict__, filter_)
# 
# Path: tenable_io/api/models.py
# class AgentGroup(BaseModel):
# 
#     def __init__(
#             self,
#             id=None,
#             name=None,
#             owner_id=None,
#             owner=None,
#             owner_name=None,
#             owner_uuid=None,
#             shared=None,
#             user_permissions=None,
#             creation_date=None,
#             last_modification_date=None,
#             timestamp=None,
#             agents=None,
#             agents_count=None,
#             uuid=None,
#             pagination=None
#     ):
#         self._agents = agents
#         self._pagination = None
#         self.id = id
#         self.name = name
#         self.owner_id = owner_id
#         self.owner = owner
#         self.owner_name = owner_name
#         self.owner_uuid = owner_uuid
#         self.shared = shared
#         self.user_permissions = user_permissions
#         self.creation_date = creation_date
#         self.last_modification_date = last_modification_date
#         self.timestamp = timestamp
#         self.agents = agents
#         self.agents_count = agents_count
#         self.uuid = uuid
#         self.pagination = pagination
# 
#     @property
#     def agents(self):
#         return self._agents
# 
#     @agents.setter
#     @BaseModel._model_list(Agent)
#     def agents(self, agents):
#         self._agents = agents
# 
#     @property
#     def pagination(self):
#         return self._pagination
# 
#     @pagination.setter
#     @BaseModel._model(FilterPagination)
#     def pagination(self, pagination):
#         self._pagination = pagination
# 
# class AgentGroupList(BaseModel):
# 
#     def __init__(
#             self,
#             groups=None
#     ):
#         self._groups = None
#         self.groups = groups
# 
#     @property
#     def groups(self):
#         return self._groups
# 
#     @groups.setter
#     @BaseModel._model_list(AgentGroup)
#     def groups(self, groups):
#         self._groups = groups
# 
# class AgentList(BaseModel):
# 
#     def __init__(
#             self,
#             agents=None,
#             pagination=None
#     ):
#         self._agents = None
#         self.agents = agents
#         self._pagination = None
#         self.pagination = pagination
# 
#     @property
#     def agents(self):
#         return self._agents
# 
#     @agents.setter
#     @BaseModel._model_list(Agent)
#     def agents(self, agents):
#         self._agents = agents
# 
#     @property
#     def pagination(self):
#         return self._pagination
# 
#     @pagination.setter
#     @BaseModel._model(FilterPagination)
#     def pagination(self, pagination):
#         self._pagination = pagination


from json import loads
from tenable_io.api.base import BaseApi, BaseRequest
from tenable_io.api.models import AgentGroup, AgentGroupList, AgentList
            'limit': limit,
            'sort': sort,
            'f': f,
            'ft': ft,
            'w': w,
            'wf': wf
        }
        params = {k: v for k, v in params.items() if v is not None}
        response = self._client.get('scanners/%(scanner_id)s/agent-groups/%(agent_group_id)s',
                                    path_params={
                                        'scanner_id': scanner_id,
                                        'agent_group_id': agent_group_id
                                    },
                                    params=params)
        return AgentGroup.from_json(response.text)

    def list(self, scanner_id=1):
        """Return agent groups for the given scanner.

        :param scanner_id: The scanner ID.
        :raise TenableIOApiException: When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.AgentGroupList`.
        """
        response = self._client.get('scanners/%(scanner_id)s/agent-groups',
                                    path_params={
                                        'scanner_id': scanner_id
                                    })
        return AgentGroupList.from_json(response.text)



# Path: tenable_io/api/base.py
# class BaseApi(object):
# 
#     def __init__(self, client):
#         self._client = client
# 
# class BaseRequest(object):
# 
#     def as_payload(self, filter_=None):
#         return payload_filter(self.__dict__, filter_)
# 
# Path: tenable_io/api/models.py
# class AgentGroup(BaseModel):
# 
#     def __init__(
#             self,
#             id=None,
#             name=None,
#             owner_id=None,
#             owner=None,
#             owner_name=None,
#             owner_uuid=None,
#             shared=None,
#             user_permissions=None,
#             creation_date=None,
#             last_modification_date=None,
#             timestamp=None,
#             agents=None,
#             agents_count=None,
#             uuid=None,
#             pagination=None
#     ):
#         self._agents = agents
#         self._pagination = None
#         self.id = id
#         self.name = name
#         self.owner_id = owner_id
#         self.owner = owner
#         self.owner_name = owner_name
#         self.owner_uuid = owner_uuid
#         self.shared = shared
#         self.user_permissions = user_permissions
#         self.creation_date = creation_date
#         self.last_modification_date = last_modification_date
#         self.timestamp = timestamp
#         self.agents = agents
#         self.agents_count = agents_count
#         self.uuid = uuid
#         self.pagination = pagination
# 
#     @property
#     def agents(self):
#         return self._agents
# 
#     @agents.setter
#     @BaseModel._model_list(Agent)
#     def agents(self, agents):
#         self._agents = agents
# 
#     @property
#     def pagination(self):
#         return self._pagination
# 
#     @pagination.setter
#     @BaseModel._model(FilterPagination)
#     def pagination(self, pagination):
#         self._pagination = pagination
# 
# class AgentGroupList(BaseModel):
# 
#     def __init__(
#             self,
#             groups=None
#     ):
#         self._groups = None
#         self.groups = groups
# 
#     @property
#     def groups(self):
#         return self._groups
# 
#     @groups.setter
#     @BaseModel._model_list(AgentGroup)
#     def groups(self, groups):
#         self._groups = groups
# 
# class AgentList(BaseModel):
# 
#     def __init__(
#             self,
#             agents=None,
#             pagination=None
#     ):
#         self._agents = None
#         self.agents = agents
#         self._pagination = None
#         self.pagination = pagination
# 
#     @property
#     def agents(self):
#         return self._agents
# 
#     @agents.setter
#     @BaseModel._model_list(Agent)
#     def agents(self, agents):
#         self._agents = agents
# 
#     @property
#     def pagination(self):
#         return self._pagination
# 
#     @pagination.setter
#     @BaseModel._model(FilterPagination)
#     def pagination(self, pagination):
#         self._pagination = pagination


# Path: tenable_io/api/agent_groups.py
from json import loads
from tenable_io.api.base import BaseApi, BaseRequest
from tenable_io.api.models import AgentGroup, AgentGroupList, AgentList

            'limit': limit,
            'sort': sort,
            'f': f,
            'ft': ft,
            'w': w,
            'wf': wf
        }
        params = {k: v for k, v in params.items() if v is not None}
        response = self._client.get('scanners/%(scanner_id)s/agent-groups/%(agent_group_id)s',
                                    path_params={
                                        'scanner_id': scanner_id,
                                        'agent_group_id': agent_group_id
                                    },
                                    params=params)
        return AgentGroup.from_json(response.text)

    def list(self, scanner_id=1):
        """Return agent groups for the given scanner.

        :param scanner_id: The scanner ID.
        :raise TenableIOApiException: When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.AgentGroupList`.
        """
        response = self._client.get('scanners/%(scanner_id)s/agent-groups',
                                    path_params={
                                        'scanner_id': scanner_id
                                    })
        return AgentGroupList.from_json(response.text)



class AgentGroupSaveRequest(BaseRequest):