+
     Ii[~  c                   s   R t ^ RIHt ^ RIHtHt ^ RIHt ^ RIH	t	 ^ RI
HtHtHt ^ RIHtHtHtHt ]! 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 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-# ).z-Abstractions to interact with service models.)defaultdict)
NamedTupleUnion)resolve_auth_type)OrderedDict)MissingServiceIdErrorUndefinedModelAttributeError UnsupportedServiceProtocolsError)$PRIORITY_ORDERED_SUPPORTED_PROTOCOLSCachedPropertyhyphenize_service_idinstance_cachec                   s    ] tR t^#tRtR# )NoShapeFoundError N__name__
__module____qualname____firstlineno____static_attributes__r       3/usr/lib/python3.14/site-packages/botocore/model.pyr   r   #       r   r   c                   s    ] tR t^'tRtR# )InvalidShapeErrorr   Nr   r   r   r   r   r   '   r   r   r   c                   s    ] tR t^+tRtR# )OperationNotFoundErrorr   Nr   r   r   r   r   r   +   r   r   r   c                   s    ] tR t^/tRtR# )InvalidShapeReferenceErrorr   Nr   r   r   r   r   r   /   r   r   r   c                   s&   a  ] tR t^3t o R tRtV tR# )	ServiceIdc                s    \        V 4      # N)r
   self   &r   	hyphenizeZServiceId.hyphenize4   s    #D))r   r   N)r   r   r   r   r   r   __classdictcell____classdict__   @r   r   r   3   s     * *r   r   c                   s   a  ] tR t^8t o Rt. ROt. ROt]tRR lt	]
R 4       t]
R 4       t]
R 4       tR tR t]R	 4       tR
tV tR# )Shapez3Object representing a shape from the service model.Nc                s    Wn         VR,          V n        VP                  RR4      V n        W n        Vf   \        4       pW0n        / V n        R# )a  

:type shape_name: string
:param shape_name: The name of the shape.

:type shape_model: dict
:param shape_model: The shape model.  This would be the value
    associated with the key in the "shapes" dict of the
    service model (i.e ``model['shapes'][shape_name]``)

:type shape_resolver: botocore.model.ShapeResolver
:param shape_resolver: A shape resolver object.  This is used to
    resolve references to other shapes.  For scalar shape types
    (string, integer, boolean, etc.), this argument is not
    required.  If a shape_resolver is not provided for a complex
    type, then a ``ValueError`` will be raised when an attempt
    to resolve a shape is made.

