"""
    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


class ReportsApi:
    """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 reports_article(self, issuetype, **kwargs):
        """Get Article

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

        :param async_req bool
        :param str issuetype: Issue Type ID (required)
        :param str technology: Options: 'DAST', 'SAST', 'IAST', 'iOS', 'Android'. Not case sensitive.
        :param str api: (when available)
        :param str locale:
        :param str language: Programing Language
        :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.reports_article_with_http_info(issuetype, **kwargs)
        else:
            (data) = self.reports_article_with_http_info(issuetype, **kwargs)
            return data

    def reports_article_with_http_info(self, issuetype, **kwargs):
        """Get Article

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

        :param async_req bool
        :param str issuetype: Issue Type ID (required)
        :param str technology: Options: 'DAST', 'SAST', 'IAST', 'iOS', 'Android'. Not case sensitive.
        :param str api: (when available)
        :param str locale:
        :param str language: Programing Language
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if "issuetype" in params:
            query_params.append(("issuetype", params["issuetype"]))
        if "technology" in params:
            query_params.append(("technology", params["technology"]))
        if "api" in params:
            query_params.append(("api", params["api"]))
        if "locale" in params:
            query_params.append(("locale", params["locale"]))
        if "language" in params:
            query_params.append(("language", params["language"]))

        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 = []

        return self.api_client.call_api(
            "/api/v2/Reports/Article",
            "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 reports_article_for_omnia_link(self, **kwargs):
        """Get Article according to embedded Omnia link format, using Issue type ID.  This API is for internal links of Omnia articles, which were returned by 'Article' API.

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

        :param async_req bool
        :param str id: Obsolete: Article ID. Use 'Issue type ID' instead
        :param str language: Programing Language
        :param str api: API vulnerability Name
        :param str nl: Translated Langauge
        :param str issuetype: Issue type ID
        :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.reports_article_for_omnia_link_with_http_info(**kwargs)
        else:
            (data) = self.reports_article_for_omnia_link_with_http_info(**kwargs)
            return data

    def reports_article_for_omnia_link_with_http_info(self, **kwargs):
        """Get Article according to embedded Omnia link format, using Issue type ID.  This API is for internal links of Omnia articles, which were returned by 'Article' API.

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

        :param async_req bool
        :param str id: Obsolete: Article ID. Use 'Issue type ID' instead
        :param str language: Programing Language
        :param str api: API vulnerability Name
        :param str nl: Translated Langauge
        :param str issuetype: Issue type ID
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["id", "language", "api", "nl", "issuetype"]
        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 reports_article_for_omnia_link" % key
                )
            params[key] = val
        del params["kwargs"]

        collection_formats = {}

        path_params = {}

        query_params = []
        if "id" in params:
            query_params.append(("id", params["id"]))
        if "language" in params:
            query_params.append(("language", params["language"]))
        if "api" in params:
            query_params.append(("api", params["api"]))
        if "nl" in params:
            query_params.append(("nl", params["nl"]))
        if "issuetype" in params:
            query_params.append(("issuetype", params["issuetype"]))

        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 = []

        return self.api_client.call_api(
            "/api/v2/Reports/ArticleForOmniaLink",
            "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 reports_article_for_open_source_component(self, component_name, **kwargs):
        """Get Article for Open Source Component

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

        :param async_req bool
        :param str component_name: Open-Source Component Name (required)
        :param str current_version: The component version in which the vulnerability was found.
        :param str fixed_version: The component version which contain a fix  to the vulnerability.
        :param str locale:
        :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.reports_article_for_open_source_component_with_http_info(
                component_name, **kwargs
            )
        else:
            (data) = self.reports_article_for_open_source_component_with_http_info(
                component_name, **kwargs
            )
            return data

    def reports_article_for_open_source_component_with_http_info(self, component_name, **kwargs):
        """Get Article for Open Source Component

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

        :param async_req bool
        :param str component_name: Open-Source Component Name (required)
        :param str current_version: The component version in which the vulnerability was found.
        :param str fixed_version: The component version which contain a fix  to the vulnerability.
        :param str locale:
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if "component_name" in params:
            query_params.append(("componentName", params["component_name"]))
        if "current_version" in params:
            query_params.append(("currentVersion", params["current_version"]))
        if "fixed_version" in params:
            query_params.append(("fixedVersion", params["fixed_version"]))
        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 = []

        return self.api_client.call_api(
            "/api/v2/Reports/ArticleForOpenSourceComponent",
            "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 reports_create_issues_report_by_scope_and_id(self, scope, id, config, **kwargs):
        """Create issues report for selected issues

        Full details of all issues in scope (JSON). <br />  Policies and OData filters can be applied.<br />  If policies are applied, the report will contain only issues that are not compliant with these policies.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_issues_report_by_scope_and_id(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsIssuesReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.reports_create_issues_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
        else:
            (data) = self.reports_create_issues_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
            return data

    def reports_create_issues_report_by_scope_and_id_with_http_info(
        self, scope, id, config, **kwargs
    ):
        """Create issues report for selected issues

        Full details of all issues in scope (JSON). <br />  Policies and OData filters can be applied.<br />  If policies are applied, the report will contain only issues that are not compliant with these policies.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_issues_report_by_scope_and_id_with_http_info(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsIssuesReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "config" in params:
            body_params = params["config"]
        # 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/Reports/Issues/{scope}/{id}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsReportStatusModel",
            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 reports_create_license_report_by_scope_and_id(self, scope, id, config, **kwargs):
        """Create open source licenses report

        PDF or HTML format.<br />  OData filters can be applied.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_license_report_by_scope_and_id(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsLicenseReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.reports_create_license_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
        else:
            (data) = self.reports_create_license_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
            return data

    def reports_create_license_report_by_scope_and_id_with_http_info(
        self, scope, id, config, **kwargs
    ):
        """Create open source licenses report

        PDF or HTML format.<br />  OData filters can be applied.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_license_report_by_scope_and_id_with_http_info(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsLicenseReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "config" in params:
            body_params = params["config"]
        # 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/Reports/Licenses/{scope}/{id}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsReportStatusModel",
            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 reports_create_regulation_report_by_scope_and_id(self, scope, id, config, **kwargs):
        """Create regulation report for selected issues

        PDF or HTML format.<br />  Policies and OData filters can be applied.<br />  If policies are applied, the report will contain only issues that are not compliant with these policies.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_regulation_report_by_scope_and_id(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsRegulationReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.reports_create_regulation_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
        else:
            (data) = self.reports_create_regulation_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
            return data

    def reports_create_regulation_report_by_scope_and_id_with_http_info(
        self, scope, id, config, **kwargs
    ):
        """Create regulation report for selected issues

        PDF or HTML format.<br />  Policies and OData filters can be applied.<br />  If policies are applied, the report will contain only issues that are not compliant with these policies.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_regulation_report_by_scope_and_id_with_http_info(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsRegulationReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "config" in params:
            body_params = params["config"]
        # 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/Reports/Regulation/{scope}/{id}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsReportStatusModel",
            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 reports_create_security_report_by_scope_and_id(self, scope, id, config, **kwargs):
        """Create security report for selected issues

        PDF, HTML, XML or CSV format.<br />  Policies and OData filters can be applied.<br />  If policies are applied, the report will contain only issues that are not compliant with these policies.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_security_report_by_scope_and_id(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsSecurityReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs["_return_http_data_only"] = True
        if kwargs.get("async_req"):
            return self.reports_create_security_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
        else:
            (data) = self.reports_create_security_report_by_scope_and_id_with_http_info(
                scope, id, config, **kwargs
            )
            return data

    def reports_create_security_report_by_scope_and_id_with_http_info(
        self, scope, id, config, **kwargs
    ):
        """Create security report for selected issues

        PDF, HTML, XML or CSV format.<br />  Policies and OData filters can be applied.<br />  If policies are applied, the report will contain only issues that are not compliant with these policies.  <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_create_security_report_by_scope_and_id_with_http_info(scope, id, config, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str scope:  (required)
        :param str id: The entity id (required)
        :param UserSiteCommonModelsSecurityReportJob config:  (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if "config" in params:
            body_params = params["config"]
        # 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/Reports/Security/{scope}/{id}",
            "POST",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsReportStatusModel",
            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 reports_delete_report_by_id(self, id, **kwargs):
        """Delete a report

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

        :param async_req bool
        :param str id: Report job 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.reports_delete_report_by_id_with_http_info(id, **kwargs)
        else:
            (data) = self.reports_delete_report_by_id_with_http_info(id, **kwargs)
            return data

    def reports_delete_report_by_id_with_http_info(self, id, **kwargs):
        """Delete a report

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

        :param async_req bool
        :param str id: Report job Id (required)
        :return: object
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["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 reports_delete_report_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 `reports_delete_report_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
        # 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/Reports/{id}",
            "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 reports_download_report_by_id(self, id, **kwargs):
        """Download a report

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

        :param async_req bool
        :param str id: Report 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.reports_download_report_by_id_with_http_info(id, **kwargs)
        else:
            (data) = self.reports_download_report_by_id_with_http_info(id, **kwargs)
            return data

    def reports_download_report_by_id_with_http_info(self, id, **kwargs):
        """Download a report

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

        :param async_req bool
        :param str id: Report job Id (required)
        :return: file
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["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 reports_download_report_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 `reports_download_report_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
        # 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/Reports/Download/{id}",
            "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 reports_get_report_job_by_id(self, id, **kwargs):
        """Get report status

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

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

    def reports_get_report_job_by_id_with_http_info(self, id, **kwargs):
        """Get report status

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

        :param async_req bool
        :param str id: Report job Id (required)
        :return: UserSiteCommonModelsReportStatusModel
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ["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 reports_get_report_job_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 `reports_get_report_job_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
        # 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/Reports/{id}",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="UserSiteCommonModelsReportStatusModel",
            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 reports_get_reports_jobs(self, **kwargs):
        """Get all available reports

        Includes all reports generated by the user in the last 24 hours.   <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_get_reports_jobs(async_req=True)
        >>> result = thread.get()

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

    def reports_get_reports_jobs_with_http_info(self, **kwargs):
        """Get all available reports

        Includes all reports generated by the user in the last 24 hours.   <br />
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.reports_get_reports_jobs_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[UserSiteCommonModelsReportStatusModel]
                 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 reports_get_reports_jobs" % 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/Reports",
            "GET",
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type="list[UserSiteCommonModelsReportStatusModel]",
            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,
        )
