+
     Ii<  c                   s    R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHtHt R t	R t
R t ! R R	4      t ! R
 R4      t ! R R4      tR# )aQ  User input parameter validation.

This module handles user input parameter validation
against a provided input model.

Note that the objects in this module do *not* mutate any
arguments.  No type version happens here.  It is up to another
layer to properly convert arguments to any required types.

Validation Errors
-----------------


N)datetime)ParamValidationError)is_json_value_headerparse_to_aware_datetimec                s    \        4       pVP                  W4      pVP                  4       '       d   \        VP	                  4       R7      hR# )aF  Validates input parameters against a schema.

This is a convenience function that validates parameters against a schema.
You can also instantiate and use the ParamValidator class directly if you
want more control.

If there are any validation errors then a ParamValidationError
will be raised.  If there are no validation errors than no exception
is raised and a value of None is returned.

:param params: The user provided input parameters.

:type shape: botocore.model.Shape
:param shape: The schema which the input parameters should
    adhere to.

:raise: ParamValidationError

reportN)ParamValidatorvalidate
has_errorsr   generate_report)paramsshapeZ	validatorr   s   &&  6/usr/lib/python3.14/site-packages/botocore/validate.pyvalidate_parametersr      sD    (  I.F"&*@*@*BCC     c                 s   a  V 3R  lpV# )c                 s&   <a a VV 3R  lpV3R loV# )c                 s:   < S! WV4      '       d   S! WW#V4      # R # N )selfparamr   errorsname_type_checkfuncs   &&&&&r   _on_passes_type_checkZKtype_check.<locals>._create_type_check_guard.<locals>._on_passes_type_check4   s$    5$//D== 0r   c                 s   < \        V S4      '       g2   S Uu. uF  p\        V4      NK  	  ppVP                  VR V VR7       R# R# u upi )invalid typer   valid_typesFT)
isinstancestrr   )r   r   r   tvalid_type_namesr   s   &&&  r   r   ZAtype_check.<locals>._create_type_check_guard.<locals>._type_check8   sT    e[114?#@KqCFK #@" 0	    $As   Ar   )r   r   r   r   s   f @r   _create_type_check_guardZ,type_check.<locals>._create_type_check_guard3   s    	>
	 %$r   r   )r   r   s   f r   
type_checkr    2   s    %& $#r   c                 s.   R p\        R4      pRVP                  9   d   VP                  R,          pW8  d   RpM=\        VR4      '       d,   VP                  P	                  R4      '       d   ^pW8  d   RpV'       d   VP                  WWR7       R# R# )Fz-infminTserializationZ	hostLabel)r   min_allowedN)floatmetadatahasattrr"   getr   )r   valuer   
error_typer   Zfailedr#      &&&&&  r   range_checkr+   I   s    F-KnnU+F		(	("";//K"deM r   c                   sD   a  ] tR t^Zt o R tR tR tR tR tR t	Rt
V tR# )	ValidationErrorsc                s    . V n         R # r   _errorsr      &r   __init__ZValidationErrors.__init__[   s	    r   c                s.    V P                   '       d   R # R# TFr-   r/   r0   r   r   ZValidationErrors.has_errors^   s    <<<r   c                s    . pV P                    F#  pVP                  V P                  V4      4       K%  	  R P                  V4      # )Z
)r.   append_format_errorjoin)r   Zerror_messageserrors   &  r   r	   Z ValidationErrors.generate_reportc   s=    \\E!!$"4"4U";< "yy((r   c                s:   Vw  r#pV P                  V4      pVR 8X  d   RV RVR,           R2# VR8X  d-   VR,          pRP                  VR,          4      pR	V RV R
V 2# VR8X  d;   VR,          p\        V4      pRP                  VR,          4      p	RV RV RV RV	 2# VR8X  d   VR,          pVR,          p
RV RV RV
 2# VR8X  d   VR,          pVR,          p
RV RV RV
 2# VR8X  d   RP                  VVR,          4      # VR8X  d;   VR,          p\        V4      pRP                  VR,          4      p	RV RV RV RV	 2# VR8X  d"   RP                  VR,          4      pR V R!V R"2# VR#8X  d"   RP                  VR,          4      pR$V R%V R"2# R&# )'missing required fieldzMissing required parameter in z: "required_nameZ"unknown fieldunknown_paramz, valid_nameszUnknown parameter in z", must be one of: r   r   r   zInvalid type for parameter z	, value: z, type: z, valid types: invalid ranger#   zInvalid value for parameter z, valid min value: invalid lengthzInvalid length for parameter z, valid min length: unable to encode to jsonz2Invalid parameter {} must be json serializable: {}
type_errorinvalid type for documentz$Invalid type for document parameter more than one inputmembersz<Invalid number of parameters set for tagged union structure z*. Can only set one of the following keys: .empty inputz=Must set one of the following keys for tagged unionstructure z: N)	_get_namer5   typeZformat)r   r6   r)   r   Z
additionalr:   r;   r   
param_typer   r#   rB   s   &&          r   r4   ZValidationErrors._format_errori   sd   ',$
*~~d#110 7015 ?*&7M))J}$=>K'vS @##.-1 >)w'EeJ))J}$=>K-dV9UG D#OK=B ?*w'E$]3K.tfIeW E$$/=2 ++w'E$]3K/vYug F%%0M3 55GNN<(  66w'EeJ))J}$=>K6tfIeW M#OK=B 00ii
9 56GN&B)1
 =(ii
9 56G!F"WIQ0 )r   c                sZ    V'       g   R # VP                  R4      '       d
   VR,          # V# )ZinputrC   :i   NN)Z
startswith)r   r      &&r   rE   ZValidationErrors._get_name   s%    __S!!8OKr   c                s@    V P                   P                  W!V34       R # r   )r.   r3   )r   r   ZreasonZkwargss   &&&,r   r   ZValidationErrors.report   s    V623r   r-   N)__name__
__module____qualname____firstlineno__r1   r   r	   r4   rE   r   __static_attributes____classdictcell__Z__classdict__   @r   r,   r,   Z   s)     
)>@4 4r   r,   c                   s6  a  ] tR t^t o RtR]]P                  ]3R]]P                  ]3R]3R]3R]	3R]
3/tR]3R	]3R
]]3/t0 RmtR tR tR tR tR tR t]! ]R,          R7      R 4       t]! ]R,          R7      R 4       t]! ]R
,          R7      R 4       t]! ]R	,          R7      R 4       t]! ]R,          R7      R 4       tR t]! ]R,          R7      R 4       t]! ]R,          R7      R 4       t]t ]! ]R,          R7      R 4       t!R t"R t#Rt$V t%R# ) r   z+Validates parameters against a shape model.r$   ZdoubleZintegerZlongZbooleanZstring	structureZmaplistc                s|    \        V P                  \        VP                  P	                  4       4      ,          4      # )zAWhether the shape has validated constraints beyond type checking.)boolVALIDATED_METADATA_ATTRSZsetr%   Zkeysr   r   rH   r   _shape_has_constraintsZ%ParamValidator._shape_has_constraints   s*    D11C8K8K8M4NNOOr   c                sB    \        4       pV P                  WVRR7       V# )a  Validate parameters against a shape model.

