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

import datetime as dt
import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .object_match_types import ObjectMatchTypes
from .platform import Platform
from .service_providers_enum import ServiceProvidersEnum
from .sync_status import SyncStatus


class SyncRecordResource(UniversalBaseModel):
    id: str
    created_at: dt.datetime
    updated_at: dt.datetime
    errors: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = None
    last_pulled_at: dt.datetime
    object_updated_at: typing.Optional[dt.datetime] = None
    object_id: typing.Optional[str] = None
    platform: typing.Optional[Platform] = None
    platform_updated_at: typing.Optional[dt.datetime] = None
    platform_object_id: typing.Optional[str] = None
    provider: typing.Optional[ServiceProvidersEnum] = None
    provider_updated_at: typing.Optional[dt.datetime] = None
    provider_object_id: typing.Optional[str] = None
    sync_status: SyncStatus
    object_type: ObjectMatchTypes

    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
