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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .xg_boost_model_schema import XgBoostModelSchema
from .xg_boost_serialization_format import XgBoostSerializationFormat


class XgBoostFramework(UniversalBaseModel):
    type: typing.Literal["xgboost"] = pydantic.Field(default="xgboost")
    """
    Type of the framework
    """

    serialization_format: typing.Optional[XgBoostSerializationFormat] = None
    model_filepath: typing.Optional[str] = pydantic.Field(default=None)
    """
    Relative path to the model file in the model version contents
    """

    model_schema: typing.Optional[XgBoostModelSchema] = None

    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
