# 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 Exclusion(BaseModel):
#     def __init__(
#             self,
#             id=None,
#             name=None,
#             description=None,
#             schedule=None,
#             creation_date=None,
#             last_modification_date=None,
#             members=None,
#     ):
#         self._schedule = None
# 
#         self.id = id
#         self.name = name
#         self.description = description
#         self.schedule = schedule
#         self.creation_date = creation_date
#         self.last_modification_date = last_modification_date
#         self.members = members
# 
#     @property
#     def schedule(self):
#         return self._schedule
# 
#     @schedule.setter
#     @BaseModel._model(ExclusionSchedule)
#     def schedule(self, schedule):
#         self._schedule = schedule
# 
# class ExclusionList(BaseModel):
#     def __init__(
#             self,
#             exclusions=None
#     ):
#         self._exclusions = None
#         self.exclusions = exclusions
# 
#     @property
#     def exclusions(self):
#         return self._exclusions
# 
#     @exclusions.setter
#     @BaseModel._model_list(Exclusion)
#     def exclusions(self, exclusions):
#         self._exclusions = exclusions
# 
# class ExclusionSchedule(BaseModel):
# 
#     def __init__(
#             self,
#             enabled=None,
#             starttime=None,
#             endtime=None,
#             timezone=None,
#             rrules=None
#     ):
#         self._rrules = None
# 
#         self.enabled = enabled
#         self.starttime = starttime
#         self.endtime = endtime
#         self.timezone = timezone
#         self.rrules = rrules
# 
#     @property
#     def rrules(self):
#         return self._rrules
# 
#     @rrules.setter
#     @BaseModel._model(ExclusionRrules)
#     def rrules(self, rrules):
#         self._rrules = rrules
# 
#     def as_payload(self, filter_=None):
#         payload = super(ExclusionSchedule, self).as_payload(True)
#         if isinstance(self.rrules, ExclusionRrules):
#             payload.__setitem__('rrules', self.rrules.as_payload(True))
#         else:
#             payload.pop('rrules', None)
#         payload.pop('_rrules', None)
#         return payload


from tenable_io.api.base import BaseApi, BaseRequest
from tenable_io.api.models import Exclusion, ExclusionList, ExclusionSchedule
        return True

    def details(self, list_id):
        """Return details of given exclusion

        :param list_id: The exclusion ID.
        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Exclusion`.
        """
        response = self._client.get('exclusions/%(list_id)s', path_params={'list_id': list_id})
        return Exclusion.from_json(response.text)

    def edit(self, list_id, exclusion_edit):
        """Edit the given exclusion

        :param list_id: The exclusion ID.
        :param exclusion_edit: An instance of :class:`ExclusionEditRequest`.
        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Exclusion`.
        """
        response = self._client.put('exclusions/%(list_id)s', exclusion_edit, path_params={'list_id': list_id})
        return Exclusion.from_json(response.text)

    def list(self):
        """Return the current exclusions

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

# 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 Exclusion(BaseModel):
#     def __init__(
#             self,
#             id=None,
#             name=None,
#             description=None,
#             schedule=None,
#             creation_date=None,
#             last_modification_date=None,
#             members=None,
#     ):
#         self._schedule = None
# 
#         self.id = id
#         self.name = name
#         self.description = description
#         self.schedule = schedule
#         self.creation_date = creation_date
#         self.last_modification_date = last_modification_date
#         self.members = members
# 
#     @property
#     def schedule(self):
#         return self._schedule
# 
#     @schedule.setter
#     @BaseModel._model(ExclusionSchedule)
#     def schedule(self, schedule):
#         self._schedule = schedule
# 
# class ExclusionList(BaseModel):
#     def __init__(
#             self,
#             exclusions=None
#     ):
#         self._exclusions = None
#         self.exclusions = exclusions
# 
#     @property
#     def exclusions(self):
#         return self._exclusions
# 
#     @exclusions.setter
#     @BaseModel._model_list(Exclusion)
#     def exclusions(self, exclusions):
#         self._exclusions = exclusions
# 
# class ExclusionSchedule(BaseModel):
# 
#     def __init__(
#             self,
#             enabled=None,
#             starttime=None,
#             endtime=None,
#             timezone=None,
#             rrules=None
#     ):
#         self._rrules = None
# 
#         self.enabled = enabled
#         self.starttime = starttime
#         self.endtime = endtime
#         self.timezone = timezone
#         self.rrules = rrules
# 
#     @property
#     def rrules(self):
#         return self._rrules
# 
#     @rrules.setter
#     @BaseModel._model(ExclusionRrules)
#     def rrules(self, rrules):
#         self._rrules = rrules
# 
#     def as_payload(self, filter_=None):
#         payload = super(ExclusionSchedule, self).as_payload(True)
#         if isinstance(self.rrules, ExclusionRrules):
#             payload.__setitem__('rrules', self.rrules.as_payload(True))
#         else:
#             payload.pop('rrules', None)
#         payload.pop('_rrules', None)
#         return payload


# Path: tenable_io/api/exclusions.py
from tenable_io.api.base import BaseApi, BaseRequest
from tenable_io.api.models import Exclusion, ExclusionList, ExclusionSchedule

        return True

    def details(self, list_id):
        """Return details of given exclusion

        :param list_id: The exclusion ID.
        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Exclusion`.
        """
        response = self._client.get('exclusions/%(list_id)s', path_params={'list_id': list_id})
        return Exclusion.from_json(response.text)

    def edit(self, list_id, exclusion_edit):
        """Edit the given exclusion

        :param list_id: The exclusion ID.
        :param exclusion_edit: An instance of :class:`ExclusionEditRequest`.
        :raise TenableIOApiException:  When API error is encountered.
        :return: An instance of :class:`tenable_io.api.models.Exclusion`.
        """
        response = self._client.put('exclusions/%(list_id)s', exclusion_edit, path_params={'list_id': list_id})
        return Exclusion.from_json(response.text)

    def list(self):
        """Return the current exclusions

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

        return ExclusionList.from_json(response.text)