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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from .connection_authentication_purpose import ConnectionAuthenticationPurpose
from .connection_common import ConnectionCommon
from .connection_connected_accounts_purpose_xaa import ConnectionConnectedAccountsPurposeXaa
from .connection_cross_app_access_resource_app import ConnectionCrossAppAccessResourceApp
from .connection_options_oidc import ConnectionOptionsOidc
from .connection_show_as_button import ConnectionShowAsButton
from .cross_app_access_requesting_app import CrossAppAccessRequestingApp


class UpdateConnectionRequestContentOidc(ConnectionCommon):
    """
    Update a connection with strategy=oidc
    """

    options: typing.Optional[ConnectionOptionsOidc] = None
    authentication: typing.Optional[ConnectionAuthenticationPurpose] = None
    connected_accounts: typing.Optional[ConnectionConnectedAccountsPurposeXaa] = None
    cross_app_access_requesting_app: typing.Optional[CrossAppAccessRequestingApp] = None
    cross_app_access_resource_app: typing.Optional[ConnectionCrossAppAccessResourceApp] = None
    show_as_button: typing.Optional[ConnectionShowAsButton] = 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
