|
52 | 52 | from stackit.telemetryrouter.models.list_telemetry_routers_response import ( |
53 | 53 | ListTelemetryRoutersResponse, |
54 | 54 | ) |
| 55 | +from stackit.telemetryrouter.models.partial_update_telemetry_router_payload import ( |
| 56 | + PartialUpdateTelemetryRouterPayload, |
| 57 | +) |
55 | 58 | from stackit.telemetryrouter.models.telemetry_router_response import ( |
56 | 59 | TelemetryRouterResponse, |
57 | 60 | ) |
@@ -3598,6 +3601,300 @@ def _list_telemetry_routers_serialize( |
3598 | 3601 | _request_auth=_request_auth, |
3599 | 3602 | ) |
3600 | 3603 |
|
| 3604 | + @validate_call |
| 3605 | + def partial_update_telemetry_router( |
| 3606 | + self, |
| 3607 | + project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")], |
| 3608 | + region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")], |
| 3609 | + telemetry_router_id: Annotated[UUID, Field(description="The Telemetry Router UUID.")], |
| 3610 | + partial_update_telemetry_router_payload: PartialUpdateTelemetryRouterPayload, |
| 3611 | + _request_timeout: Union[ |
| 3612 | + None, |
| 3613 | + Annotated[StrictFloat, Field(gt=0)], |
| 3614 | + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
| 3615 | + ] = None, |
| 3616 | + _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 3617 | + _content_type: Optional[StrictStr] = None, |
| 3618 | + _headers: Optional[Dict[StrictStr, Any]] = None, |
| 3619 | + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 3620 | + ) -> TelemetryRouterResponse: |
| 3621 | + """partial_update_telemetry_router |
| 3622 | +
|
| 3623 | + Patches the given Telemetry Router. |
| 3624 | +
|
| 3625 | + :param project_id: The STACKIT portal project UUID the resource is located in. (required) |
| 3626 | + :type project_id: UUID |
| 3627 | + :param region_id: The STACKIT region name the resource is located in. (required) |
| 3628 | + :type region_id: str |
| 3629 | + :param telemetry_router_id: The Telemetry Router UUID. (required) |
| 3630 | + :type telemetry_router_id: UUID |
| 3631 | + :param partial_update_telemetry_router_payload: (required) |
| 3632 | + :type partial_update_telemetry_router_payload: PartialUpdateTelemetryRouterPayload |
| 3633 | + :param _request_timeout: timeout setting for this request. If one |
| 3634 | + number provided, it will be total request |
| 3635 | + timeout. It can also be a pair (tuple) of |
| 3636 | + (connection, read) timeouts. |
| 3637 | + :type _request_timeout: int, tuple(int, int), optional |
| 3638 | + :param _request_auth: set to override the auth_settings for an a single |
| 3639 | + request; this effectively ignores the |
| 3640 | + authentication in the spec for a single request. |
| 3641 | + :type _request_auth: dict, optional |
| 3642 | + :param _content_type: force content-type for the request. |
| 3643 | + :type _content_type: str, Optional |
| 3644 | + :param _headers: set to override the headers for a single |
| 3645 | + request; this effectively ignores the headers |
| 3646 | + in the spec for a single request. |
| 3647 | + :type _headers: dict, optional |
| 3648 | + :param _host_index: set to override the host_index for a single |
| 3649 | + request; this effectively ignores the host_index |
| 3650 | + in the spec for a single request. |
| 3651 | + :type _host_index: int, optional |
| 3652 | + :return: Returns the result object. |
| 3653 | + """ # noqa: E501 |
| 3654 | + |
| 3655 | + _param = self._partial_update_telemetry_router_serialize( |
| 3656 | + project_id=project_id, |
| 3657 | + region_id=region_id, |
| 3658 | + telemetry_router_id=telemetry_router_id, |
| 3659 | + partial_update_telemetry_router_payload=partial_update_telemetry_router_payload, |
| 3660 | + _request_auth=_request_auth, |
| 3661 | + _content_type=_content_type, |
| 3662 | + _headers=_headers, |
| 3663 | + _host_index=_host_index, |
| 3664 | + ) |
| 3665 | + |
| 3666 | + _response_types_map: Dict[str, Optional[str]] = { |
| 3667 | + "200": "TelemetryRouterResponse", |
| 3668 | + "400": "Response4xx", |
| 3669 | + "401": "Response4xx", |
| 3670 | + "404": None, |
| 3671 | + "409": "Response4xx", |
| 3672 | + "500": None, |
| 3673 | + } |
| 3674 | + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) |
| 3675 | + response_data.read() |
| 3676 | + return self.api_client.response_deserialize( |
| 3677 | + response_data=response_data, |
| 3678 | + response_types_map=_response_types_map, |
| 3679 | + ).data |
| 3680 | + |
| 3681 | + @validate_call |
| 3682 | + def partial_update_telemetry_router_with_http_info( |
| 3683 | + self, |
| 3684 | + project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")], |
| 3685 | + region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")], |
| 3686 | + telemetry_router_id: Annotated[UUID, Field(description="The Telemetry Router UUID.")], |
| 3687 | + partial_update_telemetry_router_payload: PartialUpdateTelemetryRouterPayload, |
| 3688 | + _request_timeout: Union[ |
| 3689 | + None, |
| 3690 | + Annotated[StrictFloat, Field(gt=0)], |
| 3691 | + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
| 3692 | + ] = None, |
| 3693 | + _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 3694 | + _content_type: Optional[StrictStr] = None, |
| 3695 | + _headers: Optional[Dict[StrictStr, Any]] = None, |
| 3696 | + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 3697 | + ) -> ApiResponse[TelemetryRouterResponse]: |
| 3698 | + """partial_update_telemetry_router |
| 3699 | +
|
| 3700 | + Patches the given Telemetry Router. |
| 3701 | +
|
| 3702 | + :param project_id: The STACKIT portal project UUID the resource is located in. (required) |
| 3703 | + :type project_id: UUID |
| 3704 | + :param region_id: The STACKIT region name the resource is located in. (required) |
| 3705 | + :type region_id: str |
| 3706 | + :param telemetry_router_id: The Telemetry Router UUID. (required) |
| 3707 | + :type telemetry_router_id: UUID |
| 3708 | + :param partial_update_telemetry_router_payload: (required) |
| 3709 | + :type partial_update_telemetry_router_payload: PartialUpdateTelemetryRouterPayload |
| 3710 | + :param _request_timeout: timeout setting for this request. If one |
| 3711 | + number provided, it will be total request |
| 3712 | + timeout. It can also be a pair (tuple) of |
| 3713 | + (connection, read) timeouts. |
| 3714 | + :type _request_timeout: int, tuple(int, int), optional |
| 3715 | + :param _request_auth: set to override the auth_settings for an a single |
| 3716 | + request; this effectively ignores the |
| 3717 | + authentication in the spec for a single request. |
| 3718 | + :type _request_auth: dict, optional |
| 3719 | + :param _content_type: force content-type for the request. |
| 3720 | + :type _content_type: str, Optional |
| 3721 | + :param _headers: set to override the headers for a single |
| 3722 | + request; this effectively ignores the headers |
| 3723 | + in the spec for a single request. |
| 3724 | + :type _headers: dict, optional |
| 3725 | + :param _host_index: set to override the host_index for a single |
| 3726 | + request; this effectively ignores the host_index |
| 3727 | + in the spec for a single request. |
| 3728 | + :type _host_index: int, optional |
| 3729 | + :return: Returns the result object. |
| 3730 | + """ # noqa: E501 |
| 3731 | + |
| 3732 | + _param = self._partial_update_telemetry_router_serialize( |
| 3733 | + project_id=project_id, |
| 3734 | + region_id=region_id, |
| 3735 | + telemetry_router_id=telemetry_router_id, |
| 3736 | + partial_update_telemetry_router_payload=partial_update_telemetry_router_payload, |
| 3737 | + _request_auth=_request_auth, |
| 3738 | + _content_type=_content_type, |
| 3739 | + _headers=_headers, |
| 3740 | + _host_index=_host_index, |
| 3741 | + ) |
| 3742 | + |
| 3743 | + _response_types_map: Dict[str, Optional[str]] = { |
| 3744 | + "200": "TelemetryRouterResponse", |
| 3745 | + "400": "Response4xx", |
| 3746 | + "401": "Response4xx", |
| 3747 | + "404": None, |
| 3748 | + "409": "Response4xx", |
| 3749 | + "500": None, |
| 3750 | + } |
| 3751 | + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) |
| 3752 | + response_data.read() |
| 3753 | + return self.api_client.response_deserialize( |
| 3754 | + response_data=response_data, |
| 3755 | + response_types_map=_response_types_map, |
| 3756 | + ) |
| 3757 | + |
| 3758 | + @validate_call |
| 3759 | + def partial_update_telemetry_router_without_preload_content( |
| 3760 | + self, |
| 3761 | + project_id: Annotated[UUID, Field(description="The STACKIT portal project UUID the resource is located in.")], |
| 3762 | + region_id: Annotated[StrictStr, Field(description="The STACKIT region name the resource is located in.")], |
| 3763 | + telemetry_router_id: Annotated[UUID, Field(description="The Telemetry Router UUID.")], |
| 3764 | + partial_update_telemetry_router_payload: PartialUpdateTelemetryRouterPayload, |
| 3765 | + _request_timeout: Union[ |
| 3766 | + None, |
| 3767 | + Annotated[StrictFloat, Field(gt=0)], |
| 3768 | + Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]], |
| 3769 | + ] = None, |
| 3770 | + _request_auth: Optional[Dict[StrictStr, Any]] = None, |
| 3771 | + _content_type: Optional[StrictStr] = None, |
| 3772 | + _headers: Optional[Dict[StrictStr, Any]] = None, |
| 3773 | + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, |
| 3774 | + ) -> RESTResponseType: |
| 3775 | + """partial_update_telemetry_router |
| 3776 | +
|
| 3777 | + Patches the given Telemetry Router. |
| 3778 | +
|
| 3779 | + :param project_id: The STACKIT portal project UUID the resource is located in. (required) |
| 3780 | + :type project_id: UUID |
| 3781 | + :param region_id: The STACKIT region name the resource is located in. (required) |
| 3782 | + :type region_id: str |
| 3783 | + :param telemetry_router_id: The Telemetry Router UUID. (required) |
| 3784 | + :type telemetry_router_id: UUID |
| 3785 | + :param partial_update_telemetry_router_payload: (required) |
| 3786 | + :type partial_update_telemetry_router_payload: PartialUpdateTelemetryRouterPayload |
| 3787 | + :param _request_timeout: timeout setting for this request. If one |
| 3788 | + number provided, it will be total request |
| 3789 | + timeout. It can also be a pair (tuple) of |
| 3790 | + (connection, read) timeouts. |
| 3791 | + :type _request_timeout: int, tuple(int, int), optional |
| 3792 | + :param _request_auth: set to override the auth_settings for an a single |
| 3793 | + request; this effectively ignores the |
| 3794 | + authentication in the spec for a single request. |
| 3795 | + :type _request_auth: dict, optional |
| 3796 | + :param _content_type: force content-type for the request. |
| 3797 | + :type _content_type: str, Optional |
| 3798 | + :param _headers: set to override the headers for a single |
| 3799 | + request; this effectively ignores the headers |
| 3800 | + in the spec for a single request. |
| 3801 | + :type _headers: dict, optional |
| 3802 | + :param _host_index: set to override the host_index for a single |
| 3803 | + request; this effectively ignores the host_index |
| 3804 | + in the spec for a single request. |
| 3805 | + :type _host_index: int, optional |
| 3806 | + :return: Returns the result object. |
| 3807 | + """ # noqa: E501 |
| 3808 | + |
| 3809 | + _param = self._partial_update_telemetry_router_serialize( |
| 3810 | + project_id=project_id, |
| 3811 | + region_id=region_id, |
| 3812 | + telemetry_router_id=telemetry_router_id, |
| 3813 | + partial_update_telemetry_router_payload=partial_update_telemetry_router_payload, |
| 3814 | + _request_auth=_request_auth, |
| 3815 | + _content_type=_content_type, |
| 3816 | + _headers=_headers, |
| 3817 | + _host_index=_host_index, |
| 3818 | + ) |
| 3819 | + |
| 3820 | + _response_types_map: Dict[str, Optional[str]] = { |
| 3821 | + "200": "TelemetryRouterResponse", |
| 3822 | + "400": "Response4xx", |
| 3823 | + "401": "Response4xx", |
| 3824 | + "404": None, |
| 3825 | + "409": "Response4xx", |
| 3826 | + "500": None, |
| 3827 | + } |
| 3828 | + response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout) |
| 3829 | + return response_data.response |
| 3830 | + |
| 3831 | + def _partial_update_telemetry_router_serialize( |
| 3832 | + self, |
| 3833 | + project_id, |
| 3834 | + region_id, |
| 3835 | + telemetry_router_id, |
| 3836 | + partial_update_telemetry_router_payload, |
| 3837 | + _request_auth, |
| 3838 | + _content_type, |
| 3839 | + _headers, |
| 3840 | + _host_index, |
| 3841 | + ) -> RequestSerialized: |
| 3842 | + |
| 3843 | + _host = None |
| 3844 | + |
| 3845 | + _collection_formats: Dict[str, str] = {} |
| 3846 | + |
| 3847 | + _path_params: Dict[str, str] = {} |
| 3848 | + _query_params: List[Tuple[str, str]] = [] |
| 3849 | + _header_params: Dict[str, Optional[str]] = _headers or {} |
| 3850 | + _form_params: List[Tuple[str, str]] = [] |
| 3851 | + _files: Dict[str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]] = {} |
| 3852 | + _body_params: Optional[bytes] = None |
| 3853 | + |
| 3854 | + # process the path parameters |
| 3855 | + if project_id is not None: |
| 3856 | + _path_params["projectId"] = project_id |
| 3857 | + if region_id is not None: |
| 3858 | + _path_params["regionId"] = region_id |
| 3859 | + if telemetry_router_id is not None: |
| 3860 | + _path_params["telemetryRouterId"] = telemetry_router_id |
| 3861 | + # process the query parameters |
| 3862 | + # process the header parameters |
| 3863 | + # process the form parameters |
| 3864 | + # process the body parameter |
| 3865 | + if partial_update_telemetry_router_payload is not None: |
| 3866 | + _body_params = partial_update_telemetry_router_payload |
| 3867 | + |
| 3868 | + # set the HTTP header `Accept` |
| 3869 | + if "Accept" not in _header_params: |
| 3870 | + _header_params["Accept"] = self.api_client.select_header_accept(["application/json"]) |
| 3871 | + |
| 3872 | + # set the HTTP header `Content-Type` |
| 3873 | + if _content_type: |
| 3874 | + _header_params["Content-Type"] = _content_type |
| 3875 | + else: |
| 3876 | + _default_content_type = self.api_client.select_header_content_type(["application/json"]) |
| 3877 | + if _default_content_type is not None: |
| 3878 | + _header_params["Content-Type"] = _default_content_type |
| 3879 | + |
| 3880 | + # authentication setting |
| 3881 | + _auth_settings: List[str] = [] |
| 3882 | + |
| 3883 | + return self.api_client.param_serialize( |
| 3884 | + method="PATCH", |
| 3885 | + resource_path="/v1/projects/{projectId}/regions/{regionId}/telemetry-routers/{telemetryRouterId}", |
| 3886 | + path_params=_path_params, |
| 3887 | + query_params=_query_params, |
| 3888 | + header_params=_header_params, |
| 3889 | + body=_body_params, |
| 3890 | + post_params=_form_params, |
| 3891 | + files=_files, |
| 3892 | + auth_settings=_auth_settings, |
| 3893 | + collection_formats=_collection_formats, |
| 3894 | + _host=_host, |
| 3895 | + _request_auth=_request_auth, |
| 3896 | + ) |
| 3897 | + |
3601 | 3898 | @validate_call |
3602 | 3899 | def update_access_token( |
3603 | 3900 | self, |
|
0 commit comments