+
    i[~                        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                       ] tR t^#tRtR# )NoShapeFoundError N__name__
__module____qualname____firstlineno____static_attributes__r       0/usr/lib/python3/dist-packages/botocore/model.pyr   r   #       r   r   c                       ] tR t^'tRtR# )InvalidShapeErrorr   Nr   r   r   r   r   r   '   r   r   r   c                       ] tR t^+tRtR# )OperationNotFoundErrorr   Nr   r   r   r   r   r   +   r   r   r   c                       ] tR t^/tRtR# )InvalidShapeReferenceErrorr   Nr   r   r   r   r   r   /   r   r   r   c                   &   a  ] tR t^3t o R tRtV tR# )	ServiceIdc                    \        V 4      # N)r   selfs   &r   	hyphenizeServiceId.hyphenize4   s    #D))r   r   N)r   r   r   r   r&   r   __classdictcell____classdict__s   @r   r!   r!   3   s     * *r   r!   c                      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                    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_resolvers   &&&&r   __init__Shape.__init__f   sK    ( 	$V,(___bA'! 23N-r   c                    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.

locationNamer1   )r4   SERIALIZED_ATTRSpop)r%   modelserializationattrs   &   r   rB   Shape.serialization   s_    . !!))D(((&+k# * ]*$1$5$5n$EM&!r   c                    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.

)r4   METADATA_ATTRS)r%   rA   metadatarC   s   &   r   rG   Shape.metadata   s@    . !!''D(((!& ( r   c                :    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rG   r3   r$   s   &r   required_membersShape.required_members   s     }}  R00r   c                8    V P                   P                  V4      # r#   r6   resolve_shape_refr%   	shape_refs   &&r   _resolve_shape_refShape._resolve_shape_ref       ##55i@@r   c                P    R V P                   P                   RV P                   R2# )<(z)>	__class__r   r1   r$   s   &r   __repr__Shape.__repr__   s&    4>>**+1TYYKr::r   c                    R # r#   r   r$   s   &r   event_stream_nameShape.event_stream_name   s    r   )r7   r4   r6   r/   r1   r2   )r>   	queryName	flattenedlocationpayload	streamingtimestampFormatxmlNamespaceresultWrapperxmlAttributeeventstreameventeventheadereventpayload	jsonvaluere   	hostLabel)rJ   minmaxpattern	sensitiveenumidempotencyTokenerror	exceptionendpointdiscoveryid	retryabledocumentunioncontextParamclientContextParamsrequiresLengthr#   )r   r   r   r   __doc__r?   rF   r   MAP_TYPEr;   r   rB   rG   rL   rS   r[   propertyr^   r   r(   r)   s   @r   r,   r,   8   s     =&N$ H D  @  : 1 1A;  r   r,   c                   p   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                    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)r4   r3   r   itemsrS   )r%   r   shape_membersr1   rR   s   &    r   r   StructureShape.members   sX    ##''	4==?C &}}OD"&"9"9)"DM  /r   c                    V P                   P                  4        F*  w  rVP                  P                  R 4      '       g   K(  Vu # 	  R# )ri   N)r   r   rB   r3   )r%   member_namemembers   &  r   r^    StructureShape.event_stream_name   s>    #'<<#5#5#7K##''66"" $8 r   c                    V P                   P                  R R4      '       g   R# V P                   P                  R/ 4      pVP                  R4      pV'       d   V# V P                  # )rv   FNru   code)rG   r3   r1   )r%   error_metadatar   s   &  r   
error_codeStructureShape.error_code   sT    }}  e44**7B7!!&)Kyyr   c                :    V P                   P                  R R4      # )ry   FrK   r$   s   &r   is_document_typeStructureShape.is_document_type   s    }}  U33r   c                :    V P                   P                  R R4      # )rz   FrK   r$   s   &r   is_tagged_unionStructureShape.is_tagged_union  s    }}  %00r   r   N)r   r   r   r   r   r   r^   r   r   r   r   r(   r)   s   @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   rS   r4   r$   s   &r   r   ListShape.member  s    &&t'8'8'BCCr   r   N)r   r   r   r   r   r   r   r(   r)   s   @r   r   r     s     D Dr   r   c                   @   a  ] tR tRt o ]R 4       t]R 4       tRtV tR# )MapShapei  c                F    V P                  V P                  R ,          4      # )keyr   r$   s   &r   r   MapShape.key  s    &&t'8'8'?@@r   c                F    V P                  V P                  R ,          4      # )valuer   r$   s   &r   r   MapShape.value  s    &&t'8'8'ABBr   r   N)	r   r   r   r   r   r   r   r   r(   r)   s   @r   r   r     s/     A A C Cr   r   c                   0   a  ] tR tRt o ]R 4       tRtV tR# )StringShapei  c                :    V P                   P                  R . 4      # )rs   rK   r$   s   &r   rs   StringShape.enum  s    }}  ,,r   r   N)r   r   r   r   r   rs   r   r(   r)   s   @r   r   r     s     - -r   r   c                   ,   a  ] tR tRt o V 3R ltRtV tR# )StaticContextParameteri  c                H   < V ^8  d   Qh/ S[ ;R&   S[S[S[ 3,          ;R&   # )   r1   r   )strr   bool)formatr*   s   "r   __annotate__#StaticContextParameter.__annotate__  s#     
I s r   r   Nr   r   r   r   __annotate_func__r   r(   r)   s   @r   r   r           r   r   c                   ,   a  ] tR tRt o V 3R ltRtV tR# )ContextParameteri"  c                2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )r   r1   r   r   )r   r*   s   "r   r   ContextParameter.__annotate__"  s     
I  r   r   Nr   r)   s   @r   r   r   "  r   r   r   c                   ,   a  ] tR tRt o V 3R ltRtV tR# )ClientContextParameteri'  c                >   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   S[ ;R&   # )r   r1   r.   r/   r   )r   r*   s   "r   r   #ClientContextParameter.__annotate__'  s&     
I 
I   r   r   Nr   r)   s   @r   r   r   '  r   r   r   c                     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                    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.

