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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .apple_pay_id import ApplePayId
from .apple_pay_type import ApplePayType
from .created_at import CreatedAt
from .job_id import JobId
from .job_status import JobStatus
from .last_modified import LastModified
from .organization_id import OrganizationId
from .organization_updates import OrganizationUpdates


class ApplePayOrganizationUpdateData(UniversalBaseModel):
    created_at: typing_extensions.Annotated[typing.Optional[CreatedAt], FieldMetadata(alias="createdAt")] = None
    id: typing.Optional[ApplePayId] = pydantic.Field(default=None)
    """
    Internal ID for the Apple Pay organization update.
    """

    job_id: typing_extensions.Annotated[typing.Optional[JobId], FieldMetadata(alias="jobId")] = None
    job_status: typing_extensions.Annotated[typing.Optional[JobStatus], FieldMetadata(alias="jobStatus")] = None
    organization_id: typing_extensions.Annotated[
        typing.Optional[OrganizationId], FieldMetadata(alias="organizationId")
    ] = None
    type: typing.Optional[ApplePayType] = pydantic.Field(default=None)
    """
    The record type, in this context it will always be `ApplePayOrganizationUpdate`.
    """

    updated_at: typing_extensions.Annotated[typing.Optional[LastModified], FieldMetadata(alias="updatedAt")] = None
    updates: typing.Optional[OrganizationUpdates] = None

    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