This method will validate the parameters against a provided shape model.
All errors will be collected before returning to the caller.  This means
that this method will not stop at the first error, it will return all
possible errors.

:param params: User provided dict of parameters
:param shape: A shape model describing the expected input.

:return: A list of errors.

Z )r   )r,   	_validate)r   r
   r   r   s   &&& r   r   ZParamValidator.validate   s#     "#vf26r   c                s    \        V4      '       d   V P                  # VP                  R 8X  d!   VP                  '       d   V P                  # R# R# )rQ   N)r   _validate_jsonvalue_string	type_nameZis_document_type_validate_documentrU   rH   r   _check_special_validation_casesZ.ParamValidator._check_special_validation_cases   sE    &&222??k)e.D.D.D*** /E)r   c                s    V P                  V4      pV'       d   V! WW44       R# \        V R VP                   24      ! WW44       R# )Z
_validate_N)r[   ZgetattrrY   )r   r
   r   r   r   Zspecial_validator   &&&&& r   rW   ZParamValidator._validate   s@     @@GfV:DJu&789vr   c                s     \         P                  ! V4       R#   \        \        3 d    pTP	                  TR TR7        Rp?R# Rp?ii ; i)r>   )r?   N)jsonZdumps
ValueError	TypeErrorr   )r   r
   r   r   r   Zer\   r   rX   Z)ParamValidator._validate_jsonvalue_string   sA    	JJJvI& 	JMM$ :qMII	Js    A
AA
c           
     s   Vf   R # \        V\        4      '       d%   V F  pV P                  W,          W#V4       K  	  R # \        V\        4      '       d/   \	        V4       F  w  rgV P                  WrW4 RV R24       K  	  R # \        V\
        3\        \        \        34      '       g\   \
        \        \        \        \        \        3pV U	u. uF  p	\        V	4      NK  	  p
p	VP                  VRV\        V4      V
R7       R # R # u up	i )N[]r@   )r   rG   r   )r   dictrZ   rR   	enumerater   intrS   r$   r   rF   )r   r
   r   r   r   keyZindexZentityr   r   r   s   &&&&&      r   rZ   Z!ParamValidator._validate_document   s    >fd##''UCH %%!*6!2''6V1UG1+= "3 FcVS$$>??T5$=K0;<1A<MM+<,   @<s   D	)r   c           	     sr   VP                   '       d^   \        V4      ^ 8X  d    VP                  VRVP                  R7       M.\        V4      ^8  d   VP                  VRVP                  R7       VP                  P                  R. 4       F   pWQ9  g   K  VP                  VRVVR7       K"  	  VP                  p. pV F:  pW9  d!   VP                  VRV\        V4      R7       K)  VP                  V4       K<  	  V F3  pV P                  W,          VP                  V,          VV R	V 24       K5  	  R
# )i    rD   )rB   rA   requiredr7   )r8   Zuser_paramsr9   )r:   r;   rC   N)	Zis_tagged_unionlenr   rB   r%   r'   rR   r3   rW   )	r   r
   r   r   r   Zrequired_memberrB   Zknown_paramsr   	   &&&&&    r   _validate_structureZ"ParamValidator._validate_structure  s$      6{adM5==IVq/  
  %~~11*bAO,,"1 &	    B --E##"' $W	   ##E*  "ENNe$&%!	 "r   c                s6    \        V\        V4      VR V4       R# )r=   N)r+   rg   r   r   r   r   r      &&&&&r   _validate_stringZParamValidator._validate_string9  s     	D#e*e-=vFr   c           
     s   VP                   p\        V\        V4      VR V4       VP                  pW`P                  9   d   V P                  V4      '       gr   V P                  V,          p\        V4       FM  w  r\        W4      '       d   K  V U
u. uF  p
\        V
4      NK  	  pp
VP                  V RV R2RV	VR7       KO  	  R# \        V4       F  w  rV P                  WW4 RV R24       K  	  R# u up
i )r=   r`   ra   r   r   N)Zmemberr+   rg   rY   SCALAR_TYPESrV   rc   r   r   r   rW   )r   r   r   r   r   Zmember_shapeZmember_typer   ZiZitemr   r   s   &&&&&       r   _validate_listZParamValidator._validate_listE  s    ||D#e*e-=vF #,,,,,//==++K8K$U+!$448C'D1A$'DMM&!A&"$4	 "  ,  'GANN4vq1~F ( (Es   C7c           
     s    VP                   pVP                  pVP                  4        F4  w  rxV P                  WuW4 R V R24       V P                  WW4 RV 24       K6  	  R# )z (key: Z)rC   N)re   r(   ZitemsrW   )	r   r   r   r   r   Z	key_shapeZvalue_shapere   r(   rh   r   _validate_mapZParamValidator._validate_map_  sY    II	kk++-JCNN36V73%q3IJNN5vqG (r   c                "    \        WAVR V4       R# r<   Nr+   rj   rk   r   _validate_integerZ ParamValidator._validate_integerg      D@r   c           	     s    \        V\        \        \        34      '       d   R # \	        VR4      '       d   R # VP                  VRV\        \        4      \        \        4      R.R7       R # )NZreadr   zfile-like objectr   )r   ZbytesZ	bytearrayr   r&   r   rj   rk   r   _validate_blobZParamValidator._validate_blobk  sV    eeY455UF##MM ZY9KL	  r   c                s    R # r   r   rj   rk   r   _validate_booleanZ ParamValidator._validate_booleany  s    r   c                rp   rq   rr   rj   rk   r   _validate_doubleZParamValidator._validate_double}  rt   r   c                rp   rq   rr   rj   rk   r   _validate_longZParamValidator._validate_long  rt   r   c                s    V P                  V4      pV'       g(   \        \        4      R .pVP                  VRWR7       R# R# )ztimestamp-stringr   r   N)_type_check_datetimer   r    r   )r   r   r   r   r   Zis_valid_typer   r*   r   _validate_timestampZ"ParamValidator._validate_timestamp  sD     11%8 #H/ABMMnE   r   c                sX     \        V4       R #   \        \        \        3 d     R# i ; ir2   )r   r_   r^   ZAttributeError)r   r(   rH   r   ry   Z#ParamValidator._type_check_datetime  s-    	#E*:~6 	 	s    ))r   N>   r!   ZunionZdocumentrf   )&rI   rJ   rK   rL   __doc__r$   decimalZDecimalrd   rS   r   rm   rb   rR   ZtupleZCONTAINER_TYPESrT   rV   r   r[   rW   rX   rZ   r    ri   rl   rn   ro   rs   ru   rv   rw   Z_validate_floatrx   rz   ry   rM   rN   rO   rP   r   r   r      s    5 	%#.5'//3/C6D73&L 	dWwuO  HP$+J. OK89& :&P L23	G 4	G OF34G 5G2 OE23H 4H L34A 5A L34 5 L23A 4A 'OL01A 2A	 r   r   c                   s,   a  ] tR tRt o R tR tRtV tR# )ParamValidationDecoratori  c                s    Wn         W n        R # r   _param_validator_serializer)r   Zparam_validatorZ
serializers   &&&r   r1   Z!ParamValidationDecorator.__init__  s     /%r   c                s   VP                   pVeV   V P                  P                  WP                   4      pVP                  4       '       d   \	        VP                  4       R7      hV P                  P                  W4      # )Nr   )input_shaper   r   r   r   r	   r   serialize_to_request)r   Z
parametersZoperation_modelr   r   s   &&&  r   r   Z-ParamValidationDecorator.serialize_to_request  ss    %11"**3377F   ""*&2H2H2JKK44
 	
r   r~   N)rI   rJ   rK   rL   r1   r   rM   rN   rO   rP   r   r}   r}     s     &

 

r   r}   )r{   r|   r]   r    Zbotocore.exceptionsr   Zbotocore.utilsr   r   r   r    r+   r,   r   r}   r   r   r   <module>r      sP       4 HD4$.N"X4 X4vd dN
 
r   