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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from .gateway_data_routing_config_destination_condition import GatewayDataRoutingConfigDestinationCondition
from .gateway_data_routing_config_destination_storage import GatewayDataRoutingConfigDestinationStorage


class GatewayDataRoutingConfigDestination(GatewayDataRoutingConfigDestinationStorage):
    """
    Destination for data routing based on conditions.
    """

    name: str = pydantic.Field()
    """
    Name for the destination
    """

    enabled: bool = pydantic.Field(default=True)
    """
    Whether this destination is enabled
    """

    description: typing.Optional[str] = pydantic.Field(default=None)
    """
    Description of the destination
    """

    when: typing.List[GatewayDataRoutingConfigDestinationCondition] = pydantic.Field()
    """
    Conditions that must be met to use this destination
    """

    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
