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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .sip_media_encryption_enum import SipMediaEncryptionEnum


class GetPhoneNumberInboundSipTrunkConfigResponseModel(UncheckedBaseModel):
    allowed_addresses: typing.List[str] = pydantic.Field()
    """
    List of IP addresses that are allowed to use the trunk. Each item in the list can be an individual IP address or a Classless Inter-Domain Routing notation representing a CIDR block.
    """

    allowed_numbers: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    List of phone numbers that are allowed to use the trunk.
    """

    media_encryption: SipMediaEncryptionEnum
    has_auth_credentials: bool = pydantic.Field()
    """
    Whether authentication credentials are configured
    """

    username: typing.Optional[str] = pydantic.Field(default=None)
    """
    SIP trunk username (if available)
    """

    remote_domains: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
    """
    Domains of remote SIP servers used to validate TLS certificates.
    """

    attributes_to_headers: typing.Optional[typing.Dict[str, str]] = pydantic.Field(default=None)
    """
    Map of dynamic variable name to header name for attributes_to_headers
    """

    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