rG   shapesN)	_service_descriptionr3   rG   ShapeResolverr6   NOT_SET_signature_version_service_name_instance_cache)r%   service_descriptionservice_names   &&&r   r;   ServiceModel.__init__4  sS    * %8!+//
B?,##Hb1 
 #*)!r   c                8    V P                   P                  W4      # r#   )r6   get_shape_by_namer%   r8   member_traitss   &&&r   	shape_forServiceModel.shape_forS  s    ##55
 	
r   c                :    V P                   P                  VR 4      # r#   )_error_code_cacher3   )r%   r   s   &&r   shape_for_error_code!ServiceModel.shape_for_error_codeX  s    %%))*d;;r   c                P    / pV P                    F  pVP                  pW!V&   K  	  V# r#   )error_shapesr   )r%   error_code_cacheerror_shaper   s   &   r   r   ServiceModel._error_code_cache[  s3    ,,K))D%0T" -  r   c                8    V P                   P                  V4      # r#   rO   rQ   s   &&r   rP   ServiceModel.resolve_shape_refc  rU   r   c                L    \        V P                  P                  R / 4      4      # )r   listr   r3   r$   s   &r   shape_namesServiceModel.shape_namesf  s     D--11(B?@@r   c                    . pV P                    FI  pV P                  V4      pVP                  P                  R R4      '       g   K8  VP	                  V4       KK  	  V# )rv   F)r   r   rG   r3   append)r%   r   r8   r   s   &   r   r   ServiceModel.error_shapesj  sT    **J..4K##''U;;##K0 + r   c                     V P                   R ,          V,          p\        Y T4      #   \         d    \        T4      hi ; i
operations)r   KeyErrorr   OperationModel)r%   operation_namerA   s   && r   operation_modelServiceModel.operation_models  sG    	9--l;NKE e>::  	9(88	9s   ( ?c                :    V P                   P                  R R4      # r/   r0   )r   r3   r$   s   &r   r/   ServiceModel.documentation{  s    ((,,_bAAr   c                L    \        V P                  P                  R . 4      4      # r   r   r$   s   &r   operation_names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$   s   &r   r   ServiceModel.service_name  s(     )%%%'''r   c                     \        V P                  R 4      4      #   \         d    \        T P                  R7      hi ; i)	serviceId)r   )r!   _get_metadata_propertyr   r   r   r$   s   &r   
service_idServiceModel.service_id  s@    	IT88EFF+ 	I'T5G5GHH	Is    ">c                \    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.
signingName)rG   r3   r   )r%   signing_names   & r   r   ServiceModel.signing_name  s/     }}((7//Lr   c                $    V P                  R 4      # )
apiVersionr   r$   s   &r   api_versionServiceModel.api_version  s    **<88r   c                $    V P                  R 4      # )protocolr   r$   s   &r   r  ServiceModel.protocol  s    **:66r   c                $    V P                  R 4      # )	protocolsr   r$   s   &r   r  ServiceModel.protocols  s    **;77r   c                    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  )botocore_supported_protocolsservice_supported_protocolsservice)rG   r3   r
   r  r	   r   r  )r%   r  s   & r   resolved_protocolServiceModel.resolved_protocol  sa    
 ==[))@~~-#O A 3-Q,0NN))  }}r   c                $    V P                  R 4      # )endpointPrefixr   r$   s   &r   r   ServiceModel.endpoint_prefix  s    **+;<<r   c                z    V P                    F*  pV P                  V4      pVP                  '       g   K(  Vu # 	  R # r#   )r   r   is_endpoint_discovery_operationr%   	operationrA   s   &  r   endpoint_discovery_operation)ServiceModel.endpoint_discovery_operation  s3    --I((3E444 .r   c                    V P                    FH  pV P                  V4      pVP                  f   K$  VP                  P                  R4      '       g   KG   R# 	  R# )NrJ   TF)r   r   endpoint_discoveryr3   r  s   &  r   endpoint_discovery_required(ServiceModel.endpoint_discovery_required  sM    --I((3E((4,,00<< . r   c           
         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 )r|   r.   r/   )r1   r.   r/   )r   r3   r   r   )r%   params
