# 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 .gateway_data_routing_config_destination import GatewayDataRoutingConfigDestination
from .gateway_data_routing_config_destination_storage import GatewayDataRoutingConfigDestinationStorage


class GatewayDataRoutingConfig(UniversalBaseModel):
    """
    Configuration for gateway data routing with destinations and default settings.
    """

    type: typing.Literal["gateway-data-routing-config"] = pydantic.Field(default="gateway-data-routing-config")
    """
    Type of configuration
    """

    destinations: typing.Optional[typing.List[GatewayDataRoutingConfigDestination]] = pydantic.Field(default=None)
    """
    List of conditional routing destinations
    """

    default: GatewayDataRoutingConfigDestinationStorage

    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
