# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

from __future__ import annotations

import typing_extensions
from typing import List, Type, Optional, cast

import httpx

from ...._types import Body, Omit, Query, Headers, NotGiven, SequenceNotStr, omit, not_given
from ...._utils import maybe_transform, async_maybe_transform
from ...._compat import cached_property
from ...._resource import SyncAPIResource, AsyncAPIResource
from ...._response import (
    to_raw_response_wrapper,
    to_streamed_response_wrapper,
    async_to_raw_response_wrapper,
    async_to_streamed_response_wrapper,
)
from ...._wrappers import ResultWrapper
from ....pagination import SyncV4PagePagination, AsyncV4PagePagination
from ...._base_client import AsyncPaginator, make_request_options
from ....types.intel.attack_surface_report import (
    issue_list_params,
    issue_type_params,
    issue_class_params,
    issue_dismiss_params,
    issue_severity_params,
)
from ....types.intel.attack_surface_report.issue_type import IssueType
from ....types.intel.attack_surface_report.issue_list_response import IssueListResponse
from ....types.intel.attack_surface_report.issue_type_response import IssueTypeResponse
from ....types.intel.attack_surface_report.issue_class_response import IssueClassResponse
from ....types.intel.attack_surface_report.severity_query_param import SeverityQueryParam
from ....types.intel.attack_surface_report.issue_dismiss_response import IssueDismissResponse
from ....types.intel.attack_surface_report.issue_severity_response import IssueSeverityResponse

__all__ = ["IssuesResource", "AsyncIssuesResource"]