param_name	param_vals   &   r   client_context_parameters&ServiceModel.client_context_parameters  sg    **../DbI *0
 *8%
 #v&'8
 *8
 	
 
s   'Ac                j     V P                   V,          #   \         d    \        R T RT  24      hi ; i)"z," not defined in the metadata of the model: )rG   r   r   r%   r1   s   &&r   r   #ServiceModel._get_metadata_property  sC    	==&& 	.D6EdVL 	s    2c                    V P                   \        J d"   V P                  P                  R 4      pWn         V P                   # )signatureVersion)r   r   rG   r3   )r%   signature_versions   & r   r'  ServiceModel.signature_version  s8    ""g- $ 1 12D E&7#&&&r   c                    Wn         R # r#   )r   )r%   r   s   &&r   r'  r(    s    "'r   c                     R V P                   9   # )awsQueryCompatible)rG   r$   s   &r   is_query_compatible ServiceModel.is_query_compatible  s    #t}}44r   c                N    V P                   P                   R V P                   R2# )rX   ))rZ   r   r   r$   s   &r   r[   ServiceModel.__repr__  s'    ..))*!D,=,=+>a@@r   )r   r   r   r6   r   rG   r#   )$r   r   r   r   r~   r;   r   r   r   r   rP   r   r   r   r   r/   r   r   r   r   r   r  r  r  r   r  r  r  r   r   r'  setterr,  r[   r   r(   r)   s   @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                     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                    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.

r1   httpN)_operation_model_service_model	_api_namer3   
_wire_namerG   r4  )r%   r   service_modelr1   s   &&&&r   r;   OperationModel.__init__  sJ    8 !0+ *--f5%..#''3	r   c                N    V P                   e   V P                   # V P                  # r#   )r7  	wire_namer$   s   &r   r1   OperationModel.name+  s     >>%>>!>>!r   c                8    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``.

r1   r5  r3   r$   s   &r   r<  OperationModel.wire_name2  s     $$((00r   c                    V P                   # r#   )r6  r$   s   &r   r9  OperationModel.service_model@  s    """r   c                :    V P                   P                  R R4      # r   r?  r$   s   &r   r/   OperationModel.documentationD  s    $$(("==r   c                :    V P                   P                  R R4      # )
deprecatedFr?  r$   s   &r   rF  OperationModel.deprecatedH  s    $$((u==r   c                :    V P                   P                  R R4      # )endpointdiscoveryNr?  r$   s   &r   r  !OperationModel.endpoint_discoveryL  s     $$(()<dCCr   c                :    V P                   P                  R R4      # )endpointoperationFr?  r$   s   &r   r  .OperationModel.is_endpoint_discovery_operationR  s    $$(()<eDDr   c                    R V P                   9  d   R# V P                  P                  V P                   R ,          4      # )inputNr5  r6  rP   r$   s   &r   input_shapeOperationModel.input_shapeV  s<    $/// ""44!!'*
 	
r   c                    R V P                   9  d   R# V P                  P                  V P                   R ,          4      # )outputNrP  r$   s   &r   output_shapeOperationModel.output_shape`  s<    4000 ""44!!(+
 	
r   c                    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 )rt   )rQ  r   r   rG   )r%   rQ  r1   shapes   &   r   idempotent_members!OperationModel.idempotent_membersk  sr    &&I "-!4!4!:!:!<
!<!U^^3  122 D!<
 	
 
s   A3A3)A3c           
         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 )staticContextParamsr   )r1   r   )r5  r3   r   r   )r%   r  r1   propss   &   r   static_context_parameters(OperationModel.static_context_parametersx  sX    &&**+@"E  &||~
- #IIg4FG-
 	
 
s   &Ac           	     F   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 )r{   r1   )r1   r   )rQ  r   r   rG   r   )r%   r1   rX  s   &  r   context_parameters!OperationModel.context_parameters  s    I  $//77==?

  @/ %..88^^N3F;   @
 	
 
