codecraftai-restclient-pychestrate 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.
Files changed (84) hide show
  1. ccai/pychestrate/py.typed +0 -0
  2. ccai/pychestrate/rest/client/__init__.py +0 -0
  3. ccai/pychestrate/rest/client/generation/__init__.py +0 -0
  4. ccai/pychestrate/rest/client/generation/pychestraterestclientgenerator.py +98 -0
  5. ccai/pychestrate/rest/client/generation/specs/pychestrate.yaml +3757 -0
  6. ccai/pychestrate/rest/client/groups/__init__.py +0 -0
  7. ccai/pychestrate/rest/client/groups/agents.py +171 -0
  8. ccai/pychestrate/rest/client/groups/artifacts.py +103 -0
  9. ccai/pychestrate/rest/client/groups/audit.py +99 -0
  10. ccai/pychestrate/rest/client/groups/auth.py +55 -0
  11. ccai/pychestrate/rest/client/groups/clients.py +287 -0
  12. ccai/pychestrate/rest/client/groups/dispatch.py +118 -0
  13. ccai/pychestrate/rest/client/groups/enrollment.py +212 -0
  14. ccai/pychestrate/rest/client/groups/flags.py +332 -0
  15. ccai/pychestrate/rest/client/groups/me.py +55 -0
  16. ccai/pychestrate/rest/client/groups/notifications.py +128 -0
  17. ccai/pychestrate/rest/client/groups/pluginapi.py +128 -0
  18. ccai/pychestrate/rest/client/groups/pods.py +558 -0
  19. ccai/pychestrate/rest/client/groups/progress.py +64 -0
  20. ccai/pychestrate/rest/client/groups/projects.py +420 -0
  21. ccai/pychestrate/rest/client/groups/projecttemplates.py +91 -0
  22. ccai/pychestrate/rest/client/groups/rbac.py +243 -0
  23. ccai/pychestrate/rest/client/groups/results.py +193 -0
  24. ccai/pychestrate/rest/client/groups/retention.py +169 -0
  25. ccai/pychestrate/rest/client/groups/runs.py +152 -0
  26. ccai/pychestrate/rest/client/groups/secrets.py +91 -0
  27. ccai/pychestrate/rest/client/groups/tagging.py +216 -0
  28. ccai/pychestrate/rest/client/groups/testcatalog.py +152 -0
  29. ccai/pychestrate/rest/client/groups/testruns.py +58 -0
  30. ccai/pychestrate/rest/client/groups/users.py +91 -0
  31. ccai/pychestrate/rest/client/groups/variables.py +228 -0
  32. ccai/pychestrate/rest/client/models/__init__.py +0 -0
  33. ccai/pychestrate/rest/client/models/agents.py +34 -0
  34. ccai/pychestrate/rest/client/models/artifactlocaluploadresult.py +18 -0
  35. ccai/pychestrate/rest/client/models/artifacts.py +24 -0
  36. ccai/pychestrate/rest/client/models/artifactuploadtarget.py +20 -0
  37. ccai/pychestrate/rest/client/models/audit.py +18 -0
  38. ccai/pychestrate/rest/client/models/auth.py +15 -0
  39. ccai/pychestrate/rest/client/models/capabilityentry.py +15 -0
  40. ccai/pychestrate/rest/client/models/client.py +19 -0
  41. ccai/pychestrate/rest/client/models/clients.py +40 -0
  42. ccai/pychestrate/rest/client/models/dispatch.py +26 -0
  43. ccai/pychestrate/rest/client/models/enrollment.py +39 -0
  44. ccai/pychestrate/rest/client/models/flags.py +55 -0
  45. ccai/pychestrate/rest/client/models/jobdeadline.py +11 -0
  46. ccai/pychestrate/rest/client/models/jobenvelope.py +38 -0
  47. ccai/pychestrate/rest/client/models/jobforwardinginfo.py +12 -0
  48. ccai/pychestrate/rest/client/models/jobpipelineref.py +11 -0
  49. ccai/pychestrate/rest/client/models/jobrefs.py +14 -0
  50. ccai/pychestrate/rest/client/models/jobresultslocator.py +11 -0
  51. ccai/pychestrate/rest/client/models/me.py +14 -0
  52. ccai/pychestrate/rest/client/models/notifications.py +24 -0
  53. ccai/pychestrate/rest/client/models/pagemeta.py +18 -0
  54. ccai/pychestrate/rest/client/models/pluginapi.py +21 -0
  55. ccai/pychestrate/rest/client/models/podmember.py +14 -0
  56. ccai/pychestrate/rest/client/models/pods.py +75 -0
  57. ccai/pychestrate/rest/client/models/podtopologylink.py +15 -0
  58. ccai/pychestrate/rest/client/models/problem.py +19 -0
  59. ccai/pychestrate/rest/client/models/progress.py +18 -0
  60. ccai/pychestrate/rest/client/models/progressrecord.py +26 -0
  61. ccai/pychestrate/rest/client/models/progresssummary.py +29 -0
  62. ccai/pychestrate/rest/client/models/projects.py +49 -0
  63. ccai/pychestrate/rest/client/models/projecttemplates.py +14 -0
  64. ccai/pychestrate/rest/client/models/rbac.py +46 -0
  65. ccai/pychestrate/rest/client/models/results.py +56 -0
  66. ccai/pychestrate/rest/client/models/retention.py +26 -0
  67. ccai/pychestrate/rest/client/models/runevent.py +25 -0
  68. ccai/pychestrate/rest/client/models/runs.py +32 -0
  69. ccai/pychestrate/rest/client/models/scopedsecret.py +13 -0
  70. ccai/pychestrate/rest/client/models/secrets.py +16 -0
  71. ccai/pychestrate/rest/client/models/signingkey.py +19 -0
  72. ccai/pychestrate/rest/client/models/tagging.py +24 -0
  73. ccai/pychestrate/rest/client/models/testcatalog.py +50 -0
  74. ccai/pychestrate/rest/client/models/testcatalogimportsummary.py +16 -0
  75. ccai/pychestrate/rest/client/models/testruns.py +25 -0
  76. ccai/pychestrate/rest/client/models/users.py +23 -0
  77. ccai/pychestrate/rest/client/models/variableeffectiveentry.py +13 -0
  78. ccai/pychestrate/rest/client/models/variables.py +30 -0
  79. ccai/pychestrate/rest/client/pychestraterestclient.py +166 -0
  80. ccai/pychestrate/rest/client/pychestraterestclientbase.py +147 -0
  81. codecraftai_restclient_pychestrate-1.2.0.dist-info/METADATA +96 -0
  82. codecraftai_restclient_pychestrate-1.2.0.dist-info/RECORD +84 -0
  83. codecraftai_restclient_pychestrate-1.2.0.dist-info/WHEEL +4 -0
  84. codecraftai_restclient_pychestrate-1.2.0.dist-info/licenses/LICENSE.md +204 -0
