"""
    HCL AppScan on Cloud (v2)

    This API allows you to interact with the service. The API allows you to perform many of the operations available in the UI and more.</br>For authentication, use the relevant APIs in the Account section. A successful authentication response includes a bearer token for use in subsequent API calls. Pasting this token in the 'Access token' field above will automatically add the authorization header to any API call that requires a valid session.

    OpenAPI spec version: v2

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import re  # noqa: F401

# python 2 and python 3 compatibility library
from pyasoc.api_client import ApiClient
from pyasoc.models import (
    AppScanSaaSModelsV2ScanExecution,
    AppScanSaaSModelsV2StaticAnalyzerScan,
    SystemWebHttpODataPageResultAppScanSaaSModelsV2MinScanData,
    UserSiteCommonModelsNewStaticAnalyzerScan,
    UserSiteCommonModelsScanExecute,
)


class ScansApi:
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def scans_compare_executions_by_executionaid_and_executionbid(
        self, execution_aid, execution_bid, **kwargs
    ):
        """Compare Issues of two scan executions

        The compared scan executions should be for scans that belong to the same application</br>OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_compare_executions_by_executionaid_and_executionbid(execution_aid, execution_bid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_aid: Id of the first execution (required)
        :param str execution_bid: Id of the second execution (required)
        :param list[str] policy_id: Fitler in issues that are not compliant with these policies
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :return: list[UtilitiesIssueModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_compare_executions_by_executionaid_and_executionbid_with_http_info(
                execution_aid, execution_bid, **kwargs
            )
        else:
            (data) = self.scans_compare_executions_by_executionaid_and_executionbid_with_http_info(
                execution_aid, execution_bid, **kwargs
            )
            return data

    def scans_compare_executions_by_executionaid_and_executionbid_with_http_info(
        self, execution_aid, execution_bid, **kwargs
    ):
        """Compare Issues of two scan executions

        The compared scan executions should be for scans that belong to the same application</br>OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_compare_executions_by_executionaid_and_executionbid_with_http_info(execution_aid, execution_bid, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_aid: Id of the first execution (required)
        :param str execution_bid: Id of the second execution (required)
        :param list[str] policy_id: Fitler in issues that are not compliant with these policies
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :return: list[UtilitiesIssueModel]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "execution_aid",
            "execution_bid",
            "policy_id",
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_compare_executions_by_executionaid_and_executionbid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_aid' is set
        if self.api_client.client_side_validation and (
            "execution_aid" not in params or params["execution_aid"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_aid` when calling `scans_compare_executions_by_executionaid_and_executionbid`"
            )
        # verify the required parameter 'execution_bid' is set
        if self.api_client.client_side_validation and (
            "execution_bid" not in params or params["execution_bid"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_bid` when calling `scans_compare_executions_by_executionaid_and_executionbid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_aid" in params:
            path_params["executionAId"] = params["execution_aid"]
        if "execution_bid" in params:
            path_params["executionBId"] = params["execution_bid"]

        query_params = []
        if "policy_id" in params:
            query_params.append(("policyId", params["policy_id"]))
            collection_formats["policyId"] = "multi"
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/CompareExecutions/{executionAId}/{executionBId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[UtilitiesIssueModel]",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_create_dynamic_analyzer_scan(self, scan_model, **kwargs):
        """Create and execute a new Dynamic Analyzer scan

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewDynamicAnalyzerScan scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_create_dynamic_analyzer_scan_with_http_info(scan_model, **kwargs)
        else:
            (data) = self.scans_create_dynamic_analyzer_scan_with_http_info(scan_model, **kwargs)
            return data

    def scans_create_dynamic_analyzer_scan_with_http_info(self, scan_model, **kwargs):
        """Create and execute a new Dynamic Analyzer scan

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_with_http_info(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewDynamicAnalyzerScan scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_create_dynamic_analyzer_scan" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_model' is set
        if self.api_client.client_side_validation and (
            "scan_model" not in params or params["scan_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_model` when calling `scans_create_dynamic_analyzer_scan`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_model" in params:
            body_params = params["scan_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzer",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2DynamicAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_create_dynamic_analyzer_scan_uploaded_results_from_file(
        self, scan_results_model, **kwargs
    ):
        """Create a new Dynamic Analyzer scan and read the issues from the given uploaded results file.

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_uploaded_results_from_file(scan_results_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsScanResultsModel scan_results_model: Uploaded scan results properties (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return (
                self.scans_create_dynamic_analyzer_scan_uploaded_results_from_file_with_http_info(
                    scan_results_model, **kwargs
                )
            )
        else:
            (
                data
            ) = self.scans_create_dynamic_analyzer_scan_uploaded_results_from_file_with_http_info(
                scan_results_model, **kwargs
            )
            return data

    def scans_create_dynamic_analyzer_scan_uploaded_results_from_file_with_http_info(
        self, scan_results_model, **kwargs
    ):
        """Create a new Dynamic Analyzer scan and read the issues from the given uploaded results file.

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_uploaded_results_from_file_with_http_info(scan_results_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsScanResultsModel scan_results_model: Uploaded scan results properties (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_results_model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_create_dynamic_analyzer_scan_uploaded_results_from_file" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_results_model' is set
        if self.api_client.client_side_validation and (
            "scan_results_model" not in params or params["scan_results_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_results_model` when calling `scans_create_dynamic_analyzer_scan_uploaded_results_from_file`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_results_model" in params:
            body_params = params["scan_results_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzerUploadedResultsFromFile",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="str",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_create_dynamic_analyzer_scan_with_file(self, scan_model, **kwargs):
        """Create and execute a new Dynamic Analyzer scan

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_with_file(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewDynamicAnalyzerScanByTemplate scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_create_dynamic_analyzer_scan_with_file_with_http_info(
                scan_model, **kwargs
            )
        else:
            (data) = self.scans_create_dynamic_analyzer_scan_with_file_with_http_info(
                scan_model, **kwargs
            )
            return data

    def scans_create_dynamic_analyzer_scan_with_file_with_http_info(self, scan_model, **kwargs):
        """Create and execute a new Dynamic Analyzer scan

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_with_file_with_http_info(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewDynamicAnalyzerScanByTemplate scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_create_dynamic_analyzer_scan_with_file" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_model' is set
        if self.api_client.client_side_validation and (
            "scan_model" not in params or params["scan_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_model` when calling `scans_create_dynamic_analyzer_scan_with_file`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_model" in params:
            body_params = params["scan_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzerWithFile",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2DynamicAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_create_dynamic_analyzer_scan_with_files(self, scan_model, **kwargs):
        """Create and execute a new Dynamic Analyzer scan

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_with_files(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewDynamicAnalyzerScanWithFiles scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_create_dynamic_analyzer_scan_with_files_with_http_info(
                scan_model, **kwargs
            )
        else:
            (data) = self.scans_create_dynamic_analyzer_scan_with_files_with_http_info(
                scan_model, **kwargs
            )
            return data

    def scans_create_dynamic_analyzer_scan_with_files_with_http_info(self, scan_model, **kwargs):
        """Create and execute a new Dynamic Analyzer scan

        Application domain ownership must be previously verified (once only):<br /><b>Smart Cloud Exchange:</b> Domain ownership must be verified by the organization.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_dynamic_analyzer_scan_with_files_with_http_info(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewDynamicAnalyzerScanWithFiles scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_create_dynamic_analyzer_scan_with_files" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_model' is set
        if self.api_client.client_side_validation and (
            "scan_model" not in params or params["scan_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_model` when calling `scans_create_dynamic_analyzer_scan_with_files`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_model" in params:
            body_params = params["scan_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzerWithFiles",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2DynamicAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_create_iast_analyzer_scan(self, scan_model, **kwargs):
        """Create and execute a new IAST Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_iast_analyzer_scan(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewIastAnalyzerScan scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2IASTAnalyzer
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_create_iast_analyzer_scan_with_http_info(scan_model, **kwargs)
        else:
            (data) = self.scans_create_iast_analyzer_scan_with_http_info(scan_model, **kwargs)
            return data

    def scans_create_iast_analyzer_scan_with_http_info(self, scan_model, **kwargs):
        """Create and execute a new IAST Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_iast_analyzer_scan_with_http_info(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewIastAnalyzerScan scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2IASTAnalyzer
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_create_iast_analyzer_scan" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_model' is set
        if self.api_client.client_side_validation and (
            "scan_model" not in params or params["scan_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_model` when calling `scans_create_iast_analyzer_scan`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_model" in params:
            body_params = params["scan_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/IASTAnalyzer",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2IASTAnalyzer",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_create_static_analyzer_scan(
        self, scan_model: UserSiteCommonModelsNewStaticAnalyzerScan, **kwargs
    ) -> AppScanSaaSModelsV2StaticAnalyzerScan:
        """Create and execute a new Static Analyzer scan

        Before creating a new scan, generate an IRX file using the <a href=\"/api/Local/StaticAnalyzer/ARSATool\" target=\"_blank\">IRX tool</a>, and upload it (using <a href=\"#!/FileUpload/FileUpload_DefaultAction\" target=\"_blank\">/api/v2/FileUpload</a>).<br />              Use the ID that is returned from the upload in the <code>ApplicationFileId</code> parameter.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_static_analyzer_scan(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewStaticAnalyzerScan scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2StaticAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_create_static_analyzer_scan_with_http_info(scan_model, **kwargs)
        else:
            (data) = self.scans_create_static_analyzer_scan_with_http_info(scan_model, **kwargs)
            return data

    def scans_create_static_analyzer_scan_with_http_info(self, scan_model, **kwargs):
        """Create and execute a new Static Analyzer scan

        Before creating a new scan, generate an IRX file using the <a href=\"/api/Local/StaticAnalyzer/ARSATool\" target=\"_blank\">IRX tool</a>, and upload it (using <a href=\"#!/FileUpload/FileUpload_DefaultAction\" target=\"_blank\">/api/v2/FileUpload</a>).<br />              Use the ID that is returned from the upload in the <code>ApplicationFileId</code> parameter.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_create_static_analyzer_scan_with_http_info(scan_model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UserSiteCommonModelsNewStaticAnalyzerScan scan_model: Scan properties (required)
        :return: AppScanSaaSModelsV2StaticAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_create_static_analyzer_scan" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_model' is set
        if self.api_client.client_side_validation and (
            "scan_model" not in params or params["scan_model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_model` when calling `scans_create_static_analyzer_scan`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_model" in params:
            body_params = params["scan_model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/StaticAnalyzer",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2StaticAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_delete_execution_by_executionid(self, execution_id, **kwargs):
        """Delete scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_delete_execution_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_delete_execution_by_executionid_with_http_info(execution_id, **kwargs)
        else:
            (data) = self.scans_delete_execution_by_executionid_with_http_info(
                execution_id, **kwargs
            )
            return data

    def scans_delete_execution_by_executionid_with_http_info(self, execution_id, **kwargs):
        """Delete scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_delete_execution_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_delete_execution_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_delete_execution_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/Execution/{executionId}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="object",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_delete_scan_by_scanid(self, scan_id, delete_issues, **kwargs):
        """Delete the scan

        Note that all ScanExecutions associated with this scan will be deleted too.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_delete_scan_by_scanid(scan_id, delete_issues, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be deleted (required)
        :param bool delete_issues: Determine if the issues generated by this scan will also be deleted (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_delete_scan_by_scanid_with_http_info(scan_id, delete_issues, **kwargs)
        else:
            (data) = self.scans_delete_scan_by_scanid_with_http_info(
                scan_id, delete_issues, **kwargs
            )
            return data

    def scans_delete_scan_by_scanid_with_http_info(self, scan_id, delete_issues, **kwargs):
        """Delete the scan

        Note that all ScanExecutions associated with this scan will be deleted too.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_delete_scan_by_scanid_with_http_info(scan_id, delete_issues, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be deleted (required)
        :param bool delete_issues: Determine if the issues generated by this scan will also be deleted (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id", "delete_issues"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_delete_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_delete_scan_by_scanid`"
            )
        # verify the required parameter 'delete_issues' is set
        if self.api_client.client_side_validation and (
            "delete_issues" not in params or params["delete_issues"] is None
        ):
            raise ValueError(
                "Missing the required parameter `delete_issues` when calling `scans_delete_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []
        if "delete_issues" in params:
            query_params.append(("deleteIssues", params["delete_issues"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="object",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_delete_scan_executions_by_scanid(self, scan_id, **kwargs):
        """Delete all scan executions

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_delete_scan_executions_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan (required)
        :param bool delete_issues: Determine if the issues generated by this scan will also be deleted
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_delete_scan_executions_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_delete_scan_executions_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_delete_scan_executions_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Delete all scan executions

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_delete_scan_executions_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan (required)
        :param bool delete_issues: Determine if the issues generated by this scan will also be deleted
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id", "delete_issues"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_delete_scan_executions_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_delete_scan_executions_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []
        if "delete_issues" in params:
            query_params.append(("deleteIssues", params["delete_issues"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}/Executions",
            "DELETE",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="object",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_download_iast_config_by_scanid(self, scan_id, **kwargs):
        """Download IAST cofiguration

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_download_iast_config_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan identifier (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_download_iast_config_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_download_iast_config_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_download_iast_config_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Download IAST cofiguration

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_download_iast_config_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan identifier (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_download_iast_config_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_download_iast_config_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}/DownloadIastConfig",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="object",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_execute_scan_by_scanid(
        self, scan_id, model: UserSiteCommonModelsScanExecute, **kwargs
    ) -> AppScanSaaSModelsV2ScanExecution:
        """Execute a scan

        Execute the scan specified by ID.<br />              If the execution requires a new file (Mobile Analyzer or Static Analyzer), the file must first be uploaded (using <a href=\"#!/FileUpload/FileUpload_DefaultAction\" target=\"_blank\">/api/v2/FileUpload</a>). Then use the ID that is returned from the upload in the <code>FileId</code> parameter.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_execute_scan_by_scanid(scan_id, model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be executed (required)
        :param UserSiteCommonModelsScanExecute model: ID of file that was uploaded for the new execution (required)
        :return: AppScanSaaSModelsV2ScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_execute_scan_by_scanid_with_http_info(scan_id, model, **kwargs)
        else:
            (data) = self.scans_execute_scan_by_scanid_with_http_info(scan_id, model, **kwargs)
            return data

    def scans_execute_scan_by_scanid_with_http_info(self, scan_id, model, **kwargs):
        """Execute a scan

        Execute the scan specified by ID.<br />              If the execution requires a new file (Mobile Analyzer or Static Analyzer), the file must first be uploaded (using <a href=\"#!/FileUpload/FileUpload_DefaultAction\" target=\"_blank\">/api/v2/FileUpload</a>). Then use the ID that is returned from the upload in the <code>FileId</code> parameter.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_execute_scan_by_scanid_with_http_info(scan_id, model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be executed (required)
        :param UserSiteCommonModelsScanExecute model: ID of file that was uploaded for the new execution (required)
        :return: AppScanSaaSModelsV2ScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id", "model"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_execute_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_execute_scan_by_scanid`"
            )
        # verify the required parameter 'model' is set
        if self.api_client.client_side_validation and (
            "model" not in params or params["model"] is None
        ):
            raise ValueError(
                "Missing the required parameter `model` when calling `scans_execute_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "model" in params:
            body_params = params["model"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}/Executions",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2ScanExecution",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_execution_action_by_executionid_and_operation(
        self, execution_id, operation, **kwargs
    ):
        """Perform operations on a scan execution

        Operations are available for certain technologies only:<br /><b>Pause</b> - Pause a Dynamic scan<br /><b>Resume</b> - Resume a Dynamic scan<br /><b>Stop</b> - Stop an IAST scan<br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_execution_action_by_executionid_and_operation(execution_id, operation, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :param str operation: Operation (required)
        :return: AppScanSaaSModelsV2ScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_execution_action_by_executionid_and_operation_with_http_info(
                execution_id, operation, **kwargs
            )
        else:
            (data) = self.scans_execution_action_by_executionid_and_operation_with_http_info(
                execution_id, operation, **kwargs
            )
            return data

    def scans_execution_action_by_executionid_and_operation_with_http_info(
        self, execution_id, operation, **kwargs
    ):
        """Perform operations on a scan execution

        Operations are available for certain technologies only:<br /><b>Pause</b> - Pause a Dynamic scan<br /><b>Resume</b> - Resume a Dynamic scan<br /><b>Stop</b> - Stop an IAST scan<br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_execution_action_by_executionid_and_operation_with_http_info(execution_id, operation, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :param str operation: Operation (required)
        :return: AppScanSaaSModelsV2ScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id", "operation"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_execution_action_by_executionid_and_operation" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_execution_action_by_executionid_and_operation`"
            )
        # verify the required parameter 'operation' is set
        if self.api_client.client_side_validation and (
            "operation" not in params or params["operation"] is None
        ):
            raise ValueError(
                "Missing the required parameter `operation` when calling `scans_execution_action_by_executionid_and_operation`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]
        if "operation" in params:
            path_params["operation"] = params["operation"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/Execution/{executionId}/{operation}",
            "PUT",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2ScanExecution",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_execution_by_executionid(
        self, execution_id, **kwargs
    ) -> AppScanSaaSModelsV2ScanExecution:
        """Get basic details of a scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_execution_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2ScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_execution_by_executionid_with_http_info(execution_id, **kwargs)
        else:
            (data) = self.scans_execution_by_executionid_with_http_info(execution_id, **kwargs)
            return data

    def scans_execution_by_executionid_with_http_info(self, execution_id, **kwargs):
        """Get basic details of a scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_execution_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2ScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_execution_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_execution_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/Execution/{executionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2ScanExecution",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_generate_new_iast_key_by_scanid(self, scan_id, **kwargs):
        """Generate new key for the IAST agent

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_generate_new_iast_key_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: IAST Scan ID (required)
        :return: UserSiteCommonModelsNewIASTKey
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_generate_new_iast_key_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_generate_new_iast_key_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_generate_new_iast_key_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Generate new key for the IAST agent

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_generate_new_iast_key_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: IAST Scan ID (required)
        :return: UserSiteCommonModelsNewIASTKey
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_generate_new_iast_key_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_generate_new_iast_key_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/NewIASTKey/{scanId}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsNewIASTKey",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_count_by_status(self, **kwargs):
        """Get active scans count by status

        The count is for all the active scans that can be accessed using the provided access token
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_count_by_status(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[AppScanSaaSModelsV2ScansCountByStatus]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_count_by_status_with_http_info(**kwargs)
        else:
            (data) = self.scans_get_count_by_status_with_http_info(**kwargs)
            return data

    def scans_get_count_by_status_with_http_info(self, **kwargs):
        """Get active scans count by status

        The count is for all the active scans that can be accessed using the provided access token
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_count_by_status_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[AppScanSaaSModelsV2ScansCountByStatus]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_count_by_status" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/CountByStatus",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[AppScanSaaSModelsV2ScansCountByStatus]",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_count_by_technology(self, **kwargs):
        """scans_get_count_by_technology

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_count_by_technology(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[AppScanSaaSModelsV2ScansCountByTechnology]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_count_by_technology_with_http_info(**kwargs)
        else:
            (data) = self.scans_get_count_by_technology_with_http_info(**kwargs)
            return data

    def scans_get_count_by_technology_with_http_info(self, **kwargs):
        """scans_get_count_by_technology

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_count_by_technology_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[AppScanSaaSModelsV2ScansCountByTechnology]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_count_by_technology" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/CountByTechnology",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[AppScanSaaSModelsV2ScansCountByTechnology]",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_count_by_user(self, **kwargs):
        """Get active scans count by user

        The count is for all the scans that can be accessed using the provided access token<br />              The maximum number of query results is limited to 2000 scans.<br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_count_by_user(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[AppScanSaaSModelsV2ScansCountByUser]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_count_by_user_with_http_info(**kwargs)
        else:
            (data) = self.scans_get_count_by_user_with_http_info(**kwargs)
            return data

    def scans_get_count_by_user_with_http_info(self, **kwargs):
        """Get active scans count by user

        The count is for all the scans that can be accessed using the provided access token<br />              The maximum number of query results is limited to 2000 scans.<br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_count_by_user_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[AppScanSaaSModelsV2ScansCountByUser]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_count_by_user" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/CountByUser",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[AppScanSaaSModelsV2ScansCountByUser]",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_dast_scan_file_by_executionid(self, execution_id, **kwargs):
        """Get scan file

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_dast_scan_file_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Job ID (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_dast_scan_file_by_executionid_with_http_info(
                execution_id, **kwargs
            )
        else:
            (data) = self.scans_get_dast_scan_file_by_executionid_with_http_info(
                execution_id, **kwargs
            )
            return data

    def scans_get_dast_scan_file_by_executionid_with_http_info(self, execution_id, **kwargs):
        """Get scan file

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_dast_scan_file_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Job ID (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_dast_scan_file_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_get_dast_scan_file_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(["application/octet-stream"])

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzerScanFile/{executionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="file",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_dynamic_analyzer_scan_by_scanid(self, scan_id, **kwargs):
        """Get detailed description of a Dynamic Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_dynamic_analyzer_scan_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of the scan (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_dynamic_analyzer_scan_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_get_dynamic_analyzer_scan_by_scanid_with_http_info(
                scan_id, **kwargs
            )
            return data

    def scans_get_dynamic_analyzer_scan_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Get detailed description of a Dynamic Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_dynamic_analyzer_scan_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of the scan (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_dynamic_analyzer_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_get_dynamic_analyzer_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzer/{scanId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2DynamicAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_dynamic_analyzer_scan_execution_by_executionid(self, execution_id, **kwargs):
        """Get details of a DynamicAnalyzer scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_dynamic_analyzer_scan_execution_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_dynamic_analyzer_scan_execution_by_executionid_with_http_info(
                execution_id, **kwargs
            )
        else:
            (data) = self.scans_get_dynamic_analyzer_scan_execution_by_executionid_with_http_info(
                execution_id, **kwargs
            )
            return data

    def scans_get_dynamic_analyzer_scan_execution_by_executionid_with_http_info(
        self, execution_id, **kwargs
    ):
        """Get details of a DynamicAnalyzer scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_dynamic_analyzer_scan_execution_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2DynamicAnalyzerScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_dynamic_analyzer_scan_execution_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_get_dynamic_analyzer_scan_execution_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/DynamicAnalyzerExecution/{executionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2DynamicAnalyzerScanExecution",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_execution_by_scanid(self, scan_id, **kwargs):
        """Get basic details of all the executions of a scan

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_execution_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan ID (required)
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :return: list[AppScanSaaSModelsV2ScanExecution]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_execution_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_get_execution_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_get_execution_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Get basic details of all the executions of a scan

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_execution_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan ID (required)
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :return: list[AppScanSaaSModelsV2ScanExecution]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scan_id",
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_execution_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_get_execution_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}/Executions",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[AppScanSaaSModelsV2ScanExecution]",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_explore_data_counters_by_executionid(self, execution_id, **kwargs):
        """Get Explore Data Counters

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_explore_data_counters_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2ExploreDataCountersModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_explore_data_counters_by_executionid_with_http_info(
                execution_id, **kwargs
            )
        else:
            (data) = self.scans_get_explore_data_counters_by_executionid_with_http_info(
                execution_id, **kwargs
            )
            return data

    def scans_get_explore_data_counters_by_executionid_with_http_info(self, execution_id, **kwargs):
        """Get Explore Data Counters

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_explore_data_counters_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2ExploreDataCountersModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_explore_data_counters_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_get_explore_data_counters_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/ExploreDataCounters/{executionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2ExploreDataCountersModel",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_sca_analyzer_scan_by_scanid(self, scan_id, **kwargs):
        """Get detailed description of a Sca Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_sca_analyzer_scan_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of the scan (required)
        :return: AppScanSaaSModelsV2ScaAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_sca_analyzer_scan_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_get_sca_analyzer_scan_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_get_sca_analyzer_scan_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Get detailed description of a Sca Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_sca_analyzer_scan_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of the scan (required)
        :return: AppScanSaaSModelsV2ScaAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_sca_analyzer_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_get_sca_analyzer_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/ScaAnalyzer/{scanId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2ScaAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_scan_by_scanid(self, scan_id, **kwargs):
        """Get basic details of a scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scan_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan ID (required)
        :return: AppScanSaaSModelsV2Scan1
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_scan_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_get_scan_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_get_scan_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Get basic details of a scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scan_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan ID (required)
        :return: AppScanSaaSModelsV2Scan1
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_get_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2Scan1",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_scan_logs_by_executionid(self, execution_id, **kwargs):
        """Download scan's log

        Currently available for Dynamic/Static scans only.<br />  TrafficLog is available only for Dast scans.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scan_logs_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Job ID (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_scan_logs_by_executionid_with_http_info(execution_id, **kwargs)
        else:
            (data) = self.scans_get_scan_logs_by_executionid_with_http_info(execution_id, **kwargs)
            return data

    def scans_get_scan_logs_by_executionid_with_http_info(self, execution_id, **kwargs):
        """Download scan's log

        Currently available for Dynamic/Static scans only.<br />  TrafficLog is available only for Dast scans.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scan_logs_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Job ID (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_scan_logs_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_get_scan_logs_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(["application/octet-stream"])

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/ScanLogs/{executionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="file",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_scans(self, **kwargs):
        """Get all the scans in the current context

        This API is obsolete. Please refer to API: GET /api/v2/Scans/GetAsPageMin</br>OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scans(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :return: list[AppScanSaaSModelsV2Scan]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_scans_with_http_info(**kwargs)
        else:
            (data) = self.scans_get_scans_with_http_info(**kwargs)
            return data

    def scans_get_scans_with_http_info(self, **kwargs):
        """Get all the scans in the current context

        This API is obsolete. Please refer to API: GET /api/v2/Scans/GetAsPageMin</br>OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scans_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :return: list[AppScanSaaSModelsV2Scan]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'" " to method scans_get_scans" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[AppScanSaaSModelsV2Scan]",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_scans_page1(self, **kwargs):
        """Get all the scans in the current context

        This API is obsolete. Please refer to API: GET /api/v2/Scans/GetAsPageMin</br>OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scans_page1(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultAppScanSaaSModelsV2Scan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_scans_page1_with_http_info(**kwargs)
        else:
            (data) = self.scans_get_scans_page1_with_http_info(**kwargs)
            return data

    def scans_get_scans_page1_with_http_info(self, **kwargs):
        """Get all the scans in the current context

        This API is obsolete. Please refer to API: GET /api/v2/Scans/GetAsPageMin</br>OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scans_page1_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultAppScanSaaSModelsV2Scan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
            "inlinecount",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_scans_page1" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))
        if "inlinecount" in params:
            query_params.append(("$inlinecount", params["inlinecount"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/GetAsPage",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="SystemWebHttpODataPageResultAppScanSaaSModelsV2Scan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_scans_page2(
        self, **kwargs
    ) -> SystemWebHttpODataPageResultAppScanSaaSModelsV2MinScanData:
        """scans_get_scans_page2

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scans_page2(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultAppScanSaaSModelsV2MinScanData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_scans_page2_with_http_info(**kwargs)
        else:
            (data) = self.scans_get_scans_page2_with_http_info(**kwargs)
            return data

    def scans_get_scans_page2_with_http_info(self, **kwargs):
        """scans_get_scans_page2

        OData V3 compliant
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_scans_page2_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int top: The max number of records. (Up to 5000)
        :param int skip: The number of records to skip.
        :param str filter: A function that must evaluate to true for a record to be returned. (e.g. Name eq 'sam' or Name eq 'dan'). To filter an Id Property, open the model and see if its type is \"string\" or \"string($uuid)\". - For string no change is needed. - For \"string($uuid)\" add \"Guid\" immediately before the string (e.g. Id eq Guid'00000000-0000-0000-0000-000000000000')
        :param str select: Specifies a subset of properties to return.
        :param str orderby: Determines what values are used to order a collection of records. (e.g. Name,Id)
        :param str expand: Specifies the related resources to be included in line with retrieved resources.
        :param str inlinecount: Specifies that the response to the request MUST include the count of the number of entities in the collection of entities.
        :return: SystemWebHttpODataPageResultAppScanSaaSModelsV2MinScanData
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "top",
            "skip",
            "filter",
            "select",
            "orderby",
            "expand",
            "inlinecount",
        ]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_scans_page2" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "top" in params:
            query_params.append(("$top", params["top"]))
        if "skip" in params:
            query_params.append(("$skip", params["skip"]))
        if "filter" in params:
            query_params.append(("$filter", params["filter"]))
        if "select" in params:
            query_params.append(("$select", params["select"]))
        if "orderby" in params:
            query_params.append(("$orderby", params["orderby"]))
        if "expand" in params:
            query_params.append(("$expand", params["expand"]))
        if "inlinecount" in params:
            query_params.append(("$inlinecount", params["inlinecount"]))

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/GetAsPageMin",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="SystemWebHttpODataPageResultAppScanSaaSModelsV2MinScanData",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_static_analyzer_scan_by_scanid(self, scan_id, **kwargs):
        """Get detailed description of a Static Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_static_analyzer_scan_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of the scan (required)
        :return: AppScanSaaSModelsV2StaticAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_static_analyzer_scan_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_get_static_analyzer_scan_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_get_static_analyzer_scan_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Get detailed description of a Static Analyzer scan

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_static_analyzer_scan_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of the scan (required)
        :return: AppScanSaaSModelsV2StaticAnalyzerScan
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_static_analyzer_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_get_static_analyzer_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/StaticAnalyzer/{scanId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2StaticAnalyzerScan",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_get_static_analyzer_scan_execution_by_executionid(self, execution_id, **kwargs):
        """Get details of a StaticAnalyzer scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_static_analyzer_scan_execution_by_executionid(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2StaticAnalyzerScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_get_static_analyzer_scan_execution_by_executionid_with_http_info(
                execution_id, **kwargs
            )
        else:
            (data) = self.scans_get_static_analyzer_scan_execution_by_executionid_with_http_info(
                execution_id, **kwargs
            )
            return data

    def scans_get_static_analyzer_scan_execution_by_executionid_with_http_info(
        self, execution_id, **kwargs
    ):
        """Get details of a StaticAnalyzer scan execution

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_get_static_analyzer_scan_execution_by_executionid_with_http_info(execution_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str execution_id: Execution ID (required)
        :return: AppScanSaaSModelsV2StaticAnalyzerScanExecution
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["execution_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_get_static_analyzer_scan_execution_by_executionid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'execution_id' is set
        if self.api_client.client_side_validation and (
            "execution_id" not in params or params["execution_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `execution_id` when calling `scans_get_static_analyzer_scan_execution_by_executionid`"
            )

        collection_formats = {}

        path_params = {}
        if "execution_id" in params:
            path_params["executionId"] = params["execution_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/StaticAnalyzerExecution/{executionId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSModelsV2StaticAnalyzerScanExecution",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_is_valid_url(self, data, **kwargs):
        """scans_is_valid_url

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_is_valid_url(data, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AppScanSaaSControllersScansControllerData data: (required)
        :return: AppScanSaaSControllersScansControllerIsValidUrlResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_is_valid_url_with_http_info(data, **kwargs)
        else:
            (data) = self.scans_is_valid_url_with_http_info(data, **kwargs)
            return data

    def scans_is_valid_url_with_http_info(self, data, **kwargs):
        """scans_is_valid_url

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_is_valid_url_with_http_info(data, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AppScanSaaSControllersScansControllerData data: (required)
        :return: AppScanSaaSControllersScansControllerIsValidUrlResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["data"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'" " to method scans_is_valid_url" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'data' is set
        if self.api_client.client_side_validation and (
            "data" not in params or params["data"] is None
        ):
            raise ValueError(
                "Missing the required parameter `data` when calling `scans_is_valid_url`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "data" in params:
            body_params = params["data"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/IsValidUrl",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="AppScanSaaSControllersScansControllerIsValidUrlResponse",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_promote_issues_by_scanid(self, scan_id, **kwargs):
        """Promote personal scan's issues to the application level

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_promote_issues_by_scanid(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan ID (required)
        :return: UserSiteCommonModelsIssueMergeModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_promote_issues_by_scanid_with_http_info(scan_id, **kwargs)
        else:
            (data) = self.scans_promote_issues_by_scanid_with_http_info(scan_id, **kwargs)
            return data

    def scans_promote_issues_by_scanid_with_http_info(self, scan_id, **kwargs):
        """Promote personal scan's issues to the application level

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_promote_issues_by_scanid_with_http_info(scan_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: Scan ID (required)
        :return: UserSiteCommonModelsIssueMergeModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_promote_issues_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_promote_issues_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}/PromoteIssues",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsIssueMergeModel",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_update_iast_scan_by_scanid(self, scan_id, scan_data, **kwargs):
        """Modify IAST scan data

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_update_iast_scan_by_scanid(scan_id, scan_data, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be modified (required)
        :param UserSiteCommonModelsUpdateIastScan scan_data: New scan data (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_update_iast_scan_by_scanid_with_http_info(
                scan_id, scan_data, **kwargs
            )
        else:
            (data) = self.scans_update_iast_scan_by_scanid_with_http_info(
                scan_id, scan_data, **kwargs
            )
            return data

    def scans_update_iast_scan_by_scanid_with_http_info(self, scan_id, scan_data, **kwargs):
        """Modify IAST scan data

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_update_iast_scan_by_scanid_with_http_info(scan_id, scan_data, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be modified (required)
        :param UserSiteCommonModelsUpdateIastScan scan_data: New scan data (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id", "scan_data"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_update_iast_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_update_iast_scan_by_scanid`"
            )
        # verify the required parameter 'scan_data' is set
        if self.api_client.client_side_validation and (
            "scan_data" not in params or params["scan_data"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_data` when calling `scans_update_iast_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_data" in params:
            body_params = params["scan_data"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}/UpdateIastScan",
            "PUT",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="object",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )

    def scans_update_scan_by_scanid(self, scan_id, scan_data, **kwargs):
        """Modify scan data

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_update_scan_by_scanid(scan_id, scan_data, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be modified (required)
        :param UserSiteCommonModelsUpdateDastScan scan_data: New scan data (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.scans_update_scan_by_scanid_with_http_info(scan_id, scan_data, **kwargs)
        else:
            (data) = self.scans_update_scan_by_scanid_with_http_info(scan_id, scan_data, **kwargs)
            return data

    def scans_update_scan_by_scanid_with_http_info(self, scan_id, scan_data, **kwargs):
        """Modify scan data

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.scans_update_scan_by_scanid_with_http_info(scan_id, scan_data, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scan_id: ID of scan to be modified (required)
        :param UserSiteCommonModelsUpdateDastScan scan_data: New scan data (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["scan_id", "scan_data"]
        all_params.append("async_req")
        all_params.append("_return_http_data_only")
        all_params.append("_preload_content")
        all_params.append("_request_timeout")

        params = locals()
        for key, val in params["kwargs"].items():
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method scans_update_scan_by_scanid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scan_id' is set
        if self.api_client.client_side_validation and (
            "scan_id" not in params or params["scan_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_id` when calling `scans_update_scan_by_scanid`"
            )
        # verify the required parameter 'scan_data' is set
        if self.api_client.client_side_validation and (
            "scan_data" not in params or params["scan_data"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_data` when calling `scans_update_scan_by_scanid`"
            )

        collection_formats = {}

        path_params = {}
        if "scan_id" in params:
            path_params["scanId"] = params["scan_id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "scan_data" in params:
            body_params = params["scan_data"]
        # HTTP header `Accept`
        header_params["Accept"] = self.api_client.select_header_accept(
            ["application/json", "text/json", "text/csv"]
        )

        # HTTP header `Content-Type`
        header_params["Content-Type"] = self.api_client.select_header_content_type(
            ["application/json", "text/json", "application/x-www-form-urlencoded"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/v2/Scans/{scanId}",
            "PUT",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="object",
            auth_settings=auth_settings,
            async_req=params.get("async_req"),
            _return_http_data_only=params.get("_return_http_data_only"),
            _preload_content=params.get("_preload_content", True),
            _request_timeout=params.get("_request_timeout"),
            collection_formats=collection_formats,
        )
