Skip to content

Commit bcb6c18

Browse files
Generator: Update SDK /services/git (#2506)
Co-authored-by: Ruben Hoenle <Ruben.Hoenle@stackit.cloud>
1 parent 1782049 commit bcb6c18

File tree

9 files changed

+444
-4
lines changed

9 files changed

+444
-4
lines changed

CHANGELOG.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,13 @@
1010
- **Bugfix:** Prevent year 0 timestamp issue
1111
- `cdn`: [v1.7.1](services/cdn/CHANGELOG.md#v171)
1212
- **Bugfix:** Prevent year 0 timestamp issue
13-
- `git`: [v0.5.1](services/git/CHANGELOG.md#v051)
14-
- **Bugfix:** Prevent year 0 timestamp issue
13+
- `git`:
14+
- [v0.6.0](services/git/CHANGELOG.md#v060)
15+
- **Feature:** Add support for list runner labels operation
16+
- new API client methods `list_runner_labels`
17+
- new model classes `RunnerLabel` and `ListRunnerLabels`
18+
- [v0.5.1](services/git/CHANGELOG.md#v051)
19+
- **Bugfix:** Prevent year 0 timestamp issue
1520
- `intake`: [v0.2.1](services/intake/CHANGELOG.md#v021)
1621
- **Bugfix:** Prevent year 0 timestamp issue
1722
- `kms`: [v0.4.1](services/kms/CHANGELOG.md#v041)

services/git/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## v0.6.0
2+
- **Feature:** Add support for list runner labels operation
3+
- new API client methods `list_runner_labels`
4+
- new model classes `RunnerLabel` and `ListRunnerLabels`
5+
16
## v0.5.1
27
- **Bugfix:** Prevent year 0 timestamp issue
38

services/git/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "stackit-git"
33

44
[tool.poetry]
55
name = "stackit-git"
6-
version = "v0.5.1"
6+
version = "v0.6.0"
77
authors = [
88
"STACKIT Developer Tools <developer-tools@stackit.cloud>",
99
]

services/git/src/stackit/git/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"InternalServerErrorResponse",
3737
"ListFlavors",
3838
"ListInstances",
39+
"ListRunnerLabels",
3940
"PatchOperation",
41+
"RunnerLabel",
4042
"UnauthorizedResponse",
4143
]
4244

@@ -68,7 +70,9 @@
6870
)
6971
from stackit.git.models.list_flavors import ListFlavors as ListFlavors
7072
from stackit.git.models.list_instances import ListInstances as ListInstances
73+
from stackit.git.models.list_runner_labels import ListRunnerLabels as ListRunnerLabels
7174
from stackit.git.models.patch_operation import PatchOperation as PatchOperation
75+
from stackit.git.models.runner_label import RunnerLabel as RunnerLabel
7276
from stackit.git.models.unauthorized_response import (
7377
UnauthorizedResponse as UnauthorizedResponse,
7478
)

services/git/src/stackit/git/api/default_api.py

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from stackit.git.models.instance import Instance
3131
from stackit.git.models.list_flavors import ListFlavors
3232
from stackit.git.models.list_instances import ListInstances
33+
from stackit.git.models.list_runner_labels import ListRunnerLabels
3334
from stackit.git.models.patch_operation import PatchOperation
3435
from stackit.git.rest import RESTResponseType
3536

@@ -1302,6 +1303,244 @@ def _list_instances_serialize(
13021303
_request_auth=_request_auth,
13031304
)
13041305

1306+
@validate_call
1307+
def list_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+
return self.api_client.response_deserialize(
1366+
response_data=response_data,
1367+
response_types_map=_response_types_map,
1368+
).data
1369+
1370+
@validate_call
1371+
def list_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+
return self.api_client.response_deserialize(
1430+
response_data=response_data,
1431+
response_types_map=_response_types_map,
1432+
)
1433+
1434+
@validate_call
1435+
def list_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+
return response_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]] = _headers or {}
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+
if project_id is not None:
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" not in _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+
return self.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+
13051544
@validate_call
13061545
def patch_instance(
13071546
self,

services/git/src/stackit/git/models/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,7 @@
2424
)
2525
from stackit.git.models.list_flavors import ListFlavors
2626
from stackit.git.models.list_instances import ListInstances
27+
from stackit.git.models.list_runner_labels import ListRunnerLabels
2728
from stackit.git.models.patch_operation import PatchOperation
29+
from stackit.git.models.runner_label import RunnerLabel
2830
from stackit.git.models.unauthorized_response import UnauthorizedResponse

services/git/src/stackit/git/models/list_flavors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
class ListFlavors(BaseModel):
2828
"""
29-
A list of STACKIT Git flavors.
29+
A list of STACKIT Git Flavors.
3030
""" # noqa: E501
3131

3232
flavors: List[Flavor]

0 commit comments

Comments
 (0)