s   BB0)Bc                :    V P                   P                  R . 4      # )operationContextParamsr?  r$   s   &r   operation_context_parameters+OperationModel.operation_context_parameters  s    $$(()A2FFr   c                8    V P                   P                  R 4      # )requestcompressionr?  r$   s   &r   request_compression"OperationModel.request_compression  s    $$(()=>>r   c                8    V P                   P                  R 4      # )authr?  r$   s   &r   rl  OperationModel.auth  s    $$((00r   c                8    V P                   P                  R 4      # )authtyper?  r$   s   &r   	auth_typeOperationModel.auth_type      $$((44r   c                h    V P                   '       d   \        V P                   4      # V P                  # r#   )rl  r   rp  r$   s   &r   resolved_auth_type!OperationModel.resolved_auth_type  s$    999$TYY//~~r   c                8    V P                   P                  R 4      # )unsignedPayloadr?  r$   s   &r   unsigned_payloadOperationModel.unsigned_payload  s    $$(():;;r   c                f   a  S P                   P                  R . 4      p\        V 3R lV 4       4      # )errorsc              3   Z   <"   T F   pSP                   P                  V4      x  K"  	  R # 5ir#   )r6  rP   ).0sr%   s   & r   	<genexpr>.OperationModel.error_shapes.<locals>.<genexpr>  s%     MfD''99!<<fs   (+)r5  r3   r   )r%   r   s   f r   r   OperationModel.error_shapes  s,    &&**8R8MfMMMr   c                8    V P                   P                  R 4      # )endpointr?  r$   s   &r   r  OperationModel.endpoint  rr  r   c                :    V P                   P                  R R4      # )httpChecksumRequiredFr?  r$   s   &r   http_checksum_required%OperationModel.http_checksum_required  s    $$(()?GGr   c                :    V P                   P                  R / 4      # )httpChecksumr?  r$   s   &r   http_checksumOperationModel.http_checksum  s    $$((<<r   c                &    V P                  4       R J# r#   )get_event_stream_inputr$   s   &r   has_event_stream_input%OperationModel.has_event_stream_input  s    **,D88r   c                &    V P                  4       R J# r#   )get_event_stream_outputr$   s   &r   has_event_stream_output&OperationModel.has_event_stream_output  s    ++-T99r   c                8    V P                  V P                  4      # r#   )_get_event_streamrQ  r$   s   &r   r  %OperationModel.get_event_stream_input  s    %%d&6&677r   c                8    V P                  V P                  4      # r#   )r  rU  r$   s   &r   r  &OperationModel.get_event_stream_output  s    %%d&7&788r   c                `    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)r^   r   )r%   rX  
event_names   && r   r   OperationModel._get_event_stream  s*    =,,
==,,r   c                &    V P                  4       R J# r#   )get_streaming_inputr$   s   &r   has_streaming_input"OperationModel.has_streaming_input  s    '')55r   c                &    V P                  4       R J# r#   )get_streaming_outputr$   s   &r   has_streaming_output#OperationModel.has_streaming_output  s    ((*$66r   c                8    V P                  V P                  4      # r#   )_get_streaming_bodyrQ  r$   s   &r   r  "OperationModel.get_streaming_input  s    ''(8(899r   c                8    V P                  V P                  4      # r#   )r  rU  r$   s   &r   r  #OperationModel.get_streaming_output  s    ''(9(9::r   c                    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.Nrc   blob)rB   r3   r   r2   )r%   rX  rc   payload_shapes   &&  r   r  "OperationModel._get_streaming_body  sK    =%%)))4!MM'2M&&&0$$r   c                N    V P                   P                   R V P                   R2# )z(name=r/  rY   r$   s   &r   r[   OperationModel.__repr__  s$    ..))*&1==r   )r7  r5  r6  r8  r4  rG   r#   )*r   r   r   r   r;   r   r1   r   r<  r9  r/   rF  r  r  rQ  rU  rY  r^  ra  re  ri  rl  rp  rt  rx  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r[   r   r(   r)   s   @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                   N   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                     Wn         / V n        R # r#   )
_shape_map_shape_cache)r%   	shape_maps   &&r   r;   ShapeResolver.__init__  s    #r   Nc                P    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_CLASSESr3   r,   r   copyupdate)r%   r8   r   r9   	shape_clsresults   &&&   r   r   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                    \        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)   rX  z(Invalid model, missing shape reference: )lenr   r  r@   r   r   )r%   rR   r   r8   s   &&  r   rP   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   r~   r   r   r   r   r  r;   r   rP   r   r(   r)   s   @r   r   r     s;     $ 	^	x+	M"E Er   r   c                   4   a  ] tR tRt o RtRR ltR tRtV tR# )r5   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.
ValueErrorr   s   &&&r   r   &UnresolvableShapeMap.get_shape_by_name'  s    )*5VW
 	
