stackit-git 0.5.1__tar.gz → 0.6.0__tar.gz
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.
- {stackit_git-0.5.1 → stackit_git-0.6.0}/PKG-INFO +1 -1
- {stackit_git-0.5.1 → stackit_git-0.6.0}/pyproject.toml +1 -1
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/__init__.py +4 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/api/default_api.py +239 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/__init__.py +2 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/list_flavors.py +1 -1
- stackit_git-0.6.0/src/stackit/git/models/list_runner_labels.py +99 -0
- stackit_git-0.6.0/src/stackit/git/models/runner_label.py +86 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/LICENSE.md +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/NOTICE.txt +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/README.md +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/api/__init__.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/api_client.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/api_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/configuration.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/exceptions.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/create_instance_payload.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/flavor.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/generic_error_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/instance.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/internal_server_error_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/list_instances.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/patch_operation.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/unauthorized_response.py +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/py.typed +0 -0
- {stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/rest.py +0 -0
|
@@ -36,7 +36,9 @@ __all__ = [
|
|
|
36
36
|
"InternalServerErrorResponse",
|
|
37
37
|
"ListFlavors",
|
|
38
38
|
"ListInstances",
|
|
39
|
+
"ListRunnerLabels",
|
|
39
40
|
"PatchOperation",
|
|
41
|
+
"RunnerLabel",
|
|
40
42
|
"UnauthorizedResponse",
|
|
41
43
|
]
|
|
42
44
|
|
|
@@ -68,7 +70,9 @@ from stackit.git.models.internal_server_error_response import (
|
|
|
68
70
|
)
|
|
69
71
|
from stackit.git.models.list_flavors import ListFlavors as ListFlavors
|
|
70
72
|
from stackit.git.models.list_instances import ListInstances as ListInstances
|
|
73
|
+
from stackit.git.models.list_runner_labels import ListRunnerLabels as ListRunnerLabels
|
|
71
74
|
from stackit.git.models.patch_operation import PatchOperation as PatchOperation
|
|
75
|
+
from stackit.git.models.runner_label import RunnerLabel as RunnerLabel
|
|
72
76
|
from stackit.git.models.unauthorized_response import (
|
|
73
77
|
UnauthorizedResponse as UnauthorizedResponse,
|
|
74
78
|
)
|
|
@@ -30,6 +30,7 @@ from stackit.git.models.create_instance_payload import CreateInstancePayload
|
|
|
30
30
|
from stackit.git.models.instance import Instance
|
|
31
31
|
from stackit.git.models.list_flavors import ListFlavors
|
|
32
32
|
from stackit.git.models.list_instances import ListInstances
|
|
33
|
+
from stackit.git.models.list_runner_labels import ListRunnerLabels
|
|
33
34
|
from stackit.git.models.patch_operation import PatchOperation
|
|
34
35
|
from stackit.git.rest import RESTResponseType
|
|
35
36
|
|
|
@@ -1302,6 +1303,244 @@ class DefaultApi:
|
|
|
1302
1303
|
_request_auth=_request_auth,
|
|
1303
1304
|
)
|
|
1304
1305
|
|
|
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
|
+
|
|
1305
1544
|
@validate_call
|
|
1306
1545
|
def patch_instance(
|
|
1307
1546
|
self,
|
|
@@ -24,5 +24,7 @@ from stackit.git.models.internal_server_error_response import (
|
|
|
24
24
|
)
|
|
25
25
|
from stackit.git.models.list_flavors import ListFlavors
|
|
26
26
|
from stackit.git.models.list_instances import ListInstances
|
|
27
|
+
from stackit.git.models.list_runner_labels import ListRunnerLabels
|
|
27
28
|
from stackit.git.models.patch_operation import PatchOperation
|
|
29
|
+
from stackit.git.models.runner_label import RunnerLabel
|
|
28
30
|
from stackit.git.models.unauthorized_response import UnauthorizedResponse
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
STACKIT Git management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.4
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
22
|
+
from typing_extensions import Self
|
|
23
|
+
|
|
24
|
+
from stackit.git.models.runner_label import RunnerLabel
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class ListRunnerLabels(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
A list of STACKIT Git RunnerLabels.
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
|
|
32
|
+
runner_labels: List[RunnerLabel] = Field(alias="runner-labels")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["runner-labels"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of ListRunnerLabels from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
# override the default output from pydantic by calling `to_dict()` of each item in runner_labels (list)
|
|
73
|
+
_items = []
|
|
74
|
+
if self.runner_labels:
|
|
75
|
+
for _item in self.runner_labels:
|
|
76
|
+
if _item:
|
|
77
|
+
_items.append(_item.to_dict())
|
|
78
|
+
_dict["runner-labels"] = _items
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of ListRunnerLabels from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate(
|
|
91
|
+
{
|
|
92
|
+
"runner-labels": (
|
|
93
|
+
[RunnerLabel.from_dict(_item) for _item in obj["runner-labels"]]
|
|
94
|
+
if obj.get("runner-labels") is not None
|
|
95
|
+
else None
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
return _obj
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
STACKIT Git API
|
|
5
|
+
|
|
6
|
+
STACKIT Git management API.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1beta.0.4
|
|
9
|
+
Contact: git@stackit.cloud
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from typing import Any, ClassVar, Dict, List, Optional, Set
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing_extensions import Annotated, Self
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class RunnerLabel(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
Describes a STACKIT Git RunnerLabel.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
|
|
30
|
+
description: StrictStr = Field(description="RunnerLabel description.")
|
|
31
|
+
id: Annotated[str, Field(strict=True, max_length=36)] = Field(description="RunnerLabel id.")
|
|
32
|
+
label: Annotated[str, Field(strict=True, max_length=64)] = Field(description="RunnerLabel label.")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["description", "id", "label"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of RunnerLabel from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of RunnerLabel from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate(
|
|
84
|
+
{"description": obj.get("description"), "id": obj.get("id"), "label": obj.get("label")}
|
|
85
|
+
)
|
|
86
|
+
return _obj
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{stackit_git-0.5.1 → stackit_git-0.6.0}/src/stackit/git/models/internal_server_error_response.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|