# 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 .customer import Customer
from .customer_deleted_event_event_context import CustomerDeletedEventEventContext


class CustomerDeletedEventObject(UncheckedBaseModel):
    """
    An object that contains the customer associated with the event.
    """

    customer: typing.Optional[Customer] = pydantic.Field(default=None)
    """
    The deleted customer.
    """

    event_context: typing.Optional[CustomerDeletedEventEventContext] = pydantic.Field(default=None)
    """
    Information about the change that triggered the event. This field is returned only if the customer is deleted by a merge operation.
    """

    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
