+
    šÜiÝY  ã                   ó(  € R t ^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHtHtHt ^ RIHt ^ RIHtHtHtHtHtHtHt ]P2                  ! ]4      t]P8                  ! R	4      t]P8                  ! R
4      t]P8                  ! R4      t^dt ]! 4       t!]! 4       t" ! R R4      t#]#t$ ! R R4      t% ! R R]4      t& ! R R]%4      t' ! R R]%4      t( ! R R]%4      t) ! R R4      t* ! R R]4      t+ ! R R4      t, ! R R4      t- ! R  R!4      t.R# )"a|  
NOTE: All classes and functions in this module are considered private and are
subject to abrupt breaking changes. Please do not use them directly.

To view the raw JSON that the objects in this module represent, please
go to any `endpoint-rule-set.json` file in /botocore/data/<service>/<api version>/
or you can look at the test files in /tests/unit/data/endpoints/valid-rules/
N)ÚEnum)Ú	Formatter)Ú
NamedTuple)Ú
xform_name)ÚIPV4_REÚquoteÚurlparse)ÚEndpointResolutionError)Ú	ArnParserÚInvalidArnExceptionÚis_valid_ipv4_endpoint_urlÚis_valid_ipv6_endpoint_urlÚlru_cache_weakrefÚnormalize_url_pathÚpercent_encodez\{[a-zA-Z#]+\}z(\w*)\[(\d+)\]z^(?!-)[a-zA-Z\d-]{1,63}(?<!-)$c                   ó®   a € ] tR t^6t o RtR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tRtV tR# )ÚRuleSetStandardLibraryz5Rule actions to be performed by the EndpointProvider.c                ó   € Wn         R # ©N©Úpartitions_data)Úselfr   s   &&Ú</usr/lib/python3/dist-packages/botocore/endpoint_provider.pyÚ__init__ÚRuleSetStandardLibrary.__init__9   s   € Ø.Öó    c                ó<   € \        V\        4      ;'       d    RV9   # )zODetermine if an object is a function object.

:type argument: Any
:rtype: bool
Úfn©Ú
isinstanceÚdict©r   Úarguments   &&r   Úis_funcÚRuleSetStandardLibrary.is_func<   s   € ô ˜(¤DÓ)×>Ð>¨d°hÑ.>Ð>r   c                ó<   € \        V\        4      ;'       d    RV9   # )zPDetermine if an object is a reference object.

:type argument: Any
:rtype: bool
Úrefr   r!   s   &&r   Úis_refÚRuleSetStandardLibrary.is_refD   s   € ô ˜(¤DÓ)×?Ð?¨e°xÑ.?Ð?r   c                ó`   € \        V\        4      ;'       d    \        P                  V4      RJ# )zTDetermine if an object contains a template string.

:type argument: Any
:rtpe: bool
N)r   ÚstrÚTEMPLATE_STRING_REÚsearchr!   s   &&r   Úis_templateÚ"RuleSetStandardLibrary.is_templateL   s2   € ô �x¤Ó%÷ @ð @Ü"×)Ñ)¨(Ó3¸4Ð?ð	
r   c                óÆ   € Rp\         P                  V4       FE  w  rE pVe3   TpVP                  R4      pV F  p	Wy,          pK  	  W4 V 2,          pK=  W4,          pKG  	  V# )zgResolve and inject values into a template string.

:type value: str
:type scope_vars: dict
:rtype: str
Ú Ú#)ÚSTRING_FORMATTERÚparseÚsplit)
r   ÚvalueÚ
scope_varsÚresultÚliteralÚ	referenceÚ_Útemplate_valueÚtemplate_paramsÚparams
   &&&       r   Úresolve_template_stringÚ.RuleSetStandardLibrary.resolve_template_stringW   sr   € ð ˆÜ(8×(>Ñ(>¸uÖ(EÑ$ˆG  1ØÒ$Ø!+�Ø"+§/¡/°#Ó"6�Û,�EØ%3Õ%:’Nñ -à˜I nÐ%5Ð6Õ6’àÕ!’ñ )Fð ˆr   c                ó  € V P                  V4      '       d   V P                  W4      # V P                  V4      '       d   VP                  VR,          4      # V P	                  V4      '       d   V P                  W4      # V# )z[Return evaluated value based on type.

:type value: Any
:type scope_vars: dict
:rtype: Any
r&   )r#   Úcall_functionr'   Úgetr-   r>   )r   r5   r6   s   &&&r   Úresolve_valueÚ$RuleSetStandardLibrary.resolve_valuej   sm   € ð �<‰<˜×ÒØ×%Ñ% eÓ8Ð8Ø�[‰[˜×ÒØ—>‘> %¨¥,Ó/Ð/Ø×Ñ˜e×$Ò$Ø×/Ñ/°ÓBÐBàˆr   c                óV   € \        V4       pVR8X  d   RV 2pVP                  RR4      # )z8Normalize function names.

:type value: str
:rtype: str
Únotr:   Ú.)r   Úreplace)r   r5   Únormalized_names   && r   Úconvert_func_nameÚ(RuleSetStandardLibrary.convert_func_namez   s9   € ô (¨Ó.Ð/ˆØ˜eÔ#Ø ! /Ð!2Ð3ˆOØ×&Ñ& s¨CÓ0Ð0r   c                ó  € VR,           Uu. uF  pV P                  W24      NK  	  ppV P                  VR,          4      p\        W4      pV! V!  pRV9   d$   VR,          pW‚9   d   \        RV R2R7      hWrV&   V# u upi )z™Call the function with the resolved arguments and assign to `scope_vars`
when applicable.

:type func_signature: dict
:type scope_vars: dict
:rtype: Any
Úargvr   ÚassignzAssignment z= already exists in scoped variables and cannot be overwritten©Úmsg)rC   rJ   Úgetattrr	   )	r   Úfunc_signaturer6   ÚargÚ	func_argsÚ	func_nameÚfuncr7   rN   s	   &&&      r   rA   Ú$RuleSetStandardLibrary.call_function…   s«   € ð & fÖ-ó
á-�ð ×Ñ˜sÖ/Ù-ð 	ð 
ð ×*Ñ*¨>¸$Õ+?Ó@ˆ	Ü�tÓ'ˆÙ�yÑ!ˆØ�~Ô%Ø# HÕ-ˆFØÔ#Ü-Ø% f Xð .Að Aôð ð "(�vÑØˆùò
s   ŒA=c                ó
   € VRJ# )zAEvaluates whether a value is set.

:type value: Any
:rytpe: bool
N© ©r   r5   s   &&r   Úis_setÚRuleSetStandardLibrary.is_setž   s   € ð ˜DÐ Ð r   c                ó&  € VP                  R4       F{  p\        P                  V4      pVeX   VP                  4       w  rV\	        V4      pV'       d   VP                  V4      pVe   V\        V4      8¼  d    R# W,          u # W,          pK}  	  V# )a9  Find an attribute within a value given a path string. The path can contain
the name of the attribute and an index in brackets. A period separating attribute
names indicates the one to the right is nested. The index will always occur at
the end of the path.

:type value: dict or tuple
:type path: str
:rtype: Any
rG   N)r4   ÚGET_ATTR_REr,   ÚgroupsÚintrB   Úlen)r   r5   ÚpathÚpartÚmatchÚnameÚindexs   &&&    r   Úget_attrÚRuleSetStandardLibrary.get_attr¦   s{   € ð —J‘J˜s–OˆDÜ×&Ñ& tÓ,ˆEØÒ Ø#Ÿl™l›n‘�Ü˜E›
�ßØ!ŸI™I d›O�EØ’= E¬S°«ZÔ$7ÚØ•|Ò#à�’ñ $ð ˆr   c                ó0   € VR ,          pVR,          VR&   V# )ÚoutputsÚidre   rY   )r   Ú	partitionÚoutputs   && r   Úformat_partition_outputÚ.RuleSetStandardLibrary.format_partition_output¾   s   € Ø˜9Õ%ˆØ" 4�ˆˆv‰Øˆr   c                ól   € \         P                  ! VR ,          V4      RJpWR,          9   ;'       g    T# )ÚregionRegexNÚregions)Úrerd   )r   Úregionrl   Úmatches_regexs   &&& r   Úis_partition_matchÚ)RuleSetStandardLibrary.is_partition_matchÃ   s2   € ÜŸš ¨=Õ!9¸6ÓBÈ$ÐNˆØ 9Õ-Ñ-×>Ð>°Ð>r   c                óÊ   € V P                   R,          pVe4   V F-  pV P                  W4      '       g   K  V P                  V4      u # 	  V^ ,          pV P                  V4      # )zJMatch a region string to an AWS partition.

:type value: str
:rtype: dict
Ú
partitions)r   rv   rn   )r   r5   ry   rl   Úaws_partitions   &&   r   rz   Ú$RuleSetStandardLibrary.aws_partitionÇ   sb   € ð ×)Ñ)¨,Õ7ˆ
àÒÛ'�	Ø×*Ñ*¨5×<Ô<Ø×7Ñ7¸	ÓBÒBñ (ð
 # 1�ˆØ×+Ñ+¨MÓ:Ð:r   c                óx  € Ve   VP                  R4      '       g   R#  \        P                  V4      p\	        TR,          TR,          TR,          34      '       g   R# TP                  R4      TR&   TP                  R4      pTP                  RR	4      P                  R	4      TR
&   T#   \         d     R# i ; i)zMParse and validate string for ARN components.

:type value: str
:rtype: dict
Nzarn:rl   ÚserviceÚresourceÚaccountÚ	accountIdÚ:Ú/Ú
resourceId)Ú
startswithÚ
ARN_PARSERÚ	parse_arnr   ÚallÚpoprH   r4   )r   r5   Úarn_dictr~   s   &&  r   Úaws_parse_arnÚ$RuleSetStandardLibrary.aws_parse_arnØ   sº   € ð Š= × 0Ñ 0°× 8Ò 8Ùð	Ü!×+Ñ+¨EÓ2ˆHô
 Ø�kÕ" H¨YÕ$7¸À*Õ9MÐN÷
ò 
ñ à (§¡¨YÓ 7ˆ�Ñà—<‘< 
Ó+ˆØ!)×!1Ñ!1°#°sÓ!;×!AÑ!AÀ#Ó!Fˆ�Ñàˆøô #ô 	Úð	ús   ŸB* Â*B9Â8B9c                ó2  a € Ve   VRJ d   VP                  R4      ^ 8”  d   R# VRJ dY   \        ;QJ d.    V 3R lVP                  R4       4       F  '       d   K   R# 	  R# ! V 3R lVP                  R4       4       4      # \        P	                  V4      RJ# )zÌEvaluates whether a value is a valid host label per
RFC 1123. If allow_subdomains is True, split on `.` and validate
each component separately.

:type value: str
:type allow_subdomains: bool
:rtype: bool
NFrG   Tc              3   óH   <"  € T F  pSP                  VR 4      x € K  	  R# 5i)FN)Úis_valid_host_label)Ú.0Úlabelr   s   & €r   Ú	<genexpr>Ú=RuleSetStandardLibrary.is_valid_host_label.<locals>.<genexpr>   s(   øé € ð á-�Eð ×(Ñ(¨°×6Ð6Û-ùs   ƒ")Úcountr‡   r4   ÚVALID_HOST_LABEL_RErd   ©r   r5   Úallow_subdomainss   f&&r   rŽ   Ú*RuleSetStandardLibrary.is_valid_host_labeló   s’   ø€ ð Š=Ð,°Ó5¸%¿+¹+ÀcÓ:JÈQÔ:NÙà˜tÓ#ß“3ô à"Ÿ[™[¨Ô-ó—3”3ð ’3ð �3ô à"Ÿ[™[¨Ô-óó ð ô
 #×(Ñ(¨Ó/°tÐ;Ð;r   c                óÐ   € \         ;QJ d    R W3 4       F  '       d   K   RM	  RM! R W3 4       4      '       g(   R\        V4       R\        V4       R2p\        VR7      hW8H  # )z\Evaluates two string values for equality.

:type value1: str
:type value2: str
:rtype: bool
c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5ir   )r   r*   ©r�   Úvals   & r   r‘   Ú7RuleSetStandardLibrary.string_equals.<locals>.<genexpr>  s   é € ÐDÑ3C¨C”:˜c¤3×'Ð'Ó3Cùó   ‚FTz!Both values must be strings, not ú and rG   rO   ©r‡   Útyper	   ©r   Úvalue1Úvalue2rP   s   &&& r   Ústring_equalsÚ$RuleSetStandardLibrary.string_equals  s\   € ÷ ‹sÑD°FÑ3CÓD�s�sŠsÑD°FÑ3CÓD×DÒDØ5´d¸6³l°^À5ÌÈfËÈÐVWÐXˆCÜ)¨cÔ2Ð2ØÑÐr   c                ó$   € Vf   R# \        V4      # )zKPerform percent-encoding on an input string.

:type value: str
:rytpe: str
N)r   rZ   s   &&r   Ú
uri_encodeÚ!RuleSetStandardLibrary.uri_encode  s   € ð Š=Ùä˜eÓ$Ð$r   c                ó   € Vf   R# \        V4      p VP                   TP                  pTP                  pTR9  g   \        T4      ^ 8”  d   R# TP                  p\        \        T4      4      pTP                  R4      '       g   T R2pRTRTP                  RTRTR\        T4      ;'       g    \        T4      /#   \         d     R# i ; i)	zCParse a URL string into components.

:type value: str
:rtype: dict
Nr‚   ÚschemeÚ	authorityrb   ÚnormalizedPathÚisIp)ÚhttpsÚhttp)r   ÚportÚ
ValueErrorrª   Úqueryra   rb   r   r   ÚendswithÚnetlocr   r   )r   r5   Úurl_componentsrª   r²   rb   Únormalized_paths   &&     r   Ú	parse_urlÚ RuleSetStandardLibrary.parse_url  sã   € ð Š=Ùä! %›ˆð	ð ×Òð  ×&Ñ&ˆØ×$Ñ$ˆàÐ*Ô*¬c°%«j¸1¬nÙà×"Ñ"ˆÜÔ 2°4Ó 8Ó9ˆØ×'Ñ'¨×,Ò,Ø!0Ð 1°Ð3ˆOð �fØ˜×.Ñ.Ø�DØ˜oØÔ.¨uÓ5÷ 1ð 1Ü)¨%Ó0ð
ð 	
øô ô 	Úð	ús   “B> Â>CÃCc                óÎ   € \         ;QJ d    R W3 4       F  '       d   K   RM	  RM! R W3 4       4      '       g(   R\        V4       R\        V4       R2p\        VR7      hWJ # )z_Evaluates two boolean values for equality.

:type value1: bool
:type value2: bool
:rtype: bool
c              3   óB   "  € T F  p\        V\        4      x € K  	  R # 5ir   )r   Úboolrš   s   & r   r‘   Ú8RuleSetStandardLibrary.boolean_equals.<locals>.<genexpr>J  s   é € ÐEÑ4D¨S”:˜c¤4×(Ð(Ó4Dùr�   FTz"Both arguments must be bools, not rž   rG   rO   rŸ   r¡   s   &&& r   Úboolean_equalsÚ%RuleSetStandardLibrary.boolean_equalsC  s\   € ÷ ‹sÑE°VÑ4DÓE�s�sŠsÑE°VÑ4DÓE×EÒEØ6´t¸F³|°nÀEÌ$ÈvË,ÈÐWXÐYˆCÜ)¨cÔ2Ð2ØÐÐr   c                óN   €  VP                  R4       R#   \         d     R# i ; i)zUEvaluates if a string only contains ASCII characters.

:type value: str
:rtype: bool
ÚasciiTF)ÚencodeÚUnicodeEncodeErrorrZ   s   &&r   Úis_asciiÚRuleSetStandardLibrary.is_asciiO  s(   € ð	Ø�L‰L˜Ô!ÙøÜ!ô 	Úð	ús   ‚ •$£$c                ó&  € \        V\        4      '       g   R\        V4       R2p\        VR7      hW#8¼  g(   \	        V4      V8  g   V P                  V4      '       g   R# VRJ d)   \	        V4      V,
          p\	        V4      V,
          pWV # WV # )zÉComputes a substring given the start index and end index. If `reverse` is
True, slice the string from the end instead.

:type value: str
:type start: int
:type end: int
:type reverse: bool
:rtype: str
zInput must be a string, not rG   rO   NT)r   r*   r    r	   ra   rÃ   )r   r5   ÚstartÚstopÚreverserP   Úr_startÚr_stops   &&&&&   r   Ú	substringÚ RuleSetStandardLibrary.substring[  sˆ   € ô ˜%¤×%Ò%Ø0´°e³°¸QÐ?ˆCÜ)¨cÔ2Ð2ØŒ=œC ›J¨Ô-°T·]±]À5×5IÒ5IÙà�d‹?Ü˜%“j 4Õ'ˆGÜ˜“Z %Õ'ˆFØ Ð(Ð(à˜4Ð Ð r   c                ó   € V'       * # )zXA function implementation of the logical operator `not`.

:type value: Any
:rtype: bool
rY   rZ   s   &&r   Ú_notÚRuleSetStandardLibrary._notr  s   € ð ŒyÐr   c                ó¬   € Ve>   \        V4      ^8  g.   VP                  4       V8w  g   \        P                  ! V4      e   R# V P	                  WR7      # )a¿  Evaluates whether a value is a valid bucket name for virtual host
style bucket URLs. To pass, the value must meet the following criteria:
1. is_valid_host_label(value) is True
2. length between 3 and 63 characters (inclusive)
3. does not contain uppercase characters
4. is not formatted as an IP address

If allow_subdomains is True, split on `.` and validate
each component separately.

:type value: str
:type allow_subdomains: bool
:rtype: bool
F)r–   )ra   Úlowerr   rd   rŽ   r•   s   &&&r   Ú!aws_is_virtual_hostable_s3_bucketÚ8RuleSetStandardLibrary.aws_is_virtual_hostable_s3_bucketz  sO   € ð  ŠMÜ�5‹z˜AŒ~Ø�{‰{‹} Ô%Ü�}Š}˜UÓ#Ò/áà×'Ñ'Øð (ó 
ð 	
r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   r#   r'   r-   r>   rC   rJ   rA   r[   rg   rn   rv   rz   rŠ   rŽ   r¤   r§   r·   r½   rÃ   rË   rÎ   rÒ   Ú__static_attributes__Ú__classdictcell__©Ú__classdict__s   @r   r   r   6   s‚   ø‡ € Ù?ò/ò?ò@ò	
òò&ò 	1òò2!òò0ò
?ò;ò"ò6<ò(
 ò	%ò#
òJ
 ò
ò!ò.÷
ð 
r   r   c                   ó:   a € ] tR tRt o RtRR ltR tR tRtV t	R# )	ÚBaseRulei›  z-Base interface for individual endpoint rules.Nc                ó   € Wn         W n        R # r   ©Ú
conditionsÚdocumentation)r   rá   râ   s   &&&r   r   ÚBaseRule.__init__ž  s   € Ø$ŒØ*Ör   c                ó   € \        4       hr   )ÚNotImplementedError)r   r6   Úrule_libs   &&&r   ÚevaluateÚBaseRule.evaluate¢  s   € Ü!Ó#Ð#r   c                óh   € V P                    F!  pVP                  W14      pVRJ g   Ve   K    R# 	  R# )z{Determine if all conditions in a rule are met.

:type scope_vars: dict
:type rule_lib: RuleSetStandardLibrary
:rtype: bool
FT)rá   rA   )r   r6   ræ   rR   r7   s   &&&  r   Úevaluate_conditionsÚBaseRule.evaluate_conditions¥  s5   € ð #ŸoœoˆNØ×+Ñ+¨NÓGˆFØ˜‹ &¤.Úñ .ñ r   rà   r   )
rÔ   rÕ   rÖ   r×   rØ   r   rç   rê   rÙ   rÚ   rÛ   s   @r   rÞ   rÞ   ›  s   ø‡ € Ù7ô+ò$÷ð r   rÞ   c                   ó0   a € ] tR tRt o RtV 3R ltRtV tR# )ÚRuleSetEndpointi³  z.A resolved endpoint object returned by a rule.c                ó>   <€ V ^8„  d   Qh/ S[ ;R&   S[;R&   S[;R&   # )é   ÚurlÚ
propertiesÚheaders)r*   r    )ÚformatrÜ   s   "€r   Ú__annotate__ÚRuleSetEndpoint.__annotate__³  s*   ø‡ ‚ ñ 
�Hñ ñ Ññ	 ñ
 �Mò r   rY   N)rÔ   rÕ   rÖ   r×   rØ   Ú__annotate_func__rÙ   rÚ   rÛ   s   @r   rí   rí   ³  s   ø‡ € Ù8÷ ƒ r   rí   c                   óD   a a€ ] tR tRt oV 3R ltR tR tR tRtVt	V ;t
# )ÚEndpointRulei»  c                ó4   <€ \         SV `  ! R/ VB  Wn        R # ©NrY   )Úsuperr   Úendpoint)r   rü   ÚkwargsÚ	__class__s   &&,€r   r   ÚEndpointRule.__init__¼  s   ø€ Ü‰ÒÑ"˜6Ò"Ø Žr   c                ó  € V P                  W4      '       do   VP                  V P                  R,          V4      pV P                  V P                  P	                  R/ 4      VV4      pV P                  W4      p\        W4VR7      # R# )zmDetermine if conditions are met to provide a valid endpoint.

:type scope_vars: dict
:rtype: RuleSetEndpoint
rð   rñ   )rð   rñ   rò   N)rê   rC   rü   Úresolve_propertiesrB   Úresolve_headersrí   )r   r6   ræ   rð   rñ   rò   s   &&&   r   rç   ÚEndpointRule.evaluateÀ  sƒ   € ð ×#Ñ# J×9Ò9Ø×(Ñ(¨¯©°uÕ)=¸zÓJˆCØ×0Ñ0Ø—‘×!Ñ! ,°Ó3ØØóˆJð
 ×*Ñ*¨:Ó@ˆGÜ"Ø¸ôð ñ r   c           
     óp  € \        V\        4      '       d#   V Uu. uF  pV P                  WBV4      NK  	  up# \        V\        4      '       d5   VP	                  4        UUu/ uF  w  rVWPP                  WbV4      bK  	  upp# VP                  V4      '       d   VP                  W4      # V# u upi u uppi )z­Traverse `properties` attribute, resolving any template strings.

