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

from __future__ import annotations

from pydantic import BaseModel, ConfigDict, Field, RootModel, constr


class LookaroundNullableString(RootModel[str | None]):
    model_config = ConfigDict(
        regex_engine="python-re",
    )
    root: constr(pattern=r'^(?=.*[A-Z]).+$') | None = Field(
        ..., description='Nullable string with lookaround pattern.'
    )


class Model(BaseModel):
    value: LookaroundNullableString | None = None
