# 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_created_object_2_options_idpinitiated_client_protocol_enum import (
    EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum,
)


class EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiated(UniversalBaseModel):
    """
    Configuration for IdP-Initiated SAML Single Sign-On. When enabled, allows users to initiate login directly from their SAML identity provider without first visiting Auth0. The IdP must include the connection parameter in the post-back URL (Assertion Consumer Service URL).
    """

    client_authorizequery: typing.Optional[str] = pydantic.Field(default=None)
    """
    The query string sent to the default application
    """

    client_id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The client ID to use for IdP-initiated login requests.
    """

    client_protocol: typing.Optional[
        EventStreamCloudEventConnectionCreatedObject2OptionsIdpinitiatedClientProtocolEnum
    ] = None
    enabled: typing.Optional[bool] = pydantic.Field(default=None)
    """
    When true, enables IdP-initiated login support for this SAML connection. Allows users to log in directly from the identity provider without first visiting Auth0.
    """

    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
