HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: //opt/cppython/lib/python3.8/site-packages/botocore/__pycache__/model.cpython-38.pyc
U

KD�g�z�@s�dZddlmZddlmZmZddlmZddlm	Z	ddl
mZmZddl
mZmZmZe�ZGdd	�d	e�ZGd
d�de�ZGdd
�d
e�ZGdd�de�ZGdd�de�ZGdd�d�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�Z Gd d!�d!e�Z!Gd"d#�d#�Z"Gd$d%�d%�Z#Gd&d'�d'�Z$Gd(d)�d)�Z%Gd*d+�d+�Z&Gd,d-�d-�Z'd.S)/z-Abstractions to interact with service models.�)�defaultdict)�
NamedTuple�Union)�resolve_auth_type)�OrderedDict)�MissingServiceIdError�UndefinedModelAttributeError)�CachedProperty�hyphenize_service_id�instance_cachec@seZdZdS)�NoShapeFoundErrorN��__name__�
__module__�__qualname__�rr�;/opt/cppython/lib/python3.8/site-packages/botocore/model.pyrsrc@seZdZdS)�InvalidShapeErrorNr
rrrrr!src@seZdZdS)�OperationNotFoundErrorNr
rrrrr%src@seZdZdS)�InvalidShapeReferenceErrorNr
rrrrr)src@seZdZdd�ZdS)�	ServiceIdcCst|�S�N)r
��selfrrr�	hyphenize.szServiceId.hyphenizeN)rrrrrrrrr-src@s�eZdZdZdddddddd	d
ddd
dddddgZddddddddddddddd d!gZeZd1d#d$�Ze	d%d&��Z
e	d'd(��Ze	d)d*��Zd+d,�Z
d-d.�Zed/d0��Zd"S)2�Shapez3Object representing a shape from the service model.�locationNameZ	queryNameZ	flattened�location�payloadZ	streamingZtimestampFormatZxmlNamespaceZ
resultWrapperZxmlAttribute�eventstream�eventZeventheaderZeventpayloadZ	jsonvalueZ	hostLabel�required�min�max�patternZ	sensitive�enum�idempotencyToken�error�	exceptionZendpointdiscoveryidZ	retryable�document�union�contextParam�clientContextParamsZrequiresLengthNcCsB||_|d|_|�dd�|_||_|dkr2t�}||_i|_dS)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_resolverrrr�__init__`s
zShape.__init__cCsF|j}i}|jD]}||jkr||||<qd|krB|�d�|d<|S)aSerialization 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.

        rr0)r3�SERIALIZED_ATTRS�pop)r�model�
serialization�attrrrrr>�s

zShape.serializationcCs0|j}i}|jD]}||jkr||||<q|S)a�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.

        )r3�METADATA_ATTRS)rr=�metadatar?rrrrA�s

zShape.metadatacCs|j�dg�S)z�A 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.

        r!�rAr2rrrr�required_members�s	zShape.required_memberscCs|j�|�Sr�r5�resolve_shape_ref�r�	shape_refrrr�_resolve_shape_ref�szShape._resolve_shape_refcCsd|jj�d|j�d�S)N�<�(z)>��	__class__rr0rrrr�__repr__�szShape.__repr__cCsdSrrrrrr�event_stream_name�szShape.event_stream_name)N)rrr�__doc__r;r@r�MAP_TYPEr:r	r>rArCrHrM�propertyrNrrrrr2s`��
"
 


rc@sHeZdZedd��Zedd��Zedd��Zedd��Zed	d
��ZdS)�StructureShapecCs>|j�d|���}|��}|��D]\}}|�|�||<q"|S)N�members)r3r2rP�itemsrH)rrSZ
shape_membersr0rGrrrrS�s
zStructureShape.memberscCs,|j��D]\}}|j�d�r
|Sq
dS)Nr)rSrTr>r2)r�member_name�memberrrrrN�s
z StructureShape.event_stream_namecCs8|j�dd�sdS|j�di�}|�d�}|r2|S|jS)Nr(Fr'�code)rAr2r0)rZerror_metadatarWrrr�
error_code�s
zStructureShape.error_codecCs|j�dd�S)Nr)FrBrrrr�is_document_type�szStructureShape.is_document_typecCs|j�dd�S)Nr*FrBrrrr�is_tagged_union�szStructureShape.is_tagged_unionN)	rrrr	rSrNrXrYrZrrrrrR�s





