g2tdZddlmZddlZddlmZmZddlmZddl m Z ddl m Z m Z dd lmZmZej"rAdd lmZdd lmZmZmZdd lmZdd lmZedeefGdde j8Zn e j8ZdZej>dZ GddeejBe eZ"y)z%RootModel class and type definitions.) annotationsN)copydeepcopy)PydanticUndefined)PydanticUserError)_model_construction_repr) BaseModel_object_setattr)Any)LiteralSelfdataclass_transform)Field) PrivateAttrF)kw_only_defaultfield_specifiersc eZdZy)_RootModelMetaclassN)__name__ __module__ __qualname__B/opt/hc_python/lib/python3.12/site-packages/pydantic/root_model.pyrrsCFrr) RootModelRootModelRootTypec  eZdZUdZdZdZdZded<fdZe fddZ de _ e ddfd Z dd Zdd Zdd Zddd Zej&r(d ddddddddddd ddZdfd ZddZxZS)raUsage docs: https://docs.pydantic.dev/2.8/concepts/models/#rootmodel-and-custom-root-types A Pydantic `BaseModel` for the root object of the model. Attributes: root: The root object of the model. __pydantic_root_model__: Whether the model is a RootModel. __pydantic_private__: Private fields in the model. __pydantic_extra__: Extra fields in the model. TNrrootc x|jjd}| tddt|di|y)Nextraz<`RootModel` does not support setting `model_config['extra']`zroot-model-extra)coder) model_configgetrsuper__init_subclass__)clskwargsr" __class__s rr'zRootModel.__init_subclass__6sD  $$W-  #NUg  !+F+rc pd}|r|tur td|}|jj||y)NTz_"RootModel.__init__" accepts either a single positional argument or arbitrary keyword arguments) self_instance)r ValueError__pydantic_validator__validate_python)selfr data__tracebackhide__s r__init__zRootModel.__init__>sD  ,, uD ##33D3Mrc&t|||S)aSCreate a new model using the provided root object and update fields set. Args: root: The root object of the model. _fields_set: The set of fields to be updated. Returns: The new model. Raises: NotImplemented: If the model is not a subclass of `RootModel`. )r _fields_set)r&model_construct)r(r r5r*s rr6zRootModel.model_constructJsw&Dk&JJrc4|j|jdS)N__dict____pydantic_fields_set__r8r0s r __getstate__zRootModel.__getstate__Zs '+'C'C  rcDt|d|dt|d|dy)Nr:r9)r )r0states r __setstate__zRootModel.__setstate__`s&7?X9YZj% *;rbr`ra)r`r)rFzdict[int, Any] | Noner`r)rIzLiteral['json', 'python'] | strrJr rKr rLzdict[str, Any] | NonerMboolrNrcrOrcrPrcrQrcrRz'bool | Literal['none', 'warn', 'error']rSrcr`r )r]r r`rc)r`z_repr.ReprArgs)rrr__doc____pydantic_root_model____pydantic_private____pydantic_extra____annotations__r'rr3__pydantic_base_init__ classmethodr6r<r?rDrGtyping TYPE_CHECKINGrUr\r_ __classcell__)r*s@rrr#s # ,5FN'+H# K K = 5=-1""'%*!&$@D%* 2       +     #   > #  8w  rr) metaclass)#rd __future__r _annotationsrkrr pydantic_corerr _internalr r mainr r rlr typing_extensionsrrrfieldsrPydanticModelFieldrPydanticModelPrivateAttrModelMetaclassr__all__TypeVarrGenericrrrrr}s+2 +1, DD3? BTVnAopF1@@FqF-<< "FNN#67w 6>>*;