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

from typing import List, Optional
from datetime import datetime
from typing_extensions import Literal

from ..._models import BaseModel
from ..intel.attack_surface_report.issue_type import IssueType

__all__ = ["InsightListResponse", "Issue", "IssuePayload"]


class IssuePayload(BaseModel):
    detection_method: Optional[str] = None
    """Describes the method used to detect insight."""

    zone_tag: Optional[str] = None


class Issue(BaseModel):
    id: Optional[str] = None

    dismissed: Optional[bool] = None

    issue_class: Optional[str] = None

    issue_type: Optional[IssueType] = None

    payload: Optional[IssuePayload] = None

    resolve_link: Optional[str] = None

    resolve_text: Optional[str] = None

    severity: Optional[Literal["Low", "Moderate", "Critical"]] = None

    since: Optional[datetime] = None

    subject: Optional[str] = None

    timestamp: Optional[datetime] = None


class InsightListResponse(BaseModel):
    count: Optional[int] = None
    """Indicates the total number of results."""

    issues: Optional[List[Issue]] = None

    page: Optional[int] = None
    """Specifies the current page within paginated list of results."""

    per_page: Optional[int] = None
    """Sets the number of results per page of results."""
