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,420 @@
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.projects import Project
6
+ from ccai.pychestrate.rest.client.models.projects import Projectcreaterequest
7
+ from ccai.pychestrate.rest.client.models.projects import Projectmemberaddrequest
8
+ from ccai.pychestrate.rest.client.models.projects import Projectpatchrequest
9
+ from ccai.restclient.base.aspectsrest import AspectsRest
10
+ from ccai.restclient.base.restapigroup import RestApiGroup
11
+
12
+
13
+ class ProjectsApiGroup(RestApiGroup):
14
+ """
15
+ Project workspaces — the top-level entity that owns runs, pods, members, repositories, builds, and tests.
16
+ """
17
+
18
+ def projects_add_member(self, slug: str, body: Projectmemberaddrequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
19
+ """
20
+ Add a member to a project.
21
+ """
22
+ client = self.client
23
+ if aspects is None:
24
+ aspects = client.aspects
25
+
26
+ header_params = client.headers
27
+ if headers is not None:
28
+ header_params = headers
29
+
30
+ leaf_template = "/projects/{slug}/members"
31
+ path_params = {
32
+ 'slug': slug,
33
+ }
34
+ call_leaf = leaf_template.format(**path_params)
35
+
36
+ query_params = None
37
+
38
+
39
+ if exp_status is None:
40
+ exp_status = [201]
41
+
42
+ resp = client.perform_call(
43
+ leaf=call_leaf,
44
+ method="POST",
45
+ params=query_params if query_params else None,
46
+ body=body,
47
+ exp_status=exp_status,
48
+ headers=header_params if header_params else None,
49
+ context_msg=None,
50
+ aspects=aspects,
51
+ )
52
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
53
+ rtnval = None
54
+ else:
55
+ rtnval = resp.json()
56
+ return rtnval
57
+
58
+ def projects_archive(self, slug: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Project:
59
+ """
60
+ Archive a project.
61
+ """
62
+ client = self.client
63
+ if aspects is None:
64
+ aspects = client.aspects
65
+
66
+ header_params = client.headers
67
+ if headers is not None:
68
+ header_params = headers
69
+
70
+ leaf_template = "/projects/{slug}/archive"
71
+ path_params = {
72
+ 'slug': slug,
73
+ }
74
+ call_leaf = leaf_template.format(**path_params)
75
+
76
+ query_params = None
77
+
78
+
79
+ if exp_status is None:
80
+ exp_status = [200]
81
+
82
+ resp = client.perform_call(
83
+ leaf=call_leaf,
84
+ method="POST",
85
+ params=query_params if query_params else None,
86
+ body=None,
87
+ exp_status=exp_status,
88
+ headers=header_params if header_params else None,
89
+ context_msg=None,
90
+ aspects=aspects,
91
+ )
92
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
93
+ rtnobj = None
94
+ else:
95
+ raw_data = resp.json()
96
+ rtnobj = Project.from_dict(raw_data)
97
+ return rtnobj
98
+
99
+ def projects_create(self, body: Projectcreaterequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
100
+ """
101
+ Create a project.
102
+ """
103
+ client = self.client
104
+ if aspects is None:
105
+ aspects = client.aspects
106
+
107
+ header_params = client.headers
108
+ if headers is not None:
109
+ header_params = headers
110
+
111
+ call_leaf = "/projects"
112
+
113
+ query_params = None
114
+
115
+
116
+ if exp_status is None:
117
+ exp_status = [201]
118
+
119
+ resp = client.perform_call(
120
+ leaf=call_leaf,
121
+ method="POST",
122
+ params=query_params if query_params else None,
123
+ body=body,
124
+ exp_status=exp_status,
125
+ headers=header_params if header_params else None,
126
+ context_msg=None,
127
+ aspects=aspects,
128
+ )
129
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
130
+ rtnval = None
131
+ else:
132
+ rtnval = resp.json()
133
+ return rtnval
134
+
135
+ def projects_delete(self, slug: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
136
+ """
137
+ Delete a project.
138
+ """
139
+ client = self.client
140
+ if aspects is None:
141
+ aspects = client.aspects
142
+
143
+ header_params = client.headers
144
+ if headers is not None:
145
+ header_params = headers
146
+
147
+ leaf_template = "/projects/{slug}"
148
+ path_params = {
149
+ 'slug': slug,
150
+ }
151
+ call_leaf = leaf_template.format(**path_params)
152
+
153
+ query_params = None
154
+
155
+
156
+ if exp_status is None:
157
+ exp_status = [204]
158
+
159
+ resp = client.perform_call(
160
+ leaf=call_leaf,
161
+ method="DELETE",
162
+ params=query_params if query_params else None,
163
+ body=None,
164
+ exp_status=exp_status,
165
+ headers=header_params if header_params else None,
166
+ context_msg=None,
167
+ aspects=aspects,
168
+ )
169
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
170
+ rtnval = None
171
+ else:
172
+ rtnval = resp.json()
173
+ return rtnval
174
+
175
+ def projects_get_by_slug(self, slug: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Project:
176
+ """
177
+ Read a project by slug.
178
+ """
179
+ client = self.client
180
+ if aspects is None:
181
+ aspects = client.aspects
182
+
183
+ header_params = client.headers
184
+ if headers is not None:
185
+ header_params = headers
186
+
187
+ leaf_template = "/projects/{slug}"
188
+ path_params = {
189
+ 'slug': slug,
190
+ }
191
+ call_leaf = leaf_template.format(**path_params)
192
+
193
+ query_params = None
194
+
195
+
196
+ if exp_status is None:
197
+ exp_status = [200]
198
+
199
+ resp = client.perform_call(
200
+ leaf=call_leaf,
201
+ method="GET",
202
+ params=query_params if query_params else None,
203
+ body=None,
204
+ exp_status=exp_status,
205
+ headers=header_params if header_params else None,
206
+ context_msg=None,
207
+ aspects=aspects,
208
+ )
209
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
210
+ rtnobj = None
211
+ else:
212
+ raw_data = resp.json()
213
+ rtnobj = Project.from_dict(raw_data)
214
+ return rtnobj
215
+
216
+ def projects_list_members(self, slug: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
217
+ """
218
+ List project members.
219
+ """
220
+ client = self.client
221
+ if aspects is None:
222
+ aspects = client.aspects
223
+
224
+ header_params = client.headers
225
+ if headers is not None:
226
+ header_params = headers
227
+
228
+ leaf_template = "/projects/{slug}/members"
229
+ path_params = {
230
+ 'slug': slug,
231
+ }
232
+ call_leaf = leaf_template.format(**path_params)
233
+
234
+ query_params = None
235
+
236
+
237
+ if exp_status is None:
238
+ exp_status = [200]
239
+
240
+ resp = client.perform_call(
241
+ leaf=call_leaf,
242
+ method="GET",
243
+ params=query_params if query_params else None,
244
+ body=None,
245
+ exp_status=exp_status,
246
+ headers=header_params if header_params else None,
247
+ context_msg=None,
248
+ aspects=aspects,
249
+ )
250
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
251
+ rtnval = None
252
+ else:
253
+ raw_data = resp.json()
254
+ rtnval = self._parse_item(raw_data, Dict[str, Any])
255
+ return rtnval
256
+
257
+ def projects_patch(self, slug: str, body: Projectpatchrequest, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Project:
258
+ """
259
+ Patch a project.
260
+ """
261
+ client = self.client
262
+ if aspects is None:
263
+ aspects = client.aspects
264
+
265
+ header_params = client.headers
266
+ if headers is not None:
267
+ header_params = headers
268
+
269
+ leaf_template = "/projects/{slug}"
270
+ path_params = {
271
+ 'slug': slug,
272
+ }
273
+ call_leaf = leaf_template.format(**path_params)
274
+
275
+ query_params = None
276
+
277
+
278
+ if exp_status is None:
279
+ exp_status = [200]
280
+
281
+ resp = client.perform_call(
282
+ leaf=call_leaf,
283
+ method="PATCH",
284
+ params=query_params if query_params else None,
285
+ body=body,
286
+ exp_status=exp_status,
287
+ headers=header_params if header_params else None,
288
+ context_msg=None,
289
+ aspects=aspects,
290
+ )
291
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
292
+ rtnobj = None
293
+ else:
294
+ raw_data = resp.json()
295
+ rtnobj = Project.from_dict(raw_data)
296
+ return rtnobj
297
+
298
+ def projects_remove_member(self, slug: str, user_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
299
+ """
300
+ Remove a member's owner binding from the project.
301
+ """
302
+ client = self.client
303
+ if aspects is None:
304
+ aspects = client.aspects
305
+
306
+ header_params = client.headers
307
+ if headers is not None:
308
+ header_params = headers
309
+
310
+ leaf_template = "/projects/{slug}/members/{user_id}"
311
+ path_params = {
312
+ 'slug': slug,
313
+ 'user_id': user_id,
314
+ }
315
+ call_leaf = leaf_template.format(**path_params)
316
+
317
+ query_params = None
318
+
319
+
320
+ if exp_status is None:
321
+ exp_status = [204]
322
+
323
+ resp = client.perform_call(
324
+ leaf=call_leaf,
325
+ method="DELETE",
326
+ params=query_params if query_params else None,
327
+ body=None,
328
+ exp_status=exp_status,
329
+ headers=header_params if header_params else None,
330
+ context_msg=None,
331
+ aspects=aspects,
332
+ )
333
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
334
+ rtnval = None
335
+ else:
336
+ rtnval = resp.json()
337
+ return rtnval
338
+
339
+ def projects_remove_member_role(self, slug: str, user_id: str, role_name: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Any:
340
+ """
341
+ Remove a specific role binding from a member of the project.
342
+ """
343
+ client = self.client
344
+ if aspects is None:
345
+ aspects = client.aspects
346
+
347
+ header_params = client.headers
348
+ if headers is not None:
349
+ header_params = headers
350
+
351
+ leaf_template = "/projects/{slug}/members/{user_id}/{role_name}"
352
+ path_params = {
353
+ 'slug': slug,
354
+ 'user_id': user_id,
355
+ 'role_name': role_name,
356
+ }
357
+ call_leaf = leaf_template.format(**path_params)
358
+
359
+ query_params = None
360
+
361
+
362
+ if exp_status is None:
363
+ exp_status = [204]
364
+
365
+ resp = client.perform_call(
366
+ leaf=call_leaf,
367
+ method="DELETE",
368
+ params=query_params if query_params else None,
369
+ body=None,
370
+ exp_status=exp_status,
371
+ headers=header_params if header_params else None,
372
+ context_msg=None,
373
+ aspects=aspects,
374
+ )
375
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
376
+ rtnval = None
377
+ else:
378
+ rtnval = resp.json()
379
+ return rtnval
380
+
381
+ def projects_unarchive(self, slug: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Project:
382
+ """
383
+ Un-archive a project.
384
+ """
385
+ client = self.client
386
+ if aspects is None:
387
+ aspects = client.aspects
388
+
389
+ header_params = client.headers
390
+ if headers is not None:
391
+ header_params = headers
392
+
393
+ leaf_template = "/projects/{slug}/unarchive"
394
+ path_params = {
395
+ 'slug': slug,
396
+ }
397
+ call_leaf = leaf_template.format(**path_params)
398
+
399
+ query_params = None
400
+
401
+
402
+ if exp_status is None:
403
+ exp_status = [200]
404
+
405
+ resp = client.perform_call(
406
+ leaf=call_leaf,
407
+ method="POST",
408
+ params=query_params if query_params else None,
409
+ body=None,
410
+ exp_status=exp_status,
411
+ headers=header_params if header_params else None,
412
+ context_msg=None,
413
+ aspects=aspects,
414
+ )
415
+ if resp.status_code in (204, 205) or (resp.status_code == 202 and len(resp.content) == 0):
416
+ rtnobj = None
417
+ else:
418
+ raw_data = resp.json()
419
+ rtnobj = Project.from_dict(raw_data)
420
+ return rtnobj
@@ -0,0 +1,91 @@
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.projecttemplates import Projecttemplate
6
+ from ccai.restclient.base.aspectsrest import AspectsRest
7
+ from ccai.restclient.base.restapigroup import RestApiGroup
8
+
9
+
10
+ class ProjectTemplatesApiGroup(RestApiGroup):
11
+ """
12
+ Scaffolded new-project presets.
13
+ """
14
+
15
+ def project_templates_get_by_id(self, template_id: str, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Projecttemplate:
16
+ """
17
+ Read a project template.
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 = "/project-templates/{template_id}"
28
+ path_params = {
29
+ 'template_id': template_id,
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 = Projecttemplate.from_dict(raw_data)
54
+ return rtnobj
55
+
56
+ def project_templates_list(self, *, exp_status: Optional[List[int]] = None, headers: Optional[Dict[str, str]] = None, aspects: Optional[AspectsRest] = None) -> Dict[str, Any]:
57
+ """
58
+ List project templates.
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 = "/project-templates"
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