# 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 CustomGuardrailConfigConfig(UniversalBaseModel):
    url: str = pydantic.Field()
    """
    The URL of the Guardrail to send a post request to.
    """

    headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Headers for the Guardrail Server. Forwarded to the Guardrail Server as is. For example: `{"Authorization": "APIKey <token>"}`
    """

    config: typing.Optional[typing.Dict[str, typing.Any]] = pydantic.Field(default=None)
    """
    The config for the Guardrail Server. This is a JSON object that will be sent as a config to Guardrail Server along with the request.
    """

    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
