Skip to content

Commit 427b7e6

Browse files
Generator: Update SDK /services/iaas (#2163)
* Generate iaas v0.8.0 - **Feature:** Add new method to get project details `GetProjectDetails` --------- Co-authored-by: Marcel Jacek <[email protected]>
1 parent 0ee70c3 commit 427b7e6

File tree

9 files changed

+618
-1
lines changed

9 files changed

+618
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
- `git`: [v0.4.0](services/git/CHANGELOG.md#v040)
2424
- **Version**: Minimal version is now python 3.9
2525
- `iaas`:
26+
- [v0.8.0](services/iaas/CHANGELOG.md#v080)
27+
- **Feature:** Add new method to get project details `GetProjectDetails`
2628
- [v0.7.0](services/iaas/CHANGELOG.md#v070)
2729
- **Docs:** Improved descriptions of properties in structs with their possible values
2830
- **Feature:** Add `Agent` field to `CreateImagePayload`, `UpdateImagePayload` and `Image` model

services/iaas/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## v0.8.0
2+
- **Feature:** Add new method to get project details `GetProjectDetails`
3+
14
## v0.7.0
25
- **Docs:** Improved descriptions of properties in structs with their possible values
36
- **Feature:** Add `Agent` field to `CreateImagePayload`, `UpdateImagePayload` and `Image` model

services/iaas/pyproject.toml

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

44
[tool.poetry]
55
name = "stackit-iaas"
6-
version = "v0.7.0"
6+
version = "v0.8.0"
77
authors = [
88
"STACKIT Developer Tools <[email protected]>",
99
]

services/iaas/src/stackit/iaas/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"AllowedAddressesInner",
3636
"Area",
3737
"AreaConfig",
38+
"AreaId",
3839
"AreaPrefixConfigIPv4",
3940
"AvailabilityZoneListResponse",
4041
"Backup",
@@ -95,6 +96,7 @@
9596
"PartialUpdateNetworkAreaPayload",
9697
"PartialUpdateNetworkPayload",
9798
"PortRange",
99+
"Project",
98100
"ProjectListResponse",
99101
"Protocol",
100102
"PublicIp",
@@ -125,6 +127,7 @@
125127
"SetImageSharePayload",
126128
"Snapshot",
127129
"SnapshotListResponse",
130+
"StaticAreaID",
128131
"UpdateAreaAddressFamily",
129132
"UpdateAreaIPv4",
130133
"UpdateAttachedVolumePayload",
@@ -179,6 +182,7 @@
179182
)
180183
from stackit.iaas.models.area import Area as Area
181184
from stackit.iaas.models.area_config import AreaConfig as AreaConfig
185+
from stackit.iaas.models.area_id import AreaId as AreaId
182186
from stackit.iaas.models.area_prefix_config_ipv4 import (
183187
AreaPrefixConfigIPv4 as AreaPrefixConfigIPv4,
184188
)
@@ -313,6 +317,7 @@
313317
PartialUpdateNetworkPayload as PartialUpdateNetworkPayload,
314318
)
315319
from stackit.iaas.models.port_range import PortRange as PortRange
320+
from stackit.iaas.models.project import Project as Project
316321
from stackit.iaas.models.project_list_response import (
317322
ProjectListResponse as ProjectListResponse,
318323
)
@@ -377,6 +382,7 @@
377382
from stackit.iaas.models.snapshot_list_response import (
378383
SnapshotListResponse as SnapshotListResponse,
379384
)
385+
from stackit.iaas.models.static_area_id import StaticAreaID as StaticAreaID
380386
from stackit.iaas.models.update_area_address_family import (
381387
UpdateAreaAddressFamily as UpdateAreaAddressFamily,
382388
)

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

Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
from stackit.iaas.models.partial_update_network_payload import (
8181
PartialUpdateNetworkPayload,
8282
)
83+
from stackit.iaas.models.project import Project
8384
from stackit.iaas.models.project_list_response import ProjectListResponse
8485
from stackit.iaas.models.public_ip import PublicIp
8586
from stackit.iaas.models.public_ip_list_response import PublicIpListResponse
@@ -15397,6 +15398,256 @@ def _get_organization_request_serialize(
1539715398
_request_auth=_request_auth,
1539815399
)
1539915400

15401+
@validate_call
15402+
def get_project_details(
15403+
self,
15404+
project_id: Annotated[
15405+
str,
15406+
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
15407+
],
15408+
_request_timeout: Union[
15409+
None,
15410+
Annotated[StrictFloat, Field(gt=0)],
15411+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
15412+
] = None,
15413+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
15414+
_content_type: Optional[StrictStr] = None,
15415+
_headers: Optional[Dict[StrictStr, Any]] = None,
15416+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
15417+
) -> Project:
15418+
"""Get project details.
15419+
15420+
Get details about a STACKIT project.
15421+
15422+
:param project_id: The identifier (ID) of a STACKIT Project. (required)
15423+
:type project_id: str
15424+
:param _request_timeout: timeout setting for this request. If one
15425+
number provided, it will be total request
15426+
timeout. It can also be a pair (tuple) of
15427+
(connection, read) timeouts.
15428+
:type _request_timeout: int, tuple(int, int), optional
15429+
:param _request_auth: set to override the auth_settings for an a single
15430+
request; this effectively ignores the
15431+
authentication in the spec for a single request.
15432+
:type _request_auth: dict, optional
15433+
:param _content_type: force content-type for the request.
15434+
:type _content_type: str, Optional
15435+
:param _headers: set to override the headers for a single
15436+
request; this effectively ignores the headers
15437+
in the spec for a single request.
15438+
:type _headers: dict, optional
15439+
:param _host_index: set to override the host_index for a single
15440+
request; this effectively ignores the host_index
15441+
in the spec for a single request.
15442+
:type _host_index: int, optional
15443+
:return: Returns the result object.
15444+
""" # noqa: E501
15445+
15446+
_param = self._get_project_details_serialize(
15447+
project_id=project_id,
15448+
_request_auth=_request_auth,
15449+
_content_type=_content_type,
15450+
_headers=_headers,
15451+
_host_index=_host_index,
15452+
)
15453+
15454+
_response_types_map: Dict[str, Optional[str]] = {
15455+
"200": "Project",
15456+
"400": "Error",
15457+
"401": "Error",
15458+
"403": "Error",
15459+
"404": "Error",
15460+
"500": "Error",
15461+
}
15462+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
15463+
response_data.read()
15464+
return self.api_client.response_deserialize(
15465+
response_data=response_data,
15466+
response_types_map=_response_types_map,
15467+
).data
15468+
15469+
@validate_call
15470+
def get_project_details_with_http_info(
15471+
self,
15472+
project_id: Annotated[
15473+
str,
15474+
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
15475+
],
15476+
_request_timeout: Union[
15477+
None,
15478+
Annotated[StrictFloat, Field(gt=0)],
15479+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
15480+
] = None,
15481+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
15482+
_content_type: Optional[StrictStr] = None,
15483+
_headers: Optional[Dict[StrictStr, Any]] = None,
15484+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
15485+
) -> ApiResponse[Project]:
15486+
"""Get project details.
15487+
15488+
Get details about a STACKIT project.
15489+
15490+
:param project_id: The identifier (ID) of a STACKIT Project. (required)
15491+
:type project_id: str
15492+
:param _request_timeout: timeout setting for this request. If one
15493+
number provided, it will be total request
15494+
timeout. It can also be a pair (tuple) of
15495+
(connection, read) timeouts.
15496+
:type _request_timeout: int, tuple(int, int), optional
15497+
:param _request_auth: set to override the auth_settings for an a single
15498+
request; this effectively ignores the
15499+
authentication in the spec for a single request.
15500+
:type _request_auth: dict, optional
15501+
:param _content_type: force content-type for the request.
15502+
:type _content_type: str, Optional
15503+
:param _headers: set to override the headers for a single
15504+
request; this effectively ignores the headers
15505+
in the spec for a single request.
15506+
:type _headers: dict, optional
15507+
:param _host_index: set to override the host_index for a single
15508+
request; this effectively ignores the host_index
15509+
in the spec for a single request.
15510+
:type _host_index: int, optional
15511+
:return: Returns the result object.
15512+
""" # noqa: E501
15513+
15514+
_param = self._get_project_details_serialize(
15515+
project_id=project_id,
15516+
_request_auth=_request_auth,
15517+
_content_type=_content_type,
15518+
_headers=_headers,
15519+
_host_index=_host_index,
15520+
)
15521+
15522+
_response_types_map: Dict[str, Optional[str]] = {
15523+
"200": "Project",
15524+
"400": "Error",
15525+
"401": "Error",
15526+
"403": "Error",
15527+
"404": "Error",
15528+
"500": "Error",
15529+
}
15530+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
15531+
response_data.read()
15532+
return self.api_client.response_deserialize(
15533+
response_data=response_data,
15534+
response_types_map=_response_types_map,
15535+
)
15536+
15537+
@validate_call
15538+
def get_project_details_without_preload_content(
15539+
self,
15540+
project_id: Annotated[
15541+
str,
15542+
Field(min_length=36, strict=True, max_length=36, description="The identifier (ID) of a STACKIT Project."),
15543+
],
15544+
_request_timeout: Union[
15545+
None,
15546+
Annotated[StrictFloat, Field(gt=0)],
15547+
Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
15548+
] = None,
15549+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
15550+
_content_type: Optional[StrictStr] = None,
15551+
_headers: Optional[Dict[StrictStr, Any]] = None,
15552+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
15553+
) -> RESTResponseType:
15554+
"""Get project details.
15555+
15556+
Get details about a STACKIT project.
15557+
15558+
:param project_id: The identifier (ID) of a STACKIT Project. (required)
15559+
:type project_id: str
15560+
:param _request_timeout: timeout setting for this request. If one
15561+
number provided, it will be total request
15562+
timeout. It can also be a pair (tuple) of
15563+
(connection, read) timeouts.
15564+
:type _request_timeout: int, tuple(int, int), optional
15565+
:param _request_auth: set to override the auth_settings for an a single
15566+
request; this effectively ignores the
15567+
authentication in the spec for a single request.
15568+
:type _request_auth: dict, optional
15569+
:param _content_type: force content-type for the request.
15570+
:type _content_type: str, Optional
15571+
:param _headers: set to override the headers for a single
15572+
request; this effectively ignores the headers
15573+
in the spec for a single request.
15574+
:type _headers: dict, optional
15575+
:param _host_index: set to override the host_index for a single
15576+
request; this effectively ignores the host_index
15577+
in the spec for a single request.
15578+
:type _host_index: int, optional
15579+
:return: Returns the result object.
15580+
""" # noqa: E501
15581+
15582+
_param = self._get_project_details_serialize(
15583+
project_id=project_id,
15584+
_request_auth=_request_auth,
15585+
_content_type=_content_type,
15586+
_headers=_headers,
15587+
_host_index=_host_index,
15588+
)
15589+
15590+
_response_types_map: Dict[str, Optional[str]] = {
15591+
"200": "Project",
15592+
"400": "Error",
15593+
"401": "Error",
15594+
"403": "Error",
15595+
"404": "Error",
15596+
"500": "Error",
15597+
}
15598+
response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
15599+
return response_data.response
15600+
15601+
def _get_project_details_serialize(
15602+
self,
15603+
project_id,
15604+
_request_auth,
15605+
_content_type,
15606+
_headers,
15607+
_host_index,
15608+
) -> RequestSerialized:
15609+
15610+
_host = None
15611+
15612+
_collection_formats: Dict[str, str] = {}
15613+
15614+
_path_params: Dict[str, str] = {}
15615+
_query_params: List[Tuple[str, str]] = []
15616+
_header_params: Dict[str, Optional[str]] = _headers or {}
15617+
_form_params: List[Tuple[str, str]] = []
15618+
_files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {}
15619+
_body_params: Optional[bytes] = None
15620+
15621+
# process the path parameters
15622+
if project_id is not None:
15623+
_path_params["projectId"] = project_id
15624+
# process the query parameters
15625+
# process the header parameters
15626+
# process the form parameters
15627+
# process the body parameter
15628+
15629+
# set the HTTP header `Accept`
15630+
if "Accept" not in _header_params:
15631+
_header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
15632+
15633+
# authentication setting
15634+
_auth_settings: List[str] = []
15635+
15636+
return self.api_client.param_serialize(
15637+
method="GET",
15638+
resource_path="/v1/projects/{projectId}",
15639+
path_params=_path_params,
15640+
query_params=_query_params,
15641+
header_params=_header_params,
15642+
body=_body_params,
15643+
post_params=_form_params,
15644+
files=_files,
15645+
auth_settings=_auth_settings,
15646+
collection_formats=_collection_formats,
15647+
_host=_host,
15648+
_request_auth=_request_auth,
15649+
)
15650+
1540015651
@validate_call
1540115652
def get_project_nic(
1540215653
self,

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from stackit.iaas.models.allowed_addresses_inner import AllowedAddressesInner
2222
from stackit.iaas.models.area import Area
2323
from stackit.iaas.models.area_config import AreaConfig
24+
from stackit.iaas.models.area_id import AreaId
2425
from stackit.iaas.models.area_prefix_config_ipv4 import AreaPrefixConfigIPv4
2526
from stackit.iaas.models.availability_zone_list_response import (
2627
AvailabilityZoneListResponse,
@@ -99,6 +100,7 @@
99100
PartialUpdateNetworkPayload,
100101
)
101102
from stackit.iaas.models.port_range import PortRange
103+
from stackit.iaas.models.project import Project
102104
from stackit.iaas.models.project_list_response import ProjectListResponse
103105
from stackit.iaas.models.protocol import Protocol
104106
from stackit.iaas.models.public_ip import PublicIp
@@ -133,6 +135,7 @@
133135
from stackit.iaas.models.set_image_share_payload import SetImageSharePayload
134136
from stackit.iaas.models.snapshot import Snapshot
135137
from stackit.iaas.models.snapshot_list_response import SnapshotListResponse
138+
from stackit.iaas.models.static_area_id import StaticAreaID
136139
from stackit.iaas.models.update_area_address_family import UpdateAreaAddressFamily
137140
from stackit.iaas.models.update_area_ipv4 import UpdateAreaIPv4
138141
from stackit.iaas.models.update_attached_volume_payload import (

0 commit comments

Comments
 (0)