From 83f631162e83f9430f61a84a86ed7ca5f1993c66 Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Sun, 25 May 2025 16:32:24 +0300 Subject: [PATCH 1/3] chore: update generated output under .openapi markers --- zitadel_client/api/__init__.py | 3 +- zitadel_client/api/action_service_api.py | 2821 +++++++++++++++++ zitadel_client/api/settings_api.py | 570 ---- zitadel_client/api/settings_service_api.py | 535 ++++ zitadel_client/api/web_key_service_api.py | 1119 +++++++ zitadel_client/models/__init__.py | 47 + .../models/action_service_beta_condition.py | 96 + ...ion_service_beta_create_target_response.py | 91 + ...ion_service_beta_delete_target_response.py | 87 + .../action_service_beta_event_execution.py | 91 + .../models/action_service_beta_execution.py | 105 + ...tion_service_beta_execution_target_type.py | 89 + .../action_service_beta_function_execution.py | 86 + ...action_service_beta_get_target_response.py | 90 + ...ction_service_beta_in_target_ids_filter.py | 86 + ..._beta_list_execution_functions_response.py | 86 + ...ce_beta_list_execution_methods_response.py | 86 + ...e_beta_list_execution_services_response.py | 86 + ...n_service_beta_list_executions_response.py | 100 + ...tion_service_beta_list_targets_response.py | 100 + .../action_service_beta_pagination_request.py | 90 + ...action_service_beta_pagination_response.py | 88 + .../action_service_beta_request_execution.py | 91 + .../action_service_beta_response_execution.py | 91 + .../models/action_service_beta_rest_call.py | 86 + .../action_service_beta_rest_webhook.py | 86 + ...ion_service_beta_set_execution_response.py | 87 + .../models/action_service_beta_target.py | 107 + .../action_service_beta_target_field_name.py | 44 + .../action_service_beta_target_name_filter.py | 90 + ...ction_service_beta_target_search_filter.py | 90 + .../action_service_beta_text_filter_method.py | 43 + ...ion_service_beta_update_target_response.py | 89 + .../action_service_create_target_request.py | 99 + .../action_service_list_targets_request.py | 103 + .../models/action_service_protobuf_any.py | 86 + .../models/action_service_rpc_status.py | 98 + .../action_service_set_execution_request.py | 100 + .../action_service_update_target_request.py | 101 + ..._service_beta_activate_web_key_response.py | 87 + ...ey_service_beta_create_web_key_response.py | 89 + ...ey_service_beta_delete_web_key_response.py | 87 + .../models/web_key_service_beta_ecdsa.py | 87 + .../web_key_service_beta_ecdsa_curve.py | 39 + ...key_service_beta_list_web_keys_response.py | 94 + .../models/web_key_service_beta_rsa.py | 90 + .../models/web_key_service_beta_rsa_bits.py | 39 + .../models/web_key_service_beta_rsa_hasher.py | 39 + .../models/web_key_service_beta_state.py | 40 + .../models/web_key_service_beta_web_key.py | 102 + .../web_key_service_create_web_key_request.py | 92 + .../models/web_key_service_protobuf_any.py | 86 + .../models/web_key_service_rpc_status.py | 98 + 53 files changed, 8541 insertions(+), 571 deletions(-) create mode 100644 zitadel_client/api/action_service_api.py delete mode 100644 zitadel_client/api/settings_api.py create mode 100644 zitadel_client/api/web_key_service_api.py create mode 100644 zitadel_client/models/action_service_beta_condition.py create mode 100644 zitadel_client/models/action_service_beta_create_target_response.py create mode 100644 zitadel_client/models/action_service_beta_delete_target_response.py create mode 100644 zitadel_client/models/action_service_beta_event_execution.py create mode 100644 zitadel_client/models/action_service_beta_execution.py create mode 100644 zitadel_client/models/action_service_beta_execution_target_type.py create mode 100644 zitadel_client/models/action_service_beta_function_execution.py create mode 100644 zitadel_client/models/action_service_beta_get_target_response.py create mode 100644 zitadel_client/models/action_service_beta_in_target_ids_filter.py create mode 100644 zitadel_client/models/action_service_beta_list_execution_functions_response.py create mode 100644 zitadel_client/models/action_service_beta_list_execution_methods_response.py create mode 100644 zitadel_client/models/action_service_beta_list_execution_services_response.py create mode 100644 zitadel_client/models/action_service_beta_list_executions_response.py create mode 100644 zitadel_client/models/action_service_beta_list_targets_response.py create mode 100644 zitadel_client/models/action_service_beta_pagination_request.py create mode 100644 zitadel_client/models/action_service_beta_pagination_response.py create mode 100644 zitadel_client/models/action_service_beta_request_execution.py create mode 100644 zitadel_client/models/action_service_beta_response_execution.py create mode 100644 zitadel_client/models/action_service_beta_rest_call.py create mode 100644 zitadel_client/models/action_service_beta_rest_webhook.py create mode 100644 zitadel_client/models/action_service_beta_set_execution_response.py create mode 100644 zitadel_client/models/action_service_beta_target.py create mode 100644 zitadel_client/models/action_service_beta_target_field_name.py create mode 100644 zitadel_client/models/action_service_beta_target_name_filter.py create mode 100644 zitadel_client/models/action_service_beta_target_search_filter.py create mode 100644 zitadel_client/models/action_service_beta_text_filter_method.py create mode 100644 zitadel_client/models/action_service_beta_update_target_response.py create mode 100644 zitadel_client/models/action_service_create_target_request.py create mode 100644 zitadel_client/models/action_service_list_targets_request.py create mode 100644 zitadel_client/models/action_service_protobuf_any.py create mode 100644 zitadel_client/models/action_service_rpc_status.py create mode 100644 zitadel_client/models/action_service_set_execution_request.py create mode 100644 zitadel_client/models/action_service_update_target_request.py create mode 100644 zitadel_client/models/web_key_service_beta_activate_web_key_response.py create mode 100644 zitadel_client/models/web_key_service_beta_create_web_key_response.py create mode 100644 zitadel_client/models/web_key_service_beta_delete_web_key_response.py create mode 100644 zitadel_client/models/web_key_service_beta_ecdsa.py create mode 100644 zitadel_client/models/web_key_service_beta_ecdsa_curve.py create mode 100644 zitadel_client/models/web_key_service_beta_list_web_keys_response.py create mode 100644 zitadel_client/models/web_key_service_beta_rsa.py create mode 100644 zitadel_client/models/web_key_service_beta_rsa_bits.py create mode 100644 zitadel_client/models/web_key_service_beta_rsa_hasher.py create mode 100644 zitadel_client/models/web_key_service_beta_state.py create mode 100644 zitadel_client/models/web_key_service_beta_web_key.py create mode 100644 zitadel_client/models/web_key_service_create_web_key_request.py create mode 100644 zitadel_client/models/web_key_service_protobuf_any.py create mode 100644 zitadel_client/models/web_key_service_rpc_status.py diff --git a/zitadel_client/api/__init__.py b/zitadel_client/api/__init__.py index 731569a8..c18ea9a0 100644 --- a/zitadel_client/api/__init__.py +++ b/zitadel_client/api/__init__.py @@ -1,13 +1,14 @@ # flake8: noqa # import apis into api package +from zitadel_client.api.action_service_api import ActionServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi from zitadel_client.api.organization_service_api import OrganizationServiceApi from zitadel_client.api.saml_service_api import SAMLServiceApi from zitadel_client.api.session_service_api import SessionServiceApi -from zitadel_client.api.settings_api import SettingsApi from zitadel_client.api.settings_service_api import SettingsServiceApi from zitadel_client.api.user_service_api import UserServiceApi +from zitadel_client.api.web_key_service_api import WebKeyServiceApi diff --git a/zitadel_client/api/action_service_api.py b/zitadel_client/api/action_service_api.py new file mode 100644 index 00000000..5afad3ab --- /dev/null +++ b/zitadel_client/api/action_service_api.py @@ -0,0 +1,2821 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import Field, StrictBool, StrictInt, StrictStr, field_validator +from typing import Optional +from typing_extensions import Annotated +from zitadel_client.models.action_service_beta_create_target_response import ActionServiceBetaCreateTargetResponse +from zitadel_client.models.action_service_beta_delete_target_response import ActionServiceBetaDeleteTargetResponse +from zitadel_client.models.action_service_beta_get_target_response import ActionServiceBetaGetTargetResponse +from zitadel_client.models.action_service_beta_list_execution_functions_response import ActionServiceBetaListExecutionFunctionsResponse +from zitadel_client.models.action_service_beta_list_execution_methods_response import ActionServiceBetaListExecutionMethodsResponse +from zitadel_client.models.action_service_beta_list_execution_services_response import ActionServiceBetaListExecutionServicesResponse +from zitadel_client.models.action_service_beta_list_executions_response import ActionServiceBetaListExecutionsResponse +from zitadel_client.models.action_service_beta_list_targets_response import ActionServiceBetaListTargetsResponse +from zitadel_client.models.action_service_beta_set_execution_response import ActionServiceBetaSetExecutionResponse +from zitadel_client.models.action_service_beta_update_target_response import ActionServiceBetaUpdateTargetResponse +from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest +from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest +from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest +from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class ActionServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def action_service_create_target( + self, + action_service_create_target_request: ActionServiceCreateTargetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaCreateTargetResponse: + """Create Target + + Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param action_service_create_target_request: (required) + :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_create_target_serialize( + action_service_create_target_request=action_service_create_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaCreateTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + '409': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_create_target_with_http_info( + self, + action_service_create_target_request: ActionServiceCreateTargetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaCreateTargetResponse]: + """Create Target + + Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param action_service_create_target_request: (required) + :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_create_target_serialize( + action_service_create_target_request=action_service_create_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaCreateTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + '409': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_create_target_without_preload_content( + self, + action_service_create_target_request: ActionServiceCreateTargetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Target + + Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param action_service_create_target_request: (required) + :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_create_target_serialize( + action_service_create_target_request=action_service_create_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaCreateTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + '409': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_create_target_serialize( + self, + action_service_create_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if action_service_create_target_request is not None: + _body_params = action_service_create_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/actions/targets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_delete_target( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaDeleteTargetResponse: + """Delete Target + + Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_delete_target_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaDeleteTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_delete_target_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaDeleteTargetResponse]: + """Delete Target + + Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_delete_target_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaDeleteTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_delete_target_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Target + + Delete an existing target. This will remove it from any configured execution as well. In case the target is not found, the request will return a successful response as the desired state is already achieved. Required permission: - `action.target.delete` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_delete_target_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaDeleteTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_delete_target_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2beta/actions/targets/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_get_target( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaGetTargetResponse: + """Get Target + + Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_get_target_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaGetTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_get_target_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaGetTargetResponse]: + """Get Target + + Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_get_target_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaGetTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_get_target_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Target + + Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_get_target_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaGetTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_get_target_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/actions/targets/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_list_execution_functions( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaListExecutionFunctionsResponse: + """List Execution Functions + + List all available functions which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_functions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionFunctionsResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_list_execution_functions_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaListExecutionFunctionsResponse]: + """List Execution Functions + + List all available functions which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_functions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionFunctionsResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_list_execution_functions_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Execution Functions + + List all available functions which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_functions_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionFunctionsResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_list_execution_functions_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/actions/executions/functions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_list_execution_methods( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaListExecutionMethodsResponse: + """List Execution Methods + + List all available methods which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_methods_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionMethodsResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_list_execution_methods_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaListExecutionMethodsResponse]: + """List Execution Methods + + List all available methods which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_methods_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionMethodsResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_list_execution_methods_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Execution Methods + + List all available methods which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_methods_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionMethodsResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_list_execution_methods_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/actions/executions/methods', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_list_execution_services( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaListExecutionServicesResponse: + """List Execution Services + + List all available services which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_services_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionServicesResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_list_execution_services_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaListExecutionServicesResponse]: + """List Execution Services + + List all available services which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_services_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionServicesResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_list_execution_services_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Execution Services + + List all available services which can be used as condition for executions. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_execution_services_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionServicesResponse", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_list_execution_services_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/actions/executions/services', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_list_executions( + self, + pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, + pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, + pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, + sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaListExecutionsResponse: + """List Executions + + List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. + :type pagination_offset: str + :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. + :type pagination_limit: int + :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. + :type pagination_asc: bool + :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + :type sorting_column: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_executions_serialize( + pagination_offset=pagination_offset, + pagination_limit=pagination_limit, + pagination_asc=pagination_asc, + sorting_column=sorting_column, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionsResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_list_executions_with_http_info( + self, + pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, + pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, + pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, + sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaListExecutionsResponse]: + """List Executions + + List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. + :type pagination_offset: str + :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. + :type pagination_limit: int + :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. + :type pagination_asc: bool + :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + :type sorting_column: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_executions_serialize( + pagination_offset=pagination_offset, + pagination_limit=pagination_limit, + pagination_asc=pagination_asc, + sorting_column=sorting_column, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionsResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_list_executions_without_preload_content( + self, + pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, + pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, + pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, + sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Executions + + List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` + + :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. + :type pagination_offset: str + :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. + :type pagination_limit: int + :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. + :type pagination_asc: bool + :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + :type sorting_column: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_executions_serialize( + pagination_offset=pagination_offset, + pagination_limit=pagination_limit, + pagination_asc=pagination_asc, + sorting_column=sorting_column, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListExecutionsResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_list_executions_serialize( + self, + pagination_offset, + pagination_limit, + pagination_asc, + sorting_column, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if pagination_offset is not None: + + _query_params.append(('pagination.offset', pagination_offset)) + + if pagination_limit is not None: + + _query_params.append(('pagination.limit', pagination_limit)) + + if pagination_asc is not None: + + _query_params.append(('pagination.asc', pagination_asc)) + + if sorting_column is not None: + + _query_params.append(('sortingColumn', sorting_column)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/actions/executions/_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_list_targets( + self, + action_service_list_targets_request: ActionServiceListTargetsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaListTargetsResponse: + """List targets + + List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param action_service_list_targets_request: (required) + :type action_service_list_targets_request: ActionServiceListTargetsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_targets_serialize( + action_service_list_targets_request=action_service_list_targets_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListTargetsResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_list_targets_with_http_info( + self, + action_service_list_targets_request: ActionServiceListTargetsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaListTargetsResponse]: + """List targets + + List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param action_service_list_targets_request: (required) + :type action_service_list_targets_request: ActionServiceListTargetsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_targets_serialize( + action_service_list_targets_request=action_service_list_targets_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListTargetsResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_list_targets_without_preload_content( + self, + action_service_list_targets_request: ActionServiceListTargetsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List targets + + List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param action_service_list_targets_request: (required) + :type action_service_list_targets_request: ActionServiceListTargetsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_list_targets_serialize( + action_service_list_targets_request=action_service_list_targets_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaListTargetsResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_list_targets_serialize( + self, + action_service_list_targets_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if action_service_list_targets_request is not None: + _body_params = action_service_list_targets_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/actions/targets/_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_set_execution( + self, + action_service_set_execution_request: ActionServiceSetExecutionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaSetExecutionResponse: + """Set Execution + + Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` + + :param action_service_set_execution_request: (required) + :type action_service_set_execution_request: ActionServiceSetExecutionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_set_execution_serialize( + action_service_set_execution_request=action_service_set_execution_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaSetExecutionResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_set_execution_with_http_info( + self, + action_service_set_execution_request: ActionServiceSetExecutionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaSetExecutionResponse]: + """Set Execution + + Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` + + :param action_service_set_execution_request: (required) + :type action_service_set_execution_request: ActionServiceSetExecutionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_set_execution_serialize( + action_service_set_execution_request=action_service_set_execution_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaSetExecutionResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_set_execution_without_preload_content( + self, + action_service_set_execution_request: ActionServiceSetExecutionRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Execution + + Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` + + :param action_service_set_execution_request: (required) + :type action_service_set_execution_request: ActionServiceSetExecutionRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_set_execution_serialize( + action_service_set_execution_request=action_service_set_execution_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaSetExecutionResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "ActionServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_set_execution_serialize( + self, + action_service_set_execution_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if action_service_set_execution_request is not None: + _body_params = action_service_set_execution_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v2beta/actions/executions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def action_service_update_target( + self, + id: StrictStr, + action_service_update_target_request: ActionServiceUpdateTargetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ActionServiceBetaUpdateTargetResponse: + """Update Target + + Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param action_service_update_target_request: (required) + :type action_service_update_target_request: ActionServiceUpdateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_update_target_serialize( + id=id, + action_service_update_target_request=action_service_update_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaUpdateTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def action_service_update_target_with_http_info( + self, + id: StrictStr, + action_service_update_target_request: ActionServiceUpdateTargetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[ActionServiceBetaUpdateTargetResponse]: + """Update Target + + Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param action_service_update_target_request: (required) + :type action_service_update_target_request: ActionServiceUpdateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_update_target_serialize( + id=id, + action_service_update_target_request=action_service_update_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaUpdateTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def action_service_update_target_without_preload_content( + self, + id: StrictStr, + action_service_update_target_request: ActionServiceUpdateTargetRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Update Target + + Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` + + :param id: (required) + :type id: str + :param action_service_update_target_request: (required) + :type action_service_update_target_request: ActionServiceUpdateTargetRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._action_service_update_target_serialize( + id=id, + action_service_update_target_request=action_service_update_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceBetaUpdateTargetResponse", + '400': "object", + '403': "ActionServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _action_service_update_target_serialize( + self, + id, + action_service_update_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if action_service_update_target_request is not None: + _body_params = action_service_update_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/actions/targets/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/settings_api.py b/zitadel_client/api/settings_api.py deleted file mode 100644 index 29e7981a..00000000 --- a/zitadel_client/api/settings_api.py +++ /dev/null @@ -1,570 +0,0 @@ -# coding: utf-8 - -""" - Zitadel SDK - - The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. - - The version of the OpenAPI document: 1.0.0 - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from zitadel_client.models.settings_service_get_security_settings_response import SettingsServiceGetSecuritySettingsResponse -from zitadel_client.models.settings_service_set_security_settings_request import SettingsServiceSetSecuritySettingsRequest -from zitadel_client.models.settings_service_set_security_settings_response import SettingsServiceSetSecuritySettingsResponse - -from zitadel_client.api_client import ApiClient, RequestSerialized -from zitadel_client.api_response import ApiResponse -from zitadel_client.rest import RESTResponseType - - -class SettingsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def settings_service_get_security_settings( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceGetSecuritySettingsResponse: - """Get Security Settings - - Returns the security settings of the ZITADEL instance. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_security_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_security_settings_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetSecuritySettingsResponse]: - """Get Security Settings - - Returns the security settings of the ZITADEL instance. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_security_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_security_settings_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Security Settings - - Returns the security settings of the ZITADEL instance. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_security_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_security_settings_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/security', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_set_security_settings( - self, - settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceSetSecuritySettingsResponse: - """Set Security Settings - - Set the security settings of the ZITADEL instance. - - :param settings_service_set_security_settings_request: (required) - :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_set_security_settings_serialize( - settings_service_set_security_settings_request=settings_service_set_security_settings_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_set_security_settings_with_http_info( - self, - settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceSetSecuritySettingsResponse]: - """Set Security Settings - - Set the security settings of the ZITADEL instance. - - :param settings_service_set_security_settings_request: (required) - :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_set_security_settings_serialize( - settings_service_set_security_settings_request=settings_service_set_security_settings_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_set_security_settings_without_preload_content( - self, - settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set Security Settings - - Set the security settings of the ZITADEL instance. - - :param settings_service_set_security_settings_request: (required) - :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_set_security_settings_serialize( - settings_service_set_security_settings_request=settings_service_set_security_settings_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_set_security_settings_serialize( - self, - settings_service_set_security_settings_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if settings_service_set_security_settings_request is not None: - _body_params = settings_service_set_security_settings_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/policies/security', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/zitadel_client/api/settings_service_api.py b/zitadel_client/api/settings_service_api.py index 351a04d7..2a59f07a 100644 --- a/zitadel_client/api/settings_service_api.py +++ b/zitadel_client/api/settings_service_api.py @@ -27,6 +27,9 @@ from zitadel_client.models.settings_service_get_login_settings_response import SettingsServiceGetLoginSettingsResponse from zitadel_client.models.settings_service_get_password_complexity_settings_response import SettingsServiceGetPasswordComplexitySettingsResponse from zitadel_client.models.settings_service_get_password_expiry_settings_response import SettingsServiceGetPasswordExpirySettingsResponse +from zitadel_client.models.settings_service_get_security_settings_response import SettingsServiceGetSecuritySettingsResponse +from zitadel_client.models.settings_service_set_security_settings_request import SettingsServiceSetSecuritySettingsRequest +from zitadel_client.models.settings_service_set_security_settings_response import SettingsServiceSetSecuritySettingsResponse from zitadel_client.api_client import ApiClient, RequestSerialized from zitadel_client.api_response import ApiResponse @@ -2652,3 +2655,535 @@ def _settings_service_get_password_expiry_settings_serialize( ) + + + @validate_call + def settings_service_get_security_settings( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SettingsServiceGetSecuritySettingsResponse: + """Get Security Settings + + Returns the security settings of the ZITADEL instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._settings_service_get_security_settings_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceGetSecuritySettingsResponse", + '403': "SettingsServiceRpcStatus", + '404': "SettingsServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def settings_service_get_security_settings_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SettingsServiceGetSecuritySettingsResponse]: + """Get Security Settings + + Returns the security settings of the ZITADEL instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._settings_service_get_security_settings_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceGetSecuritySettingsResponse", + '403': "SettingsServiceRpcStatus", + '404': "SettingsServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def settings_service_get_security_settings_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Security Settings + + Returns the security settings of the ZITADEL instance. + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._settings_service_get_security_settings_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceGetSecuritySettingsResponse", + '403': "SettingsServiceRpcStatus", + '404': "SettingsServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _settings_service_get_security_settings_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/settings/security', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def settings_service_set_security_settings( + self, + settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> SettingsServiceSetSecuritySettingsResponse: + """Set Security Settings + + Set the security settings of the ZITADEL instance. + + :param settings_service_set_security_settings_request: (required) + :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._settings_service_set_security_settings_serialize( + settings_service_set_security_settings_request=settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceSetSecuritySettingsResponse", + '403': "SettingsServiceRpcStatus", + '404': "SettingsServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def settings_service_set_security_settings_with_http_info( + self, + settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[SettingsServiceSetSecuritySettingsResponse]: + """Set Security Settings + + Set the security settings of the ZITADEL instance. + + :param settings_service_set_security_settings_request: (required) + :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._settings_service_set_security_settings_serialize( + settings_service_set_security_settings_request=settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceSetSecuritySettingsResponse", + '403': "SettingsServiceRpcStatus", + '404': "SettingsServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def settings_service_set_security_settings_without_preload_content( + self, + settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Set Security Settings + + Set the security settings of the ZITADEL instance. + + :param settings_service_set_security_settings_request: (required) + :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._settings_service_set_security_settings_serialize( + settings_service_set_security_settings_request=settings_service_set_security_settings_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "SettingsServiceSetSecuritySettingsResponse", + '403': "SettingsServiceRpcStatus", + '404': "SettingsServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _settings_service_set_security_settings_serialize( + self, + settings_service_set_security_settings_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if settings_service_set_security_settings_request is not None: + _body_params = settings_service_set_security_settings_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v2/policies/security', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/api/web_key_service_api.py b/zitadel_client/api/web_key_service_api.py new file mode 100644 index 00000000..bf3b1c15 --- /dev/null +++ b/zitadel_client/api/web_key_service_api.py @@ -0,0 +1,1119 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictStr +from zitadel_client.models.web_key_service_beta_activate_web_key_response import WebKeyServiceBetaActivateWebKeyResponse +from zitadel_client.models.web_key_service_beta_create_web_key_response import WebKeyServiceBetaCreateWebKeyResponse +from zitadel_client.models.web_key_service_beta_delete_web_key_response import WebKeyServiceBetaDeleteWebKeyResponse +from zitadel_client.models.web_key_service_beta_list_web_keys_response import WebKeyServiceBetaListWebKeysResponse +from zitadel_client.models.web_key_service_create_web_key_request import WebKeyServiceCreateWebKeyRequest + +from zitadel_client.api_client import ApiClient, RequestSerialized +from zitadel_client.api_response import ApiResponse +from zitadel_client.rest import RESTResponseType + + +class WebKeyServiceApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def web_key_service_activate_web_key( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebKeyServiceBetaActivateWebKeyResponse: + """Activate Web Key + + Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_activate_web_key_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaActivateWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def web_key_service_activate_web_key_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebKeyServiceBetaActivateWebKeyResponse]: + """Activate Web Key + + Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_activate_web_key_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaActivateWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def web_key_service_activate_web_key_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Activate Web Key + + Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_activate_web_key_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaActivateWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "object", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _web_key_service_activate_web_key_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/web_keys/{id}/activate', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def web_key_service_create_web_key( + self, + web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebKeyServiceBetaCreateWebKeyResponse: + """Create Web Key + + Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param web_key_service_create_web_key_request: (required) + :type web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_create_web_key_serialize( + web_key_service_create_web_key_request=web_key_service_create_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaCreateWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def web_key_service_create_web_key_with_http_info( + self, + web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebKeyServiceBetaCreateWebKeyResponse]: + """Create Web Key + + Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param web_key_service_create_web_key_request: (required) + :type web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_create_web_key_serialize( + web_key_service_create_web_key_request=web_key_service_create_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaCreateWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def web_key_service_create_web_key_without_preload_content( + self, + web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Create Web Key + + Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` + + :param web_key_service_create_web_key_request: (required) + :type web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_create_web_key_serialize( + web_key_service_create_web_key_request=web_key_service_create_web_key_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaCreateWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _web_key_service_create_web_key_serialize( + self, + web_key_service_create_web_key_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if web_key_service_create_web_key_request is not None: + _body_params = web_key_service_create_web_key_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/web_keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def web_key_service_delete_web_key( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebKeyServiceBetaDeleteWebKeyResponse: + """Delete Web Key + + Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_delete_web_key_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaDeleteWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def web_key_service_delete_web_key_with_http_info( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebKeyServiceBetaDeleteWebKeyResponse]: + """Delete Web Key + + Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_delete_web_key_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaDeleteWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def web_key_service_delete_web_key_without_preload_content( + self, + id: StrictStr, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Delete Web Key + + Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` + + :param id: (required) + :type id: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_delete_web_key_serialize( + id=id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaDeleteWebKeyResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _web_key_service_delete_web_key_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2beta/web_keys/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def web_key_service_list_web_keys( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> WebKeyServiceBetaListWebKeysResponse: + """List Web Keys + + List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_list_web_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaListWebKeysResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def web_key_service_list_web_keys_with_http_info( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[WebKeyServiceBetaListWebKeysResponse]: + """List Web Keys + + List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_list_web_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaListWebKeysResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def web_key_service_list_web_keys_without_preload_content( + self, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """List Web Keys + + List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` + + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._web_key_service_list_web_keys_serialize( + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "WebKeyServiceBetaListWebKeysResponse", + '400': "object", + '403': "WebKeyServiceRpcStatus", + '404': "WebKeyServiceRpcStatus", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _web_key_service_list_web_keys_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/web_keys', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/zitadel_client/models/__init__.py b/zitadel_client/models/__init__.py index 018f7619..93015d7f 100644 --- a/zitadel_client/models/__init__.py +++ b/zitadel_client/models/__init__.py @@ -14,6 +14,39 @@ # import models into model package +from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from zitadel_client.models.action_service_beta_create_target_response import ActionServiceBetaCreateTargetResponse +from zitadel_client.models.action_service_beta_delete_target_response import ActionServiceBetaDeleteTargetResponse +from zitadel_client.models.action_service_beta_event_execution import ActionServiceBetaEventExecution +from zitadel_client.models.action_service_beta_execution import ActionServiceBetaExecution +from zitadel_client.models.action_service_beta_execution_target_type import ActionServiceBetaExecutionTargetType +from zitadel_client.models.action_service_beta_function_execution import ActionServiceBetaFunctionExecution +from zitadel_client.models.action_service_beta_get_target_response import ActionServiceBetaGetTargetResponse +from zitadel_client.models.action_service_beta_in_target_ids_filter import ActionServiceBetaInTargetIDsFilter +from zitadel_client.models.action_service_beta_list_execution_functions_response import ActionServiceBetaListExecutionFunctionsResponse +from zitadel_client.models.action_service_beta_list_execution_methods_response import ActionServiceBetaListExecutionMethodsResponse +from zitadel_client.models.action_service_beta_list_execution_services_response import ActionServiceBetaListExecutionServicesResponse +from zitadel_client.models.action_service_beta_list_executions_response import ActionServiceBetaListExecutionsResponse +from zitadel_client.models.action_service_beta_list_targets_response import ActionServiceBetaListTargetsResponse +from zitadel_client.models.action_service_beta_pagination_request import ActionServiceBetaPaginationRequest +from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse +from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall +from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook +from zitadel_client.models.action_service_beta_request_execution import ActionServiceBetaRequestExecution +from zitadel_client.models.action_service_beta_response_execution import ActionServiceBetaResponseExecution +from zitadel_client.models.action_service_beta_set_execution_response import ActionServiceBetaSetExecutionResponse +from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from zitadel_client.models.action_service_beta_target_field_name import ActionServiceBetaTargetFieldName +from zitadel_client.models.action_service_beta_target_name_filter import ActionServiceBetaTargetNameFilter +from zitadel_client.models.action_service_beta_target_search_filter import ActionServiceBetaTargetSearchFilter +from zitadel_client.models.action_service_beta_text_filter_method import ActionServiceBetaTextFilterMethod +from zitadel_client.models.action_service_beta_update_target_response import ActionServiceBetaUpdateTargetResponse +from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest +from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest +from zitadel_client.models.action_service_protobuf_any import ActionServiceProtobufAny +from zitadel_client.models.action_service_rpc_status import ActionServiceRpcStatus +from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest +from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest from zitadel_client.models.feature_service_details import FeatureServiceDetails from zitadel_client.models.feature_service_feature_flag import FeatureServiceFeatureFlag from zitadel_client.models.feature_service_get_instance_features_response import FeatureServiceGetInstanceFeaturesResponse @@ -331,5 +364,19 @@ from zitadel_client.models.user_service_verify_totp_registration_response import UserServiceVerifyTOTPRegistrationResponse from zitadel_client.models.user_service_verify_u2_f_registration_request import UserServiceVerifyU2FRegistrationRequest from zitadel_client.models.user_service_verify_u2_f_registration_response import UserServiceVerifyU2FRegistrationResponse +from zitadel_client.models.web_key_service_beta_activate_web_key_response import WebKeyServiceBetaActivateWebKeyResponse +from zitadel_client.models.web_key_service_beta_create_web_key_response import WebKeyServiceBetaCreateWebKeyResponse +from zitadel_client.models.web_key_service_beta_delete_web_key_response import WebKeyServiceBetaDeleteWebKeyResponse +from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA +from zitadel_client.models.web_key_service_beta_ecdsa_curve import WebKeyServiceBetaECDSACurve +from zitadel_client.models.web_key_service_beta_list_web_keys_response import WebKeyServiceBetaListWebKeysResponse +from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA +from zitadel_client.models.web_key_service_beta_rsa_bits import WebKeyServiceBetaRSABits +from zitadel_client.models.web_key_service_beta_rsa_hasher import WebKeyServiceBetaRSAHasher +from zitadel_client.models.web_key_service_beta_state import WebKeyServiceBetaState +from zitadel_client.models.web_key_service_beta_web_key import WebKeyServiceBetaWebKey +from zitadel_client.models.web_key_service_create_web_key_request import WebKeyServiceCreateWebKeyRequest +from zitadel_client.models.web_key_service_protobuf_any import WebKeyServiceProtobufAny +from zitadel_client.models.web_key_service_rpc_status import WebKeyServiceRpcStatus from zitadel_client.models.zitadelobjectv2_organization import Zitadelobjectv2Organization from zitadel_client.models.zitadelorgv2_organization import Zitadelorgv2Organization diff --git a/zitadel_client/models/action_service_beta_condition.py b/zitadel_client/models/action_service_beta_condition.py new file mode 100644 index 00000000..d8fc622f --- /dev/null +++ b/zitadel_client/models/action_service_beta_condition.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_event_execution import ActionServiceBetaEventExecution +from zitadel_client.models.action_service_beta_function_execution import ActionServiceBetaFunctionExecution +from zitadel_client.models.action_service_beta_request_execution import ActionServiceBetaRequestExecution +from zitadel_client.models.action_service_beta_response_execution import ActionServiceBetaResponseExecution +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaCondition(BaseModel): + """ + ActionServiceBetaCondition + """ # noqa: E501 + request: Optional[ActionServiceBetaRequestExecution] = None + response: Optional[ActionServiceBetaResponseExecution] = None + function: Optional[ActionServiceBetaFunctionExecution] = None + event: Optional[ActionServiceBetaEventExecution] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaCondition from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "request": ActionServiceBetaRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None, + "response": ActionServiceBetaResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None, + "function": ActionServiceBetaFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None, + "event": ActionServiceBetaEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_create_target_response.py b/zitadel_client/models/action_service_beta_create_target_response.py new file mode 100644 index 00000000..d13b9481 --- /dev/null +++ b/zitadel_client/models/action_service_beta_create_target_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaCreateTargetResponse(BaseModel): + """ + ActionServiceBetaCreateTargetResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created target.") + creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaCreateTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaCreateTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_delete_target_response.py b/zitadel_client/models/action_service_beta_delete_target_response.py new file mode 100644 index 00000000..d25a2fad --- /dev/null +++ b/zitadel_client/models/action_service_beta_delete_target_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaDeleteTargetResponse(BaseModel): + """ + ActionServiceBetaDeleteTargetResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="The timestamp of the deletion of the target. Note that the deletion date is only guaranteed to be set if the deletion was successful during the request. In case the deletion occurred in a previous request, the deletion date might be empty.", alias="deletionDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaDeleteTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaDeleteTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_event_execution.py b/zitadel_client/models/action_service_beta_event_execution.py new file mode 100644 index 00000000..5bf99774 --- /dev/null +++ b/zitadel_client/models/action_service_beta_event_execution.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaEventExecution(BaseModel): + """ + ActionServiceBetaEventExecution + """ # noqa: E501 + event: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event name as condition.") + group: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event group as condition, all events under this group.") + all: Optional[StrictBool] = Field(default=None, description="all events as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaEventExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaEventExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "event": obj.get("event"), + "group": obj.get("group"), + "all": obj.get("all") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_execution.py b/zitadel_client/models/action_service_beta_execution.py new file mode 100644 index 00000000..c2ce5a31 --- /dev/null +++ b/zitadel_client/models/action_service_beta_execution.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from zitadel_client.models.action_service_beta_execution_target_type import ActionServiceBetaExecutionTargetType +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaExecution(BaseModel): + """ + ActionServiceBetaExecution + """ # noqa: E501 + condition: Optional[ActionServiceBetaCondition] = None + creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution creation.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the execution.", alias="changeDate") + targets: Optional[List[ActionServiceBetaExecutionTargetType]] = Field(default=None, description="Ordered list of targets/includes called during the execution.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of condition + if self.condition: + _dict['condition'] = self.condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in targets (list) + _items = [] + if self.targets: + for _item_targets in self.targets: + if _item_targets: + _items.append(_item_targets.to_dict()) + _dict['targets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "targets": [ActionServiceBetaExecutionTargetType.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_execution_target_type.py b/zitadel_client/models/action_service_beta_execution_target_type.py new file mode 100644 index 00000000..808bf383 --- /dev/null +++ b/zitadel_client/models/action_service_beta_execution_target_type.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaExecutionTargetType(BaseModel): + """ + ActionServiceBetaExecutionTargetType + """ # noqa: E501 + target: Optional[StrictStr] = Field(default=None, description="Unique identifier of existing target to call.") + include: Optional[ActionServiceBetaCondition] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaExecutionTargetType from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaExecutionTargetType from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "target": obj.get("target"), + "include": ActionServiceBetaCondition.from_dict(obj["include"]) if obj.get("include") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_function_execution.py b/zitadel_client/models/action_service_beta_function_execution.py new file mode 100644 index 00000000..4e10174c --- /dev/null +++ b/zitadel_client/models/action_service_beta_function_execution.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaFunctionExecution(BaseModel): + """ + ActionServiceBetaFunctionExecution + """ # noqa: E501 + name: Optional[StrictStr] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaFunctionExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaFunctionExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_get_target_response.py b/zitadel_client/models/action_service_beta_get_target_response.py new file mode 100644 index 00000000..5c23917a --- /dev/null +++ b/zitadel_client/models/action_service_beta_get_target_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaGetTargetResponse(BaseModel): + """ + ActionServiceBetaGetTargetResponse + """ # noqa: E501 + target: Optional[ActionServiceBetaTarget] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaGetTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of target + if self.target: + _dict['target'] = self.target.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaGetTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "target": ActionServiceBetaTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_in_target_ids_filter.py b/zitadel_client/models/action_service_beta_in_target_ids_filter.py new file mode 100644 index 00000000..d26f8389 --- /dev/null +++ b/zitadel_client/models/action_service_beta_in_target_ids_filter.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaInTargetIDsFilter(BaseModel): + """ + ActionServiceBetaInTargetIDsFilter + """ # noqa: E501 + target_ids: Optional[List[StrictStr]] = Field(default=None, description="the ids of the targets to include", alias="targetIds") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaInTargetIDsFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaInTargetIDsFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetIds": obj.get("targetIds") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_execution_functions_response.py b/zitadel_client/models/action_service_beta_list_execution_functions_response.py new file mode 100644 index 00000000..eff2f1d5 --- /dev/null +++ b/zitadel_client/models/action_service_beta_list_execution_functions_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaListExecutionFunctionsResponse(BaseModel): + """ + ActionServiceBetaListExecutionFunctionsResponse + """ # noqa: E501 + functions: Optional[List[StrictStr]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionFunctionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionFunctionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "functions": obj.get("functions") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_execution_methods_response.py b/zitadel_client/models/action_service_beta_list_execution_methods_response.py new file mode 100644 index 00000000..87aa02d8 --- /dev/null +++ b/zitadel_client/models/action_service_beta_list_execution_methods_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaListExecutionMethodsResponse(BaseModel): + """ + ActionServiceBetaListExecutionMethodsResponse + """ # noqa: E501 + methods: Optional[List[StrictStr]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionMethodsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionMethodsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "methods": obj.get("methods") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_execution_services_response.py b/zitadel_client/models/action_service_beta_list_execution_services_response.py new file mode 100644 index 00000000..10f01bb2 --- /dev/null +++ b/zitadel_client/models/action_service_beta_list_execution_services_response.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaListExecutionServicesResponse(BaseModel): + """ + ActionServiceBetaListExecutionServicesResponse + """ # noqa: E501 + services: Optional[List[StrictStr]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionServicesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionServicesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "services": obj.get("services") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_executions_response.py b/zitadel_client/models/action_service_beta_list_executions_response.py new file mode 100644 index 00000000..e401be66 --- /dev/null +++ b/zitadel_client/models/action_service_beta_list_executions_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_execution import ActionServiceBetaExecution +from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaListExecutionsResponse(BaseModel): + """ + ActionServiceBetaListExecutionsResponse + """ # noqa: E501 + pagination: Optional[ActionServiceBetaPaginationResponse] = None + result: Optional[List[ActionServiceBetaExecution]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaListExecutionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [ActionServiceBetaExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_list_targets_response.py b/zitadel_client/models/action_service_beta_list_targets_response.py new file mode 100644 index 00000000..ea3a6666 --- /dev/null +++ b/zitadel_client/models/action_service_beta_list_targets_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_pagination_response import ActionServiceBetaPaginationResponse +from zitadel_client.models.action_service_beta_target import ActionServiceBetaTarget +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaListTargetsResponse(BaseModel): + """ + ActionServiceBetaListTargetsResponse + """ # noqa: E501 + pagination: Optional[ActionServiceBetaPaginationResponse] = None + result: Optional[List[ActionServiceBetaTarget]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaListTargetsResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in result (list) + _items = [] + if self.result: + for _item_result in self.result: + if _item_result: + _items.append(_item_result.to_dict()) + _dict['result'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaListTargetsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "result": [ActionServiceBetaTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_pagination_request.py b/zitadel_client/models/action_service_beta_pagination_request.py new file mode 100644 index 00000000..203eda76 --- /dev/null +++ b/zitadel_client/models/action_service_beta_pagination_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaPaginationRequest(BaseModel): + """ + ActionServiceBetaPaginationRequest + """ # noqa: E501 + offset: Optional[StrictStr] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") + limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") + asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaPaginationRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaPaginationRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "offset": obj.get("offset"), + "limit": obj.get("limit"), + "asc": obj.get("asc") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_pagination_response.py b/zitadel_client/models/action_service_beta_pagination_response.py new file mode 100644 index 00000000..ffc0b972 --- /dev/null +++ b/zitadel_client/models/action_service_beta_pagination_response.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaPaginationResponse(BaseModel): + """ + ActionServiceBetaPaginationResponse + """ # noqa: E501 + total_result: Optional[StrictStr] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[StrictStr] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaPaginationResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaPaginationResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "totalResult": obj.get("totalResult"), + "appliedLimit": obj.get("appliedLimit") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_request_execution.py b/zitadel_client/models/action_service_beta_request_execution.py new file mode 100644 index 00000000..b4f9848a --- /dev/null +++ b/zitadel_client/models/action_service_beta_request_execution.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaRequestExecution(BaseModel): + """ + ActionServiceBetaRequestExecution + """ # noqa: E501 + method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") + service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") + all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaRequestExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaRequestExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "method": obj.get("method"), + "service": obj.get("service"), + "all": obj.get("all") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_response_execution.py b/zitadel_client/models/action_service_beta_response_execution.py new file mode 100644 index 00000000..761ee4bd --- /dev/null +++ b/zitadel_client/models/action_service_beta_response_execution.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaResponseExecution(BaseModel): + """ + ActionServiceBetaResponseExecution + """ # noqa: E501 + method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") + service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") + all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaResponseExecution from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaResponseExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "method": obj.get("method"), + "service": obj.get("service"), + "all": obj.get("all") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_rest_call.py b/zitadel_client/models/action_service_beta_rest_call.py new file mode 100644 index 00000000..d1aa3e9a --- /dev/null +++ b/zitadel_client/models/action_service_beta_rest_call.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaRESTCall(BaseModel): + """ + ActionServiceBetaRESTCall + """ # noqa: E501 + interrupt_on_error: Optional[StrictBool] = Field(default=None, description="Define if any error stops the whole execution. By default the process continues as normal.", alias="interruptOnError") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaRESTCall from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaRESTCall from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interruptOnError": obj.get("interruptOnError") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_rest_webhook.py b/zitadel_client/models/action_service_beta_rest_webhook.py new file mode 100644 index 00000000..fd90bf0e --- /dev/null +++ b/zitadel_client/models/action_service_beta_rest_webhook.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaRESTWebhook(BaseModel): + """ + ActionServiceBetaRESTWebhook + """ # noqa: E501 + interrupt_on_error: Optional[StrictBool] = Field(default=None, description="Define if any error stops the whole execution. By default the process continues as normal.", alias="interruptOnError") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaRESTWebhook from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaRESTWebhook from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "interruptOnError": obj.get("interruptOnError") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_set_execution_response.py b/zitadel_client/models/action_service_beta_set_execution_response.py new file mode 100644 index 00000000..31850e3e --- /dev/null +++ b/zitadel_client/models/action_service_beta_set_execution_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaSetExecutionResponse(BaseModel): + """ + ActionServiceBetaSetExecutionResponse + """ # noqa: E501 + set_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution set.", alias="setDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaSetExecutionResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaSetExecutionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "setDate": obj.get("setDate") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_target.py b/zitadel_client/models/action_service_beta_target.py new file mode 100644 index 00000000..9c22e516 --- /dev/null +++ b/zitadel_client/models/action_service_beta_target.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall +from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaTarget(BaseModel): + """ + ActionServiceBetaTarget + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the target.") + creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the target (e.g. creation, activation, deactivation).", alias="changeDate") + name: Optional[StrictStr] = None + rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") + rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") + endpoint: Optional[StrictStr] = None + signing_key: Optional[StrictStr] = Field(default=None, alias="signingKey") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaTarget from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaTarget from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "name": obj.get("name"), + "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, + "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restAsync": obj.get("restAsync"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_target_field_name.py b/zitadel_client/models/action_service_beta_target_field_name.py new file mode 100644 index 00000000..3027395e --- /dev/null +++ b/zitadel_client/models/action_service_beta_target_field_name.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ActionServiceBetaTargetFieldName(str, Enum): + """ + ActionServiceBetaTargetFieldName + """ + + """ + allowed enum values + """ + TARGET_FIELD_NAME_UNSPECIFIED = 'TARGET_FIELD_NAME_UNSPECIFIED' + TARGET_FIELD_NAME_ID = 'TARGET_FIELD_NAME_ID' + TARGET_FIELD_NAME_CREATED_DATE = 'TARGET_FIELD_NAME_CREATED_DATE' + TARGET_FIELD_NAME_CHANGED_DATE = 'TARGET_FIELD_NAME_CHANGED_DATE' + TARGET_FIELD_NAME_NAME = 'TARGET_FIELD_NAME_NAME' + TARGET_FIELD_NAME_TARGET_TYPE = 'TARGET_FIELD_NAME_TARGET_TYPE' + TARGET_FIELD_NAME_URL = 'TARGET_FIELD_NAME_URL' + TARGET_FIELD_NAME_TIMEOUT = 'TARGET_FIELD_NAME_TIMEOUT' + TARGET_FIELD_NAME_INTERRUPT_ON_ERROR = 'TARGET_FIELD_NAME_INTERRUPT_ON_ERROR' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ActionServiceBetaTargetFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_beta_target_name_filter.py b/zitadel_client/models/action_service_beta_target_name_filter.py new file mode 100644 index 00000000..20ed7475 --- /dev/null +++ b/zitadel_client/models/action_service_beta_target_name_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from zitadel_client.models.action_service_beta_text_filter_method import ActionServiceBetaTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaTargetNameFilter(BaseModel): + """ + ActionServiceBetaTargetNameFilter + """ # noqa: E501 + target_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Defines the name of the target to query for.", alias="targetName") + method: Optional[ActionServiceBetaTextFilterMethod] = ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaTargetNameFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaTargetNameFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetName": obj.get("targetName"), + "method": obj.get("method") if obj.get("method") is not None else ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_target_search_filter.py b/zitadel_client/models/action_service_beta_target_search_filter.py new file mode 100644 index 00000000..19fc84c4 --- /dev/null +++ b/zitadel_client/models/action_service_beta_target_search_filter.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_in_target_ids_filter import ActionServiceBetaInTargetIDsFilter +from zitadel_client.models.action_service_beta_target_name_filter import ActionServiceBetaTargetNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaTargetSearchFilter(BaseModel): + """ + ActionServiceBetaTargetSearchFilter + """ # noqa: E501 + target_name_filter: Optional[ActionServiceBetaTargetNameFilter] = Field(default=None, alias="targetNameFilter") + in_target_ids_filter: Optional[ActionServiceBetaInTargetIDsFilter] = Field(default=None, alias="inTargetIdsFilter") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaTargetSearchFilter from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaTargetSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetNameFilter": ActionServiceBetaTargetNameFilter.from_dict(obj["targetNameFilter"]) if obj.get("targetNameFilter") is not None else None, + "inTargetIdsFilter": ActionServiceBetaInTargetIDsFilter.from_dict(obj["inTargetIdsFilter"]) if obj.get("inTargetIdsFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_beta_text_filter_method.py b/zitadel_client/models/action_service_beta_text_filter_method.py new file mode 100644 index 00000000..4663edd3 --- /dev/null +++ b/zitadel_client/models/action_service_beta_text_filter_method.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class ActionServiceBetaTextFilterMethod(str, Enum): + """ + ActionServiceBetaTextFilterMethod + """ + + """ + allowed enum values + """ + TEXT_FILTER_METHOD_EQUALS = 'TEXT_FILTER_METHOD_EQUALS' + TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE = 'TEXT_FILTER_METHOD_EQUALS_IGNORE_CASE' + TEXT_FILTER_METHOD_STARTS_WITH = 'TEXT_FILTER_METHOD_STARTS_WITH' + TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_STARTS_WITH_IGNORE_CASE' + TEXT_FILTER_METHOD_CONTAINS = 'TEXT_FILTER_METHOD_CONTAINS' + TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE = 'TEXT_FILTER_METHOD_CONTAINS_IGNORE_CASE' + TEXT_FILTER_METHOD_ENDS_WITH = 'TEXT_FILTER_METHOD_ENDS_WITH' + TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE = 'TEXT_FILTER_METHOD_ENDS_WITH_IGNORE_CASE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ActionServiceBetaTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_beta_update_target_response.py b/zitadel_client/models/action_service_beta_update_target_response.py new file mode 100644 index 00000000..0056e065 --- /dev/null +++ b/zitadel_client/models/action_service_beta_update_target_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceBetaUpdateTargetResponse(BaseModel): + """ + ActionServiceBetaUpdateTargetResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="The timestamp of the change of the target.", alias="changeDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceBetaUpdateTargetResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceBetaUpdateTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate"), + "signingKey": obj.get("signingKey") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_create_target_request.py b/zitadel_client/models/action_service_create_target_request.py new file mode 100644 index 00000000..8264c755 --- /dev/null +++ b/zitadel_client/models/action_service_create_target_request.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall +from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceCreateTargetRequest(BaseModel): + """ + ActionServiceCreateTargetRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None + rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") + rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") + endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceCreateTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceCreateTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, + "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restAsync": obj.get("restAsync"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_list_targets_request.py b/zitadel_client/models/action_service_list_targets_request.py new file mode 100644 index 00000000..8edc97d0 --- /dev/null +++ b/zitadel_client/models/action_service_list_targets_request.py @@ -0,0 +1,103 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_pagination_request import ActionServiceBetaPaginationRequest +from zitadel_client.models.action_service_beta_target_field_name import ActionServiceBetaTargetFieldName +from zitadel_client.models.action_service_beta_target_search_filter import ActionServiceBetaTargetSearchFilter +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceListTargetsRequest(BaseModel): + """ + ActionServiceListTargetsRequest + """ # noqa: E501 + pagination: Optional[ActionServiceBetaPaginationRequest] = None + sorting_column: Optional[ActionServiceBetaTargetFieldName] = Field(default=ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") + filters: Optional[List[ActionServiceBetaTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceListTargetsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in filters (list) + _items = [] + if self.filters: + for _item_filters in self.filters: + if _item_filters: + _items.append(_item_filters.to_dict()) + _dict['filters'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceListTargetsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": ActionServiceBetaPaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, + "filters": [ActionServiceBetaTargetSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_protobuf_any.py b/zitadel_client/models/action_service_protobuf_any.py new file mode 100644 index 00000000..61fa28f2 --- /dev/null +++ b/zitadel_client/models/action_service_protobuf_any.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceProtobufAny(BaseModel): + """ + ActionServiceProtobufAny + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, alias="@type") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceProtobufAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceProtobufAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "@type": obj.get("@type") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_rpc_status.py b/zitadel_client/models/action_service_rpc_status.py new file mode 100644 index 00000000..06a47444 --- /dev/null +++ b/zitadel_client/models/action_service_rpc_status.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_protobuf_any import ActionServiceProtobufAny +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceRpcStatus(BaseModel): + """ + ActionServiceRpcStatus + """ # noqa: E501 + code: Optional[StrictInt] = None + message: Optional[StrictStr] = None + details: Optional[List[ActionServiceProtobufAny]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceRpcStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in details (list) + _items = [] + if self.details: + for _item_details in self.details: + if _item_details: + _items.append(_item_details.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceRpcStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "details": [ActionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_set_execution_request.py b/zitadel_client/models/action_service_set_execution_request.py new file mode 100644 index 00000000..3b1a4b42 --- /dev/null +++ b/zitadel_client/models/action_service_set_execution_request.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_beta_condition import ActionServiceBetaCondition +from zitadel_client.models.action_service_beta_execution_target_type import ActionServiceBetaExecutionTargetType +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceSetExecutionRequest(BaseModel): + """ + ActionServiceSetExecutionRequest + """ # noqa: E501 + condition: Optional[ActionServiceBetaCondition] = None + targets: Optional[List[ActionServiceBetaExecutionTargetType]] = Field(default=None, description="Ordered list of targets/includes called during the execution.") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceSetExecutionRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of condition + if self.condition: + _dict['condition'] = self.condition.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in targets (list) + _items = [] + if self.targets: + for _item_targets in self.targets: + if _item_targets: + _items.append(_item_targets.to_dict()) + _dict['targets'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceSetExecutionRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "targets": [ActionServiceBetaExecutionTargetType.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_update_target_request.py b/zitadel_client/models/action_service_update_target_request.py new file mode 100644 index 00000000..774add03 --- /dev/null +++ b/zitadel_client/models/action_service_update_target_request.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from zitadel_client.models.action_service_beta_rest_call import ActionServiceBetaRESTCall +from zitadel_client.models.action_service_beta_rest_webhook import ActionServiceBetaRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceUpdateTargetRequest(BaseModel): + """ + ActionServiceUpdateTargetRequest + """ # noqa: E501 + name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None + rest_webhook: Optional[ActionServiceBetaRESTWebhook] = Field(default=None, alias="restWebhook") + rest_call: Optional[ActionServiceBetaRESTCall] = Field(default=None, alias="restCall") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") + endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None + expiration_signing_key: Optional[StrictStr] = Field(default=None, description="Regenerate the key used for signing and checking the payload sent to the target. Set the graceful period for the existing key. During that time, the previous signing key and the new one will be used to sign the request to allow you a smooth transition onf your API. Note that we currently only allow an immediate rotation (\"0s\") and will support longer expirations in the future.", alias="expirationSigningKey") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ActionServiceUpdateTargetRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceUpdateTargetRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "name": obj.get("name"), + "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, + "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restAsync": obj.get("restAsync"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "expirationSigningKey": obj.get("expirationSigningKey") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_activate_web_key_response.py b/zitadel_client/models/web_key_service_beta_activate_web_key_response.py new file mode 100644 index 00000000..5ebc1a51 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_activate_web_key_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaActivateWebKeyResponse(BaseModel): + """ + WebKeyServiceBetaActivateWebKeyResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="The timestamp of the activation of the key.", alias="changeDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaActivateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaActivateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "changeDate": obj.get("changeDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_create_web_key_response.py b/zitadel_client/models/web_key_service_beta_create_web_key_response.py new file mode 100644 index 00000000..6fac779d --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_create_web_key_response.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaCreateWebKeyResponse(BaseModel): + """ + WebKeyServiceBetaCreateWebKeyResponse + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created key.") + creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the key creation.", alias="creationDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaCreateWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaCreateWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_delete_web_key_response.py b/zitadel_client/models/web_key_service_beta_delete_web_key_response.py new file mode 100644 index 00000000..b8e96839 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_delete_web_key_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaDeleteWebKeyResponse(BaseModel): + """ + WebKeyServiceBetaDeleteWebKeyResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="The timestamp of the deletion of the key. Note that the deletion date is only guaranteed to be set if the deletion was successful during the request. In case the deletion occurred in a previous request, the deletion date might be empty.", alias="deletionDate") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaDeleteWebKeyResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaDeleteWebKeyResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "deletionDate": obj.get("deletionDate") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_ecdsa.py b/zitadel_client/models/web_key_service_beta_ecdsa.py new file mode 100644 index 00000000..5ec0c13b --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_ecdsa.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_beta_ecdsa_curve import WebKeyServiceBetaECDSACurve +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaECDSA(BaseModel): + """ + WebKeyServiceBetaECDSA + """ # noqa: E501 + curve: Optional[WebKeyServiceBetaECDSACurve] = WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaECDSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaECDSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "curve": obj.get("curve") if obj.get("curve") is not None else WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_ecdsa_curve.py b/zitadel_client/models/web_key_service_beta_ecdsa_curve.py new file mode 100644 index 00000000..e4fd1855 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_ecdsa_curve.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceBetaECDSACurve(str, Enum): + """ + WebKeyServiceBetaECDSACurve + """ + + """ + allowed enum values + """ + ECDSA_CURVE_UNSPECIFIED = 'ECDSA_CURVE_UNSPECIFIED' + ECDSA_CURVE_P256 = 'ECDSA_CURVE_P256' + ECDSA_CURVE_P384 = 'ECDSA_CURVE_P384' + ECDSA_CURVE_P512 = 'ECDSA_CURVE_P512' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceBetaECDSACurve from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_list_web_keys_response.py b/zitadel_client/models/web_key_service_beta_list_web_keys_response.py new file mode 100644 index 00000000..ac899644 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_list_web_keys_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_beta_web_key import WebKeyServiceBetaWebKey +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaListWebKeysResponse(BaseModel): + """ + WebKeyServiceBetaListWebKeysResponse + """ # noqa: E501 + web_keys: Optional[List[WebKeyServiceBetaWebKey]] = Field(default=None, alias="webKeys") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaListWebKeysResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in web_keys (list) + _items = [] + if self.web_keys: + for _item_web_keys in self.web_keys: + if _item_web_keys: + _items.append(_item_web_keys.to_dict()) + _dict['webKeys'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaListWebKeysResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "webKeys": [WebKeyServiceBetaWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_rsa.py b/zitadel_client/models/web_key_service_beta_rsa.py new file mode 100644 index 00000000..732ce677 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_rsa.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_beta_rsa_bits import WebKeyServiceBetaRSABits +from zitadel_client.models.web_key_service_beta_rsa_hasher import WebKeyServiceBetaRSAHasher +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaRSA(BaseModel): + """ + WebKeyServiceBetaRSA + """ # noqa: E501 + bits: Optional[WebKeyServiceBetaRSABits] = WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED + hasher: Optional[WebKeyServiceBetaRSAHasher] = WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaRSA from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaRSA from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "bits": obj.get("bits") if obj.get("bits") is not None else WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED, + "hasher": obj.get("hasher") if obj.get("hasher") is not None else WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_beta_rsa_bits.py b/zitadel_client/models/web_key_service_beta_rsa_bits.py new file mode 100644 index 00000000..d986bfb5 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_rsa_bits.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceBetaRSABits(str, Enum): + """ + WebKeyServiceBetaRSABits + """ + + """ + allowed enum values + """ + RSA_BITS_UNSPECIFIED = 'RSA_BITS_UNSPECIFIED' + RSA_BITS_2048 = 'RSA_BITS_2048' + RSA_BITS_3072 = 'RSA_BITS_3072' + RSA_BITS_4096 = 'RSA_BITS_4096' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceBetaRSABits from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_rsa_hasher.py b/zitadel_client/models/web_key_service_beta_rsa_hasher.py new file mode 100644 index 00000000..a466300b --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_rsa_hasher.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceBetaRSAHasher(str, Enum): + """ + WebKeyServiceBetaRSAHasher + """ + + """ + allowed enum values + """ + RSA_HASHER_UNSPECIFIED = 'RSA_HASHER_UNSPECIFIED' + RSA_HASHER_SHA256 = 'RSA_HASHER_SHA256' + RSA_HASHER_SHA384 = 'RSA_HASHER_SHA384' + RSA_HASHER_SHA512 = 'RSA_HASHER_SHA512' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceBetaRSAHasher from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_state.py b/zitadel_client/models/web_key_service_beta_state.py new file mode 100644 index 00000000..1d027f29 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_state.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class WebKeyServiceBetaState(str, Enum): + """ + - STATE_INITIAL: A newly created key is in the initial state and published to the public key endpoint. - STATE_ACTIVE: The active key is used to sign tokens. Only one key can be active at a time. - STATE_INACTIVE: The inactive key is not used to sign tokens anymore, but still published to the public key endpoint. - STATE_REMOVED: The removed key is not used to sign tokens anymore and not published to the public key endpoint. + """ + + """ + allowed enum values + """ + STATE_UNSPECIFIED = 'STATE_UNSPECIFIED' + STATE_INITIAL = 'STATE_INITIAL' + STATE_ACTIVE = 'STATE_ACTIVE' + STATE_INACTIVE = 'STATE_INACTIVE' + STATE_REMOVED = 'STATE_REMOVED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of WebKeyServiceBetaState from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/web_key_service_beta_web_key.py b/zitadel_client/models/web_key_service_beta_web_key.py new file mode 100644 index 00000000..584e3a84 --- /dev/null +++ b/zitadel_client/models/web_key_service_beta_web_key.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA +from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA +from zitadel_client.models.web_key_service_beta_state import WebKeyServiceBetaState +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceBetaWebKey(BaseModel): + """ + WebKeyServiceBetaWebKey + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the key.") + creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the key creation.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the key (e.g. creation, activation, deactivation).", alias="changeDate") + state: Optional[WebKeyServiceBetaState] = WebKeyServiceBetaState.STATE_UNSPECIFIED + rsa: Optional[WebKeyServiceBetaRSA] = None + ecdsa: Optional[WebKeyServiceBetaECDSA] = None + ed25519: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaWebKey from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceBetaWebKey from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "state": obj.get("state") if obj.get("state") is not None else WebKeyServiceBetaState.STATE_UNSPECIFIED, + "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, + "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, + "ed25519": obj.get("ed25519") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_create_web_key_request.py b/zitadel_client/models/web_key_service_create_web_key_request.py new file mode 100644 index 00000000..0e416a5b --- /dev/null +++ b/zitadel_client/models/web_key_service_create_web_key_request.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_beta_ecdsa import WebKeyServiceBetaECDSA +from zitadel_client.models.web_key_service_beta_rsa import WebKeyServiceBetaRSA +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceCreateWebKeyRequest(BaseModel): + """ + WebKeyServiceCreateWebKeyRequest + """ # noqa: E501 + rsa: Optional[WebKeyServiceBetaRSA] = None + ecdsa: Optional[WebKeyServiceBetaECDSA] = None + ed25519: Optional[Dict[str, Any]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceCreateWebKeyRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceCreateWebKeyRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, + "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, + "ed25519": obj.get("ed25519") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_protobuf_any.py b/zitadel_client/models/web_key_service_protobuf_any.py new file mode 100644 index 00000000..ac83c98a --- /dev/null +++ b/zitadel_client/models/web_key_service_protobuf_any.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceProtobufAny(BaseModel): + """ + WebKeyServiceProtobufAny + """ # noqa: E501 + type: Optional[StrictStr] = Field(default=None, alias="@type") + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceProtobufAny from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceProtobufAny from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "@type": obj.get("@type") + }) + return _obj + + diff --git a/zitadel_client/models/web_key_service_rpc_status.py b/zitadel_client/models/web_key_service_rpc_status.py new file mode 100644 index 00000000..79ce9b53 --- /dev/null +++ b/zitadel_client/models/web_key_service_rpc_status.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Zitadel SDK + + The Zitadel SDK is a convenience wrapper around the Zitadel APIs to assist you in integrating with your Zitadel environment. This SDK enables you to handle resources, settings, and configurations within the Zitadel platform. + + The version of the OpenAPI document: 1.0.0 + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.web_key_service_protobuf_any import WebKeyServiceProtobufAny +from typing import Optional, Set +from typing_extensions import Self + +class WebKeyServiceRpcStatus(BaseModel): + """ + WebKeyServiceRpcStatus + """ # noqa: E501 + code: Optional[StrictInt] = None + message: Optional[StrictStr] = None + details: Optional[List[WebKeyServiceProtobufAny]] = None + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of WebKeyServiceRpcStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in details (list) + _items = [] + if self.details: + for _item_details in self.details: + if _item_details: + _items.append(_item_details.to_dict()) + _dict['details'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of WebKeyServiceRpcStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "code": obj.get("code"), + "message": obj.get("message"), + "details": [WebKeyServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") is not None else None + }) + return _obj + + From d96112bbb036a5a8ef708459c1c7e6ee5a46d453 Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Sun, 25 May 2025 16:40:25 +0300 Subject: [PATCH 2/3] feat: added the missing services to the main Zitadel entrypoint --- zitadel_client/zitadel.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/zitadel_client/zitadel.py b/zitadel_client/zitadel.py index 89a54970..f896f65f 100644 --- a/zitadel_client/zitadel.py +++ b/zitadel_client/zitadel.py @@ -1,7 +1,7 @@ from types import TracebackType from typing import Callable, Optional, Type, TypeVar -from zitadel_client.api import SAMLServiceApi +from zitadel_client.api import SAMLServiceApi, ActionServiceApi, WebKeyServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi @@ -28,14 +28,16 @@ class Zitadel: Attributes: configuration (Configuration): The configuration instance containing authentication and endpoint details. client (ApiClient): The API client used for making HTTP requests to the Zitadel API. + actions (ActionServiceApi): Service API for actions management. features (FeatureServiceApi): Service API for feature management. idps (IdentityProviderServiceApi): Service API for identity provider operations. oidc (OIDCServiceApi): Service API for OIDC-related operations. organizations (OrganizationServiceApi): Service API for organization-related operations. + saml (SAMLServiceApi): Service API for SAML management. sessions (SessionServiceApi): Service API for session management. settings (SettingsServiceApi): Service API for settings management. users (UserServiceApi): Service API for user management. - saml (SAMLServiceApi): Service API for SAML management. + webkeys (WebKeyServiceApi): Service API for webkeys management. """ def __init__( @@ -62,15 +64,18 @@ def __init__( mutate_config(self.configuration) client = ApiClient(configuration=self.configuration) + self.actions = ActionServiceApi(client) self.features = FeatureServiceApi(client) self.idps = IdentityProviderServiceApi(client) self.oidc = OIDCServiceApi(client) self.organizations = OrganizationServiceApi(client) + self.saml = SAMLServiceApi(client) self.sessions = SessionServiceApi(client) self.settings = SettingsServiceApi(client) self.users = UserServiceApi(client) self.users = UserServiceApi(client) - self.saml = SAMLServiceApi(client) + self.webkeys = WebKeyServiceApi(client) + T = TypeVar("T", bound="Zitadel") From cf302e50824dee8895e581e21b15a10cfb6673ff Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Sun, 25 May 2025 16:42:09 +0300 Subject: [PATCH 3/3] feat: added the missing services to the main Zitadel entrypoin --- zitadel_client/zitadel.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/zitadel_client/zitadel.py b/zitadel_client/zitadel.py index f896f65f..4fabc7ff 100644 --- a/zitadel_client/zitadel.py +++ b/zitadel_client/zitadel.py @@ -1,7 +1,7 @@ from types import TracebackType from typing import Callable, Optional, Type, TypeVar -from zitadel_client.api import SAMLServiceApi, ActionServiceApi, WebKeyServiceApi +from zitadel_client.api import ActionServiceApi, SAMLServiceApi, WebKeyServiceApi from zitadel_client.api.feature_service_api import FeatureServiceApi from zitadel_client.api.identity_provider_service_api import IdentityProviderServiceApi from zitadel_client.api.oidc_service_api import OIDCServiceApi @@ -76,7 +76,6 @@ def __init__( self.users = UserServiceApi(client) self.webkeys = WebKeyServiceApi(client) - T = TypeVar("T", bound="Zitadel") def __enter__(self: T) -> T: