# 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 .public_key_credential import PublicKeyCredential
from .token_vault_privileged_access_grant import TokenVaultPrivilegedAccessGrant
from .token_vault_privileged_access_ip_allowlist_entry import TokenVaultPrivilegedAccessIpAllowlistEntry


class ClientTokenVaultPrivilegedAccessWithPublicKey(UniversalBaseModel):
    """
    Settings for Token Vault Privileged Access.
    """

    credentials: typing.List[PublicKeyCredential]
    ip_allowlist: typing.Optional[typing.List[TokenVaultPrivilegedAccessIpAllowlistEntry]] = None
    grants: typing.Optional[typing.List[TokenVaultPrivilegedAccessGrant]] = 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
