Ë
    ?—Öj|  ã                  óX  — d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z
 ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZmZ  G d„ de«      Z G d„ dee«      Z G d„ de
e«      Z	 G d„ dee«      Z G d„ dee«      Z G d„ de«      Z G d„ de«      Z G d„ de«      Zy)a£  
This module provides a facade over the `botocore.model` module.

It defines custom shape and service model classes that extend Botocore's
classes to add additional functionality and properties specific to Moto.

Because Botocore's shape classes are not designed for subclassing, this module
redefines the class hierarchy to ensure that all shape classes inherit from
both the relevant Botocore shape class as well as a new Moto base class.
This allows us to add common functionality to all shape types while still
retaining the original behavior of the Botocore classes without monkey-patching.

This module also defines a modified ShapeResolver to ensure that all shapes created
through the resolver are instances of our custom classes.

Any Moto code that needs to interact with Botocore's model classes should do so
through this facade to avoid direct dependencies on Botocore's internal structure,
which may change over time.
é    )Úannotations)ÚMapping)ÚAnyÚcast)Ú	ListShape)ÚMapShape)ÚOperationModel)ÚServiceModel)ÚShape)ÚShapeResolver)ÚStringShape)ÚStructureShape)ÚCachedPropertyÚinstance_cachec                  ón   — e Zd ZU ej                  dgz   Zded<   edd„«       Zedd„«       Zedd„«       Z	y)	r   Ú!locationNameForQueryCompatibilityúdict[str, Any]Úserializationc                ó:   — | j                   j                  dd«      S )NÚ	flattenedF©r   Úget©Úselfs    úL/var/www/photos/backend/venv/lib/python3.12/site-packages/moto/core/model.pyÚis_flattenedzShape.is_flattened-   s   € à×!Ñ!×%Ñ% k°5Ó9Ð9ó    c                ó<   — | j                   j                  d«      dv S )NÚlocation)ÚheaderÚheadersr   r   s    r   Úis_http_header_traitzShape.is_http_header_trait1   s   € à×!Ñ!×%Ñ% jÓ1Ð5JÐJÐJr   c                ó   — d| j                   v S )Nr   )r   r   s    r   Úis_not_bound_to_bodyzShape.is_not_bound_to_body5   s   € à˜T×/Ñ/Ð/Ð/r   N©ÚreturnÚbool)
Ú__name__Ú
__module__Ú__qualname__ÚBotocoreShapeÚSERIALIZED_ATTRSÚ__annotations__Úpropertyr   r"   r$   © r   r   r   r   %   s_   … à$×5Ñ5Ø+ð9ñ Ðð "Ó!àò:ó ð:ð òKó ðKð ò0ó ñ0r   r   c                  ó   — e Zd Zy)r   N©r(   r)   r*   r/   r   r   r   r   :   ó   „ Ør   r   c                  ó   — e Zd Zy)r   Nr1   r/   r   r   r   r   >   r2   r   r   c                  ó   — e Zd Zy)r   Nr1   r/   r   r   r   r   B   r2   r   r   c                  ó<   ‡ — e Zd Zedˆ fd„«       Zedd„«       Zˆ xZS )r   c                óN   •— t        t        t        t        f   t        ‰| �  «      S ©N)r   ÚdictÚstrr   ÚsuperÚmembers)r   Ú	__class__s    €r   r;   zStructureShape.membersG   s   ø€ ä”Dœœe˜Ñ$¤e¡g¡oÓ6Ð6r   c                óž   — | j                   j                  dd«      sg S | j                   j                  di «      }|j                  dg «      }|S )NÚ	exceptionFÚerrorÚcodeAliases)Úmetadatar   )r   Úerror_metadataÚaliasess      r   Úerror_code_aliasesz!StructureShape.error_code_aliasesK   sH   € à�}‰}× Ñ  ¨eÔ4ØˆIØŸ™×*Ñ*¨7°BÓ7ˆØ ×$Ñ$ ]°BÓ7ˆØˆr   )r&   zdict[str, Shape])r&   z	list[str])r(   r)   r*   r   r;   rD   Ú__classcell__©r<   s   @r   r   r   F   s)   ø„ Øô7ó ð7ð òó ôr   r   c                  óR   ‡ — e Zd Z	 d	 	 	 dˆ fd„Zedˆ fd„«       Zedd„«       Zˆ xZS )r
   c                óf   •— t         ‰| �  ||«       t        |j                  di «      «      | _        y )NÚshapes)r:   Ú__init__r   r   Ú_shape_resolver)r   Úservice_descriptionÚservice_namer<   s      €r   rJ   zServiceModel.__init__U   s0   ø€ ô 	‰ÑÐ,¨lÔ;ä,Ð-@×-DÑ-DÀXÈrÓ-RÓSˆÕr   c                óV   •— t         ‰| �  |«      }t        |di «      }t        || |«      S )NÚ_operation_model)r:   Úoperation_modelÚgetattrr	   )r   Úoperation_namerP   Úmodelr<   s       €r   rP   zServiceModel.operation_model\   s0   ø€ ä™'Ñ1°.ÓAˆÜ˜Ð);¸RÓ@ˆÜ˜e T¨>Ó:Ð:r   c                ó   — d| j                   v S )NÚawsQueryCompatible)rA   r   s    r   Úis_query_compatiblez ServiceModel.is_query_compatibleb   s   € à# t§}¡}Ð4Ð4r   r7   )rL   zMapping[str, Any]rM   z
