"""
    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
"""
from __future__ import annotations

import re  # noqa: F401
from typing import TYPE_CHECKING

from pyasoc import api
from pyasoc.api_client import ApiClient

if TYPE_CHECKING:
    from ..models import (
        SystemWebHttpODataPageResultUtilitiesIssueModel,
        UtilitiesUpdateIssue,
    )


class IssuesApi:
    """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 issues_add_comment_by_issueid(self, issue_id, model, **kwargs):
        """Submit a new comment for the issue

        The next function replaces this function to add comment to Issue(s): UpdateIssuesForScope (PUT /api/v2/Issues/{scope}/{scopeId})
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.issues_add_comment_by_issueid(issue_id, model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str issue_id: Issue Id (required)
        :param UserSiteCommonModelsCommentModel model: Comment model (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.issues_add_comment_by_issueid_with_http_info(issue_id, model, **kwargs)
        else:
            (data) = self.issues_add_comment_by_issueid_with_http_info(issue_id, model, **kwargs)
            return data

    def issues_add_comment_by_issueid_with_http_info(self, issue_id, model, **kwargs):
        """Submit a new comment for the issue

        The next function replaces this function to add comment to Issue(s): UpdateIssuesForScope (PUT /api/v2/Issues/{scope}/{scopeId})
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.issues_add_comment_by_issueid_with_http_info(issue_id, model, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str issue_id: Issue Id (required)
        :param UserSiteCommonModelsCommentModel model: Comment model (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["issue_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 issues_add_comment_by_issueid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_id' is set
        if self.api_client.client_side_validation and (
            "issue_id" not in params or params["issue_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_id` when calling `issues_add_comment_by_issueid`"
            )
        # 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 `issues_add_comment_by_issueid`"
            )

        collection_formats = {}

        path_params = {}
        if "issue_id" in params:
            path_params["issueId"] = params["issue_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/Issues/{issueId}/Comments",
            "POST",
            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 issues_advisory_by_issueid(self, issue_id, locale, **kwargs):
        """Get Advisory (Obsolete! Please refer to: GET /api/v2/Reports/Article)

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

        :param async_req bool
        :param str issue_id:  (required)
        :param str locale:  (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.issues_advisory_by_issueid_with_http_info(issue_id, locale, **kwargs)
        else:
            (data) = self.issues_advisory_by_issueid_with_http_info(issue_id, locale, **kwargs)
            return data

    def issues_advisory_by_issueid_with_http_info(self, issue_id, locale, **kwargs):
        """Get Advisory (Obsolete! Please refer to: GET /api/v2/Reports/Article)

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

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

        all_params = ["issue_id", "locale"]
        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 issues_advisory_by_issueid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_id' is set
        if self.api_client.client_side_validation and (
            "issue_id" not in params or params["issue_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_id` when calling `issues_advisory_by_issueid`"
            )
        # verify the required parameter 'locale' is set
        if self.api_client.client_side_validation and (
            "locale" not in params or params["locale"] is None
        ):
            raise ValueError(
                "Missing the required parameter `locale` when calling `issues_advisory_by_issueid`"
            )

        collection_formats = {}

        path_params = {}
        if "issue_id" in params:
            path_params["issueId"] = params["issue_id"]

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

        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/Issues/{issueId}/Advisory",
            "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 issues_artifacts_by_issueid(self, issue_id, **kwargs):
        """Get the issue details

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

        :param async_req bool
        :param str issue_id: issue id (required)
        :param str locale: locale (default value: en-US)
        :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.issues_artifacts_by_issueid_with_http_info(issue_id, **kwargs)
        else:
            (data) = self.issues_artifacts_by_issueid_with_http_info(issue_id, **kwargs)
            return data

    def issues_artifacts_by_issueid_with_http_info(self, issue_id, **kwargs):
        """Get the issue details

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

        :param async_req bool
        :param str issue_id: issue id (required)
        :param str locale: locale (default value: en-US)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["issue_id", "locale"]
        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 issues_artifacts_by_issueid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_id' is set
        if self.api_client.client_side_validation and (
            "issue_id" not in params or params["issue_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_id` when calling `issues_artifacts_by_issueid`"
            )

        collection_formats = {}

        path_params = {}
        if "issue_id" in params:
            path_params["issueId"] = params["issue_id"]

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

        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/Issues/{issueId}/Artifacts",
            "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 issues_fix_recommendation_by_issueid(self, issue_id, locale, **kwargs):
        """Get Fix Recommendation. (Obsolete! Please refer to: GET /api/v2/Reports/Article)

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

        :param async_req bool
        :param str issue_id:  (required)
        :param str locale:  (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.issues_fix_recommendation_by_issueid_with_http_info(
                issue_id, locale, **kwargs
            )
        else:
            (data) = self.issues_fix_recommendation_by_issueid_with_http_info(
                issue_id, locale, **kwargs
            )
            return data

    def issues_fix_recommendation_by_issueid_with_http_info(self, issue_id, locale, **kwargs):
        """Get Fix Recommendation. (Obsolete! Please refer to: GET /api/v2/Reports/Article)

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

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

        all_params = ["issue_id", "locale"]
        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 issues_fix_recommendation_by_issueid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_id' is set
        if self.api_client.client_side_validation and (
            "issue_id" not in params or params["issue_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_id` when calling `issues_fix_recommendation_by_issueid`"
            )
        # verify the required parameter 'locale' is set
        if self.api_client.client_side_validation and (
            "locale" not in params or params["locale"] is None
        ):
            raise ValueError(
                "Missing the required parameter `locale` when calling `issues_fix_recommendation_by_issueid`"
            )

        collection_formats = {}

        path_params = {}
        if "issue_id" in params:
            path_params["issueId"] = params["issue_id"]

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

        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/Issues/{issueId}/FixRecommendation",
            "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 issues_get_comments_by_issueid(self, issue_id, **kwargs):
        """Get all issue's comments

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

        :param async_req bool
        :param str issue_id: Issue ID (required)
        :return: list[UserSiteCommonModelsCommentModelResponse]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_get_comments_by_issueid_with_http_info(issue_id, **kwargs)
        else:
            (data) = self.issues_get_comments_by_issueid_with_http_info(issue_id, **kwargs)
            return data

    def issues_get_comments_by_issueid_with_http_info(self, issue_id, **kwargs):
        """Get all issue's comments

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

        :param async_req bool
        :param str issue_id: Issue ID (required)
        :return: list[UserSiteCommonModelsCommentModelResponse]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["issue_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 issues_get_comments_by_issueid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_id' is set
        if self.api_client.client_side_validation and (
            "issue_id" not in params or params["issue_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_id` when calling `issues_get_comments_by_issueid`"
            )

        collection_formats = {}

        path_params = {}
        if "issue_id" in params:
            path_params["issueId"] = params["issue_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/Issues/{issueId}/Comments",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[UserSiteCommonModelsCommentModelResponse]",
            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 issues_get_is_noise(self, **kwargs):
        """Determine if there are similar issues that are marked as noise

        At least one of the hash versions should be provided.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.issues_get_is_noise(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str issue_hash_0: Will be searched only in hash version 0
        :param str issue_hash_1: Will be searched only in hash version 1
        :param str issue_hash_2: Will be searched only in hash version 2
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_get_is_noise_with_http_info(**kwargs)
        else:
            (data) = self.issues_get_is_noise_with_http_info(**kwargs)
            return data

    def issues_get_is_noise_with_http_info(self, **kwargs):
        """Determine if there are similar issues that are marked as noise

        At least one of the hash versions should be provided.
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.issues_get_is_noise_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str issue_hash_0: Will be searched only in hash version 0
        :param str issue_hash_1: Will be searched only in hash version 1
        :param str issue_hash_2: Will be searched only in hash version 2
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["issue_hash_0", "issue_hash_1", "issue_hash_2"]
        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 issues_get_is_noise" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "issue_hash_0" in params:
            query_params.append(("issueHash_0", params["issue_hash_0"]))
        if "issue_hash_1" in params:
            query_params.append(("issueHash_1", params["issue_hash_1"]))
        if "issue_hash_2" in params:
            query_params.append(("issueHash_2", params["issue_hash_2"]))

        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/Issues/IsNoise",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="bool",
            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 issues_get_is_noise1(self, hashes, **kwargs):
        """Determine if there are similar issues that are marked as noise

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

        :param async_req bool
        :param str hashes: Comma separated list of hash version and hash valeu. i.e. 0:4543342,1:-5543232,2:34453456,... (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_get_is_noise1_with_http_info(hashes, **kwargs)
        else:
            (data) = self.issues_get_is_noise1_with_http_info(hashes, **kwargs)
            return data

    def issues_get_is_noise1_with_http_info(self, hashes, **kwargs):
        """Determine if there are similar issues that are marked as noise

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

        :param async_req bool
        :param str hashes: Comma separated list of hash version and hash valeu. i.e. 0:4543342,1:-5543232,2:34453456,... (required)
        :return: bool
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["hashes"]
        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 issues_get_is_noise1" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'hashes' is set
        if self.api_client.client_side_validation and (
            "hashes" not in params or params["hashes"] is None
        ):
            raise ValueError(
                "Missing the required parameter `hashes` when calling `issues_get_is_noise1`"
            )

        collection_formats = {}

        path_params = {}

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

        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/Issues/IsNoise1",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="bool",
            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 issues_get_is_noise2(self, issues_hashes, **kwargs):
        """Check a bulk of issues hashes and determine which of them belong to noise issues

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

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

    def issues_get_is_noise2_with_http_info(self, issues_hashes, **kwargs):
        """Check a bulk of issues hashes and determine which of them belong to noise issues

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

        :param async_req bool
        :param UserSiteCommonModelsVerAndHashes issues_hashes: (required)
        :return: list[str]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["issues_hashes"]
        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 issues_get_is_noise2" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issues_hashes' is set
        if self.api_client.client_side_validation and (
            "issues_hashes" not in params or params["issues_hashes"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issues_hashes` when calling `issues_get_is_noise2`"
            )

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "issues_hashes" in params:
            body_params = params["issues_hashes"]
        # 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/Issues/IsNoise",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[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 issues_get_issue_by_id(self, id, **kwargs):
        """issues_get_issue_by_id

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

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

    def issues_get_issue_by_id_with_http_info(self, id, **kwargs):
        """issues_get_issue_by_id

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

        :param async_req bool
        :param str id: (required)
        :param str locale:
        :return: UtilitiesIssueModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["id", "locale"]
        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 issues_get_issue_by_id" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ("id" not in params or params["id"] is None):
            raise ValueError(
                "Missing the required parameter `id` when calling `issues_get_issue_by_id`"
            )

        collection_formats = {}

        path_params = {}
        if "id" in params:
            path_params["id"] = params["id"]

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

        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/Issues/{id}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="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 issues_get_issues_count_by_severity_for_scope(self, scope, scope_id, **kwargs):
        """Get filtered issues count by severity

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

        :param async_req bool
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param str odata_filter: Odata filter that will be applied
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: list[UserSiteCommonModelsIssuesCountBySeverity]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_get_issues_count_by_severity_for_scope_with_http_info(
                scope, scope_id, **kwargs
            )
        else:
            (data) = self.issues_get_issues_count_by_severity_for_scope_with_http_info(
                scope, scope_id, **kwargs
            )
            return data

    def issues_get_issues_count_by_severity_for_scope_with_http_info(
        self, scope, scope_id, **kwargs
    ):
        """Get filtered issues count by severity

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

        :param async_req bool
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param str odata_filter: Odata filter that will be applied
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: list[UserSiteCommonModelsIssuesCountBySeverity]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "apply_policies",
            "odata_filter",
            "select_policy_ids",
        ]
        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 issues_get_issues_count_by_severity_for_scope" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `issues_get_issues_count_by_severity_for_scope`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `issues_get_issues_count_by_severity_for_scope`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "odata_filter" in params:
            query_params.append(("odataFilter", params["odata_filter"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"

        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/Issues/CountBySeverity/{scope}/{scopeId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[UserSiteCommonModelsIssuesCountBySeverity]",
            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 issues_get_issues_count_by_status_for_scope(self, scope, scope_id, **kwargs):
        """Get filtered issues count by status

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

        :param async_req bool
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param str odata_filter: Odata filter that will be applied
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: list[UserSiteCommonModelsIssuesCountByStatus]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_get_issues_count_by_status_for_scope_with_http_info(
                scope, scope_id, **kwargs
            )
        else:
            (data) = self.issues_get_issues_count_by_status_for_scope_with_http_info(
                scope, scope_id, **kwargs
            )
            return data

    def issues_get_issues_count_by_status_for_scope_with_http_info(self, scope, scope_id, **kwargs):
        """Get filtered issues count by status

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

        :param async_req bool
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param str odata_filter: Odata filter that will be applied
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: list[UserSiteCommonModelsIssuesCountByStatus]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "apply_policies",
            "odata_filter",
            "select_policy_ids",
        ]
        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 issues_get_issues_count_by_status_for_scope" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `issues_get_issues_count_by_status_for_scope`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `issues_get_issues_count_by_status_for_scope`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "odata_filter" in params:
            query_params.append(("odataFilter", params["odata_filter"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"

        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/Issues/CountByStatus/{scope}/{scopeId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[UserSiteCommonModelsIssuesCountByStatus]",
            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 issues_get_issues_for_scope_by_scope_and_scopeid(
        self, scope, scope_id, **kwargs
    ) -> SystemWebHttpODataPageResultUtilitiesIssueModel:
        """Get filtered issues

        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.issues_get_issues_for_scope_by_scope_and_scopeid(scope, scope_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :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: SystemWebHttpODataPageResultUtilitiesIssueModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_get_issues_for_scope_by_scope_and_scopeid_with_http_info(
                scope, scope_id, **kwargs
            )
        else:
            (data) = self.issues_get_issues_for_scope_by_scope_and_scopeid_with_http_info(
                scope, scope_id, **kwargs
            )
            return data

    def issues_get_issues_for_scope_by_scope_and_scopeid_with_http_info(
        self, scope, scope_id, **kwargs
    ):
        """Get filtered issues

        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.issues_get_issues_for_scope_by_scope_and_scopeid_with_http_info(scope, scope_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :param str locale: If provided, it overrides the Accept-Language header. (If not provided and there is no Accept-Language header, the locale will be: en-US)
        :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: SystemWebHttpODataPageResultUtilitiesIssueModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "scope",
            "scope_id",
            "apply_policies",
            "select_policy_ids",
            "locale",
            "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 issues_get_issues_for_scope_by_scope_and_scopeid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `issues_get_issues_for_scope_by_scope_and_scopeid`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `issues_get_issues_for_scope_by_scope_and_scopeid`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]

        query_params = []
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"
        if "locale" in params:
            query_params.append(("locale", params["locale"]))
        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/Issues/{scope}/{scopeId}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="SystemWebHttpODataPageResultUtilitiesIssueModel",
            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 issues_history_by_issueid(self, issue_id, **kwargs):
        """Get issue history

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

        :param async_req bool
        :param str issue_id:  (required)
        :param bool include_all_scan_executions: If set to true, the history will contain all the scan executions that found this issue
        :param str locale: locale (default value: en-US)
        :return: list[AppScanSaaSModelsV2IssueChangeSet]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_history_by_issueid_with_http_info(issue_id, **kwargs)
        else:
            (data) = self.issues_history_by_issueid_with_http_info(issue_id, **kwargs)
            return data

    def issues_history_by_issueid_with_http_info(self, issue_id, **kwargs):
        """Get issue history

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

        :param async_req bool
        :param str issue_id:  (required)
        :param bool include_all_scan_executions: If set to true, the history will contain all the scan executions that found this issue
        :param str locale: locale (default value: en-US)
        :return: list[AppScanSaaSModelsV2IssueChangeSet]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["issue_id", "include_all_scan_executions", "locale"]
        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 issues_history_by_issueid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_id' is set
        if self.api_client.client_side_validation and (
            "issue_id" not in params or params["issue_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_id` when calling `issues_history_by_issueid`"
            )

        collection_formats = {}

        path_params = {}
        if "issue_id" in params:
            path_params["issueId"] = params["issue_id"]

        query_params = []
        if "include_all_scan_executions" in params:
            query_params.append(("includeAllScanExecutions", params["include_all_scan_executions"]))
        if "locale" in params:
            query_params.append(("locale", params["locale"]))

        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/Issues/{issueId}/History",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[AppScanSaaSModelsV2IssueChangeSet]",
            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 issues_import_file(self, file_to_upload, app_id, scan_name, **kwargs):
        """Import issues from uploaded file to application specified with id

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

        :param async_req bool
        :param file file_to_upload: (required)
        :param str app_id: Application ID (required)
        :param str scan_name: Scan Name (required)
        :param str file_name: If provided, this parameter will override the name of the uploaded file, including its extension(CSV).
        :return: UserSiteCommonModelsImportIssueStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_import_file_with_http_info(
                file_to_upload, app_id, scan_name, **kwargs
            )
        else:
            (data) = self.issues_import_file_with_http_info(
                file_to_upload, app_id, scan_name, **kwargs
            )
            return data

    def issues_import_file_with_http_info(self, file_to_upload, app_id, scan_name, **kwargs):
        """Import issues from uploaded file to application specified with id

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

        :param async_req bool
        :param file file_to_upload: (required)
        :param str app_id: Application ID (required)
        :param str scan_name: Scan Name (required)
        :param str file_name: If provided, this parameter will override the name of the uploaded file, including its extension(CSV).
        :return: UserSiteCommonModelsImportIssueStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "file_to_upload",
            "app_id",
            "scan_name",
            "file_name",
        ]
        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 issues_import_file" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'file_to_upload' is set
        if self.api_client.client_side_validation and (
            "file_to_upload" not in params or params["file_to_upload"] is None
        ):
            raise ValueError(
                "Missing the required parameter `file_to_upload` when calling `issues_import_file`"
            )
        # verify the required parameter 'app_id' is set
        if self.api_client.client_side_validation and (
            "app_id" not in params or params["app_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `app_id` when calling `issues_import_file`"
            )
        # verify the required parameter 'scan_name' is set
        if self.api_client.client_side_validation and (
            "scan_name" not in params or params["scan_name"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scan_name` when calling `issues_import_file`"
            )

        if self.api_client.client_side_validation and (
            "file_name" in params and len(params["file_name"]) > 2048
        ):
            raise ValueError(
                "Invalid value for parameter `file_name` when calling `issues_import_file`, length must be less than or equal to `2048`"
            )
        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}
        if "file_to_upload" in params:
            local_var_files["fileToUpload"] = params["file_to_upload"]
        if "file_name" in params:
            form_params.append(("fileName", params["file_name"]))
        if "app_id" in params:
            form_params.append(("appId", params["app_id"]))
        if "scan_name" in params:
            form_params.append(("scanName", params["scan_name"]))

        body_params = None
        # 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(
            ["multipart/form-data"]
        )

        # Authentication setting
        auth_settings = ["AccessToken"]

        return self.api_client.call_api(
            "/api/V2/Issues/ImportFile",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsImportIssueStatusModel",
            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 issues_update_issue_by_id(self, id, issue_data: UtilitiesUpdateIssue, **kwargs):
        """Modify issue data

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

        :param async_req bool
        :param str id: ID of issue to be modified (required)
        :param UtilitiesUpdateIssue issue_data: New issue 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.issues_update_issue_by_id_with_http_info(id, issue_data, **kwargs)
        else:
            (data) = self.issues_update_issue_by_id_with_http_info(id, issue_data, **kwargs)
            return data

    def issues_update_issue_by_id_with_http_info(self, id, issue_data, **kwargs):
        """Modify issue data

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

        :param async_req bool
        :param str id: ID of issue to be modified (required)
        :param UtilitiesUpdateIssue issue_data: New issue data (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["id", "issue_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 issues_update_issue_by_id" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'id' is set
        if self.api_client.client_side_validation and ("id" not in params or params["id"] is None):
            raise ValueError(
                "Missing the required parameter `id` when calling `issues_update_issue_by_id`"
            )
        # verify the required parameter 'issue_data' is set
        if self.api_client.client_side_validation and (
            "issue_data" not in params or params["issue_data"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_data` when calling `issues_update_issue_by_id`"
            )

        collection_formats = {}

        path_params = {}
        if "id" in params:
            path_params["id"] = params["id"]

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "issue_data" in params:
            body_params = params["issue_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/Issues/{id}",
            "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 issues_update_issues_for_scope_by_scope_and_scopeid(
        self, issue_data, scope, scope_id, odata_filter, **kwargs
    ):
        """Update filtered issues

        The NUpdatedIssues value in the response counts only issues whose the status was updated. <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.issues_update_issues_for_scope_by_scope_and_scopeid(issue_data, scope, scope_id, odata_filter, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UtilitiesUpdateIssue issue_data: New issue data (required)
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str odata_filter: Odata filter that will be applied (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: UserSiteCommonModelsTriageResult
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.issues_update_issues_for_scope_by_scope_and_scopeid_with_http_info(
                issue_data, scope, scope_id, odata_filter, **kwargs
            )
        else:
            (data) = self.issues_update_issues_for_scope_by_scope_and_scopeid_with_http_info(
                issue_data, scope, scope_id, odata_filter, **kwargs
            )
            return data

    def issues_update_issues_for_scope_by_scope_and_scopeid_with_http_info(
        self, issue_data, scope, scope_id, odata_filter, **kwargs
    ):
        """Update filtered issues

        The NUpdatedIssues value in the response counts only issues whose the status was updated. <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.issues_update_issues_for_scope_by_scope_and_scopeid_with_http_info(issue_data, scope, scope_id, odata_filter, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param UtilitiesUpdateIssue issue_data: New issue data (required)
        :param str scope: The Scope of the issues (required)
        :param str scope_id: id of the Scope (required)
        :param str odata_filter: Odata filter that will be applied (required)
        :param str apply_policies: Determine which policies will be applied for filtering in non compliant issues
        :param list[str] select_policy_ids: If applyPolicies is set to Select, only issues that are not compliant with these policies will be filtered in
        :return: UserSiteCommonModelsTriageResult
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = [
            "issue_data",
            "scope",
            "scope_id",
            "odata_filter",
            "apply_policies",
            "select_policy_ids",
        ]
        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 issues_update_issues_for_scope_by_scope_and_scopeid" % key
                )
            params[key] = val
        del params["kwargs"]
        # verify the required parameter 'issue_data' is set
        if self.api_client.client_side_validation and (
            "issue_data" not in params or params["issue_data"] is None
        ):
            raise ValueError(
                "Missing the required parameter `issue_data` when calling `issues_update_issues_for_scope_by_scope_and_scopeid`"
            )
        # verify the required parameter 'scope' is set
        if self.api_client.client_side_validation and (
            "scope" not in params or params["scope"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope` when calling `issues_update_issues_for_scope_by_scope_and_scopeid`"
            )
        # verify the required parameter 'scope_id' is set
        if self.api_client.client_side_validation and (
            "scope_id" not in params or params["scope_id"] is None
        ):
            raise ValueError(
                "Missing the required parameter `scope_id` when calling `issues_update_issues_for_scope_by_scope_and_scopeid`"
            )
        # verify the required parameter 'odata_filter' is set
        if self.api_client.client_side_validation and (
            "odata_filter" not in params or params["odata_filter"] is None
        ):
            raise ValueError(
                "Missing the required parameter `odata_filter` when calling `issues_update_issues_for_scope_by_scope_and_scopeid`"
            )

        collection_formats = {}

        path_params = {}
        if "scope" in params:
            path_params["scope"] = params["scope"]
        if "scope_id" in params:
            path_params["scopeId"] = params["scope_id"]

        query_params = []
        if "odata_filter" in params:
            query_params.append(("odataFilter", params["odata_filter"]))
        if "apply_policies" in params:
            query_params.append(("applyPolicies", params["apply_policies"]))
        if "select_policy_ids" in params:
            query_params.append(("selectPolicyIds", params["select_policy_ids"]))
            collection_formats["selectPolicyIds"] = "multi"

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "issue_data" in params:
            body_params = params["issue_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/Issues/{scope}/{scopeId}",
            "PUT",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsTriageResult",
            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,
        )
