# Path: tenable_io/util.py
# def payload_filter(payload, filter_):
#     if callable(filter_):
#         payload = {k: v for k, v in payload.items() if filter_(v, k)}
#     elif filter:
#         payload = {k: v for k, v in payload.items() if v is not None}
#     return payload


from tenable_io.util import payload_filter


class BaseApi(object):

    def __init__(self, client):
        self._client = client


class BaseRequest(object):

    def as_payload(self, filter_=None):

# Path: tenable_io/util.py
# def payload_filter(payload, filter_):
#     if callable(filter_):
#         payload = {k: v for k, v in payload.items() if filter_(v, k)}
#     elif filter:
#         payload = {k: v for k, v in payload.items() if v is not None}
#     return payload


# Path: tenable_io/api/base.py
from tenable_io.util import payload_filter



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_)