:type properties: dict/list/str
:type scope_vars: dict
:type rule_lib: RuleSetStandardLibrary
:rtype: dict
)r   Úlistr  r    Úitemsr-   r>   )r   rñ   r6   ræ   ÚpropÚkeyr5   s   &&&&   r   r  ÚEndpointRule.resolve_propertiesÔ  sÀ   € ô �j¤$×'Ò'ñ 'óá&�Dð ×'Ñ'¨¸(ÖCÙ&ñð ô ˜
¤D×)Ò)ð #-×"2Ñ"2Ô"4ôá"4‘J�Cð ×,Ñ,¨UÀÓIÒIÙ"4òð ð ×!Ñ! *×-Ò-Ø×3Ñ3°JÓKÐKàÐùòùó
s   ›B-Á"B2c                óÂ   € / pV P                   P                  R/ 4      pVP                  4        F'  w  rVV Uu. uF  qrP                  Wq4      NK  	  upW5&   K)  	  V# u upi )z„Iterate through headers attribute resolving all values.

:type scope_vars: dict
:type rule_lib: RuleSetStandardLibrary
:rtype: dict
rò   )rü   rB   r  rC   )r   r6   ræ   Úresolved_headersrò   ÚheaderÚvaluesÚitems   &&&     r   r  ÚEndpointRule.resolve_headersë  se   € ð ÐØ—-‘-×#Ñ# I¨rÓ2ˆà%Ÿm™mžo‰NˆFáEKó(ÙEK¸T×&Ñ& tÖ8ÁVñ(ÐÓ$ñ .ð  Ðùò(s   ¸A)rü   )rÔ   rÕ   rÖ   r×   r   rç   r  r  rÙ   rÚ   Ú__classcell__©rþ   rÜ   s   @@r   rø   rø   »  s   ù‡ € õ!òò(÷. ò  r   rø   c                   ó8   a a€ ] tR tRt oV 3R ltR tRtVtV ;t# )Ú	ErrorRuleiü  c                ó4   <€ \         SV `  ! R/ VB  Wn        R # rú   )rû   r   Úerror)r   r  rý   rþ   s   &&,€r   r   ÚErrorRule.__init__ý  s   ø€ Ü‰ÒÑ"˜6Ò"ØŽ
r   c                ó„   € V P                  W4      '       d)   VP                  V P                  V4      p\        VR7      hR# )z›If an error rule's conditions are met, raise an error rule.

