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

from __future__ import annotations
from gusto_embedded.types import BaseModel
import pydantic
from pydantic import ConfigDict
from typing import Any, Dict, Optional
from typing_extensions import NotRequired, TypedDict


class MetadataWithOneEntityTypedDict(TypedDict):
    r"""single entity"""

    entity_type: NotRequired[str]
    r"""Name of the entity that the error corresponds to."""
    entity_uuid: NotRequired[str]
    r"""Unique identifier for the entity."""
    valid_from: NotRequired[str]
    valid_up_to: NotRequired[str]
    key: NotRequired[str]
    state: NotRequired[str]


class MetadataWithOneEntity(BaseModel):
    r"""single entity"""

    model_config = ConfigDict(
        populate_by_name=True, arbitrary_types_allowed=True, extra="allow"
    )
    __pydantic_extra__: Dict[str, Any] = pydantic.Field(init=False)

    entity_type: Optional[str] = None
    r"""Name of the entity that the error corresponds to."""

    entity_uuid: Optional[str] = None
    r"""Unique identifier for the entity."""

    valid_from: Optional[str] = None

    valid_up_to: Optional[str] = None

    key: Optional[str] = None

    state: Optional[str] = None

    @property
    def additional_properties(self):
        return self.__pydantic_extra__

    @additional_properties.setter
    def additional_properties(self, value):
        self.__pydantic_extra__ = value  # pyright: ignore[reportIncompatibleVariableOverride]
