a *Na@sddlmZddlmZmZmZddlmZm Z m Z m Z m Z m Z mZmZgdZGdddee e eZGddde eee eZGd d d ee e eZGd d d e eee eZd S)) exceptions)RequiredOptional RESTManager RESTObject) CreateMixin DeleteMixin ListMixinObjectDeleteMixin RetrieveMixin SaveMixinSubscribableMixin UpdateMixin) GroupLabelGroupLabelManager ProjectLabelProjectLabelManagerc@s$eZdZdZeejddZdS)rnamecKs,|}|jjd|fi|}||dSauSaves the changes made to the object to the server. The object is updated to match what the server returns. Args: **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct. GitlabUpdateError: If the server cannot perform the request. NZ_get_updated_datamanagerupdate _update_attrsselfkwargsZ updated_dataZ server_datars/private/var/folders/js/6pj4vh5d4zd0k6bxv74qrbhr0000gr/T/pip-target-22xwyzbs/lib/python/gitlab/v4/objects/labels.pysaves zGroupLabel.saveN__name__ __module__ __qualname__Z_id_attrexc on_http_errorZGitlabUpdateErrorrrrrrrs rcsZeZdZdZeZddiZedddZedddZ dfd d Z e e j d d ZZS)rz/groups/%(group_id)s/labelsZgroup_ididrcolor descriptionpriorityrequiredoptionalrnew_namer&r(r)Nc s,|pi}|r||d<tjfd|d|SzUpdate a Label on the server. Args: name: The name of the label **kwargs: Extra options to send to the server (e.g. sudo) rN)r$new_datasuperrrrr1r __class__rrr:szGroupLabelManager.updatecKs"|jj|jfdd|ii|dSaDDelete a Label on the server. Args: name: The name of the label **kwargs: Extra options to send to the server (e.g. sudo) Raises: GitlabAuthenticationError: If authentication is not correct GitlabDeleteError: If the server cannot perform the request Z query_datarNgitlabZ http_deletepathrrrrrrdeleteGs zGroupLabelManager.delete)N)rr r!_pathr_obj_cls_from_parent_attrsr _create_attrsrrr"r#GitlabDeleteErrorr< __classcell__rrr5rr.s rc@s$eZdZdZeejddZdS)rrcKs,|}|jjd|fi|}||dSrrrrrrrZs zProjectLabel.saveNrrrrrrVs rcsZeZdZdZeZddiZedddZedddZ dfd d Z e e j d d ZZS)rz/projects/%(project_id)s/labelsZ project_idr$r%r'r*r-r.Nc s,|pi}|r||d<tjfd|d|Sr0r2r4r5rrr|szProjectLabelManager.updatecKs"|jj|jfdd|ii|dSr7r8r;rrrr<s zProjectLabelManager.delete)N)rr r!r=rr>r?rr@rrr"r#rAr<rBrrr5rrns rN)r9rr"Z gitlab.baserrrZ gitlab.mixinsrrrr r r r r __all__rrrrrrrrs ( (