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

import typing

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


class LocationCustomAttributeDefinitionVisibleCreatedEvent(UncheckedBaseModel):
    """
    Published when a location [custom attribute definition](entity:CustomAttributeDefinition)
    that is visible to the subscribing application is created. A notification is sent when your application
    creates a custom attribute definition or another application creates a custom attribute definition whose
    `visibility` is `VISIBILITY_READ_ONLY` or `VISIBILITY_READ_WRITE_VALUES`.
    """

    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 `"location.custom_attribute_definition.visible.created"`.
    """

    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
