forked from python-gitlab/python-gitlab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeature_flag_user_lists.py
More file actions
27 lines (20 loc) · 921 Bytes
/
Copy pathfeature_flag_user_lists.py
File metadata and controls
27 lines (20 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""
GitLab API:
https://docs.gitlab.com/api/feature_flag_user_lists
"""
from __future__ import annotations
from gitlab import types
from gitlab.base import RESTObject
from gitlab.mixins import CRUDMixin, ObjectDeleteMixin, SaveMixin
from gitlab.types import RequiredOptional
__all__ = ["ProjectFeatureFlagUserList", "ProjectFeatureFlagUserListManager"]
class ProjectFeatureFlagUserList(SaveMixin, ObjectDeleteMixin, RESTObject):
_id_attr = "iid"
class ProjectFeatureFlagUserListManager(CRUDMixin[ProjectFeatureFlagUserList]):
_path = "/projects/{project_id}/feature_flags_user_lists"
_obj_cls = ProjectFeatureFlagUserList
_from_parent_attrs = {"project_id": "id"}
_create_attrs = RequiredOptional(required=("name", "user_xids"))
_update_attrs = RequiredOptional(optional=("name", "user_xids"))
_list_filters = ("search",)
_types = {"user_xids": types.CommaSeparatedStringAttribute}