r   c                     \        R V R24      h)zAttempted to resolve shape 'r  r  rQ   s   &&r   rP   &UnresolvableShapeMap.resolve_shape_ref,  s     *9+ 6  !
 	
r   r   r#   )	r   r   r   r   r~   r   rP   r   r(   r)   s   @r   r5   r5   $  s     O


 
r   r5   c                   h   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                    \        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_namer1   r#  s   &&r   r;   %DenormalizedStructureBuilder.__init__d  s8    "}13<,,;;KHDI r   c                    Wn         V # )zP

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

:return: self

)_members)r%   r   s   &&r   with_members)DenormalizedStructureBuilder.with_membersj  s      r   c                    \        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  )r8   r9   r:   )r   r  _build_modelr1   r   r   )r%   r   denormalizedresolvers   &   r   build_model(DenormalizedStructureBuilder.build_modelv  sa     Kt}}
 	,		: 62yyyy)#
 	
r   c                X   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%   rA   r   r8   s   &&&&r   r  )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                    \        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   rX  )r   _build_initial_shaper3   r   _get_shape_namer  )r%   rA   r   r   rX  r1   member_modelmember_shape_names   &&&     r   r  -DenormalizedStructureBuilder._build_structure  s{    -))%0"i"'))I{}"E"K"K"MD $ 4 4\ B$&78GMl4EF #N r   c                    V P                  V4      pV P                  V4      pR V/VR&   V P                  VR,          W#4       V# )rX  r   r  r  r  )r%   rA   r   r  rX  s   &&&  r   r  (DenormalizedStructureBuilder._build_list  sK     007))%0"$56h%/6Er   c                   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# )r   r   rX  r  )r%   rA   r   key_shape_namevalue_shape_namerX  s   &&&   r   r  'DenormalizedStructureBuilder._build_map  s    --eEl;//g?))%00e!#34g%,?%.&Cr   c                    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,   rF   )r%   rA   rX  rC   s   &&  r   r  1DenormalizedStructureBuilder._build_initial_shape  sP    E&M
 e#%*?%;E/"((D}#k ) r   c                $    V P                  V4      # r#   )r  r%   rA   s   &&r   r  *DenormalizedStructureBuilder._build_scalar  s    ((//r   c                f    R V9   d
   VR ,          # V P                   P                  VR,          4      # )r8   r.   )r  r  r  s   &&r   r  ,DenormalizedStructureBuilder._get_shape_name  s0    5 &&''66uV}EEr   )r  r  r   r1   )	r  integerbooleanr  float	timestamplongdoublecharr#   )r   r   r   r   r~   r  r;   r  r  r  r  r  r  r  r  r  r   r(   r)   s   @r   r  r  3  sM     "H
LI

(
L		0F Fr   r  c                   0   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                .    \        \        4      V n        R # r#   )r   int_name_cacher$   s   &r   r;   ShapeNameGenerator.__init__  s    &s+r   c                    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

Type)r  
capitalize)r%   r2   current_indexs   && r   r  !ShapeNameGenerator.new_shape_name  sE    4 	#q(#((3&&()m_==r   )r  N)	r   r   r   r   r~   r;   r  r   r(   r)   s   @r   r  r    s     ,> >r   r  N)*r~   collectionsr   typingr   r   botocore.authr   botocore.compatr   botocore.exceptionsr   r   r	   botocore.utilsr
   r   r   r   objectr   	Exceptionr   r   r   r   r   r!   r,   r   r   r   r   r   r   r   r   r   r   r5   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   