:type scope_vars: dict
:type rule_lib: RuleSetStandardLibrary
:rtype: EndpointResolutionError
rO   N)rê   rC   r  r	   )r   r6   ræ   r  s   &&& r   rç   ÚErrorRule.evaluate  s9   € ð ×#Ñ# J×9Ò9Ø×*Ñ*¨4¯:©:°zÓBˆEÜ)¨eÔ4Ð4Ùr   )r  )	rÔ   rÕ   rÖ   r×   r   rç   rÙ   rÚ   r  r  s   @@r   r  r  ü  s   ù‡ € õ÷
ò 
r   r  c                   ó<   a a€ ] tR tRt oRtV 3R ltR tRtVtV ;t	# )ÚTreeRulei  z”A tree rule is non-terminal meaning it will never be returned to a provider.
Additionally this means it has no attributes that need to be resolved.
c                óˆ   <€ \         SV `  ! R/ VB  V Uu. uF  p\        P                  ! R/ VB NK  	  upV n        R # u upi rú   )rû   r   ÚRuleCreatorÚcreateÚrules)r   r  rý   Úrulerþ   s   &&, €r   r   ÚTreeRule.__init__  s:   ø€ Ü‰ÒÑ"˜6Ò"Ù=BÓC¹U°T”k×(Ò(Ñ0¨4Ô0¹UÑCˆŽ
ùÒCs   –?c                ó²   € V P                  W4      '       d@   V P                   F/  pVP                  VP                  4       V4      pV'       g   K-  Vu # 	  R# )zÉIf a tree rule's conditions are met, iterate its sub-rules
and return first result found.

:type scope_vars: dict
:type rule_lib: RuleSetStandardLibrary
:rtype: RuleSetEndpoint/EndpointResolutionError
N)rê   r  rç   Úcopy)r   r6   ræ   r  Úrule_results   &&&  r   rç   ÚTreeRule.evaluate  sJ   € ð ×#Ñ# J×9Ò9ØŸ
œ
�à"Ÿm™m¨J¯O©OÓ,=¸xÓH�ß‘;Ø&Ò&ñ	 #ñ
 r   )r  )
rÔ   rÕ   rÖ   r×   rØ   r   rç   rÙ   rÚ   r  r  s   @@r   r  r    s   ù‡ € ñõD÷ò r   r  c                   ó<   a € ] tR tRt o ]t]t]t	]
R 4       tRtV tR# )r  i(  c                óŠ   € VP                  R4      p \        W4      pV! R/ VB #   \         d    \        RT R2R7      hi ; i)zOCreate a rule instance from metadata.

:rtype: TreeRule/EndpointRule/ErrorRule
r    zUnknown rule type: z1. A rule must be of type tree, endpoint or error.rO   rY   )rˆ   rQ   ÚAttributeErrorr	   )Úclsrý   Ú	rule_typeÚ
rule_classs   &,  r   r  ÚRuleCreator.create-  s`   € ð —J‘J˜vÓ&ˆ	ð	(Ü  Ó0ˆJñ Ñ' Ñ'Ð'øô ô 	Ü)Ø)¨)¨ð 56ð 6ôð ð	ús	   “& ¦ArY   N)rÔ   rÕ   rÖ   r×   rø   rü   r  r  r  ÚtreeÚclassmethodr  rÙ   rÚ   rÛ   s   @r   r  r  (  s&   ø‡ € Ø€HØ€EØ€Dàñ(ó ö(r   r  c                   ó&   € ] tR tRtRt]t]t]	t
RtR# )ÚParameterTypei?  z8Translation from `type` attribute to native Python type.rY   N)rÔ   rÕ   rÖ   r×   rØ   r*   Ústringr»   ÚbooleanÚtupleÚstringarrayrÙ   rY   r   r   r/  r/  ?  s   † ÙBà€FØ€GØ„Kr   r/  c                   ó:   a € ] tR tRt o RtRR ltR tR tRtV t	R# )	ÚParameterDefinitioniG  z9The spec of an individual parameter defined in a RuleSet.Nc                óè   € Wn          \        \        VP                  4       4      P                  V n        Y0n        Y@n	        YPn
        Y`n        Ypn        R#   \         d    \        R T R2R7      hi ; i)zUnknown parameter type: z>. A parameter must be of type string, boolean, or stringarray.rO   N)re   rQ   r/  rÑ   r5   Úparameter_typer'  r	   râ   ÚbuiltinÚdefaultÚrequiredÚ
deprecated)r   re   r7  râ   ÚbuiltInr9  r:  r;  s   &&&&&&&&r   r   ÚParameterDefinition.__init__J  s   € ð Œ	ð	Ü")Ü˜~×3Ñ3Ó5ó#ç‰eð Ôð +ÔØŒØŒØ ŒØ$Žøô ô 	Ü)Ø.¨~Ð.>ð ?Oð Oôð ð	ús   ˆ-A ÁA1c                ó¬  € \        WP                  4      '       g(   \        RV P                   RV P                   R2R7      hV P                  e„   V P                   R2pV P                  P                  R4      pV P                  P                  R4      pV'       d   VR	V 2,          pV'       d   VR
V R2,          p\        P                  V4       R# )z_Perform base validation on parameter input.

:type value: Any
:raises: EndpointParametersError
zValue (z) is the wrong type. Must be rG   rO   Nz has been deprecated.ÚmessageÚsinceÚ
z
Deprecated since )r   r7  r	   re   r;  rB   ÚloggerÚinfo)r   r5   Údepr_strrP   r@  s   &&   r   Úvalidate_inputÚ"ParameterDefinition.validate_inputd  sÃ   € ô ˜%×!4Ñ!4×5Ò5Ü)Ø˜dŸi™i˜[ð )!Ø!%×!4Ñ!4Ð 5°Qð8ôð ð �?‰?Ò&ØŸ)™)˜Ð$9Ð:ˆHØ—/‘/×%Ñ% iÓ0ˆCØ—O‘O×'Ñ'¨Ó0ˆEßØ˜b  ˜JÕ&�ßØÐ1°%°¸Ð:Õ:�Ü�K‰K˜Ô!ár   c                óÀ   € VfI   V P                   e   V P                   # V P                  '       d   \        RV P                   2R7      h V# V P	                  V4       V# )z>Process input against spec, applying default if value is None.z)Cannot find value for required parameter rO   )r9  r:  r	   re   rE  rZ   s   &&r   Úprocess_inputÚ!ParameterDefinition.process_input|  s`   € àŠ=Ø�|‰|Ò'Ø—|‘|Ð#Ø�}�}ˆ}Ü-ØCÀDÇIÁIÀ;ÐOôð ð ð ˆð ×Ñ Ô&Øˆr   )r8  r9  r;  râ   re   r7  r:  )NNNNN)
rÔ   rÕ   rÖ   r×   rØ   r   rE  rH  rÙ   rÚ   rÛ   s   @r   r5  r5  G  s   ø‡ € ÙCô%ò4÷0ð r   r5  c                   ó@   a € ] tR tRt o RtR	R ltR tR tR tRt	V t
R# )
ÚRuleSeti‹  z:Collection of rules to derive a routable service endpoint.Nc                óÊ   € Wn         V P                  V4      V n        V Uu. uF  p\        P                  ! R/ VB NK  	  upV n        \        V4      V n        WPn        R # u upi rú   )	ÚversionÚ_ingest_parameter_specÚ
parametersr  r  r  r   ræ   râ   )r   rM  rO  r  ry   râ   r  s   &&&&&& r   r   ÚRuleSet.__init__Ž  sW   € ð ŒØ×5Ñ5°jÓAˆŒÙ=BÓC¹U°T”k×(Ò(Ñ0¨4Ô0¹UÑCˆŒ
Ü.¨zÓ:ˆŒØ*Öùò Ds   ¡A c                ó  € VP                  4        UUu/ uFi  w  r#V\        VVR ,          VP                  R4      VP                  R4      VP                  R4      VP                  R4      VP                  R4      4      bKk  	  upp# u uppi )r    râ   r<  r9  r:  r;  )r  r5  rB   )r   rO  re   Úspecs   &&  r   rN  ÚRuleSet._ingest_parameter_spec—  s‹   € ð )×.Ñ.Ô0ô
ñ 1‘
�ð Ô%ØØ�V•Ø—‘˜Ó)Ø—‘˜Ó#Ø—‘˜Ó#Ø—‘˜Ó$Ø—‘˜Ó&óò ñ 1ò
ð 	
ùó 
s   ”A/Bc                ó    € V P                   P                  4        F/  w  r#VP                  VP                  V4      4      pVf   K+  WAV&   K1  	  R# )zIProcess each input parameter against its spec.

:type input_params: dict
N)rO  r  rH  rB   )r   Úinput_paramsre   rR  r5   s   &&   r   Úprocess_input_parametersÚ RuleSet.process_input_parameters¥  sK   € ð
 Ÿ/™/×/Ñ/Ö1‰JˆDØ×&Ñ& |×'7Ñ'7¸Ó'=Ó>ˆEØÔ Ø%*˜TÓ"ñ 2ñ r   c                ó²   € V P                  V4       V P                   F5  pVP                  VP                  4       V P                  4      pVf   K3  Vu # 	  R# )z]Evaluate input parameters against rules returning first match.

