# generated by datamodel-codegen:
#   filename:  property/property_error.json
#   timestamp: 2026-02-23T01:56:40+00:00

from __future__ import annotations

from enum import Enum
from typing import Annotated

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

from ..core import property as property_1


class Code(Enum):
    PROPERTY_NOT_FOUND = 'PROPERTY_NOT_FOUND'
    PROPERTY_NOT_MONITORED = 'PROPERTY_NOT_MONITORED'
    LIST_NOT_FOUND = 'LIST_NOT_FOUND'
    LIST_ACCESS_DENIED = 'LIST_ACCESS_DENIED'
    METHODOLOGY_NOT_SUPPORTED = 'METHODOLOGY_NOT_SUPPORTED'
    JURISDICTION_NOT_SUPPORTED = 'JURISDICTION_NOT_SUPPORTED'


class PropertyError(AdCPBaseModel):
    model_config = ConfigDict(
        extra='forbid',
    )
    code: Annotated[Code, Field(description='Error code')]
    message: Annotated[str, Field(description='Human-readable error message')]
    property: Annotated[
        property_1.Property | None, Field(description='The property that caused the error')
    ] = None
