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

import typing

import pydantic
import typing_extensions
from ...core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ...core.serialization import FieldMetadata


class ActionOAuthConfiguration(UniversalBaseModel):
    authorization_url: typing_extensions.Annotated[str, FieldMetadata(alias="authorizationUrl")]
    token_url: typing_extensions.Annotated[str, FieldMetadata(alias="tokenUrl")]
    client_id: typing_extensions.Annotated[str, FieldMetadata(alias="clientId")]
    client_secret: typing_extensions.Annotated[str, FieldMetadata(alias="clientSecret")]
    scopes: typing.List[str]
    extra_auth_params: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, str]], FieldMetadata(alias="extraAuthParams")
    ] = None
    extra_token_params: typing_extensions.Annotated[
        typing.Optional[typing.Dict[str, str]], FieldMetadata(alias="extraTokenParams")
    ] = 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
