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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .event_stream_cloud_event_connection_updated_object_1_options_attribute_map_attributes import (
    EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapAttributes,
)
from .event_stream_cloud_event_connection_updated_object_1_options_attribute_map_mapping_mode_enum import (
    EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum,
)


class EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMap(UniversalBaseModel):
    """
    Mapping of claims received from the identity provider (IdP)
    """

    attributes: typing.Optional[EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapAttributes] = None
    userinfo_scope: typing.Optional[str] = pydantic.Field(default=None)
    """
    Scopes to send to the IdP's Userinfo endpoint
    """

    mapping_mode: typing.Optional[EventStreamCloudEventConnectionUpdatedObject1OptionsAttributeMapMappingModeEnum] = (
        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
