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

from __future__ import annotations
from .attribute import Attribute, AttributeTypedDict
from attio.types import BaseModel
from attio.utils import FieldMetadata, PathParamMetadata
from typing import Literal
from typing_extensions import Annotated, TypedDict


GetV2TargetIdentifierAttributesAttributeTarget = Literal[
    "objects",
    "lists",
]
r"""Whether the attribute is on an object or a list."""


class GetV2TargetIdentifierAttributesAttributeRequestTypedDict(TypedDict):
    target: GetV2TargetIdentifierAttributesAttributeTarget
    r"""Whether the attribute is on an object or a list."""
    identifier: str
    attribute: str


class GetV2TargetIdentifierAttributesAttributeRequest(BaseModel):
    target: Annotated[
        GetV2TargetIdentifierAttributesAttributeTarget,
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""Whether the attribute is on an object or a list."""

    identifier: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]

    attribute: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]


GetV2TargetIdentifierAttributesAttributeType = Literal["invalid_request_error",]


GetV2TargetIdentifierAttributesAttributeCode = Literal["not_found",]


class GetV2TargetIdentifierAttributesAttributeResponseTypedDict(TypedDict):
    r"""Success"""

    data: AttributeTypedDict


class GetV2TargetIdentifierAttributesAttributeResponse(BaseModel):
    r"""Success"""

    data: Attribute
