"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from skylight_sdk import utils
from skylight_sdk.types import BaseModel
from typing import Optional


class ForbiddenErrorResponseData(BaseModel):
    detail: Optional[str] = "Access forbidden"
    r"""Error message for forbidden access"""


class ForbiddenErrorResponse(Exception):
    r"""Returned when the request cannot be processed due to authentication or authorization issues"""

    data: ForbiddenErrorResponseData

    def __init__(self, data: ForbiddenErrorResponseData):
        self.data = data

    def __str__(self) -> str:
        return utils.marshal_json(self.data, ForbiddenErrorResponseData)
