|
80 | 80 | from stackit.iaas.models.partial_update_network_payload import (
|
81 | 81 | PartialUpdateNetworkPayload,
|
82 | 82 | )
|
| 83 | +from stackit.iaas.models.project import Project |
83 | 84 | from stackit.iaas.models.project_list_response import ProjectListResponse
|
84 | 85 | from stackit.iaas.models.public_ip import PublicIp
|
85 | 86 | from stackit.iaas.models.public_ip_list_response import PublicIpListResponse
|
@@ -15397,6 +15398,256 @@ def _get_organization_request_serialize(
|
15397 | 15398 | _request_auth=_request_auth,
|
15398 | 15399 | )
|
15399 | 15400 |
|
| 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 | + |
15400 | 15651 | @validate_call
|
15401 | 15652 | def get_project_nic(
|
15402 | 15653 | self,
|
|
0 commit comments