<commit_before>'''
Remediation Scans
=================

The following methods allow for interaction into the Tenable.io
:devportal:`scans <Create Remediation Scans>` API endpoints.
:devportal:`scans <List Remediation Scans>` API endpoints.
Methods available on ``tio.remediation_scans``:

.. rst-class:: hide-signature
.. autoclass:: RemediationScansAPI

.. automethod:: create_remediation_scans
.. automethod:: list_remediation_scans
'''


from tenable.constants import IOConstants
from tenable.errors import UnexpectedValueError
from tenable.io.base import TIOEndpoint, TIOIterator
from tenable.utils import dict_merge


class RemediationScans(TIOIterator):
    '''
The Remediation scans iterator provides a scalable way to work through
scan history result sets of any size. The iterator will walk through
each page of data, returning one record at a time.  If it reaches the
end of a page of records, then it will request the next page of
information and then continue to return records from the next page
(and the next, and the next) until the counter reaches the total number
of records that the API has reported.

Attributes:
    count (int): The current number of records that have been returned
    page (list):
        The current page of data being walked through.  pages will be
        cycled through as the iterator requests more information from the
        API.
    page_count (int): The number of record returned from the current page.
    total (int):
        The total number of records that exist for the current request.
'''
pass


class RemediationScansAPI(TIOEndpoint):
    '''
    This will contain all methods related to Remediation scans
    '''
    schedule_const = IOConstants.ScanScheduleConst
    case_const = IOConstants.CaseConst

    def list_remediation_scan(self, limit, offset, sortval):
        '''
        Retrieve the list of Remediation scans.

        :devportal:`scans/remediation: list <remediationscans-list>`

        Args:
            limit (int): This value needs to be between 0 and 200

            offset (int): This value needs to be > 0

            sort (str): scan_creation_date:desc/scan_creation_date:asc
                        Returns the remediation scan list with the ascending
            or descending order with offset and limit

        Returns:
            :obj:`list`:<commit_msg>Update remediation_scans.py<commit_after>'''
Remediation Scans
=================

The following methods allow for interaction into the Tenable.io
:devportal:`scans <Create Remediation Scans>` API endpoints.
:devportal:`scans <List Remediation Scans>` API endpoints.
Methods available on ``tio.remediation_scans``:

.. rst-class:: hide-signature
.. autoclass:: RemediationScansAPI

.. automethod:: create_remediation_scans
.. automethod:: list_remediation_scans
'''


from tenable.constants import IOConstants
from tenable.errors import UnexpectedValueError
from tenable.io.base import TIOEndpoint, TIOIterator
from tenable.utils import dict_merge


class RemediationScans(TIOIterator):
    '''
The Remediation scans iterator provides a scalable way to work through
scan history result sets of any size. The iterator will walk through
each page of data, returning one record at a time.  If it reaches the
end of a page of records, then it will request the next page of
information and then continue to return records from the next page
(and the next, and the next) until the counter reaches the total number
of records that the API has reported.

Attributes:
    count (int): The current number of records that have been returned
    page (list):
        The current page of data being walked through.  pages will be
        cycled through as the iterator requests more information from the
        API.
    page_count (int): The number of record returned from the current page.
    total (int):
        The total number of records that exist for the current request.
'''
pass


class RemediationScansAPI(TIOEndpoint):
    '''
    This will contain all methods related to Remediation scans
    '''
    schedule_const = IOConstants.ScanScheduleConst
    case_const = IOConstants.CaseConst

    def list_remediation_scan(self, limit=50, offset=0, sortval='scan_creation_date:desc'):
        '''
        Retrieve the list of Remediation scans.

        :devportal:`scans/remediation: list <remediationscans-list>`

        Args:
            limit (int): This value needs to be between 0 and 200

            offset (int): This value needs to be > 0

            sort (str): scan_creation_date:desc/scan_creation_date:asc
                        Returns the remediation scan list with the ascending
            or descending order with offset and limit

        Returns:
            :obj:`list`:
{'fraction_non_alphanumeric': 0.06779303062302007, 'fraction_numerical': 0.0027455121436114043, 'mean_word_length': 3.4553151458137346, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2207939', 'n_tokens_mistral': 1275, 'n_tokens_neox': 1213, 'n_words': 534}