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

from __future__ import annotations
from .object import Object, ObjectTypedDict
from attio.types import BaseModel
from attio.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Literal, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class PatchV2ObjectsObjectDataTypedDict(TypedDict):
    api_slug: NotRequired[str]
    r"""A unique, human-readable slug to access the object through URLs and API calls. Should be formatted in snake case."""
    singular_noun: NotRequired[str]
    r"""The singular form of the object's name."""
    plural_noun: NotRequired[str]
    r"""The plural form of the object's name."""


class PatchV2ObjectsObjectData(BaseModel):
    api_slug: Optional[str] = None
    r"""A unique, human-readable slug to access the object through URLs and API calls. Should be formatted in snake case."""

    singular_noun: Optional[str] = None
    r"""The singular form of the object's name."""

    plural_noun: Optional[str] = None
    r"""The plural form of the object's name."""


class PatchV2ObjectsObjectRequestBodyTypedDict(TypedDict):
    data: PatchV2ObjectsObjectDataTypedDict


class PatchV2ObjectsObjectRequestBody(BaseModel):
    data: PatchV2ObjectsObjectData


class PatchV2ObjectsObjectRequestTypedDict(TypedDict):
    object: str
    request_body: PatchV2ObjectsObjectRequestBodyTypedDict


class PatchV2ObjectsObjectRequest(BaseModel):
    object: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]

    request_body: Annotated[
        PatchV2ObjectsObjectRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


PatchV2ObjectsObjectConflictType = Literal["invalid_request_error",]


PatchV2ObjectsObjectConflictCode = Literal["slug_conflict",]


PatchV2ObjectsObjectNotFoundType = Literal["invalid_request_error",]


PatchV2ObjectsObjectNotFoundCode = Literal["not_found",]


PatchV2ObjectsObjectBadRequestType = Literal["invalid_request_error",]


PatchV2ObjectsObjectCodeValidationType = Literal["validation_type",]


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

    data: ObjectTypedDict


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

    data: Object
