# 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_key_auth import AzureKeyAuth
from .azure_pii_guardrail_config_config import AzurePiiGuardrailConfigConfig
from .enforcing_strategy import EnforcingStrategy


class AzurePiiGuardrailConfig(UniversalBaseModel):
    """
    Azure PII
    """

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

    description: typing.Optional[str] = pydantic.Field(
        default="Azure AI Language PII detection and redaction for sensitive data"
    )
    """
    Optional description for this Guardrail Config.
    """

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

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

    priority: typing.Optional[int] = pydantic.Field(default=1)
    """
    Execution order for mutate guardrails. Lower values run first. Only applicable when operation is mutate.
    """

    auth_data: AzureKeyAuth
    enforcing_strategy: EnforcingStrategy
    config: AzurePiiGuardrailConfigConfig

    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
