a *Na@sddlmZddlmZddlmZmZmZddlm Z m Z m Z m Z gdZ GdddeZGdd d e eZGd d d e e eZGd d d e eZdS))cli) exceptions)RequiredOptional RESTManager RESTObject) CRUDMixin ListMixinObjectDeleteMixin SaveMixin) DeployKeyDeployKeyManager ProjectKeyProjectKeyManagerc@s eZdZdS)r N__name__ __module__ __qualname__rrx/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/gitlab/v4/objects/deploy_keys.pyr sr c@seZdZdZeZdS)r z /deploy_keysN)rrr_pathr _obj_clsrrrrr sr c@s eZdZdS)r Nrrrrrr sr c@sReZdZdZeZddiZedddZeddZ e dd e e jd d Zd S) rz$/projects/%(project_id)s/deploy_keysZ project_idid)titlekey)can_push)requiredoptional)rr)r)key_idcKs&d|j|f}|jj|fi|dS)aXEnable a deploy key for a project. Args: key_id (int): The ID of the key to enable **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabProjectDeployKeyError: If the key could not be enabled z %s/%s/enableN)pathgitlabZ http_post)selfrkwargsrrrrenable"s zProjectKeyManager.enableN)rrrrr rZ_from_parent_attrsrZ _create_attrsZ _update_attrsrZregister_custom_actionexcZ on_http_errorZGitlabProjectDeployKeyErrorr"rrrrrs    rN)rrrr#Z gitlab.baserrrZ gitlab.mixinsrrr r __all__r r r rrrrrs