# generated by datamodel-codegen:
#   filename:  core/error.json
#   timestamp: 2026-02-12T02:11:19+00:00

from __future__ import annotations

from typing import Annotated, Any

from adcp.types.base import AdCPBaseModel
from pydantic import ConfigDict, Field


class Error(AdCPBaseModel):
    model_config = ConfigDict(
        extra='allow',
    )
    code: Annotated[str, Field(description='Error code for programmatic handling')]
    details: Annotated[
        dict[str, Any] | None, Field(description='Additional task-specific error details')
    ] = None
    field: Annotated[
        str | None,
        Field(description="Field path associated with the error (e.g., 'packages[0].targeting')"),
    ] = None
    message: Annotated[str, Field(description='Human-readable error message')]
    retry_after: Annotated[
        float | None, Field(description='Seconds to wait before retrying the operation', ge=0.0)
    ] = None
    suggestion: Annotated[str | None, Field(description='Suggested fix for the error')] = None
