codecraftai-restclient-gitlab 1.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ccai/gitlab/py.typed +0 -0
- ccai/gitlab/rest/aspectsrest.py +120 -0
- ccai/gitlab/rest/clients/__init__.py +0 -0
- ccai/gitlab/rest/clients/gitlabrestclient.py +118 -0
- ccai/gitlab/rest/clients/groups/__init__.py +0 -0
- ccai/gitlab/rest/clients/groups/accessrequests.py +230 -0
- ccai/gitlab/rest/clients/groups/admin.py +41 -0
- ccai/gitlab/rest/clients/groups/alertmanagement.py +149 -0
- ccai/gitlab/rest/clients/groups/application.py +68 -0
- ccai/gitlab/rest/clients/groups/applications.py +95 -0
- ccai/gitlab/rest/clients/groups/avatar.py +41 -0
- ccai/gitlab/rest/clients/groups/badges.py +338 -0
- ccai/gitlab/rest/clients/groups/batchedbackgroundmigrations.py +122 -0
- ccai/gitlab/rest/clients/groups/branches.py +230 -0
- ccai/gitlab/rest/clients/groups/broadcastmessages.py +149 -0
- ccai/gitlab/rest/clients/groups/bulkimports.py +176 -0
- ccai/gitlab/rest/clients/groups/clusters.py +149 -0
- ccai/gitlab/rest/clients/groups/jobs.py +95 -0
- ccai/gitlab/rest/clients/groups/metadata.py +68 -0
- ccai/gitlab/rest/clients/groups/migrations.py +41 -0
- ccai/gitlab/rest/clients/groups/pipelinecomposition.py +146 -0
- ccai/gitlab/rest/clients/groups/planlimits.py +68 -0
- ccai/gitlab/rest/clients/parameters/__init__.py +0 -0
- ccai/gitlab/rest/clients/parameters/accessrequests.py +222 -0
- ccai/gitlab/rest/clients/parameters/admin.py +31 -0
- ccai/gitlab/rest/clients/parameters/alertmanagement.py +147 -0
- ccai/gitlab/rest/clients/parameters/application.py +27 -0
- ccai/gitlab/rest/clients/parameters/applications.py +51 -0
- ccai/gitlab/rest/clients/parameters/avatar.py +31 -0
- ccai/gitlab/rest/clients/parameters/badges.py +344 -0
- ccai/gitlab/rest/clients/parameters/batchedbackgroundmigrations.py +105 -0
- ccai/gitlab/rest/clients/parameters/branches.py +236 -0
- ccai/gitlab/rest/clients/parameters/broadcastmessages.py +123 -0
- ccai/gitlab/rest/clients/parameters/bulkimports.py +173 -0
- ccai/gitlab/rest/clients/parameters/clusters.py +100 -0
- ccai/gitlab/rest/clients/parameters/jobs.py +88 -0
- ccai/gitlab/rest/clients/parameters/metadata.py +11 -0
- ccai/gitlab/rest/clients/parameters/migrations.py +29 -0
- ccai/gitlab/rest/clients/parameters/pipelinecomposition.py +123 -0
- ccai/gitlab/rest/clients/parameters/planlimits.py +47 -0
- ccai/gitlab/rest/clients/responses/__init__.py +0 -0
- ccai/gitlab/rest/clients/responses/accessrequests.py +157 -0
- ccai/gitlab/rest/clients/responses/admin.py +24 -0
- ccai/gitlab/rest/clients/responses/alertmanagement.py +100 -0
- ccai/gitlab/rest/clients/responses/application.py +43 -0
- ccai/gitlab/rest/clients/responses/applications.py +62 -0
- ccai/gitlab/rest/clients/responses/avatar.py +24 -0
- ccai/gitlab/rest/clients/responses/badges.py +233 -0
- ccai/gitlab/rest/clients/responses/batchedbackgroundmigrations.py +81 -0
- ccai/gitlab/rest/clients/responses/branches.py +157 -0
- ccai/gitlab/rest/clients/responses/broadcastmessages.py +100 -0
- ccai/gitlab/rest/clients/responses/bulkimports.py +119 -0
- ccai/gitlab/rest/clients/responses/clusters.py +100 -0
- ccai/gitlab/rest/clients/responses/jobs.py +62 -0
- ccai/gitlab/rest/clients/responses/metadata.py +43 -0
- ccai/gitlab/rest/clients/responses/migrations.py +24 -0
- ccai/gitlab/rest/clients/responses/pipelinecomposition.py +100 -0
- ccai/gitlab/rest/clients/responses/planlimits.py +43 -0
- ccai/gitlab/rest/descriptions/gitlab-openapi-hints.yaml +195 -0
- ccai/gitlab/rest/descriptions/gitlab-openapi-spec.yaml +3635 -0
- ccai/gitlab/rest/generation/__init__.py +0 -0
- ccai/gitlab/rest/generation/restclientgenerator.py +581 -0
- ccai/gitlab/rest/itemsresult.py +274 -0
- ccai/gitlab/rest/restapigroup.py +17 -0
- ccai/gitlab/rest/restclientbase.py +676 -0
- ccai/gitlab/rest/restclientutils.py +0 -0
- codecraftai_restclient_gitlab-1.2.0.dist-info/METADATA +90 -0
- codecraftai_restclient_gitlab-1.2.0.dist-info/RECORD +70 -0
- codecraftai_restclient_gitlab-1.2.0.dist-info/WHEEL +4 -0
- codecraftai_restclient_gitlab-1.2.0.dist-info/licenses/LICENSE.md +204 -0
ccai/gitlab/py.typed
ADDED
|
File without changes
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
|
|
2
|
+
"""
|
|
3
|
+
.. module:: aspectsrest
|
|
4
|
+
:platform: Darwin, Linux, Unix, Windows
|
|
5
|
+
:synopsis: aspectsrest module.
|
|
6
|
+
|
|
7
|
+
.. moduleauthor:: Myron Walker <myron.walker@gmail.com>
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
__author__ = "Myron Walker"
|
|
12
|
+
__copyright__ = "Copyright 2025, Code Craft AI LLC"
|
|
13
|
+
__credits__ = []
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from typing import List, Optional
|
|
17
|
+
|
|
18
|
+
import logging
|
|
19
|
+
|
|
20
|
+
from enum import IntEnum
|
|
21
|
+
|
|
22
|
+
from requests import Session
|
|
23
|
+
|
|
24
|
+
from ccai.aspects.aspects import Aspects as AspectsBase
|
|
25
|
+
|
|
26
|
+
class ActionPattern(IntEnum):
|
|
27
|
+
"""
|
|
28
|
+
An action pattern to use when using aspects to change the behavior of an API.
|
|
29
|
+
"""
|
|
30
|
+
SINGLE_CALL = 0
|
|
31
|
+
SINGLE_CONNECTED_CALL = 1
|
|
32
|
+
DO_UNTIL_SUCCESS = 2
|
|
33
|
+
DO_WHILE_SUCCESS = 3
|
|
34
|
+
DO_UNTIL_CONNECTION_FAILURE = 4
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class LoggingPattern:
|
|
38
|
+
"""
|
|
39
|
+
A logging pattern to use when logging commands.
|
|
40
|
+
"""
|
|
41
|
+
ALL_RESULTS = 0
|
|
42
|
+
FAILURE_ONLY = 1
|
|
43
|
+
SUCCESS_ONLY = 2
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
DEFAULT_COMPLETION_TIMEOUT = 600
|
|
47
|
+
DEFAULT_COMPLETION_INTERVAL = 10
|
|
48
|
+
|
|
49
|
+
DEFAULT_CONNECTION_TIMEOUT = 16
|
|
50
|
+
DEFAULT_CONNECTION_INTERVAL = 2
|
|
51
|
+
DEFAULT_ALLOWED_CONNECTION_EXCEPTIONS: List[BaseException] = []
|
|
52
|
+
|
|
53
|
+
DEFAULT_INACTIVITY_TIMEOUT = 600
|
|
54
|
+
DEFAULT_INACTIVITY_INTERVAL = .5
|
|
55
|
+
|
|
56
|
+
DEFAULT_MONITOR_DELAY = 30
|
|
57
|
+
|
|
58
|
+
DEFAULT_RETRY_LOGGING_INTERVAL = 5
|
|
59
|
+
|
|
60
|
+
DEFAULT_LOGGING_PATTERN = LoggingPattern.ALL_RESULTS
|
|
61
|
+
|
|
62
|
+
DEFAULT_MUST_CONNECT = False
|
|
63
|
+
|
|
64
|
+
DEFAULT_ALLOWED_ERROR_CODES: List[int] = []
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AspectsRest(AspectsBase):
|
|
68
|
+
"""
|
|
69
|
+
Aspects container specialized for REST operations.
|
|
70
|
+
"""
|
|
71
|
+
def __init__(self, *, action_pattern: ActionPattern = ActionPattern.SINGLE_CALL,
|
|
72
|
+
completion_timeout: float = DEFAULT_COMPLETION_TIMEOUT,
|
|
73
|
+
completion_interval: float = DEFAULT_COMPLETION_INTERVAL,
|
|
74
|
+
connection_timeout: float = DEFAULT_CONNECTION_TIMEOUT,
|
|
75
|
+
inactivity_timeout: float = DEFAULT_INACTIVITY_TIMEOUT,
|
|
76
|
+
monitor_delay: float = DEFAULT_MONITOR_DELAY,
|
|
77
|
+
logging_pattern: LoggingPattern = DEFAULT_LOGGING_PATTERN,
|
|
78
|
+
retry_logging_interval: int = DEFAULT_RETRY_LOGGING_INTERVAL,
|
|
79
|
+
allowed_error_codes: List[int] = DEFAULT_ALLOWED_ERROR_CODES,
|
|
80
|
+
allowed_connection_exceptions: List[BaseException] = DEFAULT_ALLOWED_CONNECTION_EXCEPTIONS,
|
|
81
|
+
must_connect: bool = DEFAULT_MUST_CONNECT,
|
|
82
|
+
logger: Optional[logging.Logger]=None,
|
|
83
|
+
session: Optional[Session] = None):
|
|
84
|
+
"""
|
|
85
|
+
Initialize a set of REST call aspects.
|
|
86
|
+
|
|
87
|
+
:param action_pattern: Default action pattern for calls.
|
|
88
|
+
:param completion_timeout: Time in seconds to wait for completion.
|
|
89
|
+
:param completion_interval: Polling interval when waiting.
|
|
90
|
+
:param connection_timeout: Timeout for establishing connections.
|
|
91
|
+
:param inactivity_timeout: Timeout for inactivity in seconds.
|
|
92
|
+
:param monitor_delay: Delay before monitoring begins.
|
|
93
|
+
:param logging_pattern: Pattern used for call logging.
|
|
94
|
+
:param retry_logging_interval: Interval for retry log messages.
|
|
95
|
+
:param allowed_error_codes: HTTP status codes considered success.
|
|
96
|
+
:param allowed_connection_exceptions: Exceptions allowed during connect.
|
|
97
|
+
:param must_connect: Whether a connection must be established.
|
|
98
|
+
:param logger: Logger to use for messages.
|
|
99
|
+
:param session: Requests session to reuse.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
super().__init__(completion_interval=completion_interval, completion_timeout=completion_timeout,
|
|
103
|
+
connection_timeout=connection_timeout)
|
|
104
|
+
|
|
105
|
+
self.action_pattern=action_pattern
|
|
106
|
+
self.inactivity_timeout=inactivity_timeout
|
|
107
|
+
self.monitor_delay=monitor_delay
|
|
108
|
+
self.logging_pattern=logging_pattern
|
|
109
|
+
self.retry_logging_interval=retry_logging_interval
|
|
110
|
+
self.allowed_error_codes=allowed_error_codes
|
|
111
|
+
self.allowed_connection_exceptions=allowed_connection_exceptions
|
|
112
|
+
self.must_connect=must_connect
|
|
113
|
+
self.logger=logger
|
|
114
|
+
self.session = session
|
|
115
|
+
|
|
116
|
+
self.freeze()
|
|
117
|
+
return
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
DEFAULT_REST_ASPECTS = AspectsRest()
|
|
File without changes
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ccai.gitlab.rest.aspectsrest import AspectsRest, DEFAULT_REST_ASPECTS
|
|
6
|
+
from ccai.gitlab.rest.restclientbase import RestClientBase
|
|
7
|
+
from ccai.credentials.basecredential import BaseCredential
|
|
8
|
+
from ccai.gitlab.rest.clients.groups.accessrequests import AccessRequestsApiGroup
|
|
9
|
+
from ccai.gitlab.rest.clients.groups.admin import AdminApiGroup
|
|
10
|
+
from ccai.gitlab.rest.clients.groups.alertmanagement import AlertManagementApiGroup
|
|
11
|
+
from ccai.gitlab.rest.clients.groups.application import ApplicationApiGroup
|
|
12
|
+
from ccai.gitlab.rest.clients.groups.applications import ApplicationsApiGroup
|
|
13
|
+
from ccai.gitlab.rest.clients.groups.avatar import AvatarApiGroup
|
|
14
|
+
from ccai.gitlab.rest.clients.groups.badges import BadgesApiGroup
|
|
15
|
+
from ccai.gitlab.rest.clients.groups.batchedbackgroundmigrations import BatchedBackgroundMigrationsApiGroup
|
|
16
|
+
from ccai.gitlab.rest.clients.groups.branches import BranchesApiGroup
|
|
17
|
+
from ccai.gitlab.rest.clients.groups.broadcastmessages import BroadcastMessagesApiGroup
|
|
18
|
+
from ccai.gitlab.rest.clients.groups.bulkimports import BulkImportsApiGroup
|
|
19
|
+
from ccai.gitlab.rest.clients.groups.clusters import ClustersApiGroup
|
|
20
|
+
from ccai.gitlab.rest.clients.groups.jobs import JobsApiGroup
|
|
21
|
+
from ccai.gitlab.rest.clients.groups.metadata import MetadataApiGroup
|
|
22
|
+
from ccai.gitlab.rest.clients.groups.migrations import MigrationsApiGroup
|
|
23
|
+
from ccai.gitlab.rest.clients.groups.pipelinecomposition import PipelineCompositionApiGroup
|
|
24
|
+
from ccai.gitlab.rest.clients.groups.planlimits import PlanLimitsApiGroup
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class GitLabRestClient(RestClientBase):
|
|
28
|
+
"""
|
|
29
|
+
GitLab REST API client generated from the OpenAPI specification.
|
|
30
|
+
"""
|
|
31
|
+
def __init__(self, host: str, credential: BaseCredential, port: Optional[int] = None, scheme: Optional[str] = "https", aspects: AspectsRest = DEFAULT_REST_ASPECTS):
|
|
32
|
+
super().__init__(host, credential, port, scheme=scheme, aspects=aspects)
|
|
33
|
+
self._grp_access_requests = AccessRequestsApiGroup(self)
|
|
34
|
+
self._grp_admin = AdminApiGroup(self)
|
|
35
|
+
self._grp_alert_management = AlertManagementApiGroup(self)
|
|
36
|
+
self._grp_application = ApplicationApiGroup(self)
|
|
37
|
+
self._grp_applications = ApplicationsApiGroup(self)
|
|
38
|
+
self._grp_avatar = AvatarApiGroup(self)
|
|
39
|
+
self._grp_badges = BadgesApiGroup(self)
|
|
40
|
+
self._grp_batched_background_migrations = BatchedBackgroundMigrationsApiGroup(self)
|
|
41
|
+
self._grp_branches = BranchesApiGroup(self)
|
|
42
|
+
self._grp_broadcast_messages = BroadcastMessagesApiGroup(self)
|
|
43
|
+
self._grp_bulk_imports = BulkImportsApiGroup(self)
|
|
44
|
+
self._grp_clusters = ClustersApiGroup(self)
|
|
45
|
+
self._grp_jobs = JobsApiGroup(self)
|
|
46
|
+
self._grp_metadata = MetadataApiGroup(self)
|
|
47
|
+
self._grp_migrations = MigrationsApiGroup(self)
|
|
48
|
+
self._grp_pipeline_composition = PipelineCompositionApiGroup(self)
|
|
49
|
+
self._grp_plan_limits = PlanLimitsApiGroup(self)
|
|
50
|
+
return
|
|
51
|
+
|
|
52
|
+
@property
|
|
53
|
+
def access_requests(self) -> AccessRequestsApiGroup:
|
|
54
|
+
return self._grp_access_requests
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def admin(self) -> AdminApiGroup:
|
|
58
|
+
return self._grp_admin
|
|
59
|
+
|
|
60
|
+
@property
|
|
61
|
+
def alert_management(self) -> AlertManagementApiGroup:
|
|
62
|
+
return self._grp_alert_management
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def application(self) -> ApplicationApiGroup:
|
|
66
|
+
return self._grp_application
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def applications(self) -> ApplicationsApiGroup:
|
|
70
|
+
return self._grp_applications
|
|
71
|
+
|
|
72
|
+
@property
|
|
73
|
+
def avatar(self) -> AvatarApiGroup:
|
|
74
|
+
return self._grp_avatar
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def badges(self) -> BadgesApiGroup:
|
|
78
|
+
return self._grp_badges
|
|
79
|
+
|
|
80
|
+
@property
|
|
81
|
+
def batched_background_migrations(self) -> BatchedBackgroundMigrationsApiGroup:
|
|
82
|
+
return self._grp_batched_background_migrations
|
|
83
|
+
|
|
84
|
+
@property
|
|
85
|
+
def branches(self) -> BranchesApiGroup:
|
|
86
|
+
return self._grp_branches
|
|
87
|
+
|
|
88
|
+
@property
|
|
89
|
+
def broadcast_messages(self) -> BroadcastMessagesApiGroup:
|
|
90
|
+
return self._grp_broadcast_messages
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def bulk_imports(self) -> BulkImportsApiGroup:
|
|
94
|
+
return self._grp_bulk_imports
|
|
95
|
+
|
|
96
|
+
@property
|
|
97
|
+
def clusters(self) -> ClustersApiGroup:
|
|
98
|
+
return self._grp_clusters
|
|
99
|
+
|
|
100
|
+
@property
|
|
101
|
+
def jobs(self) -> JobsApiGroup:
|
|
102
|
+
return self._grp_jobs
|
|
103
|
+
|
|
104
|
+
@property
|
|
105
|
+
def metadata(self) -> MetadataApiGroup:
|
|
106
|
+
return self._grp_metadata
|
|
107
|
+
|
|
108
|
+
@property
|
|
109
|
+
def migrations(self) -> MigrationsApiGroup:
|
|
110
|
+
return self._grp_migrations
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def pipeline_composition(self) -> PipelineCompositionApiGroup:
|
|
114
|
+
return self._grp_pipeline_composition
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def plan_limits(self) -> PlanLimitsApiGroup:
|
|
118
|
+
return self._grp_plan_limits
|
|
File without changes
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ccai.gitlab.rest.aspectsrest import AspectsRest, DEFAULT_REST_ASPECTS
|
|
6
|
+
from ccai.gitlab.rest.restapigroup import RestApiGroup
|
|
7
|
+
from ccai.gitlab.rest.clients.parameters import accessrequests as parameters
|
|
8
|
+
from ccai.gitlab.rest.clients.responses import accessrequests as responses
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AccessRequestsApiGroup(RestApiGroup):
|
|
12
|
+
"""
|
|
13
|
+
Operations related to access requests
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def deleteapiv4groupsidaccessrequestsuserid(self, params: Optional[parameters.AccessRequestsDeleteapiv4groupsidaccessrequestsuseridParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsDeleteapiv4groupsidaccessrequestsuseridResponse:
|
|
17
|
+
"""
|
|
18
|
+
Denies an access request for the given user.
|
|
19
|
+
"""
|
|
20
|
+
if params is None:
|
|
21
|
+
params = parameters.AccessRequestsDeleteapiv4groupsidaccessrequestsuseridParams()
|
|
22
|
+
call_leaf = "/groups/{id}/access_requests/{user_id}"
|
|
23
|
+
path_params = params.path_params()
|
|
24
|
+
if path_params:
|
|
25
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
26
|
+
query_params = params.query_params()
|
|
27
|
+
header_params = params.header_params()
|
|
28
|
+
body_params = params.body_params()
|
|
29
|
+
exp_status = [204]
|
|
30
|
+
resp = self.client.perform_call(
|
|
31
|
+
leaf=call_leaf,
|
|
32
|
+
method="DELETE",
|
|
33
|
+
params=query_params if query_params else None,
|
|
34
|
+
body=body_params,
|
|
35
|
+
exp_status=exp_status,
|
|
36
|
+
headers=header_params if header_params else None,
|
|
37
|
+
context_msg=None,
|
|
38
|
+
aspects=aspects,
|
|
39
|
+
)
|
|
40
|
+
result = responses.AccessRequestsDeleteapiv4groupsidaccessrequestsuseridResponse(resp)
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def deleteapiv4projectsidaccessrequestsuserid(self, params: Optional[parameters.AccessRequestsDeleteapiv4projectsidaccessrequestsuseridParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsDeleteapiv4projectsidaccessrequestsuseridResponse:
|
|
44
|
+
"""
|
|
45
|
+
Denies an access request for the given user.
|
|
46
|
+
"""
|
|
47
|
+
if params is None:
|
|
48
|
+
params = parameters.AccessRequestsDeleteapiv4projectsidaccessrequestsuseridParams()
|
|
49
|
+
call_leaf = "/projects/{id}/access_requests/{user_id}"
|
|
50
|
+
path_params = params.path_params()
|
|
51
|
+
if path_params:
|
|
52
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
53
|
+
query_params = params.query_params()
|
|
54
|
+
header_params = params.header_params()
|
|
55
|
+
body_params = params.body_params()
|
|
56
|
+
exp_status = [204]
|
|
57
|
+
resp = self.client.perform_call(
|
|
58
|
+
leaf=call_leaf,
|
|
59
|
+
method="DELETE",
|
|
60
|
+
params=query_params if query_params else None,
|
|
61
|
+
body=body_params,
|
|
62
|
+
exp_status=exp_status,
|
|
63
|
+
headers=header_params if header_params else None,
|
|
64
|
+
context_msg=None,
|
|
65
|
+
aspects=aspects,
|
|
66
|
+
)
|
|
67
|
+
result = responses.AccessRequestsDeleteapiv4projectsidaccessrequestsuseridResponse(resp)
|
|
68
|
+
return result
|
|
69
|
+
|
|
70
|
+
def getapiv4groupsidaccessrequests(self, params: Optional[parameters.AccessRequestsGetapiv4groupsidaccessrequestsParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsGetapiv4groupsidaccessrequestsResponse:
|
|
71
|
+
"""
|
|
72
|
+
Gets a list of access requests for a group.
|
|
73
|
+
"""
|
|
74
|
+
if params is None:
|
|
75
|
+
params = parameters.AccessRequestsGetapiv4groupsidaccessrequestsParams()
|
|
76
|
+
call_leaf = "/groups/{id}/access_requests"
|
|
77
|
+
path_params = params.path_params()
|
|
78
|
+
if path_params:
|
|
79
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
80
|
+
query_params = params.query_params()
|
|
81
|
+
header_params = params.header_params()
|
|
82
|
+
body_params = params.body_params()
|
|
83
|
+
exp_status = [200]
|
|
84
|
+
resp = self.client.perform_call(
|
|
85
|
+
leaf=call_leaf,
|
|
86
|
+
method="GET",
|
|
87
|
+
params=query_params if query_params else None,
|
|
88
|
+
body=body_params,
|
|
89
|
+
exp_status=exp_status,
|
|
90
|
+
headers=header_params if header_params else None,
|
|
91
|
+
context_msg=None,
|
|
92
|
+
aspects=aspects,
|
|
93
|
+
)
|
|
94
|
+
result = responses.AccessRequestsGetapiv4groupsidaccessrequestsResponse(resp)
|
|
95
|
+
return result
|
|
96
|
+
|
|
97
|
+
def getapiv4projectsidaccessrequests(self, params: Optional[parameters.AccessRequestsGetapiv4projectsidaccessrequestsParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsGetapiv4projectsidaccessrequestsResponse:
|
|
98
|
+
"""
|
|
99
|
+
Gets a list of access requests for a project.
|
|
100
|
+
"""
|
|
101
|
+
if params is None:
|
|
102
|
+
params = parameters.AccessRequestsGetapiv4projectsidaccessrequestsParams()
|
|
103
|
+
call_leaf = "/projects/{id}/access_requests"
|
|
104
|
+
path_params = params.path_params()
|
|
105
|
+
if path_params:
|
|
106
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
107
|
+
query_params = params.query_params()
|
|
108
|
+
header_params = params.header_params()
|
|
109
|
+
body_params = params.body_params()
|
|
110
|
+
exp_status = [200]
|
|
111
|
+
resp = self.client.perform_call(
|
|
112
|
+
leaf=call_leaf,
|
|
113
|
+
method="GET",
|
|
114
|
+
params=query_params if query_params else None,
|
|
115
|
+
body=body_params,
|
|
116
|
+
exp_status=exp_status,
|
|
117
|
+
headers=header_params if header_params else None,
|
|
118
|
+
context_msg=None,
|
|
119
|
+
aspects=aspects,
|
|
120
|
+
)
|
|
121
|
+
result = responses.AccessRequestsGetapiv4projectsidaccessrequestsResponse(resp)
|
|
122
|
+
return result
|
|
123
|
+
|
|
124
|
+
def postapiv4groupsidaccessrequests(self, params: Optional[parameters.AccessRequestsPostapiv4groupsidaccessrequestsParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsPostapiv4groupsidaccessrequestsResponse:
|
|
125
|
+
"""
|
|
126
|
+
Requests access for the authenticated user to a group.
|
|
127
|
+
"""
|
|
128
|
+
if params is None:
|
|
129
|
+
params = parameters.AccessRequestsPostapiv4groupsidaccessrequestsParams()
|
|
130
|
+
call_leaf = "/groups/{id}/access_requests"
|
|
131
|
+
path_params = params.path_params()
|
|
132
|
+
if path_params:
|
|
133
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
134
|
+
query_params = params.query_params()
|
|
135
|
+
header_params = params.header_params()
|
|
136
|
+
body_params = params.body_params()
|
|
137
|
+
exp_status = [200]
|
|
138
|
+
resp = self.client.perform_call(
|
|
139
|
+
leaf=call_leaf,
|
|
140
|
+
method="POST",
|
|
141
|
+
params=query_params if query_params else None,
|
|
142
|
+
body=body_params,
|
|
143
|
+
exp_status=exp_status,
|
|
144
|
+
headers=header_params if header_params else None,
|
|
145
|
+
context_msg=None,
|
|
146
|
+
aspects=aspects,
|
|
147
|
+
)
|
|
148
|
+
result = responses.AccessRequestsPostapiv4groupsidaccessrequestsResponse(resp)
|
|
149
|
+
return result
|
|
150
|
+
|
|
151
|
+
def postapiv4projectsidaccessrequests(self, params: Optional[parameters.AccessRequestsPostapiv4projectsidaccessrequestsParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsPostapiv4projectsidaccessrequestsResponse:
|
|
152
|
+
"""
|
|
153
|
+
Requests access for the authenticated user to a project.
|
|
154
|
+
"""
|
|
155
|
+
if params is None:
|
|
156
|
+
params = parameters.AccessRequestsPostapiv4projectsidaccessrequestsParams()
|
|
157
|
+
call_leaf = "/projects/{id}/access_requests"
|
|
158
|
+
path_params = params.path_params()
|
|
159
|
+
if path_params:
|
|
160
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
161
|
+
query_params = params.query_params()
|
|
162
|
+
header_params = params.header_params()
|
|
163
|
+
body_params = params.body_params()
|
|
164
|
+
exp_status = [200]
|
|
165
|
+
resp = self.client.perform_call(
|
|
166
|
+
leaf=call_leaf,
|
|
167
|
+
method="POST",
|
|
168
|
+
params=query_params if query_params else None,
|
|
169
|
+
body=body_params,
|
|
170
|
+
exp_status=exp_status,
|
|
171
|
+
headers=header_params if header_params else None,
|
|
172
|
+
context_msg=None,
|
|
173
|
+
aspects=aspects,
|
|
174
|
+
)
|
|
175
|
+
result = responses.AccessRequestsPostapiv4projectsidaccessrequestsResponse(resp)
|
|
176
|
+
return result
|
|
177
|
+
|
|
178
|
+
def putapiv4groupsidaccessrequestsuseridapprove(self, params: Optional[parameters.AccessRequestsPutapiv4groupsidaccessrequestsuseridapproveParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsPutapiv4groupsidaccessrequestsuseridapproveResponse:
|
|
179
|
+
"""
|
|
180
|
+
Approves an access request for the given user.
|
|
181
|
+
"""
|
|
182
|
+
if params is None:
|
|
183
|
+
params = parameters.AccessRequestsPutapiv4groupsidaccessrequestsuseridapproveParams()
|
|
184
|
+
call_leaf = "/groups/{id}/access_requests/{user_id}/approve"
|
|
185
|
+
path_params = params.path_params()
|
|
186
|
+
if path_params:
|
|
187
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
188
|
+
query_params = params.query_params()
|
|
189
|
+
header_params = params.header_params()
|
|
190
|
+
body_params = params.body_params()
|
|
191
|
+
exp_status = [200]
|
|
192
|
+
resp = self.client.perform_call(
|
|
193
|
+
leaf=call_leaf,
|
|
194
|
+
method="PUT",
|
|
195
|
+
params=query_params if query_params else None,
|
|
196
|
+
body=body_params,
|
|
197
|
+
exp_status=exp_status,
|
|
198
|
+
headers=header_params if header_params else None,
|
|
199
|
+
context_msg=None,
|
|
200
|
+
aspects=aspects,
|
|
201
|
+
)
|
|
202
|
+
result = responses.AccessRequestsPutapiv4groupsidaccessrequestsuseridapproveResponse(resp)
|
|
203
|
+
return result
|
|
204
|
+
|
|
205
|
+
def putapiv4projectsidaccessrequestsuseridapprove(self, params: Optional[parameters.AccessRequestsPutapiv4projectsidaccessrequestsuseridapproveParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AccessRequestsPutapiv4projectsidaccessrequestsuseridapproveResponse:
|
|
206
|
+
"""
|
|
207
|
+
Approves an access request for the given user.
|
|
208
|
+
"""
|
|
209
|
+
if params is None:
|
|
210
|
+
params = parameters.AccessRequestsPutapiv4projectsidaccessrequestsuseridapproveParams()
|
|
211
|
+
call_leaf = "/projects/{id}/access_requests/{user_id}/approve"
|
|
212
|
+
path_params = params.path_params()
|
|
213
|
+
if path_params:
|
|
214
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
215
|
+
query_params = params.query_params()
|
|
216
|
+
header_params = params.header_params()
|
|
217
|
+
body_params = params.body_params()
|
|
218
|
+
exp_status = [200]
|
|
219
|
+
resp = self.client.perform_call(
|
|
220
|
+
leaf=call_leaf,
|
|
221
|
+
method="PUT",
|
|
222
|
+
params=query_params if query_params else None,
|
|
223
|
+
body=body_params,
|
|
224
|
+
exp_status=exp_status,
|
|
225
|
+
headers=header_params if header_params else None,
|
|
226
|
+
context_msg=None,
|
|
227
|
+
aspects=aspects,
|
|
228
|
+
)
|
|
229
|
+
result = responses.AccessRequestsPutapiv4projectsidaccessrequestsuseridapproveResponse(resp)
|
|
230
|
+
return result
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ccai.gitlab.rest.aspectsrest import AspectsRest, DEFAULT_REST_ASPECTS
|
|
6
|
+
from ccai.gitlab.rest.restapigroup import RestApiGroup
|
|
7
|
+
from ccai.gitlab.rest.clients.parameters import admin as parameters
|
|
8
|
+
from ccai.gitlab.rest.clients.responses import admin as responses
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AdminApiGroup(RestApiGroup):
|
|
12
|
+
"""
|
|
13
|
+
Operations about admins
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def getapiv4admindatabasesdatabasenamedictionarytablestablename(self, params: Optional[parameters.AdminGetapiv4admindatabasesdatabasenamedictionarytablestablenameParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AdminGetapiv4admindatabasesdatabasenamedictionarytablestablenameResponse:
|
|
17
|
+
"""
|
|
18
|
+
Retrieve dictionary details
|
|
19
|
+
"""
|
|
20
|
+
if params is None:
|
|
21
|
+
params = parameters.AdminGetapiv4admindatabasesdatabasenamedictionarytablestablenameParams()
|
|
22
|
+
call_leaf = "/admin/databases/{database_name}/dictionary/tables/{table_name}"
|
|
23
|
+
path_params = params.path_params()
|
|
24
|
+
if path_params:
|
|
25
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
26
|
+
query_params = params.query_params()
|
|
27
|
+
header_params = params.header_params()
|
|
28
|
+
body_params = params.body_params()
|
|
29
|
+
exp_status = [200]
|
|
30
|
+
resp = self.client.perform_call(
|
|
31
|
+
leaf=call_leaf,
|
|
32
|
+
method="GET",
|
|
33
|
+
params=query_params if query_params else None,
|
|
34
|
+
body=body_params,
|
|
35
|
+
exp_status=exp_status,
|
|
36
|
+
headers=header_params if header_params else None,
|
|
37
|
+
context_msg=None,
|
|
38
|
+
aspects=aspects,
|
|
39
|
+
)
|
|
40
|
+
result = responses.AdminGetapiv4admindatabasesdatabasenamedictionarytablestablenameResponse(resp)
|
|
41
|
+
return result
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Auto-generated by RestClientGenerator. DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
from typing import Optional
|
|
4
|
+
|
|
5
|
+
from ccai.gitlab.rest.aspectsrest import AspectsRest, DEFAULT_REST_ASPECTS
|
|
6
|
+
from ccai.gitlab.rest.restapigroup import RestApiGroup
|
|
7
|
+
from ccai.gitlab.rest.clients.parameters import alertmanagement as parameters
|
|
8
|
+
from ccai.gitlab.rest.clients.responses import alertmanagement as responses
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AlertManagementApiGroup(RestApiGroup):
|
|
12
|
+
"""
|
|
13
|
+
Operations about alert_managements
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
def deleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid(self, params: Optional[parameters.AlertManagementDeleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AlertManagementDeleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidResponse:
|
|
17
|
+
"""
|
|
18
|
+
Remove a metric image for an alert
|
|
19
|
+
"""
|
|
20
|
+
if params is None:
|
|
21
|
+
params = parameters.AlertManagementDeleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidParams()
|
|
22
|
+
call_leaf = "/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}"
|
|
23
|
+
path_params = params.path_params()
|
|
24
|
+
if path_params:
|
|
25
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
26
|
+
query_params = params.query_params()
|
|
27
|
+
header_params = params.header_params()
|
|
28
|
+
body_params = params.body_params()
|
|
29
|
+
exp_status = [204]
|
|
30
|
+
resp = self.client.perform_call(
|
|
31
|
+
leaf=call_leaf,
|
|
32
|
+
method="DELETE",
|
|
33
|
+
params=query_params if query_params else None,
|
|
34
|
+
body=body_params,
|
|
35
|
+
exp_status=exp_status,
|
|
36
|
+
headers=header_params if header_params else None,
|
|
37
|
+
context_msg=None,
|
|
38
|
+
aspects=aspects,
|
|
39
|
+
)
|
|
40
|
+
result = responses.AlertManagementDeleteapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidResponse(resp)
|
|
41
|
+
return result
|
|
42
|
+
|
|
43
|
+
def getapiv4projectsidalertmanagementalertsalertiidmetricimages(self, params: Optional[parameters.AlertManagementGetapiv4projectsidalertmanagementalertsalertiidmetricimagesParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AlertManagementGetapiv4projectsidalertmanagementalertsalertiidmetricimagesResponse:
|
|
44
|
+
"""
|
|
45
|
+
Metric Images for alert
|
|
46
|
+
"""
|
|
47
|
+
if params is None:
|
|
48
|
+
params = parameters.AlertManagementGetapiv4projectsidalertmanagementalertsalertiidmetricimagesParams()
|
|
49
|
+
call_leaf = "/projects/{id}/alert_management_alerts/{alert_iid}/metric_images"
|
|
50
|
+
path_params = params.path_params()
|
|
51
|
+
if path_params:
|
|
52
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
53
|
+
query_params = params.query_params()
|
|
54
|
+
header_params = params.header_params()
|
|
55
|
+
body_params = params.body_params()
|
|
56
|
+
exp_status = [200]
|
|
57
|
+
resp = self.client.perform_call(
|
|
58
|
+
leaf=call_leaf,
|
|
59
|
+
method="GET",
|
|
60
|
+
params=query_params if query_params else None,
|
|
61
|
+
body=body_params,
|
|
62
|
+
exp_status=exp_status,
|
|
63
|
+
headers=header_params if header_params else None,
|
|
64
|
+
context_msg=None,
|
|
65
|
+
aspects=aspects,
|
|
66
|
+
)
|
|
67
|
+
result = responses.AlertManagementGetapiv4projectsidalertmanagementalertsalertiidmetricimagesResponse(resp)
|
|
68
|
+
return result
|
|
69
|
+
|
|
70
|
+
def postapiv4projectsidalertmanagementalertsalertiidmetricimages(self, params: Optional[parameters.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesResponse:
|
|
71
|
+
"""
|
|
72
|
+
Upload a metric image for an alert
|
|
73
|
+
"""
|
|
74
|
+
if params is None:
|
|
75
|
+
params = parameters.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesParams()
|
|
76
|
+
call_leaf = "/projects/{id}/alert_management_alerts/{alert_iid}/metric_images"
|
|
77
|
+
path_params = params.path_params()
|
|
78
|
+
if path_params:
|
|
79
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
80
|
+
query_params = params.query_params()
|
|
81
|
+
header_params = params.header_params()
|
|
82
|
+
body_params = params.body_params()
|
|
83
|
+
exp_status = [200]
|
|
84
|
+
resp = self.client.perform_call(
|
|
85
|
+
leaf=call_leaf,
|
|
86
|
+
method="POST",
|
|
87
|
+
params=query_params if query_params else None,
|
|
88
|
+
body=body_params,
|
|
89
|
+
exp_status=exp_status,
|
|
90
|
+
headers=header_params if header_params else None,
|
|
91
|
+
context_msg=None,
|
|
92
|
+
aspects=aspects,
|
|
93
|
+
)
|
|
94
|
+
result = responses.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesResponse(resp)
|
|
95
|
+
return result
|
|
96
|
+
|
|
97
|
+
def postapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorize(self, params: Optional[parameters.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorizeParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorizeResponse:
|
|
98
|
+
"""
|
|
99
|
+
Workhorse authorize metric image file upload
|
|
100
|
+
"""
|
|
101
|
+
if params is None:
|
|
102
|
+
params = parameters.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorizeParams()
|
|
103
|
+
call_leaf = "/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/authorize"
|
|
104
|
+
path_params = params.path_params()
|
|
105
|
+
if path_params:
|
|
106
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
107
|
+
query_params = params.query_params()
|
|
108
|
+
header_params = params.header_params()
|
|
109
|
+
body_params = params.body_params()
|
|
110
|
+
exp_status = [200]
|
|
111
|
+
resp = self.client.perform_call(
|
|
112
|
+
leaf=call_leaf,
|
|
113
|
+
method="POST",
|
|
114
|
+
params=query_params if query_params else None,
|
|
115
|
+
body=body_params,
|
|
116
|
+
exp_status=exp_status,
|
|
117
|
+
headers=header_params if header_params else None,
|
|
118
|
+
context_msg=None,
|
|
119
|
+
aspects=aspects,
|
|
120
|
+
)
|
|
121
|
+
result = responses.AlertManagementPostapiv4projectsidalertmanagementalertsalertiidmetricimagesauthorizeResponse(resp)
|
|
122
|
+
return result
|
|
123
|
+
|
|
124
|
+
def putapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageid(self, params: Optional[parameters.AlertManagementPutapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidParams] = None, *, aspects: Optional[AspectsRest] = DEFAULT_REST_ASPECTS) -> responses.AlertManagementPutapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidResponse:
|
|
125
|
+
"""
|
|
126
|
+
Update a metric image for an alert
|
|
127
|
+
"""
|
|
128
|
+
if params is None:
|
|
129
|
+
params = parameters.AlertManagementPutapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidParams()
|
|
130
|
+
call_leaf = "/projects/{id}/alert_management_alerts/{alert_iid}/metric_images/{metric_image_id}"
|
|
131
|
+
path_params = params.path_params()
|
|
132
|
+
if path_params:
|
|
133
|
+
call_leaf = self.client.format_path(call_leaf, path_params)
|
|
134
|
+
query_params = params.query_params()
|
|
135
|
+
header_params = params.header_params()
|
|
136
|
+
body_params = params.body_params()
|
|
137
|
+
exp_status = [200]
|
|
138
|
+
resp = self.client.perform_call(
|
|
139
|
+
leaf=call_leaf,
|
|
140
|
+
method="PUT",
|
|
141
|
+
params=query_params if query_params else None,
|
|
142
|
+
body=body_params,
|
|
143
|
+
exp_status=exp_status,
|
|
144
|
+
headers=header_params if header_params else None,
|
|
145
|
+
context_msg=None,
|
|
146
|
+
aspects=aspects,
|
|
147
|
+
)
|
|
148
|
+
result = responses.AlertManagementPutapiv4projectsidalertmanagementalertsalertiidmetricimagesmetricimageidResponse(resp)
|
|
149
|
+
return result
|