rRc@seZdZedd��ZdS)�	ListShapecCs|�|jd�S)NrV�rHr3rrrrrVszListShape.memberN)rrrr	rVrrrrr[sr[c@s$eZdZedd��Zedd��ZdS)�MapShapecCs|�|jd�S)N�keyr\rrrrr^szMapShape.keycCs|�|jd�S)N�valuer\rrrrr_szMapShape.valueN)rrrr	r^r_rrrrr]s
r]c@seZdZedd��ZdS)�StringShapecCs|j�dg�S)Nr%rBrrrrr%szStringShape.enumN)rrrr	r%rrrrr`sr`c@s&eZdZUeed<eeefed<dS)�StaticContextParameterr0r_N)rrr�str�__annotations__r�boolrrrrras
rac@seZdZUeed<eed<dS)�ContextParameterr0rUN�rrrrbrcrrrrres
rec@s&eZdZUeed<eed<eed<dS)�ClientContextParameterr0r-r.Nrfrrrrrg!s
rgc@s*eZdZdZd4dd�Zd5dd�Zdd�Zed	d
��Zdd�Z	ed
d��Z
edd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zedd ��Zed!d"��Zed#d$��Zed%d&��Zed'd(��Zed)d*��Zd+d,�Zed-d.��Zejd/d.��Zed0d1��Zd2d3�ZdS)6�ServiceModelzQ

    :ivar service_description: The parsed service description dictionary.

    NcCs<||_|�di�|_t|�di��|_t|_||_i|_dS)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.

        rA�shapesN)	�_service_descriptionr2rA�
ShapeResolverr5�NOT_SET�_signature_version�
_service_nameZ_instance_cache)rZservice_description�service_namerrrr:.s
�zServiceModel.__init__cCs|j�||�Sr)r5�get_shape_by_name�rr7�
member_traitsrrr�	shape_forMs�zServiceModel.shape_forcCs|j�|d�Sr)�_error_code_cacher2)rrXrrr�shape_for_error_codeRsz!ServiceModel.shape_for_error_codecCs"i}|jD]}|j}|||<q
|Sr)�error_shapesrX)rZerror_code_cache�error_shaperWrrrrtUs