:type input_parameters: dict
N)rV  r  rç   r"  ræ   )r   Úinput_parametersr  Ú
evaluations   &&  r   rç   ÚRuleSet.evaluate°  sP   € ð
 	×%Ñ%Ð&6Ô7Ø—J”JˆDØŸ™Ð'7×'<Ñ'<Ó'>ÀÇÁÓNˆJØÔ%Ø!Ò!ñ ñ r   )râ   rO  ræ   r  rM  r   )rÔ   rÕ   rÖ   r×   rØ   r   rN  rV  rç   rÙ   rÚ   rÛ   s   @r   rK  rK  ‹  s!   ø‡ € ÙDô+ò
ò	÷
ð 
r   rK  c                   óH   a € ] tR tRt o RtR t]! ]R7      R 4       tRt	V t
R# )ÚEndpointProvideri½  z<Derives endpoints from a RuleSet for given input parameters.c                ó.   € \        R/ VBR V/B V n        R# )ry   NrY   )rK  Úruleset)r   Úruleset_dataÚpartition_datas   &&&r   r   ÚEndpointProvider.__init__À  s   € ÜÑI ÑI¸.ÒIˆŽr   )Úmaxsizec           	     óþ   € VP                  4       pV P                  P                  V4      pVfH   RP                  VP	                  4        UUu. uF  w  rEV RV 2NK  	  upp4      p\        RV 2R7      hV# u uppi )zXMatch input parameters to a rule.

:type input_parameters: dict
:rtype: RuleSetEndpoint
rA  z: z"No endpoint found for parameters:
rO   )r"  r_  rç   Újoinr  r	   )r   rY  Úparams_for_errorrü   r  r5   Úparam_strings   &,     r   Úresolve_endpointÚ!EndpointProvider.resolve_endpointÃ  sŒ   € ð ,×0Ñ0Ó2ÐØ—<‘<×(Ñ(Ð)9Ó:ˆØÒØŸ9™9Ø5E×5KÑ5KÔ5MÔNÑ5M¡z s�C�5˜˜5˜'Ó"Ñ5MÒNóˆLô *Ø9¸,¸ÐHôð ð ˆùó Os   ÁA9
)r_  N)rÔ   rÕ   rÖ   r×   rØ   r   r   Ú
CACHE_SIZErh  rÙ   rÚ   rÛ   s   @r   r]  r]  ½  s'   ø‡ € ÙFòJñ ˜zÔ*ñó +ör   r]  )/rØ   Úloggingrs   Úenumr   r0  r   Útypingr   Úbotocorer   Úbotocore.compatr   r   r   Úbotocore.exceptionsr	   Úbotocore.utilsr
   r   r   r   r   r   r   Ú	getLoggerrÔ   rB  Úcompiler+   r^   r”   rj  r…   r2   r   ÚRuleSetStandardLibaryrÞ   rí   rø   r  r  r  r/  r5  rK  r]  rY   r   r   Ú<module>ru     s  ðñó Û 	Ý Ý Ý å ß 4Ñ 4Ý 7÷÷ ñ ð 
×	Ò	˜8Ó	$€à—Z’ZÐ 1Ó2Ð Ø�jŠjÐ*Ó+€Ø—j’jØ%óÐ ð €
Ù‹[€
Ù“;Ð ÷]
ñ ]
ðD /Ð ÷ñ ô0�jô ô> �8ô > ôB�ô ô$ˆxô ÷4(ñ (ô.�Dô ÷Añ A÷H/ñ /÷dó r   