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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel


class McpServerOAuth2Dcr(UniversalBaseModel):
    """
    +label=DCR
    """

    type: typing.Literal["dcr"] = pydantic.Field(default="dcr")
    """
    +label=DCR
    +sort=100
    +value=dcr
    +usage=Uses Dynamic Client Registration (RFC 7591) to automatically obtain OAuth2 credentials from the MCP server. The system will register as a client, receive client ID and secret, and handle the complete OAuth2 flow without manual configuration.
    """

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow")  # type: ignore # Pydantic v2
    else:

        class Config:
            smart_union = True
            extra = pydantic.Extra.allow