zServiceModel._error_code_cachecCs|j�|�SrrDrFrrrrE]szServiceModel.resolve_shape_refcCst|j�di��S)Nri��listrjr2rrrr�shape_names`szServiceModel.shape_namescCs6g}|jD]&}|�|�}|j�dd�r
|�|�q
|S)Nr(F)rzrsrAr2�append)rrvr7rwrrrrvds

zServiceModel.error_shapescCs<z|jd|}Wntk
r.t|��YnXt|||�S�N�
operations)rj�KeyErrorr�OperationModel)rZoperation_namer=rrr�operation_modelms
zServiceModel.operation_modelcCs|j�dd�S�Nr.r/)rjr2rrrrr.uszServiceModel.documentationcCst|j�dg��Sr|rxrrrr�operation_namesyszServiceModel.operation_namescCs|jdk	r|jS|jSdS)a�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.

        N)rn�endpoint_prefixrrrrro}s
zServiceModel.service_namecCs6zt|�d��WStk
r0t|jd��YnXdS)NZ	serviceId)ro)r�_get_metadata_propertyrrrnrrrr�
service_id�szServiceModel.service_idcCs|j�d�}|dkr|j}|S)z�The 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.
        ZsigningNameN)rAr2r�)r�signing_namerrrr��szServiceModel.signing_namecCs
|�d�S)NZ
apiVersion�r�rrrr�api_version�szServiceModel.api_versioncCs
|�d�S)N�protocolr�rrrrr��szServiceModel.protocolcCs
|�d�S)N�	protocolsr�rrrrr��szServiceModel.protocolscCs
|�d�S)NZendpointPrefixr�rrrrr��szServiceModel.endpoint_prefixcCs(|jD]}|�|�}|jr|SqdSr)r�r��is_endpoint_discovery_operation�rZ	operationr=rrr�endpoint_discovery_operation�s

z)ServiceModel.endpoint_discovery_operationcCs6|jD]*}|�|�}|jdk	r|j�d�rdSqdS)Nr!TF)r�r��endpoint_discoveryr2r�rrr�endpoint_discovery_required�s

�
�z(ServiceModel.endpoint_discovery_requiredcCs |j�di�}dd�|��D�S)Nr,cSs&g|]\}}t||d|dd��qS)r-r.)r0r-r.)rg)�.0�
param_nameZ	param_valrrr�
<listcomp>�s��z:ServiceModel.client_context_parameters.<locals>.<listcomp>)rjr2rT�r�paramsrrr�client_context_parameters�s�z&ServiceModel.client_context_parameterscCs:z|j|WStk
r4td|�d|����YnXdS)N�"z," not defined in the metadata of the model: )rAr~r�rr0rrrr��s�z#ServiceModel._get_metadata_propertycCs"|jtkr|j�d�}||_|jS)NZsignatureVersion)rmrlrAr2)r�signature_versionrrrr��s
zServiceModel.signature_versioncCs
||_dSr)rm)rr_rrrr��scCs
d|jkS)NZawsQueryCompatible�rArrrr�is_query_compatible�sz ServiceModel.is_query_compatiblecCs|jj�d|j�d�S)NrJ�))rLrrorrrrrM�szServiceModel.__repr__)N)N) rrrrOr:rsrur	rtrErzrvrr�r.r�ror�r�r�r�r�r�r�r�r�r�rQr��setterr�rMrrrrrh'sZ





















rhc@s�eZdZdFdd�Zedd��Zedd��Zedd	��Zed
d��Z	edd
��Z
edd��Zedd��Zedd��Z
edd��Zedd��Zedd��Zedd��Zedd��Zedd��Zed d!��Zed"d#��Zed$d%��Zed&d'��Zed(d)��Zed*d+��Zed,d-��Zed.d/��Zed0d1��Zed2d3��Zd4d5�Zd6d7�Zd8d9�Z ed:d;��Z!ed<d=��Z"d>d?�Z#d@dA�Z$dBdC�Z%dDdE�Z&dS)GrNcCs8||_||_||_|�d�|_|j|_|�di�|_dS)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.

        r0�httpN)�_operation_model�_service_model�	_api_namer2Z
_wire_namerAr�)rr��
service_modelr0rrrr:�szOperationModel.__init__cCs|jdk	r|jS|jSdSr)r��	wire_namerrrrr0s
zOperationModel.namecCs|j�d�S)aRThe 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``.

        r0�r�r2rrrrr�szOperationModel.wire_namecCs|jSr)r�rrrrr�(szOperationModel.service_modelcCs|j�dd�Sr�r�rrrrr.,szOperationModel.documentationcCs|j�dd�S)N�
deprecatedFr�rrrrr�0szOperationModel.deprecatedcCs|j�dd�S)NZendpointdiscoveryr�rrrrr�4sz!OperationModel.endpoint_discoverycCs|j�dd�S)NZendpointoperationFr�rrrrr�:sz.OperationModel.is_endpoint_discovery_operationcCs d|jkrdS|j�|jd�S)N�input�r�r�rErrrr�input_shape>s

�zOperationModel.input_shapecCs d|jkrdS|j�|jd�S)N�outputr�rrrr�output_shapeHs

�zOperationModel.output_shapecCs"|j}|sgSdd�|j��D�S)NcSs(g|] \}}d|jkr|jdr|�qS)r&r��r�r0�shaperrrr�Ys

�z5OperationModel.idempotent_members.<locals>.<listcomp>�r�rSrT)rr�rrr�idempotent_membersSs�z!OperationModel.idempotent_memberscCs |j�di�}dd�|��D�S)NZstaticContextParamscSs"g|]\}}t||�d�d��qS)r_)r0r_)rar2)r�r0�propsrrrr�cs�z<OperationModel.static_context_parameters.<locals>.<listcomp>)r�r2rTr�rrr�static_context_parameters`s�z(OperationModel.static_context_parameterscCs |js
gSdd�|jj��D�S)NcSs>g|]6\}}d|jkrd|jdkrt|jdd|d��qS)r+r0)r0rU)rArer�rrrr�ms
��z5OperationModel.context_parameters.<locals>.<listcomp>r�rrrr�context_parametershs

�z!OperationModel.context_parameterscCs|j�dg�S)NZoperationContextParamsr�rrrr�operation_context_parameterswsz+OperationModel.operation_context_parameterscCs|j�d�S)NZrequestcompressionr�rrrr�request_compression{sz"OperationModel.request_compressioncCs|j�d�S)N�authr�rrrrr�szOperationModel.authcCs|j�d�S)NZauthtyper�rrrr�	auth_type�szOperationModel.auth_typecCs|jrt|j�S|jSr)r�rr�rrrr�resolved_auth_type�s
z!OperationModel.resolved_auth_typecCs|j�d�S)NZunsignedPayloadr�rrrr�unsigned_payload�szOperationModel.unsigned_payloadcs$�j�dg�}t�fdd�|D��S)N�errorsc3s|]}�j�|�VqdSr)r�rE)r��srrr�	<genexpr>�sz.OperationModel.error_shapes.<locals>.<genexpr>)r�r2ry)rrirrrrv�szOperationModel.error_shapescCs|j�d�S)N�endpointr�rrrrr��szOperationModel.endpointcCs|j�dd�S)NZhttpChecksumRequiredFr�rrrr�http_checksum_required�sz%OperationModel.http_checksum_requiredcCs|j�di�S)NZhttpChecksumr�rrrr�
http_checksum�szOperationModel.http_checksumcCs|��dk	Sr)�get_event_stream_inputrrrr�has_event_stream_input�sz%OperationModel.has_event_stream_inputcCs|��dk	Sr)�get_event_stream_outputrrrr�has_event_stream_output�sz&OperationModel.has_event_stream_outputcCs|�|j�Sr)�_get_event_streamr�rrrrr��sz%OperationModel.get_event_stream_inputcCs|�|j�Sr)r�r�rrrrr��sz&OperationModel.get_event_stream_outputcCs$|dkrdS|j}|r |j|SdS)zAReturns the event stream member's shape if any or None otherwise.N)rNrS)rr�Z
event_namerrrr��s
z OperationModel._get_event_streamcCs|��dk	Sr)�get_streaming_inputrrrr�has_streaming_input�sz"OperationModel.has_streaming_inputcCs|��dk	Sr)�get_streaming_outputrrrr�has_streaming_output�sz#OperationModel.has_streaming_outputcCs|�|j�Sr)�_get_streaming_bodyr�rrrrr��sz"OperationModel.get_streaming_inputcCs|�|j�Sr)r�r�rrrrr��sz#OperationModel.get_streaming_outputcCs<|dkrdS|j�d�}|dk	r8|j|}|jdkr8|SdS)z?Returns the streaming member's shape if any; or None otherwise.Nr�blob)r>r2rSr1)rr�rZ
payload_shaperrrr��s

z"OperationModel._get_streaming_bodycCs|jj�d|j�d�S)Nz(name=r�rKrrrrrM�szOperationModel.__repr__)N)'rrrr:r	r0rQr�r�r.r�r�r�r�r�r�r�r�r�r�r�r�r�r�rvr�r�r�r�r�r�r�r�r�r�r�r�r�rMrrrrr�sx
%








	
















	

rc@s8eZdZdZeeeed�Zdd�Z	d
dd�Z
dd	�ZdS)rkzResolves shape references.)�	structurery�map�stringcCs||_i|_dSr)�
_shape_mapZ_shape_cache)r�	shape_maprrrr:�szShapeResolver.__init__NcCs�z|j|}Wntk
r*t|��YnXz|j�|dt�}Wn"tk
rdtd|����YnX|r||��}|�|�||||�}|S)Nr-z&Shape is missing required key 'type': )	r�r~r�
SHAPE_CLASSESr2rr�copy�update)rr7rrr8Z	shape_cls�resultrrrrp�s�

zShapeResolver.get_shape_by_namecCslt|�dkr"d|kr"|�|d�S|��}z|�d�}Wn"tk
rZtd|����YnX|�||�SdS)N�r�z(Invalid model, missing shape reference: )�lenrpr�r<r~r)rrGrrr7rrrrE�s�
zShapeResolver.resolve_shape_ref)N)rrrrOrRr[r]r`r�r:rprErrrrrk�s�
rkc@s"eZdZdZddd�Zdd�ZdS)r4zEA ShapeResolver that will throw ValueErrors when shapes are resolved.NcCstd|�d���dS)NzAttempted to lookup shape '�!', but no shape map was provided.��
ValueErrorrqrrrrps
�z&UnresolvableShapeMap.get_shape_by_namecCstd|�d���dS)NzAttempted to resolve shape 'r�r�rFrrrrEs
�z&UnresolvableShapeMap.resolve_shape_ref)N)rrrrOrprErrrrr4s
r4c@sfeZdZdZdZddd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�ZdS)�DenormalizedStructureBuildera�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.

    )	r��integer�booleanr��float�	timestamp�long�double�charNcCs*t�|_t�|_|dkr&|j�d�|_dS)Nr�)rrS�ShapeNameGenerator�_name_generator�new_shape_namer0r�rrrr:Lsz%DenormalizedStructureBuilder.__init__cCs
||_|S)zp

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

        :return: self

        )�_members)rrSrrr�with_membersRs	z)DenormalizedStructureBuilder.with_memberscCsBt�}d|jd�}|�|||j�t|d�}t|j||j|d�S)z�Build the model based on the provided members.

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

        r�)r-rS)r�)r7r8r9)rr��_build_modelr0rkrR)rriZdenormalized�resolverrrr�build_model^s�
�z(DenormalizedStructureBuilder.build_modelcCs�|ddkr|�||�||<nl|ddkr<|�||�||<nN|ddkrZ|�||�||<n0|d|jkrx|�|�||<ntd|d����dS)Nr-r�ryr�zUnknown shape type: )�_build_structure�_build_list�
_build_map�SCALAR_TYPES�
_build_scalarr)rr=rir7rrrr�rsz)DenormalizedStructureBuilder._build_modelcCs\t�}|�|�}||d<|�dt����D],\}}|�|�}d|i||<|�|||�q*|S)NrSr�)r�_build_initial_shaper2rT�_get_shape_namer�)rr=rirSr�r0Zmember_model�member_shape_namerrrr�~s

z-DenormalizedStructureBuilder._build_structurecCs6|�|�}|�|�}d|i|d<|�|d||�|S)Nr�rV�r�r�r�)rr=rir�r�rrrr��s


z(DenormalizedStructureBuilder._build_listcCsf|�|d�}|�|d�}|�|�}d|i|d<d|i|d<|�|d||�|�|d||�|S)Nr^r_r�r�)rr=riZkey_shape_nameZvalue_shape_namer�rrrr��s
z'DenormalizedStructureBuilder._build_mapcCsDd|di}d|kr |d|d<tjD]}||kr&||||<q&|S)Nr-r.)rr@)rr=r�r?rrrr��s�
z1DenormalizedStructureBuilder._build_initial_shapecCs
|�|�Sr)r��rr=rrrr��sz*DenormalizedStructureBuilder._build_scalarcCs$d|kr|dS|j�|d�SdS)Nr7r-)r�r�r�rrrr��sz,DenormalizedStructureBuilder._get_shape_name)N)rrrrOr�r:r�r�r�r�r�r�r�r�r�rrrrr�s$

r�c@s eZdZdZdd�Zdd�ZdS)r�z�Generate 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.

    cCstt�|_dSr)r�int�_name_cacherrrrr:�szShapeNameGenerator.__init__cCs.|j|d7<|j|}|���d|��S)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

        r��Type)r��
capitalize)rr1Z
current_indexrrrr��s
z!ShapeNameGenerator.new_shape_nameN)rrrrOr:r�rrrrr��sr�N)(rO�collectionsr�typingrrZ
botocore.authrZbotocore.compatrZbotocore.exceptionsrrZbotocore.utilsr	r
r�objectrl�	ExceptionrrrrrbrrrRr[r]r`rarergrhrrkr4r�r�rrrr�<module>
s<&*
Gj6