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

from ...core.unchecked_base_model import UncheckedBaseModel
from .datadog_credential import DatadogCredential
import pydantic
import typing
from ...core.pydantic_utilities import IS_PYDANTIC_V2


class SinkDatadog(UncheckedBaseModel):
    """
    Configuration for Datadog.

    [Configuration guide](https://docs.synqly.com/guides/provider-configuration/datadog-sink-setup)
    """

    credential: DatadogCredential = pydantic.Field()
    """
    API key used to authenticate log ingestion requests.
    """

    site: typing.Optional[str] = pydantic.Field(default=None)
    """
    Datadog site or full logs intake URL. Defaults to `datadoghq.com`.
    """

    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