class IssuesResource(SyncAPIResource):
    @cached_property
    def with_raw_response(self) -> IssuesResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
        """
        return IssuesResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> IssuesResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
        """
        return IssuesResourceWithStreamingResponse(self)

    @typing_extensions.deprecated("deprecated")
    def list(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        page: int | Omit = omit,
        per_page: int | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> SyncV4PagePagination[Optional[IssueListResponse]]:
        """
        Retrieves Security Center Issues

        Args:
          account_id: Identifier.

          page: Specifies the current page within paginated list of results.

          per_page: Sets the number of results per page of results.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return self._get_api_list(
            f"/accounts/{account_id}/intel/attack-surface-report/issues",
            page=SyncV4PagePagination[Optional[IssueListResponse]],
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "page": page,
                        "per_page": per_page,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_list_params.IssueListParams,
                ),
            ),
            model=IssueListResponse,
        )

    @typing_extensions.deprecated("deprecated")
    def class_(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> Optional[IssueClassResponse]:
        """
        Retrieves Security Center Issue Counts by Class

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return self._get(
            f"/accounts/{account_id}/intel/attack-surface-report/issues/class",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_class_params.IssueClassParams,
                ),
                post_parser=ResultWrapper[Optional[IssueClassResponse]]._unwrapper,
            ),
            cast_to=cast(Type[Optional[IssueClassResponse]], ResultWrapper[IssueClassResponse]),
        )

    @typing_extensions.deprecated("deprecated")
    def dismiss(
        self,
        issue_id: str,
        *,
        account_id: str,
        dismiss: bool | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> IssueDismissResponse:
        """
        Archives Security Center Insight

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        if not issue_id:
            raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}")
        return self._put(
            f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
            body=maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=IssueDismissResponse,
        )

    @typing_extensions.deprecated("deprecated")
    def severity(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> Optional[IssueSeverityResponse]:
        """
        Retrieves Security Center Issue Counts by Severity

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return self._get(
            f"/accounts/{account_id}/intel/attack-surface-report/issues/severity",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_severity_params.IssueSeverityParams,
                ),
                post_parser=ResultWrapper[Optional[IssueSeverityResponse]]._unwrapper,
            ),
            cast_to=cast(Type[Optional[IssueSeverityResponse]], ResultWrapper[IssueSeverityResponse]),
        )

    @typing_extensions.deprecated("deprecated")
    def type(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> Optional[IssueTypeResponse]:
        """
        Retrieves Security Center Issue Counts by Type

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return self._get(
            f"/accounts/{account_id}/intel/attack-surface-report/issues/type",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_type_params.IssueTypeParams,
                ),
                post_parser=ResultWrapper[Optional[IssueTypeResponse]]._unwrapper,
            ),
            cast_to=cast(Type[Optional[IssueTypeResponse]], ResultWrapper[IssueTypeResponse]),
        )


class AsyncIssuesResource(AsyncAPIResource):
    @cached_property
    def with_raw_response(self) -> AsyncIssuesResourceWithRawResponse:
        """
        This property can be used as a prefix for any HTTP method call to return
        the raw response object instead of the parsed content.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#accessing-raw-response-data-eg-headers
        """
        return AsyncIssuesResourceWithRawResponse(self)

    @cached_property
    def with_streaming_response(self) -> AsyncIssuesResourceWithStreamingResponse:
        """
        An alternative to `.with_raw_response` that doesn't eagerly read the response body.

        For more information, see https://www.github.com/cloudflare/cloudflare-python#with_streaming_response
        """
        return AsyncIssuesResourceWithStreamingResponse(self)

    @typing_extensions.deprecated("deprecated")
    def list(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        page: int | Omit = omit,
        per_page: int | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> AsyncPaginator[Optional[IssueListResponse], AsyncV4PagePagination[Optional[IssueListResponse]]]:
        """
        Retrieves Security Center Issues

        Args:
          account_id: Identifier.

          page: Specifies the current page within paginated list of results.

          per_page: Sets the number of results per page of results.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return self._get_api_list(
            f"/accounts/{account_id}/intel/attack-surface-report/issues",
            page=AsyncV4PagePagination[Optional[IssueListResponse]],
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "page": page,
                        "per_page": per_page,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_list_params.IssueListParams,
                ),
            ),
            model=IssueListResponse,
        )

    @typing_extensions.deprecated("deprecated")
    async def class_(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> Optional[IssueClassResponse]:
        """
        Retrieves Security Center Issue Counts by Class

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return await self._get(
            f"/accounts/{account_id}/intel/attack-surface-report/issues/class",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_class_params.IssueClassParams,
                ),
                post_parser=ResultWrapper[Optional[IssueClassResponse]]._unwrapper,
            ),
            cast_to=cast(Type[Optional[IssueClassResponse]], ResultWrapper[IssueClassResponse]),
        )

    @typing_extensions.deprecated("deprecated")
    async def dismiss(
        self,
        issue_id: str,
        *,
        account_id: str,
        dismiss: bool | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> IssueDismissResponse:
        """
        Archives Security Center Insight

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        if not issue_id:
            raise ValueError(f"Expected a non-empty value for `issue_id` but received {issue_id!r}")
        return await self._put(
            f"/accounts/{account_id}/intel/attack-surface-report/{issue_id}/dismiss",
            body=await async_maybe_transform({"dismiss": dismiss}, issue_dismiss_params.IssueDismissParams),
            options=make_request_options(
                extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
            ),
            cast_to=IssueDismissResponse,
        )

    @typing_extensions.deprecated("deprecated")
    async def severity(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> Optional[IssueSeverityResponse]:
        """
        Retrieves Security Center Issue Counts by Severity

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return await self._get(
            f"/accounts/{account_id}/intel/attack-surface-report/issues/severity",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_severity_params.IssueSeverityParams,
                ),
                post_parser=ResultWrapper[Optional[IssueSeverityResponse]]._unwrapper,
            ),
            cast_to=cast(Type[Optional[IssueSeverityResponse]], ResultWrapper[IssueSeverityResponse]),
        )

    @typing_extensions.deprecated("deprecated")
    async def type(
        self,
        *,
        account_id: str,
        dismissed: bool | Omit = omit,
        issue_class: SequenceNotStr[str] | Omit = omit,
        issue_class_neq: SequenceNotStr[str] | Omit = omit,
        issue_type: List[IssueType] | Omit = omit,
        issue_type_neq: List[IssueType] | Omit = omit,
        product: SequenceNotStr[str] | Omit = omit,
        product_neq: SequenceNotStr[str] | Omit = omit,
        severity: List[SeverityQueryParam] | Omit = omit,
        severity_neq: List[SeverityQueryParam] | Omit = omit,
        subject: SequenceNotStr[str] | Omit = omit,
        subject_neq: SequenceNotStr[str] | Omit = omit,
        # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
        # The extra values given here take precedence over values defined on the client or passed to this method.
        extra_headers: Headers | None = None,
        extra_query: Query | None = None,
        extra_body: Body | None = None,
        timeout: float | httpx.Timeout | None | NotGiven = not_given,
    ) -> Optional[IssueTypeResponse]:
        """
        Retrieves Security Center Issue Counts by Type

        Args:
          account_id: Identifier.

          extra_headers: Send extra headers

          extra_query: Add additional query parameters to the request

          extra_body: Add additional JSON properties to the request

          timeout: Override the client-level default timeout for this request, in seconds
        """
        if not account_id:
            raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}")
        return await self._get(
            f"/accounts/{account_id}/intel/attack-surface-report/issues/type",
            options=make_request_options(
                extra_headers=extra_headers,
                extra_query=extra_query,
                extra_body=extra_body,
                timeout=timeout,
                query=await async_maybe_transform(
                    {
                        "dismissed": dismissed,
                        "issue_class": issue_class,
                        "issue_class_neq": issue_class_neq,
                        "issue_type": issue_type,
                        "issue_type_neq": issue_type_neq,
                        "product": product,
                        "product_neq": product_neq,
                        "severity": severity,
                        "severity_neq": severity_neq,
                        "subject": subject,
                        "subject_neq": subject_neq,
                    },
                    issue_type_params.IssueTypeParams,
                ),
                post_parser=ResultWrapper[Optional[IssueTypeResponse]]._unwrapper,
            ),
            cast_to=cast(Type[Optional[IssueTypeResponse]], ResultWrapper[IssueTypeResponse]),
        )


class IssuesResourceWithRawResponse:
    def __init__(self, issues: IssuesResource) -> None:
        self._issues = issues

        self.list = (  # pyright: ignore[reportDeprecated]
            to_raw_response_wrapper(
                issues.list,  # pyright: ignore[reportDeprecated],
            )
        )
        self.class_ = (  # pyright: ignore[reportDeprecated]
            to_raw_response_wrapper(
                issues.class_,  # pyright: ignore[reportDeprecated],
            )
        )
        self.dismiss = (  # pyright: ignore[reportDeprecated]
            to_raw_response_wrapper(
                issues.dismiss,  # pyright: ignore[reportDeprecated],
            )
        )
        self.severity = (  # pyright: ignore[reportDeprecated]
            to_raw_response_wrapper(
                issues.severity,  # pyright: ignore[reportDeprecated],
            )
        )
        self.type = (  # pyright: ignore[reportDeprecated]
            to_raw_response_wrapper(
                issues.type,  # pyright: ignore[reportDeprecated],
            )
        )


class AsyncIssuesResourceWithRawResponse:
    def __init__(self, issues: AsyncIssuesResource) -> None:
        self._issues = issues

        self.list = (  # pyright: ignore[reportDeprecated]
            async_to_raw_response_wrapper(
                issues.list,  # pyright: ignore[reportDeprecated],
            )
        )
        self.class_ = (  # pyright: ignore[reportDeprecated]
            async_to_raw_response_wrapper(
                issues.class_,  # pyright: ignore[reportDeprecated],
            )
        )
        self.dismiss = (  # pyright: ignore[reportDeprecated]
            async_to_raw_response_wrapper(
                issues.dismiss,  # pyright: ignore[reportDeprecated],
            )
        )
        self.severity = (  # pyright: ignore[reportDeprecated]
            async_to_raw_response_wrapper(
                issues.severity,  # pyright: ignore[reportDeprecated],
            )
        )
        self.type = (  # pyright: ignore[reportDeprecated]
            async_to_raw_response_wrapper(
                issues.type,  # pyright: ignore[reportDeprecated],
            )
        )


class IssuesResourceWithStreamingResponse:
    def __init__(self, issues: IssuesResource) -> None:
        self._issues = issues

        self.list = (  # pyright: ignore[reportDeprecated]
            to_streamed_response_wrapper(
                issues.list,  # pyright: ignore[reportDeprecated],
            )
        )
        self.class_ = (  # pyright: ignore[reportDeprecated]
            to_streamed_response_wrapper(
                issues.class_,  # pyright: ignore[reportDeprecated],
            )
        )
        self.dismiss = (  # pyright: ignore[reportDeprecated]
            to_streamed_response_wrapper(
                issues.dismiss,  # pyright: ignore[reportDeprecated],
            )
        )
        self.severity = (  # pyright: ignore[reportDeprecated]
            to_streamed_response_wrapper(
                issues.severity,  # pyright: ignore[reportDeprecated],
            )
        )
        self.type = (  # pyright: ignore[reportDeprecated]
            to_streamed_response_wrapper(
                issues.type,  # pyright: ignore[reportDeprecated],
            )
        )


class AsyncIssuesResourceWithStreamingResponse:
    def __init__(self, issues: AsyncIssuesResource) -> None:
        self._issues = issues

        self.list = (  # pyright: ignore[reportDeprecated]
            async_to_streamed_response_wrapper(
                issues.list,  # pyright: ignore[reportDeprecated],
            )
        )
        self.class_ = (  # pyright: ignore[reportDeprecated]
            async_to_streamed_response_wrapper(
                issues.class_,  # pyright: ignore[reportDeprecated],
            )
        )
        self.dismiss = (  # pyright: ignore[reportDeprecated]
            async_to_streamed_response_wrapper(
                issues.dismiss,  # pyright: ignore[reportDeprecated],
            )
        )
        self.severity = (  # pyright: ignore[reportDeprecated]
            async_to_streamed_response_wrapper(
                issues.severity,  # pyright: ignore[reportDeprecated],
            )
        )
        self.type = (  # pyright: ignore[reportDeprecated]
            async_to_streamed_response_wrapper(
                issues.type,  # pyright: ignore[reportDeprecated],
            )
        )
