# 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 .webhook_params_object_request_body_payload_type import WebhookParamsObjectRequestBodyPayloadType


class WebhookParamsObjectRequestBody(UniversalBaseModel):
    """
    The webhook configuration for an Action.
    """

    payload_type: typing_extensions.Annotated[
        typing.Optional[WebhookParamsObjectRequestBodyPayloadType],
        FieldMetadata(alias="payloadType"),
        pydantic.Field(
            alias="payloadType",
            description="This determines the alert webhook payload type to use. Learn more: https://developers.samsara.com/docs/webhook-reference.  Valid values: `legacy`, `enriched`",
        ),
    ] = None
    webhook_ids: typing_extensions.Annotated[
        typing.List[str],
        FieldMetadata(alias="webhookIds"),
        pydantic.Field(alias="webhookIds", description="The webhook IDs."),
    ]

    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
