# 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 .azure_content_safety_guardrail_config_config import AzureContentSafetyGuardrailConfigConfig
from .azure_key_auth import AzureKeyAuth
from .enforcing_strategy import EnforcingStrategy


class AzureContentSafetyGuardrailConfig(UniversalBaseModel):
    """
    Azure Content Safety
    """

    name: str = pydantic.Field()
    """
    The name of the Guardrail Config.
    """

    description: typing.Optional[str] = pydantic.Field(
        default="Azure Content Safety for hate, self-harm, sexual, and violence detection"
    )
    """
    Optional description for this Guardrail Config.
    """

    type: typing.Literal["integration/guardrail-config/azure-content-safety"] = pydantic.Field(
        default="integration/guardrail-config/azure-content-safety"
    )
    """
    +uiType=Hidden
    +value=integration/guardrail-config/azure-content-safety
    """

    operation: typing.Literal["validate"] = pydantic.Field(default="validate")
    """
    The operation type for this guardrail. Azure Content Safety guardrails can only be used for validation.
    """

    enforcing_strategy: EnforcingStrategy
    auth_data: AzureKeyAuth
    config: AzureContentSafetyGuardrailConfigConfig

    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
