# generated by datamodel-codegen:
#   filename:  referenced_default.yaml
#   timestamp: 2019-07-26T00:00:00+00:00

from __future__ import annotations

from typing import Optional

from pydantic import BaseModel, Field, RootModel, confloat


class ModelSettingB(RootModel[confloat(ge=0.0, le=10.0)]):
    root: confloat(ge=0.0, le=10.0)


class Model(BaseModel):
    settingA: Optional[confloat(ge=0.0, le=10.0)] = 5
    settingB: Optional[ModelSettingB] = Field(
        default_factory=lambda: ModelSettingB.model_validate(5)
    )
