# This file is auto-generated by oagen. Do not edit.

from __future__ import annotations

from dataclasses import dataclass
from typing import Any, Dict
from workos._types import _raise_deserialize_error


@dataclass(slots=True)
class RadarListEntryAlreadyPresentResponse:
    """Radar List Entry Already Present Response model."""

    message: str
    """A message indicating the entry already exists."""

    @classmethod
    def from_dict(cls, data: Dict[str, Any]) -> "RadarListEntryAlreadyPresentResponse":
        """Deserialize from a dictionary."""
        try:
            return cls(
                message=data["message"],
            )
        except (KeyError, ValueError) as e:
            _raise_deserialize_error("RadarListEntryAlreadyPresentResponse", e)

    def to_dict(self) -> Dict[str, Any]:
        """Serialize to a dictionary."""
        result: Dict[str, Any] = {}
        result["message"] = self.message
        return result
