# 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 .create_report_config_column_request_body import CreateReportConfigColumnRequestBody
from .filters_request_body import FiltersRequestBody


class CreateReportConfigObjectRequestBody(UniversalBaseModel):
    """
    Contains report config for a given report run.
    """

    columns: typing.Optional[typing.List[CreateReportConfigColumnRequestBody]] = pydantic.Field(default=None)
    """
    Columns to include in the report. Only one of ID or datasetId and columns must be provided.
    """

    dataset_id: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="datasetId"),
        pydantic.Field(
            alias="datasetId",
            description="ID of the dataset that is going to be used for the report. Only one of ID or datasetId and columns must be provided.",
        ),
    ] = None
    filters: typing.Optional[FiltersRequestBody] = None
    id: typing.Optional[str] = pydantic.Field(default=None)
    """
    ID of the custom report config. Only one of ID or datasetId and columns must be provided.
    """

    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