typedocumentation N)name	type_namegetr&   _shape_modelUnresolvableShapeMap_shape_resolver_cache)r   
shape_nameshape_modelshape_resolver   &&&&r   __init__ZShape.__init__f   sK    ( 	$V,(___bA'! 23N-r   c                s    V P                   p/ pV P                   F  pW0P                   9   g   K  W,          W#&   K!  	  RV9   d   VP                  R4      VR&   V# )a  Serialization information about the shape.

This contains information that may be needed for input serialization
or response parsing.  This can include:

    * name
    * queryName
    * flattened
    * location
    * payload
    * streaming
    * xmlNamespace
    * resultWrapper
    * xmlAttribute
    * jsonvalue
    * timestampFormat

:rtype: dict
:return: Serialization information about the shape.

locationNamer(   )r+   SERIALIZED_ATTRSpop)r   modelserializationattr   &   r   r8   ZShape.serialization   s_    . !!))D(((&+k# * ]*$1$5$5n$EM&!r   c                s    V P                   p/ pV P                   F  pW0P                   9   g   K  W,          W#&   K!  	  V# )aM  Metadata about the shape.

This requires optional information about the shape, including:

    * min
    * max
    * pattern
    * enum
    * sensitive
    * required
    * idempotencyToken
    * document
    * union
    * contextParam
    * clientContextParams
    * requiresLength

:rtype: dict
:return: Metadata about the shape.

)r+   METADATA_ATTRS)r   r7   metadatar9   r:   r   r<   ZShape.metadata   s@    . !!''D(((!& ( r   c                s:    V P                   P                  R. 4      # )zA list of members that are required.

A structure shape can define members that are required.
This value will return a list of required members.  If there
are no required members an empty list is returned.

requiredr<   r*   r   r   r   required_membersZShape.required_members   s     }}  R00r   c                8    V P                   P                  V4      # r   r-   resolve_shape_refr   	shape_ref   &&r   _resolve_shape_refZShape._resolve_shape_ref       ##55i@@r   c                sP    R V P                   P                   RV P                   R2# )Z<(z)>	__class__r   r(   r   r   r   __repr__ZShape.__repr__   s&    4>>**+1TYYKr::r   c                s    R # r   r   r   r   r   event_stream_nameZShape.event_stream_name   s    r   )r.   r+   r-   r&   r(   r)   )r4   Z	queryNameZ	flattenedZlocationpayloadZ	streamingtimestampFormatZxmlNamespaceZresultWrapperZxmlAttributeeventstreamZeventZeventheaderZeventpayloadZ	jsonvaluerN   Z	hostLabel)r=   ZminZmaxZpatternZ	sensitiveenumidempotencyTokenerror	exceptionZendpointdiscoveryidZ	retryabledocumentunioncontextParamclientContextParamsZrequiresLengthr   )r   r   r   r   __doc__r5   r;   r   MAP_TYPEr3   r	   r8   r<   r?   rF   rK   propertyrL   r   r    r!   r#   r   r$   r$   8   s     =&N$ H D  @  : 1 1A;  r   r$   c                   sp   a  ] tR t^t o ]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t	Rt
V tR# )StructureShapec                s    V P                   P                  R V P                  4       4      pV P                  4       pVP                  4        F  w  r4V P	                  V4      W#&   K  	  V# )members)r+   r*   rY   itemsrF   )r   r\   Zshape_membersr(   rD   s   &    r   r\   ZStructureShape.members   sX    ##''	4==?C &}}OD"&"9"9)"DM  /r   c                s    V P                   P                  4        F*  w  rVP                  P                  R 4      '       g   K(  Vu # 	  R# )rO   N)r\   r]   r8   r*   )r   member_namemember   &  r   rL   Z StructureShape.event_stream_name   s>    #'<<#5#5#7K##''66"" $8 r   c                s    V P                   P                  R R4      '       g   R# V P                   P                  R/ 4      pVP                  R4      pV'       d   V# V P                  # )rS   FNrR   code)r<   r*   r(   )r   Zerror_metadatara   r`   r   
error_codeZStructureShape.error_code   sT    }}  e44**7B7!!&)Kyyr   c                :    V P                   P                  R R4      # )rT   Fr>   r   r   r   is_document_typeZStructureShape.is_document_type   s    }}  U33r   c                rc   )rU   Fr>   r   r   r   is_tagged_unionZStructureShape.is_tagged_union  s    }}  %00r   r   N)r   r   r   r   r	   r\   rL   rb   rd   re   r   r    r!   r#   r   r[   r[      sg           4 4 1 1r   r[   c                   0   a  ] tR tRt o ]R 4       tRtV tR# )	ListShapei  c                F    V P                  V P                  R ,          4      # )r_   rF   r+   r   r   r   r_   ZListShape.member  s    &&t'8'8'BCCr   r   N)r   r   r   r   r	   r_   r   r    r!   r#   r   rg   rg     s     D Dr   rg   c                   s@   a  ] tR tRt o ]R 4       t]R 4       tRtV tR# )MapShapei  c                rh   )keyri   r   r   r   rk   ZMapShape.key  s    &&t'8'8'?@@r   c                rh   )valueri   r   r   r   rl   ZMapShape.value  s    &&t'8'8'ABBr   r   N)	r   r   r   r   r	   rk   rl   r   r    r!   r#   r   rj   rj     s/     A A C Cr   rj   c                   rf   )StringShapei  c                :    V P                   P                  R . 4      # )rP   r>   r   r   r   rP   ZStringShape.enum  s    }}  ,,r   r   N)r   r   r   r   r	   rP   r   r    r!   r#   r   rm   rm     s     - -r   rm   c                   ,   a  ] tR tRt o V 3R ltRtV tR# )StaticContextParameteri  c                sH   < V ^8  d   Qh/ S[ ;R&   S[S[S[ 3,          ;R&   # )   r(   rl   )strr   ZboolZformatr"      "r   __annotate__Z#StaticContextParameter.__annotate__  s#     
I s r   r   Nr   r   r   r   Z__annotate_func__r   r    r!   r#   r   rp   rp           r   rp   c                   ro   )ContextParameteri"  c                s2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )rq   r(   r^   rr   rs   rt   r   ru   ZContextParameter.__annotate__"  s     
I  r   r   Nrv   r!   r#   r   rx   rx   "  rw   r   rx   c                   ro   )ClientContextParameteri'  c                s>   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   # )rq   r(   r%   r&   ry   rs   rt   r   ru   Z#ClientContextParameter.__annotate__'  s&     
I 
I   r   r   Nrv   r!   r#   r   rz   rz   '  rw   r   rz   c                   s  a  ] tR tRt o RtRR ltRR ltR t]R 4       t	R t
]R	 4       t]R
 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tR t]R 4       t]P>                  R 4       t]R 4       t R t!Rt"V t#R# ) ServiceModeli-  zI

