# generated by datamodel-codegen:
#   filename:  warning_message.json

from __future__ import annotations

from dataclasses import dataclass
from enum import Enum
from typing import Optional


class When(Enum):
    """
    When the warning message is emitted
    """

    config = "config"
    collect = "collect"
    runtest = "runtest"


@dataclass
class WarningMessage:
    """
    A warning message
    """

    when: When
    """
    When the warning message is emitted
    """
    filename: str
    """
    The filename of the file where the warning message is emitted
    """
    lineno: int
    """
    The line number of the file where the warning message is emitted
    """
    message: str
    """
    The warning message
    """
    event: str = "WarningMessage"
    """
    The event type
    """
    category: Optional[str] = None
    """
    The category of the warning message
    """
