B ܁[ @sbddlZddlmZedddddgZGdddeZd d Zd d Zd dZGdddeZ dS)N) namedtupleServiceContext service_name service_modelservice_waiter_modelresource_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 L/Users/kashii/Desktop/Projects/Workshops/worker-safety/lambda/boto3/utils.pyrscCst|tj|S)zIImport module given a name. Does not support relative imports. ) __import__sysmodules)namer r r import_module.src s|fdd}|S)Ncs2dd\}}t|}|t||f|S)N.)rsplitrupdategetattr)kwargsmodule 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)class_attributesrvaluer r r inject_attributeDs  r"c@s eZdZdZddZddZdS)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)r$get_waiter_modelr%r& get_waiter)r' waiter_namer r r r+[sz LazyLoadedWaiterModel.get_waiterN)rr r r r)r+r r r r r#Msr#) r collectionsrZ_ServiceContextrrrr"objectr#r r r r  s