@@ -0,0 +1,332 @@
1
+ # Auto-generated by RestClientGenerator. DO NOT EDIT.
2
+
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ from ccai.pychestrate.rest.client.models.flags import Featureflag
6
+ from ccai.pychestrate.rest.client.models.flags import Featureflagcreaterequest
7
+ from ccai.pychestrate.rest.client.models.flags import Featureflagevaluaterequest
8
+ from ccai.pychestrate.rest.client.models.flags import Featureflagevaluateresponse
9
+ from ccai.pychestrate.rest.client.models.flags import Featureflagupdaterequest
10
+ from ccai.restclient.base.aspectsrest import AspectsRest
11
+ from ccai.restclient.base.restapigroup import RestApiGroup
12
+
13
+
14
+ class FlagsApiGroup(RestApiGroup):
15
+ """
16
+ Feature flags (runtime toggles).
17
+ """
18
+
19
+ def flags_create(self, body: Featureflagcreaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
20
+ """
21
+ Create a new feature flag.
22
+ """
23
+ client = self.client
24
+ if aspects is None:
25
+ aspects = client.aspects
26
+
27
+ header_params = client.headers
28
+ if headers is not None:
29
+ header_params = headers
30
+
31
+ call_leaf = "/flags"
32
+
33
+ query_params = None
34
+
35
+
36
+ if exp_status is None:
37
+ exp_status = [201]
38
+
39
+ resp = client.perform_call(
40
+ leaf=call_leaf,
41
+ method="POST",
42
+ params=query_params if query_params else None,
43
+ body=body,
44
+ exp_status=exp_status,
45
+ headers=header_params if header_params else None,
46
+ context_msg=None,
47
+ aspects=aspects,
48
+ )
49
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
50
+ rtnval = None
51
+ else:
52
+ rtnval = resp.json()
53
+ return rtnval
54
+
55
+ def flags_evaluate(self, flag_key: str, body: Featureflagevaluaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Featureflagevaluateresponse:
56
+ """
57
+ Evaluate a feature flag against an actor / context.
58
+ """
59
+ client = self.client
60
+ if aspects is None:
61
+ aspects = client.aspects
62
+
63
+ header_params = client.headers
64
+ if headers is not None:
65
+ header_params = headers
66
+
67
+ leaf_template = "/flags/{flag_key}/evaluate"
68
+ path_params = {
69
+ 'flag_key': flag_key,
70
+ }
71
+ call_leaf = leaf_template.format(**path_params)
72
+
73
+ query_params = None
74
+
75
+
76
+ if exp_status is None:
77
+ exp_status = [200]
78
+
79
+ resp = client.perform_call(
80
+ leaf=call_leaf,
81
+ method="POST",
82
+ params=query_params if query_params else None,
83
+ body=body,
84
+ exp_status=exp_status,
85
+ headers=header_params if header_params else None,
86
+ context_msg=None,
87
+ aspects=aspects,
88
+ )
89
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
90
+ rtnobj = None
91
+ else:
92
+ raw_data = resp.json()
93
+ rtnobj = Featureflagevaluateresponse.from_dict(raw_data)
94
+ return rtnobj
95
+
96
+ def flags_get_by_key(self, flag_key: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Featureflag:
97
+ """
98
+ Read a feature flag.
99
+ """
100
+ client = self.client
101
+ if aspects is None:
102
+ aspects = client.aspects
103
+
104
+ header_params = client.headers
105
+ if headers is not None:
106
+ header_params = headers
107
+
108
+ leaf_template = "/flags/{flag_key}"
109
+ path_params = {
110
+ 'flag_key': flag_key,
111
+ }
112
+ call_leaf = leaf_template.format(**path_params)
113
+
114
+ query_params = None
115
+
116
+
117
+ if exp_status is None:
118
+ exp_status = [200]
119
+
120
+ resp = client.perform_call(
121
+ leaf=call_leaf,
122
+ method="GET",
123
+ params=query_params if query_params else None,
124
+ body=None,
125
+ exp_status=exp_status,
126
+ headers=header_params if header_params else None,
127
+ context_msg=None,
128
+ aspects=aspects,
129
+ )
130
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
131
+ rtnobj = None
132
+ else:
133
+ raw_data = resp.json()
134
+ rtnobj = Featureflag.from_dict(raw_data)
135
+ return rtnobj
136
+
137
+ def flags_get_history(self, flag_key: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
138
+ """
139
+ Read change history for a feature flag.
140
+ """
141
+ client = self.client
142
+ if aspects is None:
143
+ aspects = client.aspects
144
+
145
+ header_params = client.headers
146
+ if headers is not None:
147
+ header_params = headers
148
+
149
+ leaf_template = "/flags/{flag_key}/history"
150
+ path_params = {
151
+ 'flag_key': flag_key,
152
+ }
153
+ call_leaf = leaf_template.format(**path_params)
154
+
155
+ query_params = None
156
+
157
+
158
+ if exp_status is None:
159
+ exp_status = [200]
160
+
161
+ resp = client.perform_call(
162
+ leaf=call_leaf,
163
+ method="GET",
164
+ params=query_params if query_params else None,
165
+ body=None,
166
+ exp_status=exp_status,
167
+ headers=header_params if header_params else None,
168
+ context_msg=None,
169
+ aspects=aspects,
170
+ )
171
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
172
+ rtnval = None
173
+ else:
174
+ raw_data = resp.json()
175
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
176
+ return rtnval
177
+
178
+ def flags_list(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
179
+ """
180
+ List feature flags.
181
+ """
182
+ client = self.client
183
+ if aspects is None:
184
+ aspects = client.aspects
185
+
186
+ header_params = client.headers
187
+ if headers is not None:
188
+ header_params = headers
189
+
190
+ call_leaf = "/flags"
191
+
192
+ query_params = None
193
+
194
+
195
+ if exp_status is None:
196
+ exp_status = [200]
197
+
198
+ resp = client.perform_call(
199
+ leaf=call_leaf,
200
+ method="GET",
201
+ params=query_params if query_params else None,
202
+ body=None,
203
+ exp_status=exp_status,
204
+ headers=header_params if header_params else None,
205
+ context_msg=None,
206
+ aspects=aspects,
207
+ )
208
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
209
+ rtnval = None
210
+ else:
211
+ raw_data = resp.json()
212
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
213
+ return rtnval
214
+
215
+ def flags_list_backends(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
216
+ """
217
+ List installed feature-flag backends.
218
+ """
219
+ client = self.client
220
+ if aspects is None:
221
+ aspects = client.aspects
222
+
223
+ header_params = client.headers
224
+ if headers is not None:
225
+ header_params = headers
226
+
227
+ call_leaf = "/flags/backends"
228
+
229
+ query_params = None
230
+
231
+
232
+ if exp_status is None:
233
+ exp_status = [200]
234
+
235
+ resp = client.perform_call(
236
+ leaf=call_leaf,
237
+ method="GET",
238
+ params=query_params if query_params else None,
239
+ body=None,
240
+ exp_status=exp_status,
241
+ headers=header_params if header_params else None,
242
+ context_msg=None,
243
+ aspects=aspects,
244
+ )
245
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
246
+ rtnval = None
247
+ else:
248
+ raw_data = resp.json()
249
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
250
+ return rtnval
251
+
252
+ def flags_retire(self, flag_key: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Featureflag:
253
+ """
254
+ Retire a feature flag.
255
+ """
256
+ client = self.client
257
+ if aspects is None:
258
+ aspects = client.aspects
259
+
260
+ header_params = client.headers
261
+ if headers is not None:
262
+ header_params = headers
263
+
264
+ leaf_template = "/flags/{flag_key}/retire"
265
+ path_params = {
266
+ 'flag_key': flag_key,
267
+ }
268
+ call_leaf = leaf_template.format(**path_params)
269
+
270
+ query_params = None
271
+
272
+
273
+ if exp_status is None:
274
+ exp_status = [200]
275
+
276
+ resp = client.perform_call(
277
+ leaf=call_leaf,
278
+ method="POST",
279
+ params=query_params if query_params else None,
280
+ body=None,
281
+ exp_status=exp_status,
282
+ headers=header_params if header_params else None,
283
+ context_msg=None,
284
+ aspects=aspects,
285
+ )
286
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
287
+ rtnobj = None
288
+ else:
289
+ raw_data = resp.json()
290
+ rtnobj = Featureflag.from_dict(raw_data)
291
+ return rtnobj
292
+
293
+ def flags_update(self, flag_key: str, body: Featureflagupdaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Featureflag:
294
+ """
295
+ Update a feature flag.
296
+ """
297
+ client = self.client
298
+ if aspects is None:
299
+ aspects = client.aspects
300
+
301
+ header_params = client.headers
302
+ if headers is not None:
303
+ header_params = headers
304
+
305
+ leaf_template = "/flags/{flag_key}"
306
+ path_params = {
307
+ 'flag_key': flag_key,
308
+ }
309
+ call_leaf = leaf_template.format(**path_params)
310
+
311
+ query_params = None
312
+
313
+
314
+ if exp_status is None:
315
+ exp_status = [200]
316
+
317
+ resp = client.perform_call(
318
+ leaf=call_leaf,
319
+ method="PATCH",
320
+ params=query_params if query_params else None,
321
+ body=body,
322
+ exp_status=exp_status,
323
+ headers=header_params if header_params else None,
324
+ context_msg=None,
325
+ aspects=aspects,
326
+ )
327
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
328
+ rtnobj = None
329
+ else:
330
+ raw_data = resp.json()
331
+ rtnobj = Featureflag.from_dict(raw_data)
332
+ return rtnobj
@@ -0,0 +1,55 @@
1
+ # Auto-generated by RestClientGenerator. DO NOT EDIT.
2
+
3
+ from typing import Dict, List, Optional
4
+
5
+ from ccai.pychestrate.rest.client.models.me import Mepermissions
6
+ from ccai.restclient.base.aspectsrest import AspectsRest
7
+ from ccai.restclient.base.restapigroup import RestApiGroup
8
+
9
+
10
+ class MeApiGroup(RestApiGroup):
11
+ """
12
+ Permissions and identity of the currently-authenticated actor.
13
+ """
14
+
15
+ def me_get_permissions(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Mepermissions:
16
+ """
17
+ List the current actor's effective permissions.
18
+
19
+ Returns the set of permission keys granted to the calling actor by
20
+ the RBAC evaluator, plus the actor's user_id and a list of role
21
+ bindings.
22
+
23
+ """
24
+ client = self.client
25
+ if aspects is None:
26
+ aspects = client.aspects
27
+
28
+ header_params = client.headers
29
+ if headers is not None:
30
+ header_params = headers
31
+
32
+ call_leaf = "/me/permissions"
33
+
34
+ query_params = None
35
+
36
+
37
+ if exp_status is None:
38
+ exp_status = [200]
39
+
40
+ resp = client.perform_call(
41
+ leaf=call_leaf,
42
+ method="GET",
43
+ params=query_params if query_params else None,
44
+ body=None,
45
+ exp_status=exp_status,
46
+ headers=header_params if header_params else None,
47
+ context_msg=None,
48
+ aspects=aspects,
49
+ )
50
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
51
+ rtnobj = None
52
+ else:
53
+ raw_data = resp.json()
54
+ rtnobj = Mepermissions.from_dict(raw_data)
55
+ return rtnobj
@@ -0,0 +1,128 @@
1
+ # Auto-generated by RestClientGenerator. DO NOT EDIT.
2
+
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ from ccai.pychestrate.rest.client.models.notifications import Notificationchannel
6
+ from ccai.pychestrate.rest.client.models.notifications import Notificationchannelcreaterequest
7
+ from ccai.restclient.base.aspectsrest import AspectsRest
8
+ from ccai.restclient.base.restapigroup import RestApiGroup
9
+
10
+
11
+ class NotificationsApiGroup(RestApiGroup):
12
+ """
13
+ Notification channels (email, Slack, webhook, ...).
14
+ """
15
+
16
+ def notifications_create_channel(self, body: Notificationchannelcreaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
17
+ """
18
+ Create a notification channel.
19
+ """
20
+ client = self.client
21
+ if aspects is None:
22
+ aspects = client.aspects
23
+
24
+ header_params = client.headers
25
+ if headers is not None:
26
+ header_params = headers
27
+
28
+ call_leaf = "/notifications/channels"
29
+
30
+ query_params = None
31
+
32
+
33
+ if exp_status is None:
34
+ exp_status = [201]
35
+
36
+ resp = client.perform_call(
37
+ leaf=call_leaf,
38
+ method="POST",
39
+ params=query_params if query_params else None,
40
+ body=body,
41
+ exp_status=exp_status,
42
+ headers=header_params if header_params else None,
43
+ context_msg=None,
44
+ aspects=aspects,
45
+ )
46
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
47
+ rtnval = None
48
+ else:
49
+ rtnval = resp.json()
50
+ return rtnval
51
+
52
+ def notifications_get_channel(self, channel_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Notificationchannel:
53
+ """
54
+ Read a notification channel.
55
+ """
56
+ client = self.client
57
+ if aspects is None:
58
+ aspects = client.aspects
59
+
60
+ header_params = client.headers
61
+ if headers is not None:
62
+ header_params = headers
63
+
64
+ leaf_template = "/notifications/channels/{channel_id}"
65
+ path_params = {
66
+ 'channel_id': channel_id,
67
+ }
68
+ call_leaf = leaf_template.format(**path_params)
69
+
70
+ query_params = None
71
+
72
+
73
+ if exp_status is None:
74
+ exp_status = [200]
75
+
76
+ resp = client.perform_call(
77
+ leaf=call_leaf,
78
+ method="GET",
79
+ params=query_params if query_params else None,
80
+ body=None,
81
+ exp_status=exp_status,
82
+ headers=header_params if header_params else None,
83
+ context_msg=None,
84
+ aspects=aspects,
85
+ )
86
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
87
+ rtnobj = None
88
+ else:
89
+ raw_data = resp.json()
90
+ rtnobj = Notificationchannel.from_dict(raw_data)
91
+ return rtnobj
92
+
93
+ def notifications_list_channels(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
94
+ """
95
+ List notification channels.
96
+ """
97
+ client = self.client
98
+ if aspects is None:
99
+ aspects = client.aspects
100
+
101
+ header_params = client.headers
102
+ if headers is not None:
103
+ header_params = headers
104
+
105
+ call_leaf = "/notifications/channels"
106
+
107
+ query_params = None
108
+
109
+
110
+ if exp_status is None:
111
+ exp_status = [200]
112
+
113
+ resp = client.perform_call(
114
+ leaf=call_leaf,
115
+ method="GET",
116
+ params=query_params if query_params else None,
117
+ body=None,
118
+ exp_status=exp_status,
119
+ headers=header_params if header_params else None,
120
+ context_msg=None,
121
+ aspects=aspects,
122
+ )
123
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
124
+ rtnval = None
125
+ else:
126
+ raw_data = resp.json()
127
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
128
+ return rtnval
@@ -0,0 +1,128 @@
1
+ # Auto-generated by RestClientGenerator. DO NOT EDIT.
2
+
3
+ from typing import Any, Dict, List, Optional
4
+
5
+ from ccai.pychestrate.rest.client.models.pluginapi import Pluginapiprotocol
6
+ from ccai.restclient.base.aspectsrest import AspectsRest
7
+ from ccai.restclient.base.restapigroup import RestApiGroup
8
+
9
+
10
+ class PluginApiApiGroup(RestApiGroup):
11
+ """
12
+ Plugin-API catalog metadata for installed extensions.
13
+ """
14
+
15
+ def plugin_api_get_protocol(self, protocol_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Pluginapiprotocol:
16
+ """
17
+ Read one plugin-API protocol's metadata.
18
+ """
19
+ client = self.client
20
+ if aspects is None:
21
+ aspects = client.aspects
22
+
23
+ header_params = client.headers
24
+ if headers is not None:
25
+ header_params = headers
26
+
27
+ leaf_template = "/plugin-api/_meta/catalog/{protocol_name}"
28
+ path_params = {
29
+ 'protocol_name': protocol_name,
30
+ }
31
+ call_leaf = leaf_template.format(**path_params)
32
+
33
+ query_params = None
34
+
35
+
36
+ if exp_status is None:
37
+ exp_status = [200]
38
+
39
+ resp = client.perform_call(
40
+ leaf=call_leaf,
41
+ method="GET",
42
+ params=query_params if query_params else None,
43
+ body=None,
44
+ exp_status=exp_status,
45
+ headers=header_params if header_params else None,
46
+ context_msg=None,
47
+ aspects=aspects,
48
+ )
49
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
50
+ rtnobj = None
51
+ else:
52
+ raw_data = resp.json()
53
+ rtnobj = Pluginapiprotocol.from_dict(raw_data)
54
+ return rtnobj
55
+
56
+ def plugin_api_list_catalog(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
57
+ """
58
+ List the plugin-API protocol catalog.
59
+ """
60
+ client = self.client
61
+ if aspects is None:
62
+ aspects = client.aspects
63
+
64
+ header_params = client.headers
65
+ if headers is not None:
66
+ header_params = headers
67
+
68
+ call_leaf = "/plugin-api/_meta/catalog"
69
+
70
+ query_params = None
71
+
72
+
73
+ if exp_status is None:
74
+ exp_status = [200]
75
+
76
+ resp = client.perform_call(
77
+ leaf=call_leaf,
78
+ method="GET",
79
+ params=query_params if query_params else None,
80
+ body=None,
81
+ exp_status=exp_status,
82
+ headers=header_params if header_params else None,
83
+ context_msg=None,
84
+ aspects=aspects,
85
+ )
86
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
87
+ rtnval = None
88
+ else:
89
+ raw_data = resp.json()
90
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
91
+ return rtnval
92
+
93
+ def plugin_api_list_mounts(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
94
+ """
95
+ List extension mounts.
96
+ """
97
+ client = self.client
98
+ if aspects is None:
99
+ aspects = client.aspects
100
+
101
+ header_params = client.headers
102
+ if headers is not None:
103
+ header_params = headers
104
+
105
+ call_leaf = "/plugin-api/_meta/mounts"
106
+
107
+ query_params = None
108
+
109
+
110
+ if exp_status is None:
111
+ exp_status = [200]
112
+
113
+ resp = client.perform_call(
114
+ leaf=call_leaf,
115
+ method="GET",
116
+ params=query_params if query_params else None,
117
+ body=None,
118
+ exp_status=exp_status,
119
+ headers=header_params if header_params else None,
120
+ context_msg=None,
121
+ aspects=aspects,
122
+ )
123
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
124
+ rtnval = None
125
+ else:
126
+ raw_data = resp.json()
127
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
128
+ return rtnval