:ivar service_description: The parsed service description dictionary.

Nc                s    Wn         VP                  R/ 4      V n        \        VP                  R/ 4      4      V n        \
        V n        W n        / V n        R# )a  

:type service_description: dict
:param service_description: The service description model.  This value
    is obtained from a botocore.loader.Loader, or from directly loading
    the file yourself::

        service_description = json.load(
            open('/path/to/service-description-model.json'))
        model = ServiceModel(service_description)

:type service_name: str
:param service_name: The name of the service.  Normally this is
    the endpoint prefix defined in the service_description.  However,
    you can override this value to provide a more convenient name.
    This is done in a few places in botocore (ses instead of email,
    emr instead of elasticmapreduce).  If this value is not provided,
    it will default to the endpointPrefix defined in the model.

r<   shapesN)	_service_descriptionr*   r<   ShapeResolverr-   NOT_SET_signature_version_service_name_instance_cache)r   Zservice_descriptionservice_name   &&&r   r3   ZServiceModel.__init__4  sS    * %8!+//
B?,##Hb1 
 #*)!r   c                s8    V P                   P                  W4      # r   )r-   get_shape_by_namer   r/   member_traitsr   r   	shape_forZServiceModel.shape_forS  s    ##55
 	
r   c                s:    V P                   P                  VR 4      # r   )_error_code_cacher*   )r   rb   rE   r   shape_for_error_codeZ!ServiceModel.shape_for_error_codeX  s    %%))*d;;r   c                sP    / pV P                    F  pVP                  pW!V&   K  	  V# r   )error_shapesrb   )r   Zerror_code_cacheerror_shapera   r:   r   r   ZServiceModel._error_code_cache[  s3    ,,K))D%0T" -  r   c                r@   r   rA   rC   rE   r   rB   ZServiceModel.resolve_shape_refc  rG   r   c                sL    \        V P                  P                  R / 4      4      # )r|   listr}   r*   r   r   r   shape_namesZServiceModel.shape_namesf  s     D--11(B?@@r   c                s    . pV P                    FI  pV P                  V4      pVP                  P                  R R4      '       g   K8  VP	                  V4       KK  	  V# )rS   F)r   r   r<   r*   Zappend)r   r   r/   r   r:   r   r   ZServiceModel.error_shapesj  sT    **J..4K##''U;;##K0 + r   c                s     V P                   R ,          V,          p\        Y T4      #   \         d    \        T4      hi ; iZ
operations)r}   KeyErrorr   OperationModel)r   Zoperation_namer7      && r   operation_modelZServiceModel.operation_models  sG    	9--l;NKE e>::  	9(88	9s   ( ?c                rc   r&   r'   )r}   r*   r   r   r   r&   ZServiceModel.documentation{  s    ((,,_bAAr   c                sL    \        V P                  P                  R . 4      4      # r   r   r   r   r   operation_namesZServiceModel.operation_names  s     D--11,CDDr   c                N    V P                   e   V P                   # V P                  # )as  The name of the service.

This defaults to the endpointPrefix defined in the service model.
However, this value can be overriden when a ``ServiceModel`` is
created.  If a service_name was not provided when the ``ServiceModel``
was created and if there is no endpointPrefix defined in the
service model, then an ``UndefinedModelAttributeError`` exception
will be raised.

)r   endpoint_prefixr   r   r   r   ZServiceModel.service_name  s(     )%%%'''r   c                s     \        V P                  R 4      4      #   \         d    \        T P                  R7      hi ; i)Z	serviceId)r   )r   _get_metadata_propertyr   r   r   r   r   r   
service_idZServiceModel.service_id  s@    	IT88EFF+ 	I'T5G5GHH	Is    ">c                s\    V P                   P                  R4      pVf   V P                  pV# )zThe name to use when computing signatures.

If the model does not define a signing name, this
value will be the endpoint prefix defined in the model.
ZsigningName)r<   r*   r   )r   signing_name   & r   r   ZServiceModel.signing_name  s/     }}((7//Lr   c                $    V P                  R 4      # )Z
apiVersionr   r   r   r   api_versionZServiceModel.api_version  s    **<88r   c                r   )protocolr   r   r   r   r   ZServiceModel.protocol  s    **:66r   c                r   )	protocolsr   r   r   r   r   ZServiceModel.protocols  s    **;77r   c                s    V P                   P                  R 4      '       dH   \         F  pWP                  9   g   K  Vu # 	  \	        \        V P                  V P
                  R7      hV P                  # )r   )Zbotocore_supported_protocolsZservice_supported_protocolsZservice)r<   r*   r   r   r   r   r   )r   r   r   r   resolved_protocolZServiceModel.resolved_protocol  sa    
 ==[))@~~-#O A 3-Q,0NN))  }}r   c                r   )ZendpointPrefixr   r   r   r   r   ZServiceModel.endpoint_prefix  s    **+;<<r   c                sz    V P                    F*  pV P                  V4      pVP                  '       g   K(  Vu # 	  R # r   )r   r   is_endpoint_discovery_operationr   Z	operationr7   r`   r   endpoint_discovery_operationZ)ServiceModel.endpoint_discovery_operation  s3    --I((3E444 .r   c                s    V P                    FH  pV P                  V4      pVP                  f   K$  VP                  P                  R4      '       g   KG   R# 	  R# )Nr=   TF)r   r   endpoint_discoveryr*   r   r`   r   endpoint_discovery_requiredZ(ServiceModel.endpoint_discovery_required  sM    --I((3E((4,,00<< . r   c           
     s    V P                   P                  R / 4      pVP                  4        UUu. uF!  w  r#\        VVR,          VR,          R7      NK#  	  upp# u uppi )rW   r%   r&   )r(   r%   r&   )r}   r*   r]   rz   )r   paramsZ
param_nameZ	param_valr:   r   client_context_parametersZ&ServiceModel.client_context_parameters  sg    **../DbI *0
 *8%
 #v&'8
 *8
 	
 
s   'Ac                sj     V P                   V,          #   \         d    \        R T RT  24      hi ; i)Z"z," not defined in the metadata of the model: )r<   r   r   r   r(   rE   r   r   Z#ServiceModel._get_metadata_property  sC    	==&& 	.D6EdVL 	s    2c                s    V P                   \        J d"   V P                  P                  R 4      pWn         V P                   # )ZsignatureVersion)r   r   r<   r*   )r   signature_versionr   r   r   ServiceModel.signature_version  s8    ""g- $ 1 12D E&7#&&&r   c                s    Wn         R # r   )r   )r   rl   rE   r   r   r     s    "'r   c                s     R V P                   9   # )ZawsQueryCompatible)r<   r   r   r   is_query_compatibleZ ServiceModel.is_query_compatible  s    #t}}44r   c                N    V P                   P                   R V P                   R2# )rH   ))rJ   r   r   r   r   r   rK   ZServiceModel.__repr__  s'    ..))*!D,=,=+>a@@r   )r   r}   r   r-   r   r<   r   )$r   r   r   r   rX   r3   r   r   r	   r   rB   r   r   r   r   r&   r   r   r   r   r   r   r   r   r   r   r   r   r   rZ   r   Zsetterr   rK   r   r    r!   r#   r   r{   r{   -  s    ">

<    A A A   ; ; B B E E ( (  I I 	 	 9 9 7 7 8 8  " = =     	
 	
 ' ' ( ( 5 5A Ar   r{   c                   s  a  ] tR tRt o R&R lt]R 4       t]R 4       t]R 4       t	]R 4       t
]R 4       t]R	 4       t]R
 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       t]R 4       tR tR t R t!]R 4       t"]R  4       t#R! t$R" t%R# t&R$ t'R%t(V t)R# )'r   i  Nc                s    Wn         W n        W0n        VP                  R4      V n        VP
                  V n        VP                  R/ 4      V n        R# )a  

:type operation_model: dict
:param operation_model: The operation model.  This comes from the
    service model, and is the value associated with the operation
    name in the service model (i.e ``model['operations'][op_name]``).

:type service_model: botocore.model.ServiceModel
:param service_model: The service model associated with the operation.

:type name: string
:param name: The operation name.  This is the operation name exposed to
    the users of this model.  This can potentially be different from
    the "wire_name", which is the operation name that *must* by
    provided over the wire.  For example, given::

       "CreateCloudFrontOriginAccessIdentity":{
         "name":"CreateCloudFrontOriginAccessIdentity2014_11_06",
          ...
      }

   The ``name`` would be ``CreateCloudFrontOriginAccessIdentity``,
   but the ``self.wire_name`` would be
   ``CreateCloudFrontOriginAccessIdentity2014_11_06``, which is the
   value we must send in the corresponding HTTP request.

r(   httpN)_operation_model_service_model	_api_namer*   
_wire_namer<   r   )r   r   service_modelr(   r2   r   r3   ZOperationModel.__init__  sJ    8 !0+ *--f5%..#''3	r   c                r   r   )r   	wire_namer   r   r   r(   ZOperationModel.name+  s     >>%>>!>>!r   c                s8    V P                   P                  R4      # )a"  The wire name of the operation.

In many situations this is the same value as the
``name``, value, but in some services, the operation name
exposed to the user is different from the operation name
we send across the wire (e.g cloudfront).

Any serialization code should use ``wire_name``.

r(   r   r*   r   r   r   r   ZOperationModel.wire_name2  s     $$((00r   c                s    V P                   # r   )r   r   r   r   r   ZOperationModel.service_model@  s    """r   c                rc   r   r   r   r   r   r&   ZOperationModel.documentationD  s    $$(("==r   c                rc   )
deprecatedFr   r   r   r   r   ZOperationModel.deprecatedH  s    $$((u==r   c                rc   )ZendpointdiscoveryNr   r   r   r   r   Z!OperationModel.endpoint_discoveryL  s     $$(()<dCCr   c                rc   )ZendpointoperationFr   r   r   r   r   Z.OperationModel.is_endpoint_discovery_operationR  s    $$(()<eDDr   c                    R V P                   9  d   R# V P                  P                  V P                   R ,          4      # )ZinputNr   r   rB   r   r   r   input_shapeZOperationModel.input_shapeV  s<    $/// ""44!!'*
 	
r   c                r   )ZoutputNr   r   r   r   output_shapeZOperationModel.output_shape`  s<    4000 ""44!!(+
 	
r   c                s    V P                   pV'       g   . # VP                  P                  4        UUu. uF5  w  r#R VP                  9   g   K  VP                  R ,          '       g   K3  VNK7  	  upp# u uppi )rQ   )r   r\   r]   r<   )r   r   r(   shaper:   r   idempotent_membersZ!OperationModel.idempotent_membersk  sr    &&I "-!4!4!:!:!<
!<!U^^3  122 D!<
 	
 
s   A3A3)A3c           
     s    V P                   P                  R / 4      pVP                  4        UUu. uF   w  r#\        W#P                  R4      R7      NK"  	  upp# u uppi )ZstaticContextParamsrl   )r(   rl   )r   r*   r]   rp   )r   r   r(   Zpropsr:   r   static_context_parametersZ(OperationModel.static_context_parametersx  sX    &&**+@"E  &||~
- #IIg4FG-
 	
 
s   &Ac           	     sF   V P                   '       g   . # V P                   P                  P                  4        UUu. uFW  w  rR VP                  9   g   K  RVP                  R ,          9   g   K2  \	        VP                  R ,          R,          VR7      NKY  	  upp# u uppi )rV   r(   )r(   r^   )r   r\   r]   r<   rx   )r   r(   r   r`   r   context_parametersZ!OperationModel.context_parameters  s    I  $//77==?

  @/ %..88^^N3F;   @
 	
 
s   BB0)Bc                rn   )ZoperationContextParamsr   r   r   r   operation_context_parametersZ+OperationModel.operation_context_parameters  s    $$(()A2FFr   c                8    V P                   P                  R 4      # )Zrequestcompressionr   r   r   r   request_compressionZ"OperationModel.request_compression  s    $$(()=>>r   c                r   )authr   r   r   r   r   ZOperationModel.auth  s    $$((00r   c                r   )Zauthtyper   r   r   r   	auth_typeZOperationModel.auth_type      $$((44r   c                sh    V P                   '       d   \        V P                   4      # V P                  # r   )r   r   r   r   r   r   resolved_auth_typeZ!OperationModel.resolved_auth_type  s$    999$TYY//~~r   c                r   )ZunsignedPayloadr   r   r   r   unsigned_payloadZOperationModel.unsigned_payload  s    $$(():;;r   c                sf   a  S P                   P                  R . 4      p\        V 3R lV 4       4      # )Zerrorsc              3   sZ   <"   T F   pSP                   P                  V4      x  K"  	  R # 5ir   )r   rB   )Z.0Zsr   s   & r   Z	<genexpr>Z.OperationModel.error_shapes.<locals>.<genexpr>  s%     MfD''99!<<fs   (+)r   r*   r   )r   r|   s   f r   r   ZOperationModel.error_shapes  s,    &&**8R8MfMMMr   c                r   )endpointr   r   r   r   r   ZOperationModel.endpoint  r   r   c                rc   )ZhttpChecksumRequiredFr   r   r   r   http_checksum_requiredZ%OperationModel.http_checksum_required  s    $$(()?GGr   c                s:    V P                   P                  R / 4      # )ZhttpChecksumr   r   r   r   http_checksumZOperationModel.http_checksum  s    $$((<<r   c                &    V P                  4       R J# r   )get_event_stream_inputr   r   r   has_event_stream_inputZ%OperationModel.has_event_stream_input  s    **,D88r   c                r   r   )get_event_stream_outputr   r   r   has_event_stream_outputZ&OperationModel.has_event_stream_output  s    ++-T99r   c                8    V P                  V P                  4      # r   )_get_event_streamr   r   r   r   r   Z%OperationModel.get_event_stream_input  s    %%d&6&677r   c                r   r   )r   r   r   r   r   r   Z&OperationModel.get_event_stream_output  s    %%d&7&788r   c                s`    Vf   R# VP                   pV'       d   VP                  V,          # R# )zAReturns the event stream member's shape if any or None otherwise.N)rL   r\   )r   r   Z
event_namer   r   r   Z OperationModel._get_event_stream  s*    =,,
==,,r   c                r   r   )get_streaming_inputr   r   r   has_streaming_inputZ"OperationModel.has_streaming_input  s    '')55r   c                r   r   )get_streaming_outputr   r   r   has_streaming_outputZ#OperationModel.has_streaming_output  s    ((*$66r   c                r   r   )_get_streaming_bodyr   r   r   r   r   Z"OperationModel.get_streaming_input  s    ''(8(899r   c                r   r   )r   r   r   r   r   r   Z#OperationModel.get_streaming_output  s    ''(9(9::r   c                s    Vf   R# VP                   P                  R4      pVe'   VP                  V,          pVP                  R8X  d   V# R# )z?Returns the streaming member's shape if any; or None otherwise.NrM   blob)r8   r*   r\   r)   )r   r   rM   Zpayload_shape   &&  r   r   Z"OperationModel._get_streaming_body  sK    =%%)))4!MM'2M&&&0$$r   c                r   )z(name=r   rI   r   r   r   rK   ZOperationModel.__repr__  s$    ..))*&1==r   )r   r   r   r   r   r<   r   )*r   r   r   r   r3   r	   r(   rZ   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   r   rK   r   r    r!   r#   r   r   r     sE    #4J " " 1 1 # # > > > > D D
 E E 
 
 
 
 

 

 
 
 
 
 G G ? ? 1 1 5 5  
 < < N N 5 5 H H = = 9 9 : :89 6 6 7 7:;	> >r   r   c                   sN   a  ] tR tRt o RtR]R]R]R]/t	R t
RR	 ltR
 tRtV tR# )r~   i  zResolves shape references.	structurer   mapstringc                s     Wn         / V n        R # r   )
_shape_map_shape_cache)r   	shape_maprE   r   r3   ZShapeResolver.__init__  s    #r   Nc                sP    V P                   V,          p T P                  P	                  TR ,          \
        4      pT'       d"   TP                  4       pTP                  T4       T! YT 4      pT#   \         d    \        T4      hi ; i  \         d    \        RT 24      hi ; i)r%   z&Shape is missing required key 'type': )	r   r   r   SHAPE_CLASSESr*   r$   r   copyZupdate)r   r/   r   r0   Z	shape_clsZresult   &&&   r   r   ZShapeResolver.get_shape_by_name  s    	0//*5K	**..{6/BEJI
 %**,K}-:D9  	0#J//	0  	#8F 	s   A1 'B 1BB%c                s    \        V4      ^8X  d    RV9   d   V P                  VR,          4      # VP                  4       p VP                  R4      pT P                  Y24      #   \         d    \        RT 24      hi ; i)i   r   z(Invalid model, missing shape reference: )Zlenr   r   r6   r   r   )r   rD   r   r/   r   r   rB   ZShapeResolver.resolve_shape_ref  s     y>Q7i#7 )))G*<==%NN,M*..w7

 ))*DD	  0>ykJ s   A# #A=)r   r   r   )r   r   r   r   rX   r[   rg   rj   rm   r   r3   r   rB   r   r    r!   r#   r   r~   r~     s;     $ 	^	x+	M"E Er   r~   c                   s4   a  ] tR tRt o RtRR ltR tRtV tR# )r,   i$  zEA ShapeResolver that will throw ValueErrors when shapes are resolved.Nc                     \        R V R24      h)zAttempted to lookup shape '!', but no shape map was provided.Z
ValueErrorr   r   r   r   Z&UnresolvableShapeMap.get_shape_by_name'  s    )*5VW
 	
r   c                r   )zAttempted to resolve shape 'r   r   rC   rE   r   rB   Z&UnresolvableShapeMap.resolve_shape_ref,  s     *9+ 6  !
 	
r   r   r   )	r   r   r   r   rX   r   rB   r   r    r!   r#   r   r,   r,   $  s     O


 
r   r,   c                   sh   a  ] tR tRt o RtRtRR ltR tR tR t	R t
R	 tR
 tR tR tR tRtV tR# )DenormalizedStructureBuilderi3  aZ  Build a StructureShape from a denormalized model.

This is a convenience builder class that makes it easy to construct
``StructureShape``s based on a denormalized model.

It will handle the details of creating unique shape names and creating
the appropriate shape map needed by the ``StructureShape`` class.

Example usage::

    builder = DenormalizedStructureBuilder()
    shape = builder.with_members({
        'A': {
            'type': 'structure',
            'members': {
                'B': {
                    'type': 'structure',
                    'members': {
                        'C': {
                            'type': 'string',
                        }
                    }
                }
            }
        }
    }).build_model()
    # ``shape`` is now an instance of botocore.model.StructureShape

:type dict_type: class
:param dict_type: The dictionary type to use, allowing you to opt-in
                  to using OrderedDict or another dict type. This can
                  be particularly useful for testing when order
                  matters, such as for documentation.

Nc                s    \        4       V n        \        4       V n        Vf#   V P                  P	                  R4      V n        R # R # )Nr   )r   r\   ShapeNameGenerator_name_generatornew_shape_namer(   r   rE   r   r3   Z%DenormalizedStructureBuilder.__init__d  s8    "}13<,,;;KHDI r   c                s    Wn         V # )zP

:type members: dict
:param members: The denormalized members.

:return: self

)_members)r   r\   rE   r   with_membersZ)DenormalizedStructureBuilder.with_membersj  s      r   c                s    \        4       pRRRV P                  /pV P                  W!V P                  4       \	        VR7      p\        V P                  WP                  ,          VR7      # )zBuild the model based on the provided members.

:rtype: botocore.model.StructureShape
:return: The built StructureShape object.

r%   r   r\   )r   )r/   r0   r1   )r   r   _build_modelr(   r~   r[   )r   r|   ZdenormalizedZresolverr:   r   build_modelZ(DenormalizedStructureBuilder.build_modelv  sa     Kt}}
 	,		: 62yyyy)#
 	
r   c                sX   VR ,          R8X  d   V P                  W4      W#&   R# VR ,          R8X  d   V P                  W4      W#&   R# VR ,          R8X  d   V P                  W4      W#&   R# VR ,          V P                  9   d   V P	                  V4      W#&   R# \        RVR ,           24      h)r%   r   r   r   zUnknown shape type: N)_build_structure_build_list
_build_mapSCALAR_TYPES_build_scalarr   )r   r7   r|   r/   r2   r   r   Z)DenormalizedStructureBuilder._build_model  s    =K'!%!6!6u!EF6]f$!%!1!1%!@F6]e#!%!?F6]d///!%!3!3E!:F#&:5=/$JKKr   c                s    \        4       pV P                  V4      pW4R &   VP                  R \        4       4      P                  4        F.  w  rVV P	                  V4      pRV/W5&   V P                  WbV4       K0  	  V# )r\   r   )r   _build_initial_shaper*   r]   _get_shape_namer   )r   r7   r|   r\   r   r(   Zmember_modelmember_shape_names   &&&     r   r   Z-DenormalizedStructureBuilder._build_structure  s{    -))%0"i"'))I{}"E"K"K"MD $ 4 4\ B$&78GMl4EF #N r   c                s    V P                  V4      pV P                  V4      pR V/VR&   V P                  VR,          W#4       V# )r   r_   r   r   r   )r   r7   r|   r   r   s   &&&  r   r   Z(DenormalizedStructureBuilder._build_list  sK     007))%0"$56h%/6Er   c                s   V P                  VR ,          4      pV P                  VR,          4      pV P                  V4      pRV/VR &   RV/VR&   V P                  VR ,          W#4       V P                  VR,          W$4       V# )rk   rl   r   r   )r   r7   r|   Zkey_shape_nameZvalue_shape_namer   r   r   r   Z'DenormalizedStructureBuilder._build_map  s    --eEl;//g?))%00e!#34g%,?%.&Cr   c                s    R VR ,          /pRV9   d   VR,          VR&   \         P                   F  pW19   g   K  W,          W#&   K  	  V# )r%   r&   )r$   r;   )r   r7   r   r9   r   r   r   Z1DenormalizedStructureBuilder._build_initial_shape  sP    E&M
 e#%*?%;E/"((D}#k ) r   c                s$    V P                  V4      # r   )r   r   r7   rE   r   r   Z*DenormalizedStructureBuilder._build_scalar  s    ((//r   c                sf    R V9   d
   VR ,          # V P                   P                  VR,          4      # )r/   r%   )r   r   r   rE   r   r   Z,DenormalizedStructureBuilder._get_shape_name  s0    5 &&''66uV}EEr   )r   r   r\   r(   )	r   ZintegerZbooleanr   ZfloatZ	timestampZlongZdoubleZcharr   )r   r   r   r   rX   r   r3   r   r   r   r   r   r   r   r   r   r   r    r!   r#   r   r   r   3  sM     "H
LI

(
L		0F Fr   r   c                   s0   a  ] tR tRt o RtR tR tRtV tR# )r   i  zGenerate unique shape names for a type.

This class can be used in conjunction with the DenormalizedStructureBuilder
to generate unique shape names for a given type.

c                s.    \        \        4      V n        R # r   )r    Zint_name_cacher   r   r   r3   ZShapeNameGenerator.__init__  s    &s+r   c                s    V P                   V;;,          ^,          uu&   V P                   V,          pVP                  4        RV 2# )a  Generate a unique shape name.

This method will guarantee a unique shape name each time it is
called with the same type.

::

    >>> s = ShapeNameGenerator()
    >>> s.new_shape_name('structure')
    'StructureType1'
    >>> s.new_shape_name('structure')
    'StructureType2'
    >>> s.new_shape_name('list')
    'ListType1'
    >>> s.new_shape_name('list')
    'ListType2'


:type type_name: string
:param type_name: The type name (structure, list, map, string, etc.)

:rtype: string
:return: A unique shape name for the given type

ZType)r   Z
capitalize)r   r)   Zcurrent_indexr   r   r   Z!ShapeNameGenerator.new_shape_name  sE    4 	#q(#((3&&()m_==r   )r   N)	r   r   r   r   rX   r3   r   r   r    r!   r#   r   r   r     s     ,> >r   r   N)*rX   Zcollectionsr    Ztypingr   r   Zbotocore.authr   Zbotocore.compatr   Zbotocore.exceptionsr   r   r   Zbotocore.utilsr   r	   r
   r   Zobjectr   Z	Exceptionr   r   r   r   rr   r   r$   r[   rg   rj   rm   rp   rx   rz   r{   r   r~   r,   r   r   r   r   r   <module>r      s!   4 # $ + ' 
  (		 			 		Y 		 	* *
b bJ'1U '1TD DCu C-% -Z 
z 
Z UA UApf> f>R3E 3El
 
QF QFh'> '>r   