B ’äî\ ã@sbddlZddlmZedddddgƒZGdd„deƒZd d „Zd d „Zd d„ZGdd„deƒZ dS)éN)Ú namedtupleÚServiceContextÚ service_nameZ service_modelZservice_waiter_modelZresource_json_definitionsc@seZdZdZdS)raProvides 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 ú,/tmp/pip-build-uw_ogi45/boto3/boto3/utils.pyrscCst|ƒtj|S)zIImport module given a name. Does not support relative imports. )Ú __import__ÚsysÚmodules)Únamer r r Ú import_module.src s|‰‡‡fdd„}|S)Ncs2ˆ dd¡\}}t|ƒ}| ˆ¡t||ƒf|ŽS)NÚ.é)ÚrsplitrÚupdateÚgetattr)ÚkwargsÚmoduleZ function_name)Ú full_nameÚ parent_kwargsr r Ú_handler;s zlazy_call.._handlerr )rrrr )rrr Ú lazy_call8srcCs"||krtd|ƒ‚n|||<dS)NzKCannot inject class attribute "%s", attribute already exists in class dict.)Ú RuntimeError)Zclass_attributesrÚvaluer r r Úinject_attributeDs  rc@s eZdZdZdd„Zdd„ZdS)ÚLazyLoadedWaiterModelatA 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. cCs||_||_||_dS)N)Ú_sessionÚ _service_nameÚ _api_version)ÚselfZ bc_sessionrÚ api_versionr r r Ú__init__VszLazyLoadedWaiterModel.__init__cCs|j |j|j¡ |¡S)N)rZget_waiter_modelr r!Ú get_waiter)r"Z waiter_namer r r r%[sz LazyLoadedWaiterModel.get_waiterN)rrrrr$r%r r r r rMsr) r Ú collectionsrZ_ServiceContextrrrrÚobjectrr r r r Ú s