# 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 .log_stream_datadog_enum import LogStreamDatadogEnum
from .log_stream_datadog_sink import LogStreamDatadogSink
from .log_stream_filter import LogStreamFilter
from .log_stream_pii_config import LogStreamPiiConfig
from .log_stream_status_enum import LogStreamStatusEnum


class LogStreamDatadogResponseSchema(UniversalBaseModel):
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    The id of the log stream
    """

    name: typing.Optional[str] = pydantic.Field(default=None)
    """
    log stream name
    """

    status: typing.Optional[LogStreamStatusEnum] = None
    type: typing.Optional[LogStreamDatadogEnum] = None
    is_priority: typing_extensions.Annotated[
        typing.Optional[bool],
        FieldMetadata(alias="isPriority"),
        pydantic.Field(alias="isPriority", description="True for priority log streams, false for non-priority"),
    ] = None
    """
    True for priority log streams, false for non-priority
    """

    filters: typing.Optional[typing.List[LogStreamFilter]] = pydantic.Field(default=None)
    """
    Only logs events matching these filters will be delivered by the stream. If omitted or empty, all events will be delivered.
    """

    pii_config: typing.Optional[LogStreamPiiConfig] = None
    sink: typing.Optional[LogStreamDatadogSink] = 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
