§
    ÑÁ³gå  ã                  ó<  — U d Z ddlmZ ddlmZmZmZ ddlmZm	Z	m
Z
 ddlmZmZmZ dZdZded	<    G d
„ de¦  «        Zed         Zded<    G d„ de¦  «        Z G d„ de¦  «        Z G d„ dee¦  «        Z G d„ dee¦  «        ZdZded<    G d„ dee¦  «        ZdS )z†Usage docs: https://docs.pydantic.dev/2.10/concepts/plugins#build-a-plugin

Plugin interface for Pydantic plugins, and related types.
é    )Úannotations)ÚAnyÚCallableÚ
NamedTuple)Ú
CoreConfigÚ
CoreSchemaÚValidationError)ÚLiteralÚProtocolÚ	TypeAlias)ÚPydanticPluginProtocolÚBaseValidateHandlerProtocolÚValidatePythonHandlerProtocolÚValidateJsonHandlerProtocolÚValidateStringsHandlerProtocolÚNewSchemaReturnsÚSchemaTypePathÚ
SchemaKindúvtuple[ValidatePythonHandlerProtocol | None, ValidateJsonHandlerProtocol | None, ValidateStringsHandlerProtocol | None]r   r   c                  ó(   — e Zd ZU dZded<   ded<   dS )r   zQPath defining where `schema_type` was defined, or where `TypeAdapter` was called.ÚstrÚmoduleÚnameN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__© ó    úV/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pydantic/plugin/__init__.pyr   r      s(   € € € € € € Ø[Ð[à€K€K�KØ€I€I�I€I€Ir    r   )Ú	BaseModelÚTypeAdapterÚ	dataclassÚcreate_modelÚvalidate_callr   c                  ó   — e Zd ZdZdd„ZdS )r   z5Protocol defining the interface for Pydantic plugins.Úschemar   Úschema_typer   Úschema_type_pathr   Úschema_kindr   ÚconfigúCoreConfig | NoneÚplugin_settingsúdict[str, object]Úreturnr   c                ó    — t          d¦  «        ‚)a�  This method is called for each plugin every time a new [`SchemaValidator`][pydantic_core.SchemaValidator]
        is created.

        It should return an event handler for each of the three validation methods, or `None` if the plugin does not
        implement that method.

        Args:
            schema: The schema to validate against.
            schema_type: The original type which the schema was created from, e.g. the model class.
            schema_type_path: Path defining where `schema_type` was defined, or where `TypeAdapter` was called.
            schema_kind: The kind of schema to validate against.
            config: The config to use for validation.
            plugin_settings: Any plugin settings.

        Returns:
            A tuple of optional event handlers for each of the three validation methods -
                `validate_python`, `validate_json`, `validate_strings`.
        z9Pydantic plugins should implement `new_schema_validator`.)ÚNotImplementedError)Úselfr(   r)   r*   r+   r,   r.   s          r!   Únew_schema_validatorz+PydanticPluginProtocol.new_schema_validator(   s   € õ: "Ð"]Ñ^Ô^Ð^r    N)r(   r   r)   r   r*   r   r+   r   r,   r-   r.   r/   r0   r   )r   r   r   r   r4   r   r    r!   r   r   %   s4   € € € € € Ø?Ð?ð_ð _ð _ð _ð _ð _r    r   c                  ó8   — e Zd ZU dZded<   	 dd„Zdd„Zdd„ZdS )r   z»Base class for plugin callbacks protocols.

    You shouldn't implement this protocol directly, instead use one of the subclasses with adds the correctly
    typed `on_error` method.
    zCallable[..., None]Úon_enterÚresultr   r0   ÚNonec                ó   — dS )z{Callback to be notified of successful validation.

        Args:
            result: The result of the validation.
        Nr   )r3   r7   s     r!   Ú
on_successz&BaseValidateHandlerProtocol.on_successR   ó	   € ð 	ˆr    Úerrorr	   c                ó   — dS )znCallback to be notified of validation errors.

        Args:
            error: The validation error.
        Nr   )r3   r<   s     r!   Úon_errorz$BaseValidateHandlerProtocol.on_errorZ   r;   r    Ú	exceptionÚ	Exceptionc                ó   — dS )zˆCallback to be notified of validation exceptions.

        Args:
            exception: The exception raised during validation.
        Nr   )r3   r?   s     r!   Úon_exceptionz(BaseValidateHandlerProtocol.on_exceptionb   r;   r    N)r7   r   r0   r8   )r<   r	   r0   r8   )r?   r@   r0   r8   )r   r   r   r   r   r:   r>   rB   r   r    r!   r   r   H   sm   € € € € € € ðð ð "Ð!Ð!Ñ!ØEðð ð ð ðð ð ð ðð ð ð ð ð r    r   c                  ó&   — e Zd ZdZdddddœdd„ZdS )r   z4Event handler for `SchemaValidator.validate_python`.N)ÚstrictÚfrom_attributesÚcontextÚself_instanceÚinputr   rD   úbool | NonerE   rF   údict[str, Any] | NonerG   ú
Any | Noner0   r8   c               ó   — dS )aT  Callback to be notified of validation start, and create an instance of the event handler.

        Args:
            input: The input to be validated.
            strict: Whether to validate the object in strict mode.
            from_attributes: Whether to validate objects as inputs by extracting attributes.
            context: The context to use for validation, this is passed to functional validators.
            self_instance: An instance of a model to set attributes on from validation, this is used when running
                validation from the `__init__` method of a model.
        Nr   )r3   rH   rD   rE   rF   rG   s         r!   r6   z&ValidatePythonHandlerProtocol.on_entern   s	   € ð& 	ˆr    )rH   r   rD   rI   rE   rI   rF   rJ   rG   rK   r0   r8   ©r   r   r   r   r6   r   r    r!   r   r   k   sF   € € € € € Ø>Ð>ð #Ø'+Ø)-Ø$(ðð ð ð ð ð ð ð r    r   c                  ó$   — e Zd ZdZddddœdd„ZdS )r   z2Event handler for `SchemaValidator.validate_json`.N)rD   rF   rG   rH   ústr | bytes | bytearrayrD   rI   rF   rJ   rG   rK   r0   r8   c               ó   — dS )aû  Callback to be notified of validation start, and create an instance of the event handler.

        Args:
            input: The JSON data to be validated.
            strict: Whether to validate the object in strict mode.
            context: The context to use for validation, this is passed to functional validators.
            self_instance: An instance of a model to set attributes on from validation, this is used when running
                validation from the `__init__` method of a model.
        Nr   )r3   rH   rD   rF   rG   s        r!   r6   z$ValidateJsonHandlerProtocol.on_enter‡   s	   € ð" 	ˆr    )
rH   rO   rD   rI   rF   rJ   rG   rK   r0   r8   rM   r   r    r!   r   r   „   sC   € € € € € Ø<Ð<ð #Ø)-Ø$(ðð ð ð ð ð ð ð r    r   zdict[str, StringInput]ÚStringInputc                  ó"   — e Zd ZdZdddœdd„ZdS )r   z5Event handler for `SchemaValidator.validate_strings`.N)rD   rF   rH   rQ   rD   rI   rF   rJ   r0   r8   c               ó   — dS )aI  Callback to be notified of validation start, and create an instance of the event handler.

        Args:
            input: The string data to be validated.
            strict: Whether to validate the object in strict mode.
            context: The context to use for validation, this is passed to functional validators.
        Nr   )r3   rH   rD   rF   s       r!   r6   z'ValidateStringsHandlerProtocol.on_enter¡   s	   € ð 	ˆr    )rH   rQ   rD   rI   rF   rJ   r0   r8   rM   r   r    r!   r   r   ž   sA   € € € € € Ø?Ð?ð <@Ðbfð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
r    r   N)r   Ú
__future__r   Útypingr   r   r   Úpydantic_corer   r   r	   Útyping_extensionsr
   r   r   Ú__all__r   r   r   r   r   r   r   r   rQ   r   r   r    r!   ú<module>rY      sï  ððð ð ð
 #Ð "Ð "Ð "Ð "Ð "à ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,Ð ,à AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AØ :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :Ð :ð	€ð WÐ ð  Wð  Wð  Wñ  Wðð ð ð ð �Zñ ô ð ð  Ð hÔi€
Ð iÐ iÐ iÑ ið _ð  _ð  _ð  _ð  _˜Xñ  _ô  _ð  _ðF ð  ð  ð  ð   (ñ  ô  ð  ðFð ð ð ð Ð$?Àñ ô ð ð2ð ð ð ð Ð"=¸xñ ô ð ð. 2€Ð 1Ð 1Ð 1Ñ 1ðð ð ð ð Ð%@À(ñ ô ð ð ð r    