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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .driver_app_notification_object_request_body import DriverAppNotificationObjectRequestBody
from .recipient_object_request_body import RecipientObjectRequestBody
from .webhook_params_object_request_body import WebhookParamsObjectRequestBody


class ActionParamsObjectRequestBody(UniversalBaseModel):
    """
    The action type specific details. Set webhookIds for Slack or Webhook actions. Set recipients for Notifications. Set driverAppNotification for Driver App Push. Other action types don't need to set a param.
    """

    driver_app_notification: typing_extensions.Annotated[
        typing.Optional[DriverAppNotificationObjectRequestBody],
        FieldMetadata(alias="driverAppNotification"),
        pydantic.Field(alias="driverAppNotification"),
    ] = None
    recipients: typing.Optional[typing.List[RecipientObjectRequestBody]] = pydantic.Field(default=None)
    """
    Recipient of the action.
    """

    webhooks: typing.Optional[WebhookParamsObjectRequestBody] = 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
