# 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 .scim_mapping_item import ScimMappingItem


class ScimConfiguration(UniversalBaseModel):
    connection_id: str = pydantic.Field()
    """
    The connection's identifier
    """

    connection_name: str = pydantic.Field()
    """
    The connection's name
    """

    strategy: str = pydantic.Field()
    """
    The connection's strategy
    """

    tenant_name: str = pydantic.Field()
    """
    The tenant's name
    """

    user_id_attribute: str = pydantic.Field()
    """
    User ID attribute for generating unique user ids
    """

    mapping: typing.List[ScimMappingItem] = pydantic.Field()
    """
    The mapping between auth0 and SCIM
    """

    created_at: dt.datetime = pydantic.Field()
    """
    The ISO 8601 date and time the SCIM configuration was created at
    """

    updated_on: dt.datetime = pydantic.Field()
    """
    The ISO 8601 date and time the SCIM configuration was last updated on
    """

    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
