cribl-control-plane 0.0.26__py3-none-any.whl → 0.0.27__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.
Potentially problematic release.
This version of cribl-control-plane might be problematic. Click here for more details.
- cribl_control_plane/_version.py +3 -3
- cribl_control_plane/acl.py +203 -0
- cribl_control_plane/auth_sdk.py +9 -176
- cribl_control_plane/branches.py +335 -0
- cribl_control_plane/commits.py +1141 -0
- cribl_control_plane/commits_files.py +371 -0
- cribl_control_plane/configs_versions.py +189 -0
- cribl_control_plane/destinations.py +16 -729
- cribl_control_plane/destinations_pq.py +359 -0
- cribl_control_plane/groups_configs.py +17 -0
- cribl_control_plane/groups_sdk.py +12 -545
- cribl_control_plane/hectokens.py +479 -0
- cribl_control_plane/models/__init__.py +0 -8
- cribl_control_plane/nodes.py +9 -171
- cribl_control_plane/samples.py +391 -0
- cribl_control_plane/sdk.py +3 -5
- cribl_control_plane/sources.py +13 -469
- cribl_control_plane/statuses.py +185 -0
- cribl_control_plane/summaries.py +185 -0
- cribl_control_plane/teams.py +201 -0
- cribl_control_plane/tokens.py +182 -0
- cribl_control_plane/versions.py +26 -0
- cribl_control_plane/versions_configs.py +171 -0
- {cribl_control_plane-0.0.26.dist-info → cribl_control_plane-0.0.27.dist-info}/METADATA +67 -29
- {cribl_control_plane-0.0.26.dist-info → cribl_control_plane-0.0.27.dist-info}/RECORD +26 -13
- cribl_control_plane/models/createversionsyncop.py +0 -23
- cribl_control_plane/versioning.py +0 -2309
- {cribl_control_plane-0.0.26.dist-info → cribl_control_plane-0.0.27.dist-info}/WHEEL +0 -0
|
@@ -1,2309 +0,0 @@
|
|
|
1
|
-
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
-
|
|
3
|
-
from .basesdk import BaseSDK
|
|
4
|
-
from cribl_control_plane import errors, models, utils
|
|
5
|
-
from cribl_control_plane._hooks import HookContext
|
|
6
|
-
from cribl_control_plane.types import OptionalNullable, UNSET
|
|
7
|
-
from cribl_control_plane.utils import get_security_from_env
|
|
8
|
-
from cribl_control_plane.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, List, Mapping, Optional
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
class Versioning(BaseSDK):
|
|
13
|
-
r"""Actions related to Versioning"""
|
|
14
|
-
|
|
15
|
-
def list_branches(
|
|
16
|
-
self,
|
|
17
|
-
*,
|
|
18
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
19
|
-
server_url: Optional[str] = None,
|
|
20
|
-
timeout_ms: Optional[int] = None,
|
|
21
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
22
|
-
) -> models.GetVersionBranchResponse:
|
|
23
|
-
r"""List all branches in the Git repository used for Cribl configuration
|
|
24
|
-
|
|
25
|
-
get the list of branches
|
|
26
|
-
|
|
27
|
-
:param retries: Override the default retry configuration for this method
|
|
28
|
-
:param server_url: Override the default server URL for this method
|
|
29
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
30
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
31
|
-
"""
|
|
32
|
-
base_url = None
|
|
33
|
-
url_variables = None
|
|
34
|
-
if timeout_ms is None:
|
|
35
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
36
|
-
|
|
37
|
-
if server_url is not None:
|
|
38
|
-
base_url = server_url
|
|
39
|
-
else:
|
|
40
|
-
base_url = self._get_url(base_url, url_variables)
|
|
41
|
-
req = self._build_request(
|
|
42
|
-
method="GET",
|
|
43
|
-
path="/version/branch",
|
|
44
|
-
base_url=base_url,
|
|
45
|
-
url_variables=url_variables,
|
|
46
|
-
request=None,
|
|
47
|
-
request_body_required=False,
|
|
48
|
-
request_has_path_params=False,
|
|
49
|
-
request_has_query_params=True,
|
|
50
|
-
user_agent_header="user-agent",
|
|
51
|
-
accept_header_value="application/json",
|
|
52
|
-
http_headers=http_headers,
|
|
53
|
-
security=self.sdk_configuration.security,
|
|
54
|
-
timeout_ms=timeout_ms,
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
if retries == UNSET:
|
|
58
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
59
|
-
retries = self.sdk_configuration.retry_config
|
|
60
|
-
|
|
61
|
-
retry_config = None
|
|
62
|
-
if isinstance(retries, utils.RetryConfig):
|
|
63
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
64
|
-
|
|
65
|
-
http_res = self.do_request(
|
|
66
|
-
hook_ctx=HookContext(
|
|
67
|
-
config=self.sdk_configuration,
|
|
68
|
-
base_url=base_url or "",
|
|
69
|
-
operation_id="getVersionBranch",
|
|
70
|
-
oauth2_scopes=[],
|
|
71
|
-
security_source=get_security_from_env(
|
|
72
|
-
self.sdk_configuration.security, models.Security
|
|
73
|
-
),
|
|
74
|
-
),
|
|
75
|
-
request=req,
|
|
76
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
77
|
-
retry_config=retry_config,
|
|
78
|
-
)
|
|
79
|
-
|
|
80
|
-
response_data: Any = None
|
|
81
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
82
|
-
return unmarshal_json_response(models.GetVersionBranchResponse, http_res)
|
|
83
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
84
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
85
|
-
raise errors.Error(response_data, http_res)
|
|
86
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
87
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
88
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
89
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
90
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
91
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
92
|
-
|
|
93
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
94
|
-
|
|
95
|
-
async def list_branches_async(
|
|
96
|
-
self,
|
|
97
|
-
*,
|
|
98
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
99
|
-
server_url: Optional[str] = None,
|
|
100
|
-
timeout_ms: Optional[int] = None,
|
|
101
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
102
|
-
) -> models.GetVersionBranchResponse:
|
|
103
|
-
r"""List all branches in the Git repository used for Cribl configuration
|
|
104
|
-
|
|
105
|
-
get the list of branches
|
|
106
|
-
|
|
107
|
-
:param retries: Override the default retry configuration for this method
|
|
108
|
-
:param server_url: Override the default server URL for this method
|
|
109
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
110
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
111
|
-
"""
|
|
112
|
-
base_url = None
|
|
113
|
-
url_variables = None
|
|
114
|
-
if timeout_ms is None:
|
|
115
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
116
|
-
|
|
117
|
-
if server_url is not None:
|
|
118
|
-
base_url = server_url
|
|
119
|
-
else:
|
|
120
|
-
base_url = self._get_url(base_url, url_variables)
|
|
121
|
-
req = self._build_request_async(
|
|
122
|
-
method="GET",
|
|
123
|
-
path="/version/branch",
|
|
124
|
-
base_url=base_url,
|
|
125
|
-
url_variables=url_variables,
|
|
126
|
-
request=None,
|
|
127
|
-
request_body_required=False,
|
|
128
|
-
request_has_path_params=False,
|
|
129
|
-
request_has_query_params=True,
|
|
130
|
-
user_agent_header="user-agent",
|
|
131
|
-
accept_header_value="application/json",
|
|
132
|
-
http_headers=http_headers,
|
|
133
|
-
security=self.sdk_configuration.security,
|
|
134
|
-
timeout_ms=timeout_ms,
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
if retries == UNSET:
|
|
138
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
139
|
-
retries = self.sdk_configuration.retry_config
|
|
140
|
-
|
|
141
|
-
retry_config = None
|
|
142
|
-
if isinstance(retries, utils.RetryConfig):
|
|
143
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
144
|
-
|
|
145
|
-
http_res = await self.do_request_async(
|
|
146
|
-
hook_ctx=HookContext(
|
|
147
|
-
config=self.sdk_configuration,
|
|
148
|
-
base_url=base_url or "",
|
|
149
|
-
operation_id="getVersionBranch",
|
|
150
|
-
oauth2_scopes=[],
|
|
151
|
-
security_source=get_security_from_env(
|
|
152
|
-
self.sdk_configuration.security, models.Security
|
|
153
|
-
),
|
|
154
|
-
),
|
|
155
|
-
request=req,
|
|
156
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
157
|
-
retry_config=retry_config,
|
|
158
|
-
)
|
|
159
|
-
|
|
160
|
-
response_data: Any = None
|
|
161
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
162
|
-
return unmarshal_json_response(models.GetVersionBranchResponse, http_res)
|
|
163
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
164
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
165
|
-
raise errors.Error(response_data, http_res)
|
|
166
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
167
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
168
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
169
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
170
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
171
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
172
|
-
|
|
173
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
174
|
-
|
|
175
|
-
def create_commit(
|
|
176
|
-
self,
|
|
177
|
-
*,
|
|
178
|
-
message: str,
|
|
179
|
-
effective: Optional[bool] = None,
|
|
180
|
-
files: Optional[List[str]] = None,
|
|
181
|
-
group: Optional[str] = None,
|
|
182
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
183
|
-
server_url: Optional[str] = None,
|
|
184
|
-
timeout_ms: Optional[int] = None,
|
|
185
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
186
|
-
) -> models.CreateVersionCommitResponse:
|
|
187
|
-
r"""Create a new commit for pending changes to the Cribl configuration
|
|
188
|
-
|
|
189
|
-
create a new commit containing the current configs the given log message describing the changes.
|
|
190
|
-
|
|
191
|
-
:param message:
|
|
192
|
-
:param effective:
|
|
193
|
-
:param files:
|
|
194
|
-
:param group:
|
|
195
|
-
:param retries: Override the default retry configuration for this method
|
|
196
|
-
:param server_url: Override the default server URL for this method
|
|
197
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
198
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
199
|
-
"""
|
|
200
|
-
base_url = None
|
|
201
|
-
url_variables = None
|
|
202
|
-
if timeout_ms is None:
|
|
203
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
204
|
-
|
|
205
|
-
if server_url is not None:
|
|
206
|
-
base_url = server_url
|
|
207
|
-
else:
|
|
208
|
-
base_url = self._get_url(base_url, url_variables)
|
|
209
|
-
|
|
210
|
-
request = models.GitCommitParams(
|
|
211
|
-
effective=effective,
|
|
212
|
-
files=files,
|
|
213
|
-
group=group,
|
|
214
|
-
message=message,
|
|
215
|
-
)
|
|
216
|
-
|
|
217
|
-
req = self._build_request(
|
|
218
|
-
method="POST",
|
|
219
|
-
path="/version/commit",
|
|
220
|
-
base_url=base_url,
|
|
221
|
-
url_variables=url_variables,
|
|
222
|
-
request=request,
|
|
223
|
-
request_body_required=True,
|
|
224
|
-
request_has_path_params=False,
|
|
225
|
-
request_has_query_params=True,
|
|
226
|
-
user_agent_header="user-agent",
|
|
227
|
-
accept_header_value="application/json",
|
|
228
|
-
http_headers=http_headers,
|
|
229
|
-
security=self.sdk_configuration.security,
|
|
230
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
231
|
-
request, False, False, "json", models.GitCommitParams
|
|
232
|
-
),
|
|
233
|
-
timeout_ms=timeout_ms,
|
|
234
|
-
)
|
|
235
|
-
|
|
236
|
-
if retries == UNSET:
|
|
237
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
238
|
-
retries = self.sdk_configuration.retry_config
|
|
239
|
-
|
|
240
|
-
retry_config = None
|
|
241
|
-
if isinstance(retries, utils.RetryConfig):
|
|
242
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
243
|
-
|
|
244
|
-
http_res = self.do_request(
|
|
245
|
-
hook_ctx=HookContext(
|
|
246
|
-
config=self.sdk_configuration,
|
|
247
|
-
base_url=base_url or "",
|
|
248
|
-
operation_id="createVersionCommit",
|
|
249
|
-
oauth2_scopes=[],
|
|
250
|
-
security_source=get_security_from_env(
|
|
251
|
-
self.sdk_configuration.security, models.Security
|
|
252
|
-
),
|
|
253
|
-
),
|
|
254
|
-
request=req,
|
|
255
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
256
|
-
retry_config=retry_config,
|
|
257
|
-
)
|
|
258
|
-
|
|
259
|
-
response_data: Any = None
|
|
260
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
261
|
-
return unmarshal_json_response(models.CreateVersionCommitResponse, http_res)
|
|
262
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
263
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
264
|
-
raise errors.Error(response_data, http_res)
|
|
265
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
266
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
267
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
268
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
269
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
270
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
271
|
-
|
|
272
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
273
|
-
|
|
274
|
-
async def create_commit_async(
|
|
275
|
-
self,
|
|
276
|
-
*,
|
|
277
|
-
message: str,
|
|
278
|
-
effective: Optional[bool] = None,
|
|
279
|
-
files: Optional[List[str]] = None,
|
|
280
|
-
group: Optional[str] = None,
|
|
281
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
282
|
-
server_url: Optional[str] = None,
|
|
283
|
-
timeout_ms: Optional[int] = None,
|
|
284
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
285
|
-
) -> models.CreateVersionCommitResponse:
|
|
286
|
-
r"""Create a new commit for pending changes to the Cribl configuration
|
|
287
|
-
|
|
288
|
-
create a new commit containing the current configs the given log message describing the changes.
|
|
289
|
-
|
|
290
|
-
:param message:
|
|
291
|
-
:param effective:
|
|
292
|
-
:param files:
|
|
293
|
-
:param group:
|
|
294
|
-
:param retries: Override the default retry configuration for this method
|
|
295
|
-
:param server_url: Override the default server URL for this method
|
|
296
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
297
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
298
|
-
"""
|
|
299
|
-
base_url = None
|
|
300
|
-
url_variables = None
|
|
301
|
-
if timeout_ms is None:
|
|
302
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
303
|
-
|
|
304
|
-
if server_url is not None:
|
|
305
|
-
base_url = server_url
|
|
306
|
-
else:
|
|
307
|
-
base_url = self._get_url(base_url, url_variables)
|
|
308
|
-
|
|
309
|
-
request = models.GitCommitParams(
|
|
310
|
-
effective=effective,
|
|
311
|
-
files=files,
|
|
312
|
-
group=group,
|
|
313
|
-
message=message,
|
|
314
|
-
)
|
|
315
|
-
|
|
316
|
-
req = self._build_request_async(
|
|
317
|
-
method="POST",
|
|
318
|
-
path="/version/commit",
|
|
319
|
-
base_url=base_url,
|
|
320
|
-
url_variables=url_variables,
|
|
321
|
-
request=request,
|
|
322
|
-
request_body_required=True,
|
|
323
|
-
request_has_path_params=False,
|
|
324
|
-
request_has_query_params=True,
|
|
325
|
-
user_agent_header="user-agent",
|
|
326
|
-
accept_header_value="application/json",
|
|
327
|
-
http_headers=http_headers,
|
|
328
|
-
security=self.sdk_configuration.security,
|
|
329
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
330
|
-
request, False, False, "json", models.GitCommitParams
|
|
331
|
-
),
|
|
332
|
-
timeout_ms=timeout_ms,
|
|
333
|
-
)
|
|
334
|
-
|
|
335
|
-
if retries == UNSET:
|
|
336
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
337
|
-
retries = self.sdk_configuration.retry_config
|
|
338
|
-
|
|
339
|
-
retry_config = None
|
|
340
|
-
if isinstance(retries, utils.RetryConfig):
|
|
341
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
342
|
-
|
|
343
|
-
http_res = await self.do_request_async(
|
|
344
|
-
hook_ctx=HookContext(
|
|
345
|
-
config=self.sdk_configuration,
|
|
346
|
-
base_url=base_url or "",
|
|
347
|
-
operation_id="createVersionCommit",
|
|
348
|
-
oauth2_scopes=[],
|
|
349
|
-
security_source=get_security_from_env(
|
|
350
|
-
self.sdk_configuration.security, models.Security
|
|
351
|
-
),
|
|
352
|
-
),
|
|
353
|
-
request=req,
|
|
354
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
355
|
-
retry_config=retry_config,
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
response_data: Any = None
|
|
359
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
360
|
-
return unmarshal_json_response(models.CreateVersionCommitResponse, http_res)
|
|
361
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
362
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
363
|
-
raise errors.Error(response_data, http_res)
|
|
364
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
365
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
366
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
367
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
368
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
369
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
370
|
-
|
|
371
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
372
|
-
|
|
373
|
-
def get_file_count(
|
|
374
|
-
self,
|
|
375
|
-
*,
|
|
376
|
-
group: Optional[str] = None,
|
|
377
|
-
id: Optional[str] = None,
|
|
378
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
379
|
-
server_url: Optional[str] = None,
|
|
380
|
-
timeout_ms: Optional[int] = None,
|
|
381
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
382
|
-
) -> models.GetVersionCountResponse:
|
|
383
|
-
r"""Retrieve a count of files that changed since a commit
|
|
384
|
-
|
|
385
|
-
get the count of files of changed
|
|
386
|
-
|
|
387
|
-
:param group: Group ID
|
|
388
|
-
:param id: Commit ID
|
|
389
|
-
:param retries: Override the default retry configuration for this method
|
|
390
|
-
:param server_url: Override the default server URL for this method
|
|
391
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
392
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
393
|
-
"""
|
|
394
|
-
base_url = None
|
|
395
|
-
url_variables = None
|
|
396
|
-
if timeout_ms is None:
|
|
397
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
398
|
-
|
|
399
|
-
if server_url is not None:
|
|
400
|
-
base_url = server_url
|
|
401
|
-
else:
|
|
402
|
-
base_url = self._get_url(base_url, url_variables)
|
|
403
|
-
|
|
404
|
-
request = models.GetVersionCountRequest(
|
|
405
|
-
group=group,
|
|
406
|
-
id=id,
|
|
407
|
-
)
|
|
408
|
-
|
|
409
|
-
req = self._build_request(
|
|
410
|
-
method="GET",
|
|
411
|
-
path="/version/count",
|
|
412
|
-
base_url=base_url,
|
|
413
|
-
url_variables=url_variables,
|
|
414
|
-
request=request,
|
|
415
|
-
request_body_required=False,
|
|
416
|
-
request_has_path_params=False,
|
|
417
|
-
request_has_query_params=True,
|
|
418
|
-
user_agent_header="user-agent",
|
|
419
|
-
accept_header_value="application/json",
|
|
420
|
-
http_headers=http_headers,
|
|
421
|
-
security=self.sdk_configuration.security,
|
|
422
|
-
timeout_ms=timeout_ms,
|
|
423
|
-
)
|
|
424
|
-
|
|
425
|
-
if retries == UNSET:
|
|
426
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
427
|
-
retries = self.sdk_configuration.retry_config
|
|
428
|
-
|
|
429
|
-
retry_config = None
|
|
430
|
-
if isinstance(retries, utils.RetryConfig):
|
|
431
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
432
|
-
|
|
433
|
-
http_res = self.do_request(
|
|
434
|
-
hook_ctx=HookContext(
|
|
435
|
-
config=self.sdk_configuration,
|
|
436
|
-
base_url=base_url or "",
|
|
437
|
-
operation_id="getVersionCount",
|
|
438
|
-
oauth2_scopes=[],
|
|
439
|
-
security_source=get_security_from_env(
|
|
440
|
-
self.sdk_configuration.security, models.Security
|
|
441
|
-
),
|
|
442
|
-
),
|
|
443
|
-
request=req,
|
|
444
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
445
|
-
retry_config=retry_config,
|
|
446
|
-
)
|
|
447
|
-
|
|
448
|
-
response_data: Any = None
|
|
449
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
450
|
-
return unmarshal_json_response(models.GetVersionCountResponse, http_res)
|
|
451
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
452
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
453
|
-
raise errors.Error(response_data, http_res)
|
|
454
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
455
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
456
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
457
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
458
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
459
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
460
|
-
|
|
461
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
462
|
-
|
|
463
|
-
async def get_file_count_async(
|
|
464
|
-
self,
|
|
465
|
-
*,
|
|
466
|
-
group: Optional[str] = None,
|
|
467
|
-
id: Optional[str] = None,
|
|
468
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
469
|
-
server_url: Optional[str] = None,
|
|
470
|
-
timeout_ms: Optional[int] = None,
|
|
471
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
472
|
-
) -> models.GetVersionCountResponse:
|
|
473
|
-
r"""Retrieve a count of files that changed since a commit
|
|
474
|
-
|
|
475
|
-
get the count of files of changed
|
|
476
|
-
|
|
477
|
-
:param group: Group ID
|
|
478
|
-
:param id: Commit ID
|
|
479
|
-
:param retries: Override the default retry configuration for this method
|
|
480
|
-
:param server_url: Override the default server URL for this method
|
|
481
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
482
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
483
|
-
"""
|
|
484
|
-
base_url = None
|
|
485
|
-
url_variables = None
|
|
486
|
-
if timeout_ms is None:
|
|
487
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
488
|
-
|
|
489
|
-
if server_url is not None:
|
|
490
|
-
base_url = server_url
|
|
491
|
-
else:
|
|
492
|
-
base_url = self._get_url(base_url, url_variables)
|
|
493
|
-
|
|
494
|
-
request = models.GetVersionCountRequest(
|
|
495
|
-
group=group,
|
|
496
|
-
id=id,
|
|
497
|
-
)
|
|
498
|
-
|
|
499
|
-
req = self._build_request_async(
|
|
500
|
-
method="GET",
|
|
501
|
-
path="/version/count",
|
|
502
|
-
base_url=base_url,
|
|
503
|
-
url_variables=url_variables,
|
|
504
|
-
request=request,
|
|
505
|
-
request_body_required=False,
|
|
506
|
-
request_has_path_params=False,
|
|
507
|
-
request_has_query_params=True,
|
|
508
|
-
user_agent_header="user-agent",
|
|
509
|
-
accept_header_value="application/json",
|
|
510
|
-
http_headers=http_headers,
|
|
511
|
-
security=self.sdk_configuration.security,
|
|
512
|
-
timeout_ms=timeout_ms,
|
|
513
|
-
)
|
|
514
|
-
|
|
515
|
-
if retries == UNSET:
|
|
516
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
517
|
-
retries = self.sdk_configuration.retry_config
|
|
518
|
-
|
|
519
|
-
retry_config = None
|
|
520
|
-
if isinstance(retries, utils.RetryConfig):
|
|
521
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
522
|
-
|
|
523
|
-
http_res = await self.do_request_async(
|
|
524
|
-
hook_ctx=HookContext(
|
|
525
|
-
config=self.sdk_configuration,
|
|
526
|
-
base_url=base_url or "",
|
|
527
|
-
operation_id="getVersionCount",
|
|
528
|
-
oauth2_scopes=[],
|
|
529
|
-
security_source=get_security_from_env(
|
|
530
|
-
self.sdk_configuration.security, models.Security
|
|
531
|
-
),
|
|
532
|
-
),
|
|
533
|
-
request=req,
|
|
534
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
535
|
-
retry_config=retry_config,
|
|
536
|
-
)
|
|
537
|
-
|
|
538
|
-
response_data: Any = None
|
|
539
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
540
|
-
return unmarshal_json_response(models.GetVersionCountResponse, http_res)
|
|
541
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
542
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
543
|
-
raise errors.Error(response_data, http_res)
|
|
544
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
545
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
546
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
547
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
548
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
549
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
550
|
-
|
|
551
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
552
|
-
|
|
553
|
-
def get_branch(
|
|
554
|
-
self,
|
|
555
|
-
*,
|
|
556
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
557
|
-
server_url: Optional[str] = None,
|
|
558
|
-
timeout_ms: Optional[int] = None,
|
|
559
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
560
|
-
) -> models.GetVersionCurrentBranchResponse:
|
|
561
|
-
r"""Retrieve the name of the Git branch that the Cribl configuration is checked out to
|
|
562
|
-
|
|
563
|
-
returns git branch that the config is checked out to, if any
|
|
564
|
-
|
|
565
|
-
:param retries: Override the default retry configuration for this method
|
|
566
|
-
:param server_url: Override the default server URL for this method
|
|
567
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
568
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
569
|
-
"""
|
|
570
|
-
base_url = None
|
|
571
|
-
url_variables = None
|
|
572
|
-
if timeout_ms is None:
|
|
573
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
574
|
-
|
|
575
|
-
if server_url is not None:
|
|
576
|
-
base_url = server_url
|
|
577
|
-
else:
|
|
578
|
-
base_url = self._get_url(base_url, url_variables)
|
|
579
|
-
req = self._build_request(
|
|
580
|
-
method="GET",
|
|
581
|
-
path="/version/current-branch",
|
|
582
|
-
base_url=base_url,
|
|
583
|
-
url_variables=url_variables,
|
|
584
|
-
request=None,
|
|
585
|
-
request_body_required=False,
|
|
586
|
-
request_has_path_params=False,
|
|
587
|
-
request_has_query_params=True,
|
|
588
|
-
user_agent_header="user-agent",
|
|
589
|
-
accept_header_value="application/json",
|
|
590
|
-
http_headers=http_headers,
|
|
591
|
-
security=self.sdk_configuration.security,
|
|
592
|
-
timeout_ms=timeout_ms,
|
|
593
|
-
)
|
|
594
|
-
|
|
595
|
-
if retries == UNSET:
|
|
596
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
597
|
-
retries = self.sdk_configuration.retry_config
|
|
598
|
-
|
|
599
|
-
retry_config = None
|
|
600
|
-
if isinstance(retries, utils.RetryConfig):
|
|
601
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
602
|
-
|
|
603
|
-
http_res = self.do_request(
|
|
604
|
-
hook_ctx=HookContext(
|
|
605
|
-
config=self.sdk_configuration,
|
|
606
|
-
base_url=base_url or "",
|
|
607
|
-
operation_id="getVersionCurrentBranch",
|
|
608
|
-
oauth2_scopes=[],
|
|
609
|
-
security_source=get_security_from_env(
|
|
610
|
-
self.sdk_configuration.security, models.Security
|
|
611
|
-
),
|
|
612
|
-
),
|
|
613
|
-
request=req,
|
|
614
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
615
|
-
retry_config=retry_config,
|
|
616
|
-
)
|
|
617
|
-
|
|
618
|
-
response_data: Any = None
|
|
619
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
620
|
-
return unmarshal_json_response(
|
|
621
|
-
models.GetVersionCurrentBranchResponse, http_res
|
|
622
|
-
)
|
|
623
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
624
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
625
|
-
raise errors.Error(response_data, http_res)
|
|
626
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
627
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
628
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
629
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
630
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
631
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
632
|
-
|
|
633
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
634
|
-
|
|
635
|
-
async def get_branch_async(
|
|
636
|
-
self,
|
|
637
|
-
*,
|
|
638
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
639
|
-
server_url: Optional[str] = None,
|
|
640
|
-
timeout_ms: Optional[int] = None,
|
|
641
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
642
|
-
) -> models.GetVersionCurrentBranchResponse:
|
|
643
|
-
r"""Retrieve the name of the Git branch that the Cribl configuration is checked out to
|
|
644
|
-
|
|
645
|
-
returns git branch that the config is checked out to, if any
|
|
646
|
-
|
|
647
|
-
:param retries: Override the default retry configuration for this method
|
|
648
|
-
:param server_url: Override the default server URL for this method
|
|
649
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
650
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
651
|
-
"""
|
|
652
|
-
base_url = None
|
|
653
|
-
url_variables = None
|
|
654
|
-
if timeout_ms is None:
|
|
655
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
656
|
-
|
|
657
|
-
if server_url is not None:
|
|
658
|
-
base_url = server_url
|
|
659
|
-
else:
|
|
660
|
-
base_url = self._get_url(base_url, url_variables)
|
|
661
|
-
req = self._build_request_async(
|
|
662
|
-
method="GET",
|
|
663
|
-
path="/version/current-branch",
|
|
664
|
-
base_url=base_url,
|
|
665
|
-
url_variables=url_variables,
|
|
666
|
-
request=None,
|
|
667
|
-
request_body_required=False,
|
|
668
|
-
request_has_path_params=False,
|
|
669
|
-
request_has_query_params=True,
|
|
670
|
-
user_agent_header="user-agent",
|
|
671
|
-
accept_header_value="application/json",
|
|
672
|
-
http_headers=http_headers,
|
|
673
|
-
security=self.sdk_configuration.security,
|
|
674
|
-
timeout_ms=timeout_ms,
|
|
675
|
-
)
|
|
676
|
-
|
|
677
|
-
if retries == UNSET:
|
|
678
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
679
|
-
retries = self.sdk_configuration.retry_config
|
|
680
|
-
|
|
681
|
-
retry_config = None
|
|
682
|
-
if isinstance(retries, utils.RetryConfig):
|
|
683
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
684
|
-
|
|
685
|
-
http_res = await self.do_request_async(
|
|
686
|
-
hook_ctx=HookContext(
|
|
687
|
-
config=self.sdk_configuration,
|
|
688
|
-
base_url=base_url or "",
|
|
689
|
-
operation_id="getVersionCurrentBranch",
|
|
690
|
-
oauth2_scopes=[],
|
|
691
|
-
security_source=get_security_from_env(
|
|
692
|
-
self.sdk_configuration.security, models.Security
|
|
693
|
-
),
|
|
694
|
-
),
|
|
695
|
-
request=req,
|
|
696
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
697
|
-
retry_config=retry_config,
|
|
698
|
-
)
|
|
699
|
-
|
|
700
|
-
response_data: Any = None
|
|
701
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
702
|
-
return unmarshal_json_response(
|
|
703
|
-
models.GetVersionCurrentBranchResponse, http_res
|
|
704
|
-
)
|
|
705
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
706
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
707
|
-
raise errors.Error(response_data, http_res)
|
|
708
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
709
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
710
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
711
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
712
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
713
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
714
|
-
|
|
715
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
716
|
-
|
|
717
|
-
def get_diff(
|
|
718
|
-
self,
|
|
719
|
-
*,
|
|
720
|
-
commit: Optional[str] = None,
|
|
721
|
-
group: Optional[str] = None,
|
|
722
|
-
filename: Optional[str] = None,
|
|
723
|
-
diff_line_limit: Optional[float] = None,
|
|
724
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
725
|
-
server_url: Optional[str] = None,
|
|
726
|
-
timeout_ms: Optional[int] = None,
|
|
727
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
728
|
-
) -> models.GetVersionDiffResponse:
|
|
729
|
-
r"""Retrieve the diff for a commit
|
|
730
|
-
|
|
731
|
-
get the textual diff for given commit
|
|
732
|
-
|
|
733
|
-
:param commit: Commit hash (default is HEAD)
|
|
734
|
-
:param group: Group ID
|
|
735
|
-
:param filename: Filename
|
|
736
|
-
:param diff_line_limit: Limit maximum lines in the diff
|
|
737
|
-
:param retries: Override the default retry configuration for this method
|
|
738
|
-
:param server_url: Override the default server URL for this method
|
|
739
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
740
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
741
|
-
"""
|
|
742
|
-
base_url = None
|
|
743
|
-
url_variables = None
|
|
744
|
-
if timeout_ms is None:
|
|
745
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
746
|
-
|
|
747
|
-
if server_url is not None:
|
|
748
|
-
base_url = server_url
|
|
749
|
-
else:
|
|
750
|
-
base_url = self._get_url(base_url, url_variables)
|
|
751
|
-
|
|
752
|
-
request = models.GetVersionDiffRequest(
|
|
753
|
-
commit=commit,
|
|
754
|
-
group=group,
|
|
755
|
-
filename=filename,
|
|
756
|
-
diff_line_limit=diff_line_limit,
|
|
757
|
-
)
|
|
758
|
-
|
|
759
|
-
req = self._build_request(
|
|
760
|
-
method="GET",
|
|
761
|
-
path="/version/diff",
|
|
762
|
-
base_url=base_url,
|
|
763
|
-
url_variables=url_variables,
|
|
764
|
-
request=request,
|
|
765
|
-
request_body_required=False,
|
|
766
|
-
request_has_path_params=False,
|
|
767
|
-
request_has_query_params=True,
|
|
768
|
-
user_agent_header="user-agent",
|
|
769
|
-
accept_header_value="application/json",
|
|
770
|
-
http_headers=http_headers,
|
|
771
|
-
security=self.sdk_configuration.security,
|
|
772
|
-
timeout_ms=timeout_ms,
|
|
773
|
-
)
|
|
774
|
-
|
|
775
|
-
if retries == UNSET:
|
|
776
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
777
|
-
retries = self.sdk_configuration.retry_config
|
|
778
|
-
|
|
779
|
-
retry_config = None
|
|
780
|
-
if isinstance(retries, utils.RetryConfig):
|
|
781
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
782
|
-
|
|
783
|
-
http_res = self.do_request(
|
|
784
|
-
hook_ctx=HookContext(
|
|
785
|
-
config=self.sdk_configuration,
|
|
786
|
-
base_url=base_url or "",
|
|
787
|
-
operation_id="getVersionDiff",
|
|
788
|
-
oauth2_scopes=[],
|
|
789
|
-
security_source=get_security_from_env(
|
|
790
|
-
self.sdk_configuration.security, models.Security
|
|
791
|
-
),
|
|
792
|
-
),
|
|
793
|
-
request=req,
|
|
794
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
795
|
-
retry_config=retry_config,
|
|
796
|
-
)
|
|
797
|
-
|
|
798
|
-
response_data: Any = None
|
|
799
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
800
|
-
return unmarshal_json_response(models.GetVersionDiffResponse, http_res)
|
|
801
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
802
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
803
|
-
raise errors.Error(response_data, http_res)
|
|
804
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
805
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
806
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
807
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
808
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
809
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
810
|
-
|
|
811
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
812
|
-
|
|
813
|
-
async def get_diff_async(
|
|
814
|
-
self,
|
|
815
|
-
*,
|
|
816
|
-
commit: Optional[str] = None,
|
|
817
|
-
group: Optional[str] = None,
|
|
818
|
-
filename: Optional[str] = None,
|
|
819
|
-
diff_line_limit: Optional[float] = None,
|
|
820
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
821
|
-
server_url: Optional[str] = None,
|
|
822
|
-
timeout_ms: Optional[int] = None,
|
|
823
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
824
|
-
) -> models.GetVersionDiffResponse:
|
|
825
|
-
r"""Retrieve the diff for a commit
|
|
826
|
-
|
|
827
|
-
get the textual diff for given commit
|
|
828
|
-
|
|
829
|
-
:param commit: Commit hash (default is HEAD)
|
|
830
|
-
:param group: Group ID
|
|
831
|
-
:param filename: Filename
|
|
832
|
-
:param diff_line_limit: Limit maximum lines in the diff
|
|
833
|
-
:param retries: Override the default retry configuration for this method
|
|
834
|
-
:param server_url: Override the default server URL for this method
|
|
835
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
836
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
837
|
-
"""
|
|
838
|
-
base_url = None
|
|
839
|
-
url_variables = None
|
|
840
|
-
if timeout_ms is None:
|
|
841
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
842
|
-
|
|
843
|
-
if server_url is not None:
|
|
844
|
-
base_url = server_url
|
|
845
|
-
else:
|
|
846
|
-
base_url = self._get_url(base_url, url_variables)
|
|
847
|
-
|
|
848
|
-
request = models.GetVersionDiffRequest(
|
|
849
|
-
commit=commit,
|
|
850
|
-
group=group,
|
|
851
|
-
filename=filename,
|
|
852
|
-
diff_line_limit=diff_line_limit,
|
|
853
|
-
)
|
|
854
|
-
|
|
855
|
-
req = self._build_request_async(
|
|
856
|
-
method="GET",
|
|
857
|
-
path="/version/diff",
|
|
858
|
-
base_url=base_url,
|
|
859
|
-
url_variables=url_variables,
|
|
860
|
-
request=request,
|
|
861
|
-
request_body_required=False,
|
|
862
|
-
request_has_path_params=False,
|
|
863
|
-
request_has_query_params=True,
|
|
864
|
-
user_agent_header="user-agent",
|
|
865
|
-
accept_header_value="application/json",
|
|
866
|
-
http_headers=http_headers,
|
|
867
|
-
security=self.sdk_configuration.security,
|
|
868
|
-
timeout_ms=timeout_ms,
|
|
869
|
-
)
|
|
870
|
-
|
|
871
|
-
if retries == UNSET:
|
|
872
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
873
|
-
retries = self.sdk_configuration.retry_config
|
|
874
|
-
|
|
875
|
-
retry_config = None
|
|
876
|
-
if isinstance(retries, utils.RetryConfig):
|
|
877
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
878
|
-
|
|
879
|
-
http_res = await self.do_request_async(
|
|
880
|
-
hook_ctx=HookContext(
|
|
881
|
-
config=self.sdk_configuration,
|
|
882
|
-
base_url=base_url or "",
|
|
883
|
-
operation_id="getVersionDiff",
|
|
884
|
-
oauth2_scopes=[],
|
|
885
|
-
security_source=get_security_from_env(
|
|
886
|
-
self.sdk_configuration.security, models.Security
|
|
887
|
-
),
|
|
888
|
-
),
|
|
889
|
-
request=req,
|
|
890
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
891
|
-
retry_config=retry_config,
|
|
892
|
-
)
|
|
893
|
-
|
|
894
|
-
response_data: Any = None
|
|
895
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
896
|
-
return unmarshal_json_response(models.GetVersionDiffResponse, http_res)
|
|
897
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
898
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
899
|
-
raise errors.Error(response_data, http_res)
|
|
900
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
901
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
902
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
903
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
904
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
905
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
906
|
-
|
|
907
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
908
|
-
|
|
909
|
-
def list_files(
|
|
910
|
-
self,
|
|
911
|
-
*,
|
|
912
|
-
group: Optional[str] = None,
|
|
913
|
-
id: Optional[str] = None,
|
|
914
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
915
|
-
server_url: Optional[str] = None,
|
|
916
|
-
timeout_ms: Optional[int] = None,
|
|
917
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
918
|
-
) -> models.GetVersionFilesResponse:
|
|
919
|
-
r"""Retrieve the names and statuses of files that changed since a commit
|
|
920
|
-
|
|
921
|
-
get the files changed
|
|
922
|
-
|
|
923
|
-
:param group: Group ID
|
|
924
|
-
:param id: Commit ID
|
|
925
|
-
:param retries: Override the default retry configuration for this method
|
|
926
|
-
:param server_url: Override the default server URL for this method
|
|
927
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
928
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
929
|
-
"""
|
|
930
|
-
base_url = None
|
|
931
|
-
url_variables = None
|
|
932
|
-
if timeout_ms is None:
|
|
933
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
934
|
-
|
|
935
|
-
if server_url is not None:
|
|
936
|
-
base_url = server_url
|
|
937
|
-
else:
|
|
938
|
-
base_url = self._get_url(base_url, url_variables)
|
|
939
|
-
|
|
940
|
-
request = models.GetVersionFilesRequest(
|
|
941
|
-
group=group,
|
|
942
|
-
id=id,
|
|
943
|
-
)
|
|
944
|
-
|
|
945
|
-
req = self._build_request(
|
|
946
|
-
method="GET",
|
|
947
|
-
path="/version/files",
|
|
948
|
-
base_url=base_url,
|
|
949
|
-
url_variables=url_variables,
|
|
950
|
-
request=request,
|
|
951
|
-
request_body_required=False,
|
|
952
|
-
request_has_path_params=False,
|
|
953
|
-
request_has_query_params=True,
|
|
954
|
-
user_agent_header="user-agent",
|
|
955
|
-
accept_header_value="application/json",
|
|
956
|
-
http_headers=http_headers,
|
|
957
|
-
security=self.sdk_configuration.security,
|
|
958
|
-
timeout_ms=timeout_ms,
|
|
959
|
-
)
|
|
960
|
-
|
|
961
|
-
if retries == UNSET:
|
|
962
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
963
|
-
retries = self.sdk_configuration.retry_config
|
|
964
|
-
|
|
965
|
-
retry_config = None
|
|
966
|
-
if isinstance(retries, utils.RetryConfig):
|
|
967
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
968
|
-
|
|
969
|
-
http_res = self.do_request(
|
|
970
|
-
hook_ctx=HookContext(
|
|
971
|
-
config=self.sdk_configuration,
|
|
972
|
-
base_url=base_url or "",
|
|
973
|
-
operation_id="getVersionFiles",
|
|
974
|
-
oauth2_scopes=[],
|
|
975
|
-
security_source=get_security_from_env(
|
|
976
|
-
self.sdk_configuration.security, models.Security
|
|
977
|
-
),
|
|
978
|
-
),
|
|
979
|
-
request=req,
|
|
980
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
981
|
-
retry_config=retry_config,
|
|
982
|
-
)
|
|
983
|
-
|
|
984
|
-
response_data: Any = None
|
|
985
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
986
|
-
return unmarshal_json_response(models.GetVersionFilesResponse, http_res)
|
|
987
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
988
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
989
|
-
raise errors.Error(response_data, http_res)
|
|
990
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
991
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
992
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
993
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
994
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
995
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
996
|
-
|
|
997
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
998
|
-
|
|
999
|
-
async def list_files_async(
|
|
1000
|
-
self,
|
|
1001
|
-
*,
|
|
1002
|
-
group: Optional[str] = None,
|
|
1003
|
-
id: Optional[str] = None,
|
|
1004
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1005
|
-
server_url: Optional[str] = None,
|
|
1006
|
-
timeout_ms: Optional[int] = None,
|
|
1007
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1008
|
-
) -> models.GetVersionFilesResponse:
|
|
1009
|
-
r"""Retrieve the names and statuses of files that changed since a commit
|
|
1010
|
-
|
|
1011
|
-
get the files changed
|
|
1012
|
-
|
|
1013
|
-
:param group: Group ID
|
|
1014
|
-
:param id: Commit ID
|
|
1015
|
-
:param retries: Override the default retry configuration for this method
|
|
1016
|
-
:param server_url: Override the default server URL for this method
|
|
1017
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1018
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1019
|
-
"""
|
|
1020
|
-
base_url = None
|
|
1021
|
-
url_variables = None
|
|
1022
|
-
if timeout_ms is None:
|
|
1023
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1024
|
-
|
|
1025
|
-
if server_url is not None:
|
|
1026
|
-
base_url = server_url
|
|
1027
|
-
else:
|
|
1028
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1029
|
-
|
|
1030
|
-
request = models.GetVersionFilesRequest(
|
|
1031
|
-
group=group,
|
|
1032
|
-
id=id,
|
|
1033
|
-
)
|
|
1034
|
-
|
|
1035
|
-
req = self._build_request_async(
|
|
1036
|
-
method="GET",
|
|
1037
|
-
path="/version/files",
|
|
1038
|
-
base_url=base_url,
|
|
1039
|
-
url_variables=url_variables,
|
|
1040
|
-
request=request,
|
|
1041
|
-
request_body_required=False,
|
|
1042
|
-
request_has_path_params=False,
|
|
1043
|
-
request_has_query_params=True,
|
|
1044
|
-
user_agent_header="user-agent",
|
|
1045
|
-
accept_header_value="application/json",
|
|
1046
|
-
http_headers=http_headers,
|
|
1047
|
-
security=self.sdk_configuration.security,
|
|
1048
|
-
timeout_ms=timeout_ms,
|
|
1049
|
-
)
|
|
1050
|
-
|
|
1051
|
-
if retries == UNSET:
|
|
1052
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1053
|
-
retries = self.sdk_configuration.retry_config
|
|
1054
|
-
|
|
1055
|
-
retry_config = None
|
|
1056
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1057
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1058
|
-
|
|
1059
|
-
http_res = await self.do_request_async(
|
|
1060
|
-
hook_ctx=HookContext(
|
|
1061
|
-
config=self.sdk_configuration,
|
|
1062
|
-
base_url=base_url or "",
|
|
1063
|
-
operation_id="getVersionFiles",
|
|
1064
|
-
oauth2_scopes=[],
|
|
1065
|
-
security_source=get_security_from_env(
|
|
1066
|
-
self.sdk_configuration.security, models.Security
|
|
1067
|
-
),
|
|
1068
|
-
),
|
|
1069
|
-
request=req,
|
|
1070
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1071
|
-
retry_config=retry_config,
|
|
1072
|
-
)
|
|
1073
|
-
|
|
1074
|
-
response_data: Any = None
|
|
1075
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1076
|
-
return unmarshal_json_response(models.GetVersionFilesResponse, http_res)
|
|
1077
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1078
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1079
|
-
raise errors.Error(response_data, http_res)
|
|
1080
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1081
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1082
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1083
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1084
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1085
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1086
|
-
|
|
1087
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1088
|
-
|
|
1089
|
-
def get_config_status(
|
|
1090
|
-
self,
|
|
1091
|
-
*,
|
|
1092
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1093
|
-
server_url: Optional[str] = None,
|
|
1094
|
-
timeout_ms: Optional[int] = None,
|
|
1095
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1096
|
-
) -> models.GetVersionInfoResponse:
|
|
1097
|
-
r"""Retrieve the configuration and status for the Git integration
|
|
1098
|
-
|
|
1099
|
-
Get info about versioning availability
|
|
1100
|
-
|
|
1101
|
-
:param retries: Override the default retry configuration for this method
|
|
1102
|
-
:param server_url: Override the default server URL for this method
|
|
1103
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1104
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1105
|
-
"""
|
|
1106
|
-
base_url = None
|
|
1107
|
-
url_variables = None
|
|
1108
|
-
if timeout_ms is None:
|
|
1109
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1110
|
-
|
|
1111
|
-
if server_url is not None:
|
|
1112
|
-
base_url = server_url
|
|
1113
|
-
else:
|
|
1114
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1115
|
-
req = self._build_request(
|
|
1116
|
-
method="GET",
|
|
1117
|
-
path="/version/info",
|
|
1118
|
-
base_url=base_url,
|
|
1119
|
-
url_variables=url_variables,
|
|
1120
|
-
request=None,
|
|
1121
|
-
request_body_required=False,
|
|
1122
|
-
request_has_path_params=False,
|
|
1123
|
-
request_has_query_params=True,
|
|
1124
|
-
user_agent_header="user-agent",
|
|
1125
|
-
accept_header_value="application/json",
|
|
1126
|
-
http_headers=http_headers,
|
|
1127
|
-
security=self.sdk_configuration.security,
|
|
1128
|
-
timeout_ms=timeout_ms,
|
|
1129
|
-
)
|
|
1130
|
-
|
|
1131
|
-
if retries == UNSET:
|
|
1132
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1133
|
-
retries = self.sdk_configuration.retry_config
|
|
1134
|
-
|
|
1135
|
-
retry_config = None
|
|
1136
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1137
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1138
|
-
|
|
1139
|
-
http_res = self.do_request(
|
|
1140
|
-
hook_ctx=HookContext(
|
|
1141
|
-
config=self.sdk_configuration,
|
|
1142
|
-
base_url=base_url or "",
|
|
1143
|
-
operation_id="getVersionInfo",
|
|
1144
|
-
oauth2_scopes=[],
|
|
1145
|
-
security_source=get_security_from_env(
|
|
1146
|
-
self.sdk_configuration.security, models.Security
|
|
1147
|
-
),
|
|
1148
|
-
),
|
|
1149
|
-
request=req,
|
|
1150
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1151
|
-
retry_config=retry_config,
|
|
1152
|
-
)
|
|
1153
|
-
|
|
1154
|
-
response_data: Any = None
|
|
1155
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1156
|
-
return unmarshal_json_response(models.GetVersionInfoResponse, http_res)
|
|
1157
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1158
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1159
|
-
raise errors.Error(response_data, http_res)
|
|
1160
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1161
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1162
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1163
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1164
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1165
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1166
|
-
|
|
1167
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1168
|
-
|
|
1169
|
-
async def get_config_status_async(
|
|
1170
|
-
self,
|
|
1171
|
-
*,
|
|
1172
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1173
|
-
server_url: Optional[str] = None,
|
|
1174
|
-
timeout_ms: Optional[int] = None,
|
|
1175
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1176
|
-
) -> models.GetVersionInfoResponse:
|
|
1177
|
-
r"""Retrieve the configuration and status for the Git integration
|
|
1178
|
-
|
|
1179
|
-
Get info about versioning availability
|
|
1180
|
-
|
|
1181
|
-
:param retries: Override the default retry configuration for this method
|
|
1182
|
-
:param server_url: Override the default server URL for this method
|
|
1183
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1184
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1185
|
-
"""
|
|
1186
|
-
base_url = None
|
|
1187
|
-
url_variables = None
|
|
1188
|
-
if timeout_ms is None:
|
|
1189
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1190
|
-
|
|
1191
|
-
if server_url is not None:
|
|
1192
|
-
base_url = server_url
|
|
1193
|
-
else:
|
|
1194
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1195
|
-
req = self._build_request_async(
|
|
1196
|
-
method="GET",
|
|
1197
|
-
path="/version/info",
|
|
1198
|
-
base_url=base_url,
|
|
1199
|
-
url_variables=url_variables,
|
|
1200
|
-
request=None,
|
|
1201
|
-
request_body_required=False,
|
|
1202
|
-
request_has_path_params=False,
|
|
1203
|
-
request_has_query_params=True,
|
|
1204
|
-
user_agent_header="user-agent",
|
|
1205
|
-
accept_header_value="application/json",
|
|
1206
|
-
http_headers=http_headers,
|
|
1207
|
-
security=self.sdk_configuration.security,
|
|
1208
|
-
timeout_ms=timeout_ms,
|
|
1209
|
-
)
|
|
1210
|
-
|
|
1211
|
-
if retries == UNSET:
|
|
1212
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1213
|
-
retries = self.sdk_configuration.retry_config
|
|
1214
|
-
|
|
1215
|
-
retry_config = None
|
|
1216
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1217
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1218
|
-
|
|
1219
|
-
http_res = await self.do_request_async(
|
|
1220
|
-
hook_ctx=HookContext(
|
|
1221
|
-
config=self.sdk_configuration,
|
|
1222
|
-
base_url=base_url or "",
|
|
1223
|
-
operation_id="getVersionInfo",
|
|
1224
|
-
oauth2_scopes=[],
|
|
1225
|
-
security_source=get_security_from_env(
|
|
1226
|
-
self.sdk_configuration.security, models.Security
|
|
1227
|
-
),
|
|
1228
|
-
),
|
|
1229
|
-
request=req,
|
|
1230
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1231
|
-
retry_config=retry_config,
|
|
1232
|
-
)
|
|
1233
|
-
|
|
1234
|
-
response_data: Any = None
|
|
1235
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1236
|
-
return unmarshal_json_response(models.GetVersionInfoResponse, http_res)
|
|
1237
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1238
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1239
|
-
raise errors.Error(response_data, http_res)
|
|
1240
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1241
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1242
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1243
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1244
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1245
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1246
|
-
|
|
1247
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1248
|
-
|
|
1249
|
-
def push_commit(
|
|
1250
|
-
self,
|
|
1251
|
-
*,
|
|
1252
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1253
|
-
server_url: Optional[str] = None,
|
|
1254
|
-
timeout_ms: Optional[int] = None,
|
|
1255
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1256
|
-
) -> models.CreateVersionPushResponse:
|
|
1257
|
-
r"""Push a commit from the local repository to the remote repository
|
|
1258
|
-
|
|
1259
|
-
push the current configs to the remote repository.
|
|
1260
|
-
|
|
1261
|
-
:param retries: Override the default retry configuration for this method
|
|
1262
|
-
:param server_url: Override the default server URL for this method
|
|
1263
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1264
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1265
|
-
"""
|
|
1266
|
-
base_url = None
|
|
1267
|
-
url_variables = None
|
|
1268
|
-
if timeout_ms is None:
|
|
1269
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1270
|
-
|
|
1271
|
-
if server_url is not None:
|
|
1272
|
-
base_url = server_url
|
|
1273
|
-
else:
|
|
1274
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1275
|
-
req = self._build_request(
|
|
1276
|
-
method="POST",
|
|
1277
|
-
path="/version/push",
|
|
1278
|
-
base_url=base_url,
|
|
1279
|
-
url_variables=url_variables,
|
|
1280
|
-
request=None,
|
|
1281
|
-
request_body_required=False,
|
|
1282
|
-
request_has_path_params=False,
|
|
1283
|
-
request_has_query_params=True,
|
|
1284
|
-
user_agent_header="user-agent",
|
|
1285
|
-
accept_header_value="application/json",
|
|
1286
|
-
http_headers=http_headers,
|
|
1287
|
-
security=self.sdk_configuration.security,
|
|
1288
|
-
timeout_ms=timeout_ms,
|
|
1289
|
-
)
|
|
1290
|
-
|
|
1291
|
-
if retries == UNSET:
|
|
1292
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1293
|
-
retries = self.sdk_configuration.retry_config
|
|
1294
|
-
|
|
1295
|
-
retry_config = None
|
|
1296
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1297
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1298
|
-
|
|
1299
|
-
http_res = self.do_request(
|
|
1300
|
-
hook_ctx=HookContext(
|
|
1301
|
-
config=self.sdk_configuration,
|
|
1302
|
-
base_url=base_url or "",
|
|
1303
|
-
operation_id="createVersionPush",
|
|
1304
|
-
oauth2_scopes=[],
|
|
1305
|
-
security_source=get_security_from_env(
|
|
1306
|
-
self.sdk_configuration.security, models.Security
|
|
1307
|
-
),
|
|
1308
|
-
),
|
|
1309
|
-
request=req,
|
|
1310
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1311
|
-
retry_config=retry_config,
|
|
1312
|
-
)
|
|
1313
|
-
|
|
1314
|
-
response_data: Any = None
|
|
1315
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1316
|
-
return unmarshal_json_response(models.CreateVersionPushResponse, http_res)
|
|
1317
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1318
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1319
|
-
raise errors.Error(response_data, http_res)
|
|
1320
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1321
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1322
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1323
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1324
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1325
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1326
|
-
|
|
1327
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1328
|
-
|
|
1329
|
-
async def push_commit_async(
|
|
1330
|
-
self,
|
|
1331
|
-
*,
|
|
1332
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1333
|
-
server_url: Optional[str] = None,
|
|
1334
|
-
timeout_ms: Optional[int] = None,
|
|
1335
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1336
|
-
) -> models.CreateVersionPushResponse:
|
|
1337
|
-
r"""Push a commit from the local repository to the remote repository
|
|
1338
|
-
|
|
1339
|
-
push the current configs to the remote repository.
|
|
1340
|
-
|
|
1341
|
-
:param retries: Override the default retry configuration for this method
|
|
1342
|
-
:param server_url: Override the default server URL for this method
|
|
1343
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1344
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1345
|
-
"""
|
|
1346
|
-
base_url = None
|
|
1347
|
-
url_variables = None
|
|
1348
|
-
if timeout_ms is None:
|
|
1349
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1350
|
-
|
|
1351
|
-
if server_url is not None:
|
|
1352
|
-
base_url = server_url
|
|
1353
|
-
else:
|
|
1354
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1355
|
-
req = self._build_request_async(
|
|
1356
|
-
method="POST",
|
|
1357
|
-
path="/version/push",
|
|
1358
|
-
base_url=base_url,
|
|
1359
|
-
url_variables=url_variables,
|
|
1360
|
-
request=None,
|
|
1361
|
-
request_body_required=False,
|
|
1362
|
-
request_has_path_params=False,
|
|
1363
|
-
request_has_query_params=True,
|
|
1364
|
-
user_agent_header="user-agent",
|
|
1365
|
-
accept_header_value="application/json",
|
|
1366
|
-
http_headers=http_headers,
|
|
1367
|
-
security=self.sdk_configuration.security,
|
|
1368
|
-
timeout_ms=timeout_ms,
|
|
1369
|
-
)
|
|
1370
|
-
|
|
1371
|
-
if retries == UNSET:
|
|
1372
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1373
|
-
retries = self.sdk_configuration.retry_config
|
|
1374
|
-
|
|
1375
|
-
retry_config = None
|
|
1376
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1377
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1378
|
-
|
|
1379
|
-
http_res = await self.do_request_async(
|
|
1380
|
-
hook_ctx=HookContext(
|
|
1381
|
-
config=self.sdk_configuration,
|
|
1382
|
-
base_url=base_url or "",
|
|
1383
|
-
operation_id="createVersionPush",
|
|
1384
|
-
oauth2_scopes=[],
|
|
1385
|
-
security_source=get_security_from_env(
|
|
1386
|
-
self.sdk_configuration.security, models.Security
|
|
1387
|
-
),
|
|
1388
|
-
),
|
|
1389
|
-
request=req,
|
|
1390
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1391
|
-
retry_config=retry_config,
|
|
1392
|
-
)
|
|
1393
|
-
|
|
1394
|
-
response_data: Any = None
|
|
1395
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1396
|
-
return unmarshal_json_response(models.CreateVersionPushResponse, http_res)
|
|
1397
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1398
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1399
|
-
raise errors.Error(response_data, http_res)
|
|
1400
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1401
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1402
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1403
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1404
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1405
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1406
|
-
|
|
1407
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1408
|
-
|
|
1409
|
-
def revert_commit(
|
|
1410
|
-
self,
|
|
1411
|
-
*,
|
|
1412
|
-
commit: str,
|
|
1413
|
-
message: str,
|
|
1414
|
-
group: Optional[str] = None,
|
|
1415
|
-
force: Optional[bool] = None,
|
|
1416
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1417
|
-
server_url: Optional[str] = None,
|
|
1418
|
-
timeout_ms: Optional[int] = None,
|
|
1419
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1420
|
-
) -> models.CreateVersionRevertResponse:
|
|
1421
|
-
r"""Revert a commit in the local repository
|
|
1422
|
-
|
|
1423
|
-
revert a commit
|
|
1424
|
-
|
|
1425
|
-
:param commit:
|
|
1426
|
-
:param message:
|
|
1427
|
-
:param group: Group ID
|
|
1428
|
-
:param force:
|
|
1429
|
-
:param retries: Override the default retry configuration for this method
|
|
1430
|
-
:param server_url: Override the default server URL for this method
|
|
1431
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1432
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1433
|
-
"""
|
|
1434
|
-
base_url = None
|
|
1435
|
-
url_variables = None
|
|
1436
|
-
if timeout_ms is None:
|
|
1437
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1438
|
-
|
|
1439
|
-
if server_url is not None:
|
|
1440
|
-
base_url = server_url
|
|
1441
|
-
else:
|
|
1442
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1443
|
-
|
|
1444
|
-
request = models.CreateVersionRevertRequest(
|
|
1445
|
-
group=group,
|
|
1446
|
-
git_revert_params=models.GitRevertParams(
|
|
1447
|
-
commit=commit,
|
|
1448
|
-
force=force,
|
|
1449
|
-
message=message,
|
|
1450
|
-
),
|
|
1451
|
-
)
|
|
1452
|
-
|
|
1453
|
-
req = self._build_request(
|
|
1454
|
-
method="POST",
|
|
1455
|
-
path="/version/revert",
|
|
1456
|
-
base_url=base_url,
|
|
1457
|
-
url_variables=url_variables,
|
|
1458
|
-
request=request,
|
|
1459
|
-
request_body_required=True,
|
|
1460
|
-
request_has_path_params=False,
|
|
1461
|
-
request_has_query_params=True,
|
|
1462
|
-
user_agent_header="user-agent",
|
|
1463
|
-
accept_header_value="application/json",
|
|
1464
|
-
http_headers=http_headers,
|
|
1465
|
-
security=self.sdk_configuration.security,
|
|
1466
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1467
|
-
request.git_revert_params, False, False, "json", models.GitRevertParams
|
|
1468
|
-
),
|
|
1469
|
-
timeout_ms=timeout_ms,
|
|
1470
|
-
)
|
|
1471
|
-
|
|
1472
|
-
if retries == UNSET:
|
|
1473
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1474
|
-
retries = self.sdk_configuration.retry_config
|
|
1475
|
-
|
|
1476
|
-
retry_config = None
|
|
1477
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1478
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1479
|
-
|
|
1480
|
-
http_res = self.do_request(
|
|
1481
|
-
hook_ctx=HookContext(
|
|
1482
|
-
config=self.sdk_configuration,
|
|
1483
|
-
base_url=base_url or "",
|
|
1484
|
-
operation_id="createVersionRevert",
|
|
1485
|
-
oauth2_scopes=[],
|
|
1486
|
-
security_source=get_security_from_env(
|
|
1487
|
-
self.sdk_configuration.security, models.Security
|
|
1488
|
-
),
|
|
1489
|
-
),
|
|
1490
|
-
request=req,
|
|
1491
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1492
|
-
retry_config=retry_config,
|
|
1493
|
-
)
|
|
1494
|
-
|
|
1495
|
-
response_data: Any = None
|
|
1496
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1497
|
-
return unmarshal_json_response(models.CreateVersionRevertResponse, http_res)
|
|
1498
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1499
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1500
|
-
raise errors.Error(response_data, http_res)
|
|
1501
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1502
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1503
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1504
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1505
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1506
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1507
|
-
|
|
1508
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1509
|
-
|
|
1510
|
-
async def revert_commit_async(
|
|
1511
|
-
self,
|
|
1512
|
-
*,
|
|
1513
|
-
commit: str,
|
|
1514
|
-
message: str,
|
|
1515
|
-
group: Optional[str] = None,
|
|
1516
|
-
force: Optional[bool] = None,
|
|
1517
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1518
|
-
server_url: Optional[str] = None,
|
|
1519
|
-
timeout_ms: Optional[int] = None,
|
|
1520
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1521
|
-
) -> models.CreateVersionRevertResponse:
|
|
1522
|
-
r"""Revert a commit in the local repository
|
|
1523
|
-
|
|
1524
|
-
revert a commit
|
|
1525
|
-
|
|
1526
|
-
:param commit:
|
|
1527
|
-
:param message:
|
|
1528
|
-
:param group: Group ID
|
|
1529
|
-
:param force:
|
|
1530
|
-
:param retries: Override the default retry configuration for this method
|
|
1531
|
-
:param server_url: Override the default server URL for this method
|
|
1532
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1533
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1534
|
-
"""
|
|
1535
|
-
base_url = None
|
|
1536
|
-
url_variables = None
|
|
1537
|
-
if timeout_ms is None:
|
|
1538
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1539
|
-
|
|
1540
|
-
if server_url is not None:
|
|
1541
|
-
base_url = server_url
|
|
1542
|
-
else:
|
|
1543
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1544
|
-
|
|
1545
|
-
request = models.CreateVersionRevertRequest(
|
|
1546
|
-
group=group,
|
|
1547
|
-
git_revert_params=models.GitRevertParams(
|
|
1548
|
-
commit=commit,
|
|
1549
|
-
force=force,
|
|
1550
|
-
message=message,
|
|
1551
|
-
),
|
|
1552
|
-
)
|
|
1553
|
-
|
|
1554
|
-
req = self._build_request_async(
|
|
1555
|
-
method="POST",
|
|
1556
|
-
path="/version/revert",
|
|
1557
|
-
base_url=base_url,
|
|
1558
|
-
url_variables=url_variables,
|
|
1559
|
-
request=request,
|
|
1560
|
-
request_body_required=True,
|
|
1561
|
-
request_has_path_params=False,
|
|
1562
|
-
request_has_query_params=True,
|
|
1563
|
-
user_agent_header="user-agent",
|
|
1564
|
-
accept_header_value="application/json",
|
|
1565
|
-
http_headers=http_headers,
|
|
1566
|
-
security=self.sdk_configuration.security,
|
|
1567
|
-
get_serialized_body=lambda: utils.serialize_request_body(
|
|
1568
|
-
request.git_revert_params, False, False, "json", models.GitRevertParams
|
|
1569
|
-
),
|
|
1570
|
-
timeout_ms=timeout_ms,
|
|
1571
|
-
)
|
|
1572
|
-
|
|
1573
|
-
if retries == UNSET:
|
|
1574
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1575
|
-
retries = self.sdk_configuration.retry_config
|
|
1576
|
-
|
|
1577
|
-
retry_config = None
|
|
1578
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1579
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1580
|
-
|
|
1581
|
-
http_res = await self.do_request_async(
|
|
1582
|
-
hook_ctx=HookContext(
|
|
1583
|
-
config=self.sdk_configuration,
|
|
1584
|
-
base_url=base_url or "",
|
|
1585
|
-
operation_id="createVersionRevert",
|
|
1586
|
-
oauth2_scopes=[],
|
|
1587
|
-
security_source=get_security_from_env(
|
|
1588
|
-
self.sdk_configuration.security, models.Security
|
|
1589
|
-
),
|
|
1590
|
-
),
|
|
1591
|
-
request=req,
|
|
1592
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1593
|
-
retry_config=retry_config,
|
|
1594
|
-
)
|
|
1595
|
-
|
|
1596
|
-
response_data: Any = None
|
|
1597
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1598
|
-
return unmarshal_json_response(models.CreateVersionRevertResponse, http_res)
|
|
1599
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1600
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1601
|
-
raise errors.Error(response_data, http_res)
|
|
1602
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1603
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1604
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1605
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1606
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1607
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1608
|
-
|
|
1609
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1610
|
-
|
|
1611
|
-
def get_commit(
|
|
1612
|
-
self,
|
|
1613
|
-
*,
|
|
1614
|
-
commit: Optional[str] = None,
|
|
1615
|
-
group: Optional[str] = None,
|
|
1616
|
-
filename: Optional[str] = None,
|
|
1617
|
-
diff_line_limit: Optional[float] = None,
|
|
1618
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1619
|
-
server_url: Optional[str] = None,
|
|
1620
|
-
timeout_ms: Optional[int] = None,
|
|
1621
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1622
|
-
) -> models.GetVersionShowResponse:
|
|
1623
|
-
r"""Retrieve the diff and log message for a commit
|
|
1624
|
-
|
|
1625
|
-
get the log message and textual diff for given commit
|
|
1626
|
-
|
|
1627
|
-
:param commit: Commit hash (default is HEAD)
|
|
1628
|
-
:param group: Group ID
|
|
1629
|
-
:param filename: Filename
|
|
1630
|
-
:param diff_line_limit: Limit maximum lines in the diff
|
|
1631
|
-
:param retries: Override the default retry configuration for this method
|
|
1632
|
-
:param server_url: Override the default server URL for this method
|
|
1633
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1634
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1635
|
-
"""
|
|
1636
|
-
base_url = None
|
|
1637
|
-
url_variables = None
|
|
1638
|
-
if timeout_ms is None:
|
|
1639
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1640
|
-
|
|
1641
|
-
if server_url is not None:
|
|
1642
|
-
base_url = server_url
|
|
1643
|
-
else:
|
|
1644
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1645
|
-
|
|
1646
|
-
request = models.GetVersionShowRequest(
|
|
1647
|
-
commit=commit,
|
|
1648
|
-
group=group,
|
|
1649
|
-
filename=filename,
|
|
1650
|
-
diff_line_limit=diff_line_limit,
|
|
1651
|
-
)
|
|
1652
|
-
|
|
1653
|
-
req = self._build_request(
|
|
1654
|
-
method="GET",
|
|
1655
|
-
path="/version/show",
|
|
1656
|
-
base_url=base_url,
|
|
1657
|
-
url_variables=url_variables,
|
|
1658
|
-
request=request,
|
|
1659
|
-
request_body_required=False,
|
|
1660
|
-
request_has_path_params=False,
|
|
1661
|
-
request_has_query_params=True,
|
|
1662
|
-
user_agent_header="user-agent",
|
|
1663
|
-
accept_header_value="application/json",
|
|
1664
|
-
http_headers=http_headers,
|
|
1665
|
-
security=self.sdk_configuration.security,
|
|
1666
|
-
timeout_ms=timeout_ms,
|
|
1667
|
-
)
|
|
1668
|
-
|
|
1669
|
-
if retries == UNSET:
|
|
1670
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1671
|
-
retries = self.sdk_configuration.retry_config
|
|
1672
|
-
|
|
1673
|
-
retry_config = None
|
|
1674
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1675
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1676
|
-
|
|
1677
|
-
http_res = self.do_request(
|
|
1678
|
-
hook_ctx=HookContext(
|
|
1679
|
-
config=self.sdk_configuration,
|
|
1680
|
-
base_url=base_url or "",
|
|
1681
|
-
operation_id="getVersionShow",
|
|
1682
|
-
oauth2_scopes=[],
|
|
1683
|
-
security_source=get_security_from_env(
|
|
1684
|
-
self.sdk_configuration.security, models.Security
|
|
1685
|
-
),
|
|
1686
|
-
),
|
|
1687
|
-
request=req,
|
|
1688
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1689
|
-
retry_config=retry_config,
|
|
1690
|
-
)
|
|
1691
|
-
|
|
1692
|
-
response_data: Any = None
|
|
1693
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1694
|
-
return unmarshal_json_response(models.GetVersionShowResponse, http_res)
|
|
1695
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1696
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1697
|
-
raise errors.Error(response_data, http_res)
|
|
1698
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1699
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1700
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1701
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1702
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1703
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1704
|
-
|
|
1705
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1706
|
-
|
|
1707
|
-
async def get_commit_async(
|
|
1708
|
-
self,
|
|
1709
|
-
*,
|
|
1710
|
-
commit: Optional[str] = None,
|
|
1711
|
-
group: Optional[str] = None,
|
|
1712
|
-
filename: Optional[str] = None,
|
|
1713
|
-
diff_line_limit: Optional[float] = None,
|
|
1714
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1715
|
-
server_url: Optional[str] = None,
|
|
1716
|
-
timeout_ms: Optional[int] = None,
|
|
1717
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1718
|
-
) -> models.GetVersionShowResponse:
|
|
1719
|
-
r"""Retrieve the diff and log message for a commit
|
|
1720
|
-
|
|
1721
|
-
get the log message and textual diff for given commit
|
|
1722
|
-
|
|
1723
|
-
:param commit: Commit hash (default is HEAD)
|
|
1724
|
-
:param group: Group ID
|
|
1725
|
-
:param filename: Filename
|
|
1726
|
-
:param diff_line_limit: Limit maximum lines in the diff
|
|
1727
|
-
:param retries: Override the default retry configuration for this method
|
|
1728
|
-
:param server_url: Override the default server URL for this method
|
|
1729
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1730
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1731
|
-
"""
|
|
1732
|
-
base_url = None
|
|
1733
|
-
url_variables = None
|
|
1734
|
-
if timeout_ms is None:
|
|
1735
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1736
|
-
|
|
1737
|
-
if server_url is not None:
|
|
1738
|
-
base_url = server_url
|
|
1739
|
-
else:
|
|
1740
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1741
|
-
|
|
1742
|
-
request = models.GetVersionShowRequest(
|
|
1743
|
-
commit=commit,
|
|
1744
|
-
group=group,
|
|
1745
|
-
filename=filename,
|
|
1746
|
-
diff_line_limit=diff_line_limit,
|
|
1747
|
-
)
|
|
1748
|
-
|
|
1749
|
-
req = self._build_request_async(
|
|
1750
|
-
method="GET",
|
|
1751
|
-
path="/version/show",
|
|
1752
|
-
base_url=base_url,
|
|
1753
|
-
url_variables=url_variables,
|
|
1754
|
-
request=request,
|
|
1755
|
-
request_body_required=False,
|
|
1756
|
-
request_has_path_params=False,
|
|
1757
|
-
request_has_query_params=True,
|
|
1758
|
-
user_agent_header="user-agent",
|
|
1759
|
-
accept_header_value="application/json",
|
|
1760
|
-
http_headers=http_headers,
|
|
1761
|
-
security=self.sdk_configuration.security,
|
|
1762
|
-
timeout_ms=timeout_ms,
|
|
1763
|
-
)
|
|
1764
|
-
|
|
1765
|
-
if retries == UNSET:
|
|
1766
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1767
|
-
retries = self.sdk_configuration.retry_config
|
|
1768
|
-
|
|
1769
|
-
retry_config = None
|
|
1770
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1771
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1772
|
-
|
|
1773
|
-
http_res = await self.do_request_async(
|
|
1774
|
-
hook_ctx=HookContext(
|
|
1775
|
-
config=self.sdk_configuration,
|
|
1776
|
-
base_url=base_url or "",
|
|
1777
|
-
operation_id="getVersionShow",
|
|
1778
|
-
oauth2_scopes=[],
|
|
1779
|
-
security_source=get_security_from_env(
|
|
1780
|
-
self.sdk_configuration.security, models.Security
|
|
1781
|
-
),
|
|
1782
|
-
),
|
|
1783
|
-
request=req,
|
|
1784
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1785
|
-
retry_config=retry_config,
|
|
1786
|
-
)
|
|
1787
|
-
|
|
1788
|
-
response_data: Any = None
|
|
1789
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1790
|
-
return unmarshal_json_response(models.GetVersionShowResponse, http_res)
|
|
1791
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1792
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1793
|
-
raise errors.Error(response_data, http_res)
|
|
1794
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1795
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1796
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1797
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1798
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1799
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1800
|
-
|
|
1801
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1802
|
-
|
|
1803
|
-
def get_current_status(
|
|
1804
|
-
self,
|
|
1805
|
-
*,
|
|
1806
|
-
group: Optional[str] = None,
|
|
1807
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1808
|
-
server_url: Optional[str] = None,
|
|
1809
|
-
timeout_ms: Optional[int] = None,
|
|
1810
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1811
|
-
) -> models.GetVersionStatusResponse:
|
|
1812
|
-
r"""Retrieve the status of the current working tree
|
|
1813
|
-
|
|
1814
|
-
get the the working tree status
|
|
1815
|
-
|
|
1816
|
-
:param group: Group ID
|
|
1817
|
-
:param retries: Override the default retry configuration for this method
|
|
1818
|
-
:param server_url: Override the default server URL for this method
|
|
1819
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1820
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1821
|
-
"""
|
|
1822
|
-
base_url = None
|
|
1823
|
-
url_variables = None
|
|
1824
|
-
if timeout_ms is None:
|
|
1825
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1826
|
-
|
|
1827
|
-
if server_url is not None:
|
|
1828
|
-
base_url = server_url
|
|
1829
|
-
else:
|
|
1830
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1831
|
-
|
|
1832
|
-
request = models.GetVersionStatusRequest(
|
|
1833
|
-
group=group,
|
|
1834
|
-
)
|
|
1835
|
-
|
|
1836
|
-
req = self._build_request(
|
|
1837
|
-
method="GET",
|
|
1838
|
-
path="/version/status",
|
|
1839
|
-
base_url=base_url,
|
|
1840
|
-
url_variables=url_variables,
|
|
1841
|
-
request=request,
|
|
1842
|
-
request_body_required=False,
|
|
1843
|
-
request_has_path_params=False,
|
|
1844
|
-
request_has_query_params=True,
|
|
1845
|
-
user_agent_header="user-agent",
|
|
1846
|
-
accept_header_value="application/json",
|
|
1847
|
-
http_headers=http_headers,
|
|
1848
|
-
security=self.sdk_configuration.security,
|
|
1849
|
-
timeout_ms=timeout_ms,
|
|
1850
|
-
)
|
|
1851
|
-
|
|
1852
|
-
if retries == UNSET:
|
|
1853
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1854
|
-
retries = self.sdk_configuration.retry_config
|
|
1855
|
-
|
|
1856
|
-
retry_config = None
|
|
1857
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1858
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1859
|
-
|
|
1860
|
-
http_res = self.do_request(
|
|
1861
|
-
hook_ctx=HookContext(
|
|
1862
|
-
config=self.sdk_configuration,
|
|
1863
|
-
base_url=base_url or "",
|
|
1864
|
-
operation_id="getVersionStatus",
|
|
1865
|
-
oauth2_scopes=[],
|
|
1866
|
-
security_source=get_security_from_env(
|
|
1867
|
-
self.sdk_configuration.security, models.Security
|
|
1868
|
-
),
|
|
1869
|
-
),
|
|
1870
|
-
request=req,
|
|
1871
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1872
|
-
retry_config=retry_config,
|
|
1873
|
-
)
|
|
1874
|
-
|
|
1875
|
-
response_data: Any = None
|
|
1876
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1877
|
-
return unmarshal_json_response(models.GetVersionStatusResponse, http_res)
|
|
1878
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1879
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1880
|
-
raise errors.Error(response_data, http_res)
|
|
1881
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1882
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1883
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1884
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1885
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
1886
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1887
|
-
|
|
1888
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1889
|
-
|
|
1890
|
-
async def get_current_status_async(
|
|
1891
|
-
self,
|
|
1892
|
-
*,
|
|
1893
|
-
group: Optional[str] = None,
|
|
1894
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1895
|
-
server_url: Optional[str] = None,
|
|
1896
|
-
timeout_ms: Optional[int] = None,
|
|
1897
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1898
|
-
) -> models.GetVersionStatusResponse:
|
|
1899
|
-
r"""Retrieve the status of the current working tree
|
|
1900
|
-
|
|
1901
|
-
get the the working tree status
|
|
1902
|
-
|
|
1903
|
-
:param group: Group ID
|
|
1904
|
-
:param retries: Override the default retry configuration for this method
|
|
1905
|
-
:param server_url: Override the default server URL for this method
|
|
1906
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1907
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1908
|
-
"""
|
|
1909
|
-
base_url = None
|
|
1910
|
-
url_variables = None
|
|
1911
|
-
if timeout_ms is None:
|
|
1912
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1913
|
-
|
|
1914
|
-
if server_url is not None:
|
|
1915
|
-
base_url = server_url
|
|
1916
|
-
else:
|
|
1917
|
-
base_url = self._get_url(base_url, url_variables)
|
|
1918
|
-
|
|
1919
|
-
request = models.GetVersionStatusRequest(
|
|
1920
|
-
group=group,
|
|
1921
|
-
)
|
|
1922
|
-
|
|
1923
|
-
req = self._build_request_async(
|
|
1924
|
-
method="GET",
|
|
1925
|
-
path="/version/status",
|
|
1926
|
-
base_url=base_url,
|
|
1927
|
-
url_variables=url_variables,
|
|
1928
|
-
request=request,
|
|
1929
|
-
request_body_required=False,
|
|
1930
|
-
request_has_path_params=False,
|
|
1931
|
-
request_has_query_params=True,
|
|
1932
|
-
user_agent_header="user-agent",
|
|
1933
|
-
accept_header_value="application/json",
|
|
1934
|
-
http_headers=http_headers,
|
|
1935
|
-
security=self.sdk_configuration.security,
|
|
1936
|
-
timeout_ms=timeout_ms,
|
|
1937
|
-
)
|
|
1938
|
-
|
|
1939
|
-
if retries == UNSET:
|
|
1940
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
1941
|
-
retries = self.sdk_configuration.retry_config
|
|
1942
|
-
|
|
1943
|
-
retry_config = None
|
|
1944
|
-
if isinstance(retries, utils.RetryConfig):
|
|
1945
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
1946
|
-
|
|
1947
|
-
http_res = await self.do_request_async(
|
|
1948
|
-
hook_ctx=HookContext(
|
|
1949
|
-
config=self.sdk_configuration,
|
|
1950
|
-
base_url=base_url or "",
|
|
1951
|
-
operation_id="getVersionStatus",
|
|
1952
|
-
oauth2_scopes=[],
|
|
1953
|
-
security_source=get_security_from_env(
|
|
1954
|
-
self.sdk_configuration.security, models.Security
|
|
1955
|
-
),
|
|
1956
|
-
),
|
|
1957
|
-
request=req,
|
|
1958
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
1959
|
-
retry_config=retry_config,
|
|
1960
|
-
)
|
|
1961
|
-
|
|
1962
|
-
response_data: Any = None
|
|
1963
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
1964
|
-
return unmarshal_json_response(models.GetVersionStatusResponse, http_res)
|
|
1965
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
1966
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
1967
|
-
raise errors.Error(response_data, http_res)
|
|
1968
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
1969
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1970
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1971
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
1972
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
1973
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
1974
|
-
|
|
1975
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
1976
|
-
|
|
1977
|
-
def sync_local_remote(
|
|
1978
|
-
self,
|
|
1979
|
-
*,
|
|
1980
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
1981
|
-
server_url: Optional[str] = None,
|
|
1982
|
-
timeout_ms: Optional[int] = None,
|
|
1983
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
1984
|
-
) -> models.CreateVersionSyncResponse:
|
|
1985
|
-
r"""Synchronize the local branch with the remote repository
|
|
1986
|
-
|
|
1987
|
-
syncs with remote repo via POST requests
|
|
1988
|
-
|
|
1989
|
-
:param retries: Override the default retry configuration for this method
|
|
1990
|
-
:param server_url: Override the default server URL for this method
|
|
1991
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
1992
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
1993
|
-
"""
|
|
1994
|
-
base_url = None
|
|
1995
|
-
url_variables = None
|
|
1996
|
-
if timeout_ms is None:
|
|
1997
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
1998
|
-
|
|
1999
|
-
if server_url is not None:
|
|
2000
|
-
base_url = server_url
|
|
2001
|
-
else:
|
|
2002
|
-
base_url = self._get_url(base_url, url_variables)
|
|
2003
|
-
req = self._build_request(
|
|
2004
|
-
method="POST",
|
|
2005
|
-
path="/version/sync",
|
|
2006
|
-
base_url=base_url,
|
|
2007
|
-
url_variables=url_variables,
|
|
2008
|
-
request=None,
|
|
2009
|
-
request_body_required=False,
|
|
2010
|
-
request_has_path_params=False,
|
|
2011
|
-
request_has_query_params=True,
|
|
2012
|
-
user_agent_header="user-agent",
|
|
2013
|
-
accept_header_value="application/json",
|
|
2014
|
-
http_headers=http_headers,
|
|
2015
|
-
security=self.sdk_configuration.security,
|
|
2016
|
-
timeout_ms=timeout_ms,
|
|
2017
|
-
)
|
|
2018
|
-
|
|
2019
|
-
if retries == UNSET:
|
|
2020
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
2021
|
-
retries = self.sdk_configuration.retry_config
|
|
2022
|
-
|
|
2023
|
-
retry_config = None
|
|
2024
|
-
if isinstance(retries, utils.RetryConfig):
|
|
2025
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
2026
|
-
|
|
2027
|
-
http_res = self.do_request(
|
|
2028
|
-
hook_ctx=HookContext(
|
|
2029
|
-
config=self.sdk_configuration,
|
|
2030
|
-
base_url=base_url or "",
|
|
2031
|
-
operation_id="createVersionSync",
|
|
2032
|
-
oauth2_scopes=[],
|
|
2033
|
-
security_source=get_security_from_env(
|
|
2034
|
-
self.sdk_configuration.security, models.Security
|
|
2035
|
-
),
|
|
2036
|
-
),
|
|
2037
|
-
request=req,
|
|
2038
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
2039
|
-
retry_config=retry_config,
|
|
2040
|
-
)
|
|
2041
|
-
|
|
2042
|
-
response_data: Any = None
|
|
2043
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
2044
|
-
return unmarshal_json_response(models.CreateVersionSyncResponse, http_res)
|
|
2045
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
2046
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
2047
|
-
raise errors.Error(response_data, http_res)
|
|
2048
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
2049
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2050
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2051
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
2052
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2053
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2054
|
-
|
|
2055
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
2056
|
-
|
|
2057
|
-
async def sync_local_remote_async(
|
|
2058
|
-
self,
|
|
2059
|
-
*,
|
|
2060
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2061
|
-
server_url: Optional[str] = None,
|
|
2062
|
-
timeout_ms: Optional[int] = None,
|
|
2063
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
2064
|
-
) -> models.CreateVersionSyncResponse:
|
|
2065
|
-
r"""Synchronize the local branch with the remote repository
|
|
2066
|
-
|
|
2067
|
-
syncs with remote repo via POST requests
|
|
2068
|
-
|
|
2069
|
-
:param retries: Override the default retry configuration for this method
|
|
2070
|
-
:param server_url: Override the default server URL for this method
|
|
2071
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
2072
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
2073
|
-
"""
|
|
2074
|
-
base_url = None
|
|
2075
|
-
url_variables = None
|
|
2076
|
-
if timeout_ms is None:
|
|
2077
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
2078
|
-
|
|
2079
|
-
if server_url is not None:
|
|
2080
|
-
base_url = server_url
|
|
2081
|
-
else:
|
|
2082
|
-
base_url = self._get_url(base_url, url_variables)
|
|
2083
|
-
req = self._build_request_async(
|
|
2084
|
-
method="POST",
|
|
2085
|
-
path="/version/sync",
|
|
2086
|
-
base_url=base_url,
|
|
2087
|
-
url_variables=url_variables,
|
|
2088
|
-
request=None,
|
|
2089
|
-
request_body_required=False,
|
|
2090
|
-
request_has_path_params=False,
|
|
2091
|
-
request_has_query_params=True,
|
|
2092
|
-
user_agent_header="user-agent",
|
|
2093
|
-
accept_header_value="application/json",
|
|
2094
|
-
http_headers=http_headers,
|
|
2095
|
-
security=self.sdk_configuration.security,
|
|
2096
|
-
timeout_ms=timeout_ms,
|
|
2097
|
-
)
|
|
2098
|
-
|
|
2099
|
-
if retries == UNSET:
|
|
2100
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
2101
|
-
retries = self.sdk_configuration.retry_config
|
|
2102
|
-
|
|
2103
|
-
retry_config = None
|
|
2104
|
-
if isinstance(retries, utils.RetryConfig):
|
|
2105
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
2106
|
-
|
|
2107
|
-
http_res = await self.do_request_async(
|
|
2108
|
-
hook_ctx=HookContext(
|
|
2109
|
-
config=self.sdk_configuration,
|
|
2110
|
-
base_url=base_url or "",
|
|
2111
|
-
operation_id="createVersionSync",
|
|
2112
|
-
oauth2_scopes=[],
|
|
2113
|
-
security_source=get_security_from_env(
|
|
2114
|
-
self.sdk_configuration.security, models.Security
|
|
2115
|
-
),
|
|
2116
|
-
),
|
|
2117
|
-
request=req,
|
|
2118
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
2119
|
-
retry_config=retry_config,
|
|
2120
|
-
)
|
|
2121
|
-
|
|
2122
|
-
response_data: Any = None
|
|
2123
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
2124
|
-
return unmarshal_json_response(models.CreateVersionSyncResponse, http_res)
|
|
2125
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
2126
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
2127
|
-
raise errors.Error(response_data, http_res)
|
|
2128
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
2129
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2130
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2131
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
2132
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2133
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2134
|
-
|
|
2135
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
2136
|
-
|
|
2137
|
-
def undo(
|
|
2138
|
-
self,
|
|
2139
|
-
*,
|
|
2140
|
-
group: Optional[str] = None,
|
|
2141
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2142
|
-
server_url: Optional[str] = None,
|
|
2143
|
-
timeout_ms: Optional[int] = None,
|
|
2144
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
2145
|
-
) -> models.CreateVersionUndoResponse:
|
|
2146
|
-
r"""Discard uncommitted (staged) changes
|
|
2147
|
-
|
|
2148
|
-
Discards all uncommitted (staged) configuration changes, resetting the working directory to the last committed state.
|
|
2149
|
-
|
|
2150
|
-
:param group: Group ID
|
|
2151
|
-
:param retries: Override the default retry configuration for this method
|
|
2152
|
-
:param server_url: Override the default server URL for this method
|
|
2153
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
2154
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
2155
|
-
"""
|
|
2156
|
-
base_url = None
|
|
2157
|
-
url_variables = None
|
|
2158
|
-
if timeout_ms is None:
|
|
2159
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
2160
|
-
|
|
2161
|
-
if server_url is not None:
|
|
2162
|
-
base_url = server_url
|
|
2163
|
-
else:
|
|
2164
|
-
base_url = self._get_url(base_url, url_variables)
|
|
2165
|
-
|
|
2166
|
-
request = models.CreateVersionUndoRequest(
|
|
2167
|
-
group=group,
|
|
2168
|
-
)
|
|
2169
|
-
|
|
2170
|
-
req = self._build_request(
|
|
2171
|
-
method="POST",
|
|
2172
|
-
path="/version/undo",
|
|
2173
|
-
base_url=base_url,
|
|
2174
|
-
url_variables=url_variables,
|
|
2175
|
-
request=request,
|
|
2176
|
-
request_body_required=False,
|
|
2177
|
-
request_has_path_params=False,
|
|
2178
|
-
request_has_query_params=True,
|
|
2179
|
-
user_agent_header="user-agent",
|
|
2180
|
-
accept_header_value="application/json",
|
|
2181
|
-
http_headers=http_headers,
|
|
2182
|
-
security=self.sdk_configuration.security,
|
|
2183
|
-
timeout_ms=timeout_ms,
|
|
2184
|
-
)
|
|
2185
|
-
|
|
2186
|
-
if retries == UNSET:
|
|
2187
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
2188
|
-
retries = self.sdk_configuration.retry_config
|
|
2189
|
-
|
|
2190
|
-
retry_config = None
|
|
2191
|
-
if isinstance(retries, utils.RetryConfig):
|
|
2192
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
2193
|
-
|
|
2194
|
-
http_res = self.do_request(
|
|
2195
|
-
hook_ctx=HookContext(
|
|
2196
|
-
config=self.sdk_configuration,
|
|
2197
|
-
base_url=base_url or "",
|
|
2198
|
-
operation_id="createVersionUndo",
|
|
2199
|
-
oauth2_scopes=[],
|
|
2200
|
-
security_source=get_security_from_env(
|
|
2201
|
-
self.sdk_configuration.security, models.Security
|
|
2202
|
-
),
|
|
2203
|
-
),
|
|
2204
|
-
request=req,
|
|
2205
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
2206
|
-
retry_config=retry_config,
|
|
2207
|
-
)
|
|
2208
|
-
|
|
2209
|
-
response_data: Any = None
|
|
2210
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
2211
|
-
return unmarshal_json_response(models.CreateVersionUndoResponse, http_res)
|
|
2212
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
2213
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
2214
|
-
raise errors.Error(response_data, http_res)
|
|
2215
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
2216
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2217
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2218
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
2219
|
-
http_res_text = utils.stream_to_text(http_res)
|
|
2220
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2221
|
-
|
|
2222
|
-
raise errors.APIError("Unexpected response received", http_res)
|
|
2223
|
-
|
|
2224
|
-
async def undo_async(
|
|
2225
|
-
self,
|
|
2226
|
-
*,
|
|
2227
|
-
group: Optional[str] = None,
|
|
2228
|
-
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
2229
|
-
server_url: Optional[str] = None,
|
|
2230
|
-
timeout_ms: Optional[int] = None,
|
|
2231
|
-
http_headers: Optional[Mapping[str, str]] = None,
|
|
2232
|
-
) -> models.CreateVersionUndoResponse:
|
|
2233
|
-
r"""Discard uncommitted (staged) changes
|
|
2234
|
-
|
|
2235
|
-
Discards all uncommitted (staged) configuration changes, resetting the working directory to the last committed state.
|
|
2236
|
-
|
|
2237
|
-
:param group: Group ID
|
|
2238
|
-
:param retries: Override the default retry configuration for this method
|
|
2239
|
-
:param server_url: Override the default server URL for this method
|
|
2240
|
-
:param timeout_ms: Override the default request timeout configuration for this method in milliseconds
|
|
2241
|
-
:param http_headers: Additional headers to set or replace on requests.
|
|
2242
|
-
"""
|
|
2243
|
-
base_url = None
|
|
2244
|
-
url_variables = None
|
|
2245
|
-
if timeout_ms is None:
|
|
2246
|
-
timeout_ms = self.sdk_configuration.timeout_ms
|
|
2247
|
-
|
|
2248
|
-
if server_url is not None:
|
|
2249
|
-
base_url = server_url
|
|
2250
|
-
else:
|
|
2251
|
-
base_url = self._get_url(base_url, url_variables)
|
|
2252
|
-
|
|
2253
|
-
request = models.CreateVersionUndoRequest(
|
|
2254
|
-
group=group,
|
|
2255
|
-
)
|
|
2256
|
-
|
|
2257
|
-
req = self._build_request_async(
|
|
2258
|
-
method="POST",
|
|
2259
|
-
path="/version/undo",
|
|
2260
|
-
base_url=base_url,
|
|
2261
|
-
url_variables=url_variables,
|
|
2262
|
-
request=request,
|
|
2263
|
-
request_body_required=False,
|
|
2264
|
-
request_has_path_params=False,
|
|
2265
|
-
request_has_query_params=True,
|
|
2266
|
-
user_agent_header="user-agent",
|
|
2267
|
-
accept_header_value="application/json",
|
|
2268
|
-
http_headers=http_headers,
|
|
2269
|
-
security=self.sdk_configuration.security,
|
|
2270
|
-
timeout_ms=timeout_ms,
|
|
2271
|
-
)
|
|
2272
|
-
|
|
2273
|
-
if retries == UNSET:
|
|
2274
|
-
if self.sdk_configuration.retry_config is not UNSET:
|
|
2275
|
-
retries = self.sdk_configuration.retry_config
|
|
2276
|
-
|
|
2277
|
-
retry_config = None
|
|
2278
|
-
if isinstance(retries, utils.RetryConfig):
|
|
2279
|
-
retry_config = (retries, ["429", "500", "502", "503", "504"])
|
|
2280
|
-
|
|
2281
|
-
http_res = await self.do_request_async(
|
|
2282
|
-
hook_ctx=HookContext(
|
|
2283
|
-
config=self.sdk_configuration,
|
|
2284
|
-
base_url=base_url or "",
|
|
2285
|
-
operation_id="createVersionUndo",
|
|
2286
|
-
oauth2_scopes=[],
|
|
2287
|
-
security_source=get_security_from_env(
|
|
2288
|
-
self.sdk_configuration.security, models.Security
|
|
2289
|
-
),
|
|
2290
|
-
),
|
|
2291
|
-
request=req,
|
|
2292
|
-
error_status_codes=["401", "4XX", "500", "5XX"],
|
|
2293
|
-
retry_config=retry_config,
|
|
2294
|
-
)
|
|
2295
|
-
|
|
2296
|
-
response_data: Any = None
|
|
2297
|
-
if utils.match_response(http_res, "200", "application/json"):
|
|
2298
|
-
return unmarshal_json_response(models.CreateVersionUndoResponse, http_res)
|
|
2299
|
-
if utils.match_response(http_res, "500", "application/json"):
|
|
2300
|
-
response_data = unmarshal_json_response(errors.ErrorData, http_res)
|
|
2301
|
-
raise errors.Error(response_data, http_res)
|
|
2302
|
-
if utils.match_response(http_res, ["401", "4XX"], "*"):
|
|
2303
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2304
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2305
|
-
if utils.match_response(http_res, "5XX", "*"):
|
|
2306
|
-
http_res_text = await utils.stream_to_text_async(http_res)
|
|
2307
|
-
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
2308
|
-
|
|
2309
|
-
raise errors.APIError("Unexpected response received", http_res)
|