@@ -62,7 +62,7 @@ def compound_metrics(self, **kwargs):
6262 return self .gitlab .http_get ('/sidekiq/compound_metrics' , ** kwargs )
6363
6464
65- class UserEmail (RESTObject ):
65+ class UserEmail (ObjectDeleteMixin , RESTObject ):
6666 _short_print_attr = 'email'
6767
6868
@@ -73,7 +73,7 @@ class UserEmailManager(RetrieveMixin, CreateMixin, DeleteMixin, RESTManager):
7373 _create_attrs = (('email' , ), tuple ())
7474
7575
76- class UserKey (RESTObject ):
76+ class UserKey (ObjectDeleteMixin , RESTObject ):
7777 pass
7878
7979
@@ -101,7 +101,7 @@ class UserProjectManager(CreateMixin, RESTManager):
101101 )
102102
103103
104- class User (SaveMixin , RESTObject ):
104+ class User (SaveMixin , ObjectDeleteMixin , RESTObject ):
105105 _short_print_attr = 'username'
106106 _managers = (
107107 ('emails' , 'UserEmailManager' ),
@@ -162,7 +162,7 @@ def _sanitize_data(self, data, action):
162162 return new_data
163163
164164
165- class CurrentUserEmail (RESTObject ):
165+ class CurrentUserEmail (ObjectDeleteMixin , RESTObject ):
166166 _short_print_attr = 'email'
167167
168168
@@ -173,7 +173,7 @@ class CurrentUserEmailManager(RetrieveMixin, CreateMixin, DeleteMixin,
173173 _create_attrs = (('email' , ), tuple ())
174174
175175
176- class CurrentUserKey (RESTObject ):
176+ class CurrentUserKey (ObjectDeleteMixin , RESTObject ):
177177 _short_print_attr = 'title'
178178
179179
@@ -231,7 +231,7 @@ def _sanitize_data(self, data, action):
231231 return new_data
232232
233233
234- class BroadcastMessage (SaveMixin , RESTObject ):
234+ class BroadcastMessage (SaveMixin , ObjectDeleteMixin , RESTObject ):
235235 pass
236236
237237
@@ -308,12 +308,12 @@ class GroupIssueManager(GetFromListMixin, RESTManager):
308308 _list_filters = ('state' , 'labels' , 'milestone' , 'order_by' , 'sort' )
309309
310310
311- class GroupMember (SaveMixin , RESTObject ):
311+ class GroupMember (SaveMixin , ObjectDeleteMixin , RESTObject ):
312312 _short_print_attr = 'username'
313313
314314
315315class GroupMemberManager (GetFromListMixin , CreateMixin , UpdateMixin ,
316- RESTManager ):
316+ DeleteMixin , RESTManager ):
317317 _path = '/groups/%(group_id)s/members'
318318 _obj_cls = GroupMember
319319 _from_parent_attrs = {'group_id' : 'id' }
@@ -331,7 +331,7 @@ class GroupNotificationSettingsManager(NotificationSettingsManager):
331331 _from_parent_attrs = {'group_id' : 'id' }
332332
333333
334- class GroupAccessRequest (AccessRequestMixin , RESTObject ):
334+ class GroupAccessRequest (AccessRequestMixin , ObjectDeleteMixin , RESTObject ):
335335 pass
336336
337337
@@ -342,7 +342,7 @@ class GroupAccessRequestManager(GetFromListMixin, CreateMixin, DeleteMixin,
342342 _from_parent_attrs = {'group_id' : 'id' }
343343
344344
345- class Hook (RESTObject ):
345+ class Hook (ObjectDeleteMixin , RESTObject ):
346346 _url = '/hooks'
347347 _short_print_attr = 'url'
348348
@@ -378,7 +378,7 @@ class LicenseManager(RetrieveMixin, RESTManager):
378378 _optional_get_attrs = ('project' , 'fullname' )
379379
380380
381- class Snippet (SaveMixin , RESTObject ):
381+ class Snippet (SaveMixin , ObjectDeleteMixin , RESTObject ):
382382 _constructor_types = {'author' : 'User' }
383383 _short_print_attr = 'title'
384384
@@ -433,7 +433,7 @@ class NamespaceManager(GetFromListMixin, RESTManager):
433433 _list_filters = ('search' , )
434434
435435
436- class ProjectBoardList (SaveMixin , RESTObject ):
436+ class ProjectBoardList (SaveMixin , ObjectDeleteMixin , RESTObject ):
437437 _constructor_types = {'label' : 'ProjectLabel' }
438438
439439
@@ -457,7 +457,7 @@ class ProjectBoardManager(GetFromListMixin, RESTManager):
457457 _from_parent_attrs = {'project_id' : 'id' }
458458
459459
460- class ProjectBranch (RESTObject ):
460+ class ProjectBranch (ObjectDeleteMixin , RESTObject ):
461461 _constructor_types = {'author' : 'User' , "committer" : "User" }
462462 _id_attr = 'name'
463463
@@ -640,7 +640,7 @@ class ProjectCommitManager(RetrieveMixin, CreateMixin, RESTManager):
640640 ('author_email' , 'author_name' ))
641641
642642
643- class ProjectEnvironment (SaveMixin , RESTObject ):
643+ class ProjectEnvironment (SaveMixin , ObjectDeleteMixin , RESTObject ):
644644 pass
645645
646646
@@ -653,7 +653,7 @@ class ProjectEnvironmentManager(GetFromListMixin, CreateMixin, UpdateMixin,
653653 _update_attrs = (tuple (), ('name' , 'external_url' ))
654654
655655
656- class ProjectKey (RESTObject ):
656+ class ProjectKey (ObjectDeleteMixin , RESTObject ):
657657 pass
658658
659659
@@ -694,7 +694,7 @@ class ProjectForkManager(CreateMixin, RESTManager):
694694 _create_attrs = (tuple (), ('namespace' , ))
695695
696696
697- class ProjectHook (SaveMixin , RESTObject ):
697+ class ProjectHook (SaveMixin , ObjectDeleteMixin , RESTObject ):
698698 requiredUrlAttrs = ['project_id' ]
699699 requiredCreateAttrs = ['url' ]
700700 optionalCreateAttrs = ['push_events' , 'issues_events' , 'note_events' ,
@@ -722,12 +722,11 @@ class ProjectHookManager(CRUDMixin, RESTManager):
722722 )
723723
724724
725- class ProjectIssueNote (SaveMixin , RESTObject ):
725+ class ProjectIssueNote (SaveMixin , ObjectDeleteMixin , RESTObject ):
726726 _constructor_types = {'author' : 'User' }
727727
728728
729- class ProjectIssueNoteManager (RetrieveMixin , CreateMixin , UpdateMixin ,
730- RESTManager ):
729+ class ProjectIssueNoteManager (CRUDMixin , RESTManager ):
731730 _path = '/projects/%(project_id)s/issues/%(issue_iid)s/notes'
732731 _obj_cls = ProjectIssueNote
733732 _from_parent_attrs = {'project_id' : 'project_id' , 'issue_iid' : 'iid' }
@@ -736,7 +735,7 @@ class ProjectIssueNoteManager(RetrieveMixin, CreateMixin, UpdateMixin,
736735
737736
738737class ProjectIssue (SubscribableMixin , TodoMixin , TimeTrackingMixin , SaveMixin ,
739- RESTObject ):
738+ ObjectDeleteMixin , RESTObject ):
740739 _constructor_types = {'author' : 'User' , 'assignee' : 'User' , 'milestone' :
741740 'ProjectMilestone' }
742741 _short_print_attr = 'title'
@@ -765,7 +764,7 @@ class ProjectIssueManager(CRUDMixin, RESTManager):
765764 'updated_at' , 'state_event' , 'due_date' ))
766765
767766
768- class ProjectMember (SaveMixin , RESTObject ):
767+ class ProjectMember (SaveMixin , ObjectDeleteMixin , RESTObject ):
769768 requiredCreateAttrs = ['access_level' , 'user_id' ]
770769 optionalCreateAttrs = ['expires_at' ]
771770 requiredUpdateAttrs = ['access_level' ]
@@ -802,7 +801,7 @@ class ProjectNotificationSettingsManager(NotificationSettingsManager):
802801 _from_parent_attrs = {'project_id' : 'id' }
803802
804803
805- class ProjectTag (RESTObject ):
804+ class ProjectTag (ObjectDeleteMixin , RESTObject ):
806805 _constructor_types = {'release' : 'ProjectTagRelease' ,
807806 'commit' : 'ProjectCommit' }
808807 _id_attr = 'name'
@@ -846,7 +845,7 @@ class ProjectMergeRequestDiffManager(RetrieveMixin, RESTManager):
846845 _from_parent_attrs = {'project_id' : 'project_id' , 'mr_iid' : 'iid' }
847846
848847
849- class ProjectMergeRequestNote (SaveMixin , RESTObject ):
848+ class ProjectMergeRequestNote (SaveMixin , ObjectDeleteMixin , RESTObject ):
850849 _constructor_types = {'author' : 'User' }
851850
852851
@@ -859,7 +858,7 @@ class ProjectMergeRequestNoteManager(CRUDMixin, RESTManager):
859858
860859
861860class ProjectMergeRequest (SubscribableMixin , TodoMixin , TimeTrackingMixin ,
862- SaveMixin , RESTObject ):
861+ SaveMixin , ObjectDeleteMixin , RESTObject ):
863862 _constructor_types = {'author' : 'User' , 'assignee' : 'User' }
864863 _id_attr = 'iid'
865864
@@ -952,7 +951,7 @@ class ProjectMergeRequestManager(CRUDMixin, RESTManager):
952951 _list_filters = ('iids' , 'state' , 'order_by' , 'sort' )
953952
954953
955- class ProjectMilestone (SaveMixin , RESTObject ):
954+ class ProjectMilestone (SaveMixin , ObjectDeleteMixin , RESTObject ):
956955 _short_print_attr = 'title'
957956
958957 def issues (self , ** kwargs ):
@@ -995,7 +994,8 @@ class ProjectMilestoneManager(RetrieveMixin, CreateMixin, DeleteMixin,
995994 _list_filters = ('iids' , 'state' )
996995
997996
998- class ProjectLabel (SubscribableMixin , SaveMixin , RESTObject ):
997+ class ProjectLabel (SubscribableMixin , SaveMixin , ObjectDeleteMixin ,
998+ RESTObject ):
999999 _id_attr = 'name'
10001000 requiredCreateAttrs = ['name' , 'color' ]
10011001 optionalCreateAttrs = ['description' , 'priority' ]
@@ -1004,7 +1004,7 @@ class ProjectLabel(SubscribableMixin, SaveMixin, RESTObject):
10041004
10051005
10061006class ProjectLabelManager (GetFromListMixin , CreateMixin , UpdateMixin ,
1007- RESTManager ):
1007+ DeleteMixin , RESTManager ):
10081008 _path = '/projects/%(project_id)s/labels'
10091009 _obj_cls = ProjectLabel
10101010 _from_parent_attrs = {'project_id' : 'id' }
@@ -1038,7 +1038,7 @@ def save(self, **kwargs):
10381038 self ._update_attrs (server_data )
10391039
10401040
1041- class ProjectFile (SaveMixin , RESTObject ):
1041+ class ProjectFile (SaveMixin , ObjectDeleteMixin , RESTObject ):
10421042 _id_attr = 'file_path'
10431043 _short_print_attr = 'file_path'
10441044
@@ -1145,7 +1145,7 @@ class ProjectSnippetNoteManager(RetrieveMixin, CreateMixin, RESTManager):
11451145 _create_attrs = (('body' , ), tuple ())
11461146
11471147
1148- class ProjectSnippet (SaveMixin , RESTObject ):
1148+ class ProjectSnippet (SaveMixin , ObjectDeleteMixin , RESTObject ):
11491149 _url = '/projects/%(project_id)s/snippets'
11501150 _constructor_types = {'author' : 'User' }
11511151 _short_print_attr = 'title'
@@ -1180,7 +1180,7 @@ class ProjectSnippetManager(CRUDMixin, RESTManager):
11801180 _update_attrs = (tuple (), ('title' , 'file_name' , 'code' , 'visibility' ))
11811181
11821182
1183- class ProjectTrigger (SaveMixin , RESTObject ):
1183+ class ProjectTrigger (SaveMixin , ObjectDeleteMixin , RESTObject ):
11841184 def take_ownership (self , ** kwargs ):
11851185 """Update the owner of a trigger."""
11861186 path = '%s/%s/take_ownership' % (self .manager .path , self .get_id ())
@@ -1196,7 +1196,7 @@ class ProjectTriggerManager(CRUDMixin, RESTManager):
11961196 _update_attrs = (('description' , ), tuple ())
11971197
11981198
1199- class ProjectVariable (SaveMixin , RESTObject ):
1199+ class ProjectVariable (SaveMixin , ObjectDeleteMixin , RESTObject ):
12001200 _id_attr = 'key'
12011201
12021202
@@ -1297,7 +1297,7 @@ def available(self, **kwargs):
12971297 return list (ProjectService ._service_attrs .keys ())
12981298
12991299
1300- class ProjectAccessRequest (AccessRequestMixin , RESTObject ):
1300+ class ProjectAccessRequest (AccessRequestMixin , ObjectDeleteMixin , RESTObject ):
13011301 pass
13021302
13031303
@@ -1318,7 +1318,7 @@ class ProjectDeploymentManager(RetrieveMixin, RESTManager):
13181318 _from_parent_attrs = {'project_id' : 'id' }
13191319
13201320
1321- class ProjectRunner (RESTObject ):
1321+ class ProjectRunner (ObjectDeleteMixin , RESTObject ):
13221322 canUpdate = False
13231323 requiredCreateAttrs = ['runner_id' ]
13241324
@@ -1330,7 +1330,7 @@ class ProjectRunnerManager(NoUpdateMixin, RESTManager):
13301330 _create_attrs = (('runner_id' , ), tuple ())
13311331
13321332
1333- class Project (SaveMixin , RESTObject ):
1333+ class Project (SaveMixin , ObjectDeleteMixin , RESTObject ):
13341334 _constructor_types = {'owner' : 'User' , 'namespace' : 'Group' }
13351335 _short_print_attr = 'path'
13361336 _managers = (
@@ -1547,7 +1547,7 @@ def trigger_pipeline(self, ref, token, variables={}, **kwargs):
15471547 self .manager .gitlab .http_post (path , post_data = post_data , ** kwargs )
15481548
15491549
1550- class Runner (SaveMixin , RESTObject ):
1550+ class Runner (SaveMixin , ObjectDeleteMixin , RESTObject ):
15511551 pass
15521552
15531553
@@ -1574,7 +1574,7 @@ def all(self, scope=None, **kwargs):
15741574 return self .gitlab .http_list (path , query_data , ** kwargs )
15751575
15761576
1577- class Todo (RESTObject ):
1577+ class Todo (ObjectDeleteMixin , RESTObject ):
15781578 def mark_as_done (self , ** kwargs ):
15791579 """Mark the todo as done.
15801580
@@ -1640,7 +1640,7 @@ class GroupProjectManager(GetFromListMixin, RESTManager):
16401640 'ci_enabled_first' )
16411641
16421642
1643- class Group (SaveMixin , RESTObject ):
1643+ class Group (SaveMixin , ObjectDeleteMixin , RESTObject ):
16441644 _short_print_attr = 'name'
16451645 _managers = (
16461646 ('accessrequests' , 'GroupAccessRequestManager' ),
0 commit comments