o
    é’Oj½  ã                   @   sX   d dl mZ d dlmZ edg d¢ƒZG dd„ deƒZdd„ Zdd	„ ZG d
d„ dƒZdS )é    )Ú
namedtuple)Úimport_moduleÚServiceContext)Úservice_nameÚservice_modelÚservice_waiter_modelÚresource_json_definitionsc                   @   s   e Zd ZdZdS )r   a   Provides important service-wide, read-only information about a service

    :type service_name: str
    :param service_name: The name of the service

    :type service_model: :py:class:`botocore.model.ServiceModel`
    :param service_model: The model of the service.

    :type service_waiter_model: :py:class:`botocore.waiter.WaiterModel` or
        a waiter model-like object such as
        :py:class:`boto3.utils.LazyLoadedWaiterModel`
    :param service_waiter_model: The waiter model of the service.

    :type resource_json_definitions: dict
    :param resource_json_definitions: The loaded json models of all resource
        shapes for a service. It is equivalient of loading a
        ``resource-1.json`` and retrieving the value at the key "resources".
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   úQ/var/www/html/pharmsmart-cdr-gen/venv/lib/python3.10/site-packages/boto3/utils.pyr      s    c                    s   |‰‡ ‡fdd„}|S )Nc                     s6   ˆ   dd¡\}}t|ƒ}|  ˆ¡ t||ƒdi | ¤ŽS )NÚ.é   r   )Úrsplitr   ÚupdateÚgetattr)ÚkwargsÚmoduleÚfunction_name©Ú	full_nameÚparent_kwargsr   r   Ú_handler5   s   
zlazy_call.<locals>._handlerr   )r   r   r   r   r   r   Ú	lazy_call2   s   r   c                 C   s$   || v rt d|› d�ƒ‚|| |< d S )NzCannot inject class attribute "z*", attribute already exists in class dict.)ÚRuntimeError)Úclass_attributesÚnameÚvaluer   r   r   Úinject_attribute>   s
   
ÿr    c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚLazyLoadedWaiterModelat  A lazily loaded waiter model

    This does not load the service waiter model until an attempt is made
    to retrieve the waiter model for a specific waiter. This is helpful
    in docstring generation where we do not need to actually need to grab
    the waiter-2.json until it is accessed through a ``get_waiter`` call
    when the docstring is generated/accessed.
    c                 C   s   || _ || _|| _d S ©N)Ú_sessionÚ_service_nameÚ_api_version)ÚselfÚ
bc_sessionr   Úapi_versionr   r   r   Ú__init__R   s   
zLazyLoadedWaiterModel.__init__c                 C   s   | j  | j| j¡ |¡S r"   )r#   Úget_waiter_modelr$   r%   Ú
get_waiter)r&   Úwaiter_namer   r   r   r+   W   s
   ÿþz LazyLoadedWaiterModel.get_waiterN)r	   r
   r   r   r)   r+   r   r   r   r   r!   H   s    	r!   N)	Úcollectionsr   Ú	importlibr   Ú_ServiceContextr   r   r    r!   r   r   r   r   Ú<module>   s   þ
