|
30 | 30 | fromstackit.git.models.instanceimportInstance |
31 | 31 | fromstackit.git.models.list_flavorsimportListFlavors |
32 | 32 | fromstackit.git.models.list_instancesimportListInstances |
| 33 | +fromstackit.git.models.list_runner_labelsimportListRunnerLabels |
33 | 34 | fromstackit.git.models.patch_operationimportPatchOperation |
34 | 35 | fromstackit.git.restimportRESTResponseType |
35 | 36 |
|
@@ -1302,6 +1303,244 @@ def _list_instances_serialize( |
1302 | 1303 | _request_auth=_request_auth, |
1303 | 1304 | ) |
1304 | 1305 |
|
| 1306 | +@validate_call |
| 1307 | +deflist_runner_labels( |
| 1308 | +self, |
| 1309 | +project_id:Annotated[str,Field(min_length=36,strict=True,max_length=36,description="Project identifier.")], |
| 1310 | +_request_timeout:Union[ |
| 1311 | +None, |
| 1312 | +Annotated[StrictFloat,Field(gt=0)], |
| 1313 | +Tuple[Annotated[StrictFloat,Field(gt=0)],Annotated[StrictFloat,Field(gt=0)]], |
| 1314 | + ]=None, |
| 1315 | +_request_auth:Optional[Dict[StrictStr,Any]]=None, |
| 1316 | +_content_type:Optional[StrictStr]=None, |
| 1317 | +_headers:Optional[Dict[StrictStr,Any]]=None, |
| 1318 | +_host_index:Annotated[StrictInt,Field(ge=0,le=0)]=0, |
| 1319 | + )->ListRunnerLabels: |
| 1320 | +"""Returns the details for the given STACKIT Git RunnerLabels. |
| 1321 | +
|
| 1322 | + Type of runners we can use for running jobs. |
| 1323 | +
|
| 1324 | + :param project_id: Project identifier. (required) |
| 1325 | + :type project_id: str |
| 1326 | + :param _request_timeout: timeout setting for this request. If one |
| 1327 | + number provided, it will be total request |
| 1328 | + timeout. It can also be a pair (tuple) of |
| 1329 | + (connection, read) timeouts. |
| 1330 | + :type _request_timeout: int, tuple(int, int), optional |
| 1331 | + :param _request_auth: set to override the auth_settings for an a single |
| 1332 | + request; this effectively ignores the |
| 1333 | + authentication in the spec for a single request. |
| 1334 | + :type _request_auth: dict, optional |
| 1335 | + :param _content_type: force content-type for the request. |
| 1336 | + :type _content_type: str, Optional |
| 1337 | + :param _headers: set to override the headers for a single |
| 1338 | + request; this effectively ignores the headers |
| 1339 | + in the spec for a single request. |
| 1340 | + :type _headers: dict, optional |
| 1341 | + :param _host_index: set to override the host_index for a single |
| 1342 | + request; this effectively ignores the host_index |
| 1343 | + in the spec for a single request. |
| 1344 | + :type _host_index: int, optional |
| 1345 | + :return: Returns the result object. |
| 1346 | + """# noqa: E501 |
| 1347 | + |
| 1348 | +_param=self._list_runner_labels_serialize( |
| 1349 | +project_id=project_id, |
| 1350 | +_request_auth=_request_auth, |
| 1351 | +_content_type=_content_type, |
| 1352 | +_headers=_headers, |
| 1353 | +_host_index=_host_index, |
| 1354 | + ) |
| 1355 | + |
| 1356 | +_response_types_map:Dict[str,Optional[str]]= { |
| 1357 | +"200":"ListRunnerLabels", |
| 1358 | +"400":"GenericErrorResponse", |
| 1359 | +"401":"UnauthorizedResponse", |
| 1360 | +"404":None, |
| 1361 | +"500":"GenericErrorResponse", |
| 1362 | + } |
| 1363 | +response_data=self.api_client.call_api(*_param,_request_timeout=_request_timeout) |
| 1364 | +response_data.read() |
| 1365 | +returnself.api_client.response_deserialize( |
| 1366 | +response_data=response_data, |
| 1367 | +response_types_map=_response_types_map, |
| 1368 | + ).data |
| 1369 | + |
| 1370 | +@validate_call |
| 1371 | +deflist_runner_labels_with_http_info( |
| 1372 | +self, |
| 1373 | +project_id:Annotated[str,Field(min_length=36,strict=True,max_length=36,description="Project identifier.")], |
| 1374 | +_request_timeout:Union[ |
| 1375 | +None, |
| 1376 | +Annotated[StrictFloat,Field(gt=0)], |
| 1377 | +Tuple[Annotated[StrictFloat,Field(gt=0)],Annotated[StrictFloat,Field(gt=0)]], |
| 1378 | + ]=None, |
| 1379 | +_request_auth:Optional[Dict[StrictStr,Any]]=None, |
| 1380 | +_content_type:Optional[StrictStr]=None, |
| 1381 | +_headers:Optional[Dict[StrictStr,Any]]=None, |
| 1382 | +_host_index:Annotated[StrictInt,Field(ge=0,le=0)]=0, |
| 1383 | + )->ApiResponse[ListRunnerLabels]: |
| 1384 | +"""Returns the details for the given STACKIT Git RunnerLabels. |
| 1385 | +
|
| 1386 | + Type of runners we can use for running jobs. |
| 1387 | +
|
| 1388 | + :param project_id: Project identifier. (required) |
| 1389 | + :type project_id: str |
| 1390 | + :param _request_timeout: timeout setting for this request. If one |
| 1391 | + number provided, it will be total request |
| 1392 | + timeout. It can also be a pair (tuple) of |
| 1393 | + (connection, read) timeouts. |
| 1394 | + :type _request_timeout: int, tuple(int, int), optional |
| 1395 | + :param _request_auth: set to override the auth_settings for an a single |
| 1396 | + request; this effectively ignores the |
| 1397 | + authentication in the spec for a single request. |
| 1398 | + :type _request_auth: dict, optional |
| 1399 | + :param _content_type: force content-type for the request. |
| 1400 | + :type _content_type: str, Optional |
| 1401 | + :param _headers: set to override the headers for a single |
| 1402 | + request; this effectively ignores the headers |
| 1403 | + in the spec for a single request. |
| 1404 | + :type _headers: dict, optional |
| 1405 | + :param _host_index: set to override the host_index for a single |
| 1406 | + request; this effectively ignores the host_index |
| 1407 | + in the spec for a single request. |
| 1408 | + :type _host_index: int, optional |
| 1409 | + :return: Returns the result object. |
| 1410 | + """# noqa: E501 |
| 1411 | + |
| 1412 | +_param=self._list_runner_labels_serialize( |
| 1413 | +project_id=project_id, |
| 1414 | +_request_auth=_request_auth, |
| 1415 | +_content_type=_content_type, |
| 1416 | +_headers=_headers, |
| 1417 | +_host_index=_host_index, |
| 1418 | + ) |
| 1419 | + |
| 1420 | +_response_types_map:Dict[str,Optional[str]]= { |
| 1421 | +"200":"ListRunnerLabels", |
| 1422 | +"400":"GenericErrorResponse", |
| 1423 | +"401":"UnauthorizedResponse", |
| 1424 | +"404":None, |
| 1425 | +"500":"GenericErrorResponse", |
| 1426 | + } |
| 1427 | +response_data=self.api_client.call_api(*_param,_request_timeout=_request_timeout) |
| 1428 | +response_data.read() |
| 1429 | +returnself.api_client.response_deserialize( |
| 1430 | +response_data=response_data, |
| 1431 | +response_types_map=_response_types_map, |
| 1432 | + ) |
| 1433 | + |
| 1434 | +@validate_call |
| 1435 | +deflist_runner_labels_without_preload_content( |
| 1436 | +self, |
| 1437 | +project_id:Annotated[str,Field(min_length=36,strict=True,max_length=36,description="Project identifier.")], |
| 1438 | +_request_timeout:Union[ |
| 1439 | +None, |
| 1440 | +Annotated[StrictFloat,Field(gt=0)], |
| 1441 | +Tuple[Annotated[StrictFloat,Field(gt=0)],Annotated[StrictFloat,Field(gt=0)]], |
| 1442 | + ]=None, |
| 1443 | +_request_auth:Optional[Dict[StrictStr,Any]]=None, |
| 1444 | +_content_type:Optional[StrictStr]=None, |
| 1445 | +_headers:Optional[Dict[StrictStr,Any]]=None, |
| 1446 | +_host_index:Annotated[StrictInt,Field(ge=0,le=0)]=0, |
| 1447 | + )->RESTResponseType: |
| 1448 | +"""Returns the details for the given STACKIT Git RunnerLabels. |
| 1449 | +
|
| 1450 | + Type of runners we can use for running jobs. |
| 1451 | +
|
| 1452 | + :param project_id: Project identifier. (required) |
| 1453 | + :type project_id: str |
| 1454 | + :param _request_timeout: timeout setting for this request. If one |
| 1455 | + number provided, it will be total request |
| 1456 | + timeout. It can also be a pair (tuple) of |
| 1457 | + (connection, read) timeouts. |
| 1458 | + :type _request_timeout: int, tuple(int, int), optional |
| 1459 | + :param _request_auth: set to override the auth_settings for an a single |
| 1460 | + request; this effectively ignores the |
| 1461 | + authentication in the spec for a single request. |
| 1462 | + :type _request_auth: dict, optional |
| 1463 | + :param _content_type: force content-type for the request. |
| 1464 | + :type _content_type: str, Optional |
| 1465 | + :param _headers: set to override the headers for a single |
| 1466 | + request; this effectively ignores the headers |
| 1467 | + in the spec for a single request. |
| 1468 | + :type _headers: dict, optional |
| 1469 | + :param _host_index: set to override the host_index for a single |
| 1470 | + request; this effectively ignores the host_index |
| 1471 | + in the spec for a single request. |
| 1472 | + :type _host_index: int, optional |
| 1473 | + :return: Returns the result object. |
| 1474 | + """# noqa: E501 |
| 1475 | + |
| 1476 | +_param=self._list_runner_labels_serialize( |
| 1477 | +project_id=project_id, |
| 1478 | +_request_auth=_request_auth, |
| 1479 | +_content_type=_content_type, |
| 1480 | +_headers=_headers, |
| 1481 | +_host_index=_host_index, |
| 1482 | + ) |
| 1483 | + |
| 1484 | +_response_types_map:Dict[str,Optional[str]]= { |
| 1485 | +"200":"ListRunnerLabels", |
| 1486 | +"400":"GenericErrorResponse", |
| 1487 | +"401":"UnauthorizedResponse", |
| 1488 | +"404":None, |
| 1489 | +"500":"GenericErrorResponse", |
| 1490 | + } |
| 1491 | +response_data=self.api_client.call_api(*_param,_request_timeout=_request_timeout) |
| 1492 | +returnresponse_data.response |
| 1493 | + |
| 1494 | +def_list_runner_labels_serialize( |
| 1495 | +self, |
| 1496 | +project_id, |
| 1497 | +_request_auth, |
| 1498 | +_content_type, |
| 1499 | +_headers, |
| 1500 | +_host_index, |
| 1501 | + )->RequestSerialized: |
| 1502 | + |
| 1503 | +_host=None |
| 1504 | + |
| 1505 | +_collection_formats:Dict[str,str]= {} |
| 1506 | + |
| 1507 | +_path_params:Dict[str,str]= {} |
| 1508 | +_query_params:List[Tuple[str,str]]= [] |
| 1509 | +_header_params:Dict[str,Optional[str]]=_headersor {} |
| 1510 | +_form_params:List[Tuple[str,str]]= [] |
| 1511 | +_files:Dict[str,Union[str,bytes,List[str],List[bytes],List[Tuple[str,bytes]]]]= {} |
| 1512 | +_body_params:Optional[bytes]=None |
| 1513 | + |
| 1514 | +# process the path parameters |
| 1515 | +ifproject_idisnotNone: |
| 1516 | +_path_params["projectId"]=project_id |
| 1517 | +# process the query parameters |
| 1518 | +# process the header parameters |
| 1519 | +# process the form parameters |
| 1520 | +# process the body parameter |
| 1521 | + |
| 1522 | +# set the HTTP header `Accept` |
| 1523 | +if"Accept"notin_header_params: |
| 1524 | +_header_params["Accept"]=self.api_client.select_header_accept(["application/json"]) |
| 1525 | + |
| 1526 | +# authentication setting |
| 1527 | +_auth_settings:List[str]= [] |
| 1528 | + |
| 1529 | +returnself.api_client.param_serialize( |
| 1530 | +method="GET", |
| 1531 | +resource_path="/v1beta/projects/{projectId}/runner-labels", |
| 1532 | +path_params=_path_params, |
| 1533 | +query_params=_query_params, |
| 1534 | +header_params=_header_params, |
| 1535 | +body=_body_params, |
| 1536 | +post_params=_form_params, |
| 1537 | +files=_files, |
| 1538 | +auth_settings=_auth_settings, |
| 1539 | +collection_formats=_collection_formats, |
| 1540 | +_host=_host, |
| 1541 | +_request_auth=_request_auth, |
| 1542 | + ) |
| 1543 | + |
1305 | 1544 | @validate_call |
1306 | 1545 | defpatch_instance( |
1307 | 1546 | self, |
|