# This file was auto-generated by Fern from our API Definition.

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
import pydantic
from .custom_attribute_definition_event_data import CustomAttributeDefinitionEventData
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class BookingCustomAttributeDefinitionVisibleDeletedEvent(UncheckedBaseModel):
    """
    Published when a booking [custom attribute definition](entity:CustomAttributeDefinition)
    with the `visibility` field set to `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES` is deleted.
    An application that subscribes to this event is notified when a booking custom attribute definition is deleted
    by any application for which the subscribing application has read access to the booking custom attribute definition.
    """

    merchant_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The ID of the seller associated with the event that triggered the event notification.
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    The type of this event. The value is `"booking.custom_attribute_definition.visible.deleted"`.
    """

    event_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    A unique ID for the event notification.
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    The timestamp that indicates when the event notification was created, in RFC 3339 format.
    """

    data: typing.Optional[CustomAttributeDefinitionEventData] = pydantic.Field(default=None)
    """
    The data associated with the event that triggered the event notification.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow
