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

from __future__ import annotations

from dataclasses import dataclass
from typing import Any

from workos._types import _raise_deserialize_error


@dataclass(slots=True)
class SSODeviceAuthorizationRequest:
    """SSO Device Authorization Request model."""

    client_id: str
    """The WorkOS client ID for your application."""

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

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