str | None)rR   r9   r&   r	   r%   )	r(   r)   r*   rJ   r   rP   r   rV   rE   rF   s   @r   r
   r
   T   sF   ø„ àQUðTØ#4ðTØDNõTð ô;ó ð;ð
 ò5ó ô5r   r
   c                  ó4   — e Zd ZU ded<   ded<   edd„«       Zy)r	   r   rO   r
   Ú_service_modelc                ó   — | j                   S r7   )rX   r   s    r   Úservice_modelzOperationModel.service_modelk   s   € à×"Ñ"Ð"r   N)r&   r
   )r(   r)   r*   r-   r.   rZ   r/   r   r   r	   r	   g   s    … Ø$Ó$Ø Ó àò#ó ñ#r   r	   c                  ó<   ‡ — e Zd ZeeeedœZ	 d	 	 	 	 	 dˆ fd„Zˆ xZ	S )r   )Ú	structureÚlistÚmapÚstringc                óx   •— t         ‰| �  ||«      }t        |t        «      st        |t	        |di «      | «      }|S )NÚ_shape_model)r:   Úget_shape_by_nameÚ
isinstancer   rQ   )r   Ú
shape_nameÚmember_traitsÚshaper<   s       €r   rb   zShapeResolver.get_shape_by_namex   s>   ø€ ô ‘Ñ)¨*°mÓDˆô
 ˜%¤Ô'Ü˜*¤g¨e°^ÀRÓ&HÈ$ÓOˆEØˆr   r7   )rd   r9   re   zMapping[str, Any] | Noner&   r   )
r(   r)   r*   r   r   r   r   ÚSHAPE_CLASSESrb   rE   rF   s   @r   r   r   p   s?   ø„ à#ØØØñ	€Mð JNð
Øð
Ø.Fð
à	÷
ñ 
r   r   N)Ú__doc__Ú
__future__r   Úcollections.abcr   Útypingr   r   Úbotocore.modelr   ÚBotocoreListShaper   ÚBotocoreMapShaper	   ÚBotocoreOperationModelr
   ÚBotocoreServiceModelr   r+   r   ÚBotocoreShapeResolverr   ÚBotocoreStringShaper   ÚBotocoreStructureShapeÚbotocore.utilsr   r   r/   r   r   ú<module>ru      sŸ   ðñõ( #å #ß å 9Ý 7Ý CÝ ?Ý 1Ý AÝ =Ý Cß 9ô0ˆMô 0ô*	Ð% uô 	ô	Ð! 5ô 	ô	Ð ô 	ôÐ+¨Uô ô5Ð'ô 5ô&#Ð+ô #ôÐ)õ r   