o
    –ã dE  ã                   @   s°  d dl mZ d dlmZ d dlmZmZmZmZm	Z	m
Z
mZmZ ddlmZ er.ddlmZ dZded	 d
ddd	fdd„ZG dd	„ d	ƒZG dd„ deeƒZG dd„ deeƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG d d!„ d!eƒZG d"d#„ d#eƒZG d$d%„ d%eƒZG d&d'„ d'eƒZ G d(d)„ d)eƒZ!G d*d+„ d+eƒZ"G d,d-„ d-e"ƒZ#G d.d/„ d/e"ƒZ$G d0d1„ d1e"ƒZ%G d2d3„ d3e"ƒZ&G d4d5„ d5e"ƒZ'G d6d7„ d7e"ƒZ(G d8d9„ d9e"ƒZ)G d:d;„ d;eƒZ*G d<d=„ d=eƒZ+G d>d?„ d?eƒZ,G d@dA„ dAeƒZ-G dBdC„ dCeƒZ.G dDdE„ dEe.ƒZ/G dFdG„ dGe.ƒZ0G dHdI„ dIe.ƒZ1G dJdK„ dKeƒZ2G dLdM„ dMeƒZ3G dNdO„ dOeƒZ4G dPdQ„ dQeƒZ5G dRdS„ dSeƒZ6G dTdU„ dUeƒZ7G dVdW„ dWeƒZ8G dXdY„ dYeƒZ9G dZd[„ d[eƒZ:G d\d]„ d]eƒZ;G d^d_„ d_eƒZ<G d`da„ daeƒZ=G dbdc„ dceƒZ>G ddde„ deeƒZ?G dfdg„ dgeƒZ@G dhdi„ dieƒZAG djdk„ dkeƒZBG dldm„ dmeƒZCG dndo„ doeƒZDG dpdq„ dqeƒZEG drds„ dseƒZFG dtdu„ dueFƒZGG dvdw„ dweFƒZHG dxdy„ dyeFƒZIG dzd{„ d{eFƒZJG d|d}„ d}eƒZKG d~d„ deƒZLG d€d„ deƒZMG d‚dƒ„ dƒeƒZNG d„d…„ d…eƒZOG d†d‡„ d‡eƒZPG dˆd‰„ d‰eƒZQG dŠd‹„ d‹eƒZRG dŒd„ deƒZSG dŽd„ deƒZTG dd‘„ d‘eƒZUG d’d“„ d“eƒZVG d”d•„ d•eƒZWG d–d—„ d—eƒZXG d˜d™„ d™eƒZYG dšd›„ d›eƒZZG dœd„ deƒZ[G dždŸ„ dŸeƒZ\G d d¡„ d¡eƒZ]G d¢d£„ d£eƒZ^G d¤d¥„ d¥eƒZ_G d¦d§„ d§eƒZ`G d¨d©„ d©eƒZaG dªd«„ d«eƒZbG d¬d­„ d­eƒZcG d®d¯„ d¯eƒZdG d°d±„ d±eƒZeG d²d³„ d³eƒZfG d´dµ„ dµeƒZgG d¶d·„ d·eƒZhG d¸d¹„ d¹eƒZiG dºd»„ d»eƒZjG d¼d½„ d½eƒZkG d¾d¿„ d¿eƒZlG dÀdÁ„ dÁeƒZmG dÂdÃ„ dÃeƒZnG dÄdÅ„ dÅeƒZoG dÆdÇ„ dÇeƒZpG dÈdÉ„ dÉeƒZqG dÊdË„ dËeƒZrG dÌdÍ„ dÍeƒZsG dÎdÏ„ dÏeƒZtG dÐdÑ„ dÑeƒZuG dÒdÓ„ dÓeƒZvdÔS )Õé    )ÚDecimal)ÚPath)ÚTYPE_CHECKINGÚAnyÚCallableÚSequenceÚSetÚTupleÚTypeÚUnioné   )Údisplay_as_type)Ú
DictStrAny)]ÚPydanticTypeErrorÚPydanticValueErrorÚConfigErrorÚMissingErrorÚ
ExtraErrorÚNoneIsNotAllowedErrorÚNoneIsAllowedErrorÚWrongConstantErrorÚNotNoneErrorÚ	BoolErrorÚ
BytesErrorÚ	DictErrorÚ
EmailErrorÚUrlErrorÚUrlSchemeErrorÚUrlSchemePermittedErrorÚUrlUserInfoErrorÚUrlHostErrorÚUrlHostTldErrorÚUrlPortErrorÚUrlExtraErrorÚ	EnumErrorÚIntEnumErrorÚEnumMemberErrorÚIntegerErrorÚ
FloatErrorÚ	PathErrorÚPathNotExistsErrorÚPathNotAFileErrorÚPathNotADirectoryErrorÚPyObjectErrorÚSequenceErrorÚ	ListErrorÚSetErrorÚFrozenSetErrorÚ
TupleErrorÚTupleLengthErrorÚListMinLengthErrorÚListMaxLengthErrorÚListUniqueItemsErrorÚSetMinLengthErrorÚSetMaxLengthErrorÚFrozenSetMinLengthErrorÚFrozenSetMaxLengthErrorÚAnyStrMinLengthErrorÚAnyStrMaxLengthErrorÚStrErrorÚStrRegexErrorÚNumberNotGtErrorÚNumberNotGeErrorÚNumberNotLtErrorÚNumberNotLeErrorÚNumberNotMultipleErrorÚDecimalErrorÚDecimalIsNotFiniteErrorÚDecimalMaxDigitsErrorÚDecimalMaxPlacesErrorÚDecimalWholeDigitsErrorÚDateTimeErrorÚ	DateErrorÚDateNotInThePastErrorÚDateNotInTheFutureErrorÚ	TimeErrorÚDurationErrorÚHashableErrorÚ	UUIDErrorÚUUIDVersionErrorÚArbitraryTypeErrorÚ
ClassErrorÚSubclassErrorÚ	JsonErrorÚJsonTypeErrorÚPatternErrorÚDataclassTypeErrorÚCallableErrorÚIPvAnyAddressErrorÚIPvAnyInterfaceErrorÚIPvAnyNetworkErrorÚIPv4AddressErrorÚIPv6AddressErrorÚIPv4NetworkErrorÚIPv6NetworkErrorÚIPv4InterfaceErrorÚIPv6InterfaceErrorÚ
ColorErrorÚStrictBoolErrorÚNotDigitErrorÚLuhnValidationErrorÚInvalidLengthForBrandÚInvalidByteSizeÚInvalidByteSizeUnitÚMissingDiscriminatorÚInvalidDiscriminatorÚclsÚPydanticErrorMixinÚctxr   Úreturnc                 C   s   | di |¤ŽS )aŽ  
    For built-in exceptions like ValueError or TypeError, we need to implement
    __reduce__ to override the default behaviour (instead of __getstate__/__setstate__)
    By default pickle protocol 2 calls `cls.__new__(cls, *args)`.
    Since we only use kwargs, we need a little constructor to change that.
    Note: the callable can't be a lambda as pickle looks in the namespace to find it
    N© rp   )rl   rn   rp   rp   ú:/usr/local/lib/python3.10/dist-packages/pydantic/errors.pyÚ
