o |nh^@sJdZddlZddlmZmZddlmZeeZ GdddeedZ dS)z3Base class used by all hvac api "category" classes.N)ABCMetaabstractmethod) VaultApiBasecsjeZdZdZfddZddZeddZejddZee d d Z ed d Z e d dZ ZS)VaultApiCategoryzBase class for API categories.cs\||_g|_|jD]}|j}|j|||d}t||||q tj |ddS)zAPI Category class constructor. :param adapter: Instance of :py:class:`hvac.adapters.Adapter`; used for performing HTTP requests. :type adapter: hvac.adapters.Adapter )adapterN) _adapterimplemented_class_namesimplemented_classes__name__lowerappendsetattrget_private_attr_namesuper__init__)selfrimplemented_class class_nameauth_method_instance __class__F/usr/local/lib/python3.10/dist-packages/hvac/api/vault_api_category.pyr s    zVaultApiCategory.__init__cCsN|dkrt||jvr||}t||S|dd|jDvr%td|t)aGet an instance of an class instance in this category where available. :param item: Name of the class being requested. :type item: str | unicode :return: The requested class instance where available. :rtype: hvac.api.VaultApiBase rcSsg|]}|qSr)r ).0urrr *sz0VaultApiCategory.__getattr__..z1"%s" auth method class not currently implemented.)AttributeErrorrrgetattrunimplemented_classesNotImplementedError)ritemprivate_attr_namerrr __getattr__s   zVaultApiCategory.__getattr__cCs|jS)zRetrieve the adapter instance under the "_adapter" property in use by this class. :return: The adapter instance in use by this class. :rtype: hvac.adapters.Adapter )rrrrrr0szVaultApiCategory.adaptercCs2||_|jD]}|j}|t|||_qdS)aQSets the adapter instance under the "_adapter" property in use by this class. Also sets the adapter property for all implemented classes under this category. :param adapter: New adapter instance to set for this class and all implemented classes under this category. :type adapter: hvac.adapters.Adapter N)rr r r rrr)rrrrrrrr9s   cCt)zList of implemented classes under this category. :return: List of implemented classes under this category. :rtype: List[hvac.api.VaultApiBase] rr#rrrr Gsz$VaultApiCategory.implemented_classescCr$)zList of known unimplemented classes under this category. :return: List of known unimplemented classes under this category. :rtype: List[str] r%r#rrrrQsz&VaultApiCategory.unimplemented_classescCsd|}|S)aHelper method to prepend a leading underscore to a provided class name. :param class_name: Name of a class under this category. :type class_name: str|unicode :return: The private attribute label for the provided class. :rtype: str _r)rr!rrrrZs z&VaultApiCategory.get_private_attr_name)r __module__ __qualname____doc__rr"propertyrsetterrr r staticmethodr __classcell__rrrrr s      r) metaclass) r)loggingabcrrhvac.api.vault_api_baser getLoggerr loggerrrrrrs