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

from __future__ import annotations
from attio.errors import AttioError
from attio.models import (
    get_v2_target_identifier_attributes_attribute_optionsop as models_get_v2_target_identifier_attributes_attribute_optionsop,
)
from attio.types import BaseModel
from dataclasses import dataclass, field
import httpx
from typing import Optional


class GetV2TargetIdentifierAttributesAttributeOptionsNotFoundErrorData(BaseModel):
    status_code: float

    type: models_get_v2_target_identifier_attributes_attribute_optionsop.GetV2TargetIdentifierAttributesAttributeOptionsType

    code: models_get_v2_target_identifier_attributes_attribute_optionsop.GetV2TargetIdentifierAttributesAttributeOptionsCode

    message: str


@dataclass(frozen=True)
class GetV2TargetIdentifierAttributesAttributeOptionsNotFoundError(AttioError):
    r"""Not Found"""

    data: GetV2TargetIdentifierAttributesAttributeOptionsNotFoundErrorData = field(
        hash=False
    )

    def __init__(
        self,
        data: GetV2TargetIdentifierAttributesAttributeOptionsNotFoundErrorData,
        raw_response: httpx.Response,
        body: Optional[str] = None,
    ):
        fallback = body or raw_response.text
        message = str(data.message) or fallback
        super().__init__(message, raw_response, body)
        object.__setattr__(self, "data", data)