cls_kwargsl   s   rr   c                   @   sd   e Zd ZU eed< eed< deddfdd„Zdefdd	„Zdee	d
 ee
d  df f fdd„ZdS )rm   ÚcodeÚmsg_templatern   ro   Nc                 K   s
   || _ d S ©N)Ú__dict__)Úselfrn   rp   rp   rq   Ú__init__{   s   
zPydanticErrorMixin.__init__c                 C   s   | j jdi | j¤ŽS )Nrp   )rt   Úformatrv   ©rw   rp   rp   rq   Ú__str__~   ó   zPydanticErrorMixin.__str__).rm   r   c                 C   s   t | j| jffS ru   )rr   Ú	__class__rv   rz   rp   rp   rq   Ú
__reduce__   s   zPydanticErrorMixin.__reduce__)Ú__name__Ú
__module__Ú__qualname__ÚstrÚ__annotations__r   rx   r{   r	   r   r
   r~   rp   rp   rp   rq   rm   w   s   
 *c                   @   ó   e Zd ZdS )r   N©r   r€   r   rp   rp   rp   rq   r   …   ó    r   c                   @   r„   )r   Nr…   rp   rp   rp   rq   r   ‰   r†   r   c                   @   r„   )r   Nr…   rp   rp   rp   rq   r      r†   r   c                   @   ó   e Zd ZdZdS )r   zfield requiredN©r   r€   r   rt   rp   rp   rp   rq   r   ‘   ó    r   c                   @   r‡   )r   zextra fields not permittedNrˆ   rp   rp   rp   rq   r   •   r‰   r   c                   @   ó   e Zd ZdZdZdS )r   znone.not_allowedznone is not an allowed valueN©r   r€   r   rs   rt   rp   rp   rp   rq   r   ™   ó    r   c                   @   rŠ   )r   znone.allowedzvalue is not noneNr‹   rp   rp   rp   rq   r   ž   rŒ   r   c                   @   ó   e Zd ZdZdefdd„ZdS )r   Úconstro   c                 C   ó    d  dd„ | jD ƒ¡}d|› S )Nú, c                 s   s    | ]}t |ƒV  qd S ru   )Úrepr©Ú.0Úvrp   rp   rq   Ú	<genexpr>§   s   € z-WrongConstantError.__str__.<locals>.<genexpr>zunexpected value; permitted: )ÚjoinÚ	permitted©rw   r—   rp   rp   rq   r{   ¦   ó   
zWrongConstantError.__str__N©r   r€   r   rs   r‚   r{   rp   rp   rp   rq   r   £   ó    r   c                   @   rŠ   )r   Únot_nonezvalue is not NoneNr‹   rp   rp   rp   rq   r   «   rŒ   r   c                   @   r‡   )r   z&value could not be parsed to a booleanNrˆ   rp   rp   rp   rq   r   °   r‰   r   c                   @   r‡   )r   zbyte type expectedNrˆ   rp   rp   rp   rq   r   ´   r‰   r   c                   @   r‡   )r   zvalue is not a valid dictNrˆ   rp   rp   rp   rq   r   ¸   r‰   r   c                   @   r‡   )r   z"value is not a valid email addressNrˆ   rp   rp   rp   rq   r   ¼   r‰   r   c                   @   r‡   )r   ÚurlN)r   r€   r   rs   rp   rp   rp   rq   r   À   r‰   r   c                   @   rŠ   )r   ú
url.schemezinvalid or missing URL schemeNr‹   rp   rp   rp   rq   r   Ä   rŒ   r   c                       s.   e Zd ZdZdZdee f‡ fdd„Z‡  ZS )r   rž   zURL scheme not permittedÚallowed_schemesc                    ó   t ƒ j|d d S )N)rŸ   ©Úsuperrx   )rw   rŸ   ©r}   rp   rq   rx   Í   ó   z UrlSchemePermittedError.__init__)	r   r€   r   rs   rt   r   r‚   rx   Ú__classcell__rp   rp   r£   rq   r   É   ó    r   c                   @   rŠ   )r   zurl.userinfoz$userinfo required in URL but missingNr‹   rp   rp   rp   rq   r   Ñ   rŒ   r   c                   @   rŠ   )r    úurl.hostzURL host invalidNr‹   rp   rp   rp   rq   r    Ö   rŒ   r    c                   @   rŠ   )r!   r§   z+URL host invalid, top level domain requiredNr‹   rp   rp   rp   rq   r!   Û   rŒ   r!   c                   @   rŠ   )r"   zurl.portz*URL port invalid, port cannot exceed 65535Nr‹   rp   rp   rp   rq   r"   à   rŒ   r"   c                   @   rŠ   )r#   z	url.extraz>URL invalid, extra characters found after valid URL: {extra!r}Nr‹   rp   rp   rp   rq   r#   å   rŒ   r#   c                   @   r   )r&   Úenumro   c                 C   r   )Nr   c                 s   s    | ]}t |jƒV  qd S ru   )r‘   Úvaluer’   rp   rp   rq   r•   î   s   € z*EnumMemberError.__str__.<locals>.<genexpr>z4value is not a valid enumeration member; permitted: )r–   Úenum_valuesr˜   rp   rp   rq   r{   í   r™   zEnumMemberError.__str__Nrš   rp   rp   rp   rq   r&   ê   r›   r&   c                   @   r‡   )r'   zvalue is not a valid integerNrˆ   rp   rp   rp   rq   r'   ò   r‰   r'   c                   @   r‡   )r(   zvalue is not a valid floatNrˆ   rp   rp   rp   rq   r(   ö   r‰   r(   c                   @   r‡   )r)   zvalue is not a valid pathNrˆ   rp   rp   rp   rq   r)   ú   r‰   r)   c                       s&   e Zd Zdeddf‡ fdd„Z‡  ZS )Ú_PathValueErrorÚpathro   Nc                   ó   t ƒ jt|ƒd d S )N)r¬   )r¢   rx   r‚   )rw   r¬   r£   rp   rq   rx   ÿ   ó   z_PathValueError.__init__)r   r€   r   r   rx   r¥   rp   rp   r£   rq   r«   þ   s    r«   c                   @   rŠ   )r*   zpath.not_existsz1file or directory at path "{path}" does not existNr‹   rp   rp   rp   rq   r*     rŒ   r*   c                   @   rŠ   )r+   zpath.not_a_filez&path "{path}" does not point to a fileNr‹   rp   rp   rp   rq   r+     rŒ   r+   c                   @   rŠ   )r,   zpath.not_a_directoryz+path "{path}" does not point to a directoryNr‹   rp   rp   rp   rq   r,     rŒ   r,   c                   @   r‡   )r-   zOensure this value contains valid import path or valid callable: {error_message}Nrˆ   rp   rp   rp   rq   r-     r‰   r-   c                   @   r‡   )r.   zvalue is not a valid sequenceNrˆ   rp   rp   rp   rq   r.     r‰   r.   c                   @   r‡   )ÚIterableErrorzvalue is not a valid iterableNrˆ   rp   rp   rp   rq   r¯     r‰   r¯   c                   @   r‡   )r/   zvalue is not a valid listNrˆ   rp   rp   rp   rq   r/     r‰   r/   c                   @   r‡   )r0   zvalue is not a valid setNrˆ   rp   rp   rp   rq   r0   "  r‰   r0   c                   @   r‡   )r1   zvalue is not a valid frozensetNrˆ   rp   rp   rp   rq   r1   &  r‰   r1   c                   @   r‡   )Ú
DequeErrorzvalue is not a valid dequeNrˆ   rp   rp   rp   rq   r°   *  r‰   r°   c                   @   r‡   )r2   zvalue is not a valid tupleNrˆ   rp   rp   rp   rq   r2   .  r‰   r2   c                       s2   e Zd ZdZdZdededdf‡ fdd„Z‡  ZS )	r3   ztuple.lengthz>wrong tuple length {actual_length}, expected {expected_length}Úactual_lengthÚexpected_lengthro   Nc                   s   t ƒ j||d d S )N)r±   r²   r¡   )rw   r±   r²   r£   rp   rq   rx   6  r|   zTupleLengthError.__init__©r   r€   r   rs   rt   Úintrx   r¥   rp   rp   r£   rq   r3   2  ó    "r3   c                       ó.   e Zd ZdZdZdeddf‡ fdd„Z‡  ZS )r4   zlist.min_itemsú2ensure this value has at least {limit_value} itemsÚlimit_valuero   Nc                   r    ©N)r¸   r¡   ©rw   r¸   r£   rp   rq   rx   >  r¤   zListMinLengthError.__init__r³   rp   rp   r£   rq   r4   :  r¦   r4   c                       r¶   )r5   zlist.max_itemsú1ensure this value has at most {limit_value} itemsr¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   F  r¤   zListMaxLengthError.__init__r³   rp   rp   r£   rq   r5   B  r¦   r5   c                   @   rŠ   )r6   zlist.unique_itemszthe list has duplicated itemsNr‹   rp   rp   rp   rq   r6   J  rŒ   r6   c                       r¶   )r7   zset.min_itemsr·   r¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   S  r¤   zSetMinLengthError.__init__r³   rp   rp   r£   rq   r7   O  r¦   r7   c                       r¶   )r8   zset.max_itemsr»   r¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   [  r¤   zSetMaxLengthError.__init__r³   rp   rp   r£   rq   r8   W  r¦   r8   c                       r¶   )r9   zfrozenset.min_itemsr·   r¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   c  r¤   z FrozenSetMinLengthError.__init__r³   rp   rp   r£   rq   r9   _  r¦   r9   c                       r¶   )r:   zfrozenset.max_itemsr»   r¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   k  r¤   z FrozenSetMaxLengthError.__init__r³   rp   rp   r£   rq   r:   g  r¦   r:   c                       r¶   )r;   zany_str.min_lengthz7ensure this value has at least {limit_value} charactersr¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   s  r¤   zAnyStrMinLengthError.__init__r³   rp   rp   r£   rq   r;   o  r¦   r;   c                       r¶   )r<   zany_str.max_lengthz6ensure this value has at most {limit_value} charactersr¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   {  r¤   zAnyStrMaxLengthError.__init__r³   rp   rp   r£   rq   r<   w  r¦   r<   c                   @   r‡   )r=   zstr type expectedNrˆ   rp   rp   rp   rq   r=     r‰   r=   c                       r¶   )r>   z	str.regexz'string does not match regex "{pattern}"Úpatternro   Nc                   r    )N)r¼   r¡   )rw   r¼   r£   rp   rq   rx   ‡  r¤   zStrRegexError.__init__)r   r€   r   rs   rt   r‚   rx   r¥   rp   rp   r£   rq   r>   ƒ  r¦   r>   c                       s0   e Zd Zdeeeef ddf‡ fdd„Z‡  ZS )Ú_NumberBoundErrorr¸   ro   Nc                   r    r¹   r¡   rº   r£   rp   rq   rx   Œ  r¤   z_NumberBoundError.__init__)	r   r€   r   r   r´   Úfloatr   rx   r¥   rp   rp   r£   rq   r½   ‹  s    (r½   c                   @   rŠ   )r?   znumber.not_gtz/ensure this value is greater than {limit_value}Nr‹   rp   rp   rp   rq   r?     rŒ   r?   c                   @   rŠ   )r@   znumber.not_gez;ensure this value is greater than or equal to {limit_value}Nr‹   rp   rp   rp   rq   r@   •  rŒ   r@   c                   @   rŠ   )rA   znumber.not_ltz,ensure this value is less than {limit_value}Nr‹   rp   rp   rp   rq   rA   š  rŒ   rA   c                   @   rŠ   )rB   znumber.not_lez8ensure this value is less than or equal to {limit_value}Nr‹   rp   rp   rp   rq   rB   Ÿ  rŒ   rB   c                   @   rŠ   )ÚNumberNotFiniteErrorznumber.not_finite_numberz$ensure this value is a finite numberNr‹   rp   rp   rp   rq   r¿   ¤  rŒ   r¿   c                       s8   e Zd ZdZdZdeeeef ddf‡ fdd„Z	‡  Z
S )rC   znumber.not_multiplez0ensure this value is a multiple of {multiple_of}Úmultiple_ofro   Nc                   r    )N)rÀ   r¡   )rw   rÀ   r£   rp   rq   rx   ­  r¤   zNumberNotMultipleError.__init__)r   r€   r   rs   rt   r   r´   r¾   r   rx   r¥   rp   rp   r£   rq   rC   ©  s    (rC   c                   @   r‡   )rD   úvalue is not a valid decimalNrˆ   rp   rp   rp   rq   rD   ±  r‰   rD   c                   @   rŠ   )rE   zdecimal.not_finiterÁ   Nr‹   rp   rp   rp   rq   rE   µ  rŒ   rE   c                       r¶   )rF   zdecimal.max_digitsz?ensure that there are no more than {max_digits} digits in totalÚ
max_digitsro   Nc                   r    )N)rÂ   r¡   )rw   rÂ   r£   rp   rq   rx   ¾  r¤   zDecimalMaxDigitsError.__init__r³   rp   rp   r£   rq   rF   º  r¦   rF   c                       r¶   )rG   zdecimal.max_placeszBensure that there are no more than {decimal_places} decimal placesÚdecimal_placesro   Nc                   r    )N)rÃ   r¡   )rw   rÃ   r£   rp   rq   rx   Æ  r¤   zDecimalMaxPlacesError.__init__r³   rp   rp   r£   rq   rG   Â  r¦   rG   c                       r¶   )rH   zdecimal.whole_digitszQensure that there are no more than {whole_digits} digits before the decimal pointÚwhole_digitsro   Nc                   r    )N)rÄ   r¡   )rw   rÄ   r£   rp   rq   rx   Î  r¤   z DecimalWholeDigitsError.__init__r³   rp   rp   r£   rq   rH   Ê  r¦   rH   c                   @   r‡   )rI   zinvalid datetime formatNrˆ   rp   rp   rp   rq   rI   Ò  r‰   rI   c                   @   r‡   )rJ   zinvalid date formatNrˆ   rp   rp   rp   rq   rJ   Ö  r‰   rJ   c                   @   rŠ   )rK   zdate.not_in_the_pastzdate is not in the pastNr‹   rp   rp   rp   rq   rK   Ú  rŒ   rK   c                   @   rŠ   )rL   zdate.not_in_the_futurezdate is not in the futureNr‹   rp   rp   rp   rq   rL   ß  rŒ   rL   c                   @   r‡   )rM   zinvalid time formatNrˆ   rp   rp   rp   rq   rM   ä  r‰   rM   c                   @   r‡   )rN   zinvalid duration formatNrˆ   rp   rp   rp   rq   rN   è  r‰   rN   c                   @   r‡   )rO   zvalue is not a valid hashableNrˆ   rp   rp   rp   rq   rO   ì  r‰   rO   c                   @   r‡   )rP   zvalue is not a valid uuidNrˆ   rp   rp   rp   rq   rP   ð  r‰   rP   c                       r¶   )rQ   zuuid.versionz(uuid version {required_version} expectedÚrequired_versionro   Nc                   r    )N)rÅ   r¡   )rw   rÅ   r£   rp   rq   rx   ø  r¤   zUUIDVersionError.__init__r³   rp   rp   r£   rq   rQ   ô  r¦   rQ   c                       ó2   e Zd ZdZdZdee ddf‡ fdd„Z‡  ZS )rR   Úarbitrary_typez.instance of {expected_arbitrary_type} expectedÚexpected_arbitrary_typero   Nc                   r­   )N)rÈ   ©r¢   rx   r   )rw   rÈ   r£   rp   rq   rx      r®   zArbitraryTypeError.__init__©	r   r€   r   rs   rt   r
   r   rx   r¥   rp   rp   r£   rq   rR   ü  rµ   rR   c                   @   rŠ   )rS   Úclassza class is expectedNr‹   rp   rp   rp   rq   rS     rŒ   rS   c                       rÆ   )rT   Úsubclassz%subclass of {expected_class} expectedÚexpected_classro   Nc                   r­   )N)rÍ   rÉ   )rw   rÍ   r£   rp   rq   rx     r®   zSubclassError.__init__rÊ   rp   rp   r£   rq   rT   	  rµ   rT   c                   @   r‡   )rU   zInvalid JSONNrˆ   rp   rp   rp   rq   rU     r‰   rU   c                   @   rŠ   )rV   Újsonz+JSON object must be str, bytes or bytearrayNr‹   rp   rp   rp   rq   rV     rŒ   rV   c                   @   rŠ   )rW   Úregex_patternzInvalid regular expressionNr‹   rp   rp   rp   rq   rW     rŒ   rW   c                   @   rŠ   )rX   Ú	dataclassz0instance of {class_name}, tuple or dict expectedNr‹   rp   rp   rp   rq   rX     rŒ   rX   c                   @   r‡   )rY   z{value} is not callableNrˆ   rp   rp   rp   rq   rY   $  r‰   rY   c                   @   rŠ   )r$   Úenum_instancez${value} is not a valid Enum instanceNr‹   rp   rp   rp   rq   r$   (  rŒ   r$   c                   @   rŠ   )r%   Úint_enum_instancez'{value} is not a valid IntEnum instanceNr‹   rp   rp   rp   rq   r%   -  rŒ   r%   c                   @   r‡   )rZ   z)value is not a valid IPv4 or IPv6 addressNrˆ   rp   rp   rp   rq   rZ   2  r‰   rZ   c                   @   r‡   )r[   z+value is not a valid IPv4 or IPv6 interfaceNrˆ   rp   rp   rp   rq   r[   6  r‰   r[   c                   @   r‡   )r\   z)value is not a valid IPv4 or IPv6 networkNrˆ   rp   rp   rp   rq   r\   :  r‰   r\   c                   @   r‡   )r]   z!value is not a valid IPv4 addressNrˆ   rp   rp   rp   rq   r]   >  r‰   r]   c                   @   r‡   )r^   z!value is not a valid IPv6 addressNrˆ   rp   rp   rp   rq   r^   B  r‰   r^   c                   @   r‡   )r_   z!value is not a valid IPv4 networkNrˆ   rp   rp   rp   rq   r_   F  r‰   r_   c                   @   r‡   )r`   z!value is not a valid IPv6 networkNrˆ   rp   rp   rp   rq   r`   J  r‰   r`   c                   @   r‡   )ra   z#value is not a valid IPv4 interfaceNrˆ   rp   rp   rp   rq   ra   N  r‰   ra   c                   @   r‡   )rb   z#value is not a valid IPv6 interfaceNrˆ   rp   rp   rp   rq   rb   R  r‰   rb   c                   @   r‡   )rc   z$value is not a valid color: {reason}Nrˆ   rp   rp   rp   rq   rc   V  r‰   rc   c                   @   r‡   )rd   zvalue is not a valid booleanNrˆ   rp   rp   rp   rq   rd   Z  r‰   rd   c                   @   rŠ   )re   zpayment_card_number.digitszcard number is not all digitsNr‹   rp   rp   rp   rq   re   ^  rŒ   re   c                   @   rŠ   )rf   zpayment_card_number.luhn_checkzcard number is not luhn validNr‹   rp   rp   rp   rq   rf   c  rŒ   rf   c                   @   rŠ   )rg   z,payment_card_number.invalid_length_for_brandz3Length for a {brand} card must be {required_length}Nr‹   rp   rp   rp   rq   rg   h  rŒ   rg   c                   @   r‡   )rh   z/could not parse value and unit from byte stringNrˆ   rp   rp   rp   rq   rh   m  r‰   rh   c                   @   r‡   )ri   z%could not interpret byte unit: {unit}Nrˆ   rp   rp   rp   rq   ri   q  r‰   ri   c                   @   rŠ   )rj   z)discriminated_union.missing_discriminatorz7Discriminator {discriminator_key!r} is missing in valueNr‹   rp   rp   rp   rq   rj   u  rŒ   rj   c                       s:   e Zd ZdZdZdededee ddf‡ fdd	„Z‡  Z	S )
rk   z)discriminated_union.invalid_discriminatorzuNo match for discriminator {discriminator_key!r} and value {discriminator_value!r} (allowed values: {allowed_values})Údiscriminator_keyÚdiscriminator_valueÚallowed_valuesro   Nc                   s"   t ƒ j||d tt|ƒ¡d d S )Nr   )rÓ   rÔ   rÕ   )r¢   rx   r–   Úmapr‘   )rw   rÓ   rÔ   rÕ   r£   rp   rq   rx     s
   
ýzInvalidDiscriminator.__init__)
r   r€   r   rs   rt   r‚   r   r   rx   r¥   rp   rp   r£   rq   rk   z  s
    ÿ*rk   N)wÚdecimalr   Úpathlibr   Útypingr   r   r   r   r   r	   r
   r   r   r   Ú__all__rr   rm   Ú	TypeErrorr   Ú
ValueErrorr   ÚRuntimeErrorr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r&   r'   r(   r)   r«   r*   r+   r,   r-   r.   r¯   r/   r0   r1   r°   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r½   r?   r@   rA   rB   r¿   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   rS   rT   rU   rV   rW   rX   rY   r$   r%   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rp   rp   rp   rq   Ú<module>   sÖ    (a