diff --git a/etc/docker-compose.yaml b/etc/docker-compose.yaml index 5dc92a9b..db0a518b 100644 --- a/etc/docker-compose.yaml +++ b/etc/docker-compose.yaml @@ -20,7 +20,7 @@ services: restart: 'no' networks: - storage - image: 'ghcr.io/zitadel/zitadel:v4.0.0-rc.1' + image: 'ghcr.io/zitadel/zitadel:v4.0.0' command: 'init --config /example-zitadel-config.yaml --config /example-zitadel-secrets.yaml' depends_on: db: @@ -34,7 +34,7 @@ services: restart: 'no' networks: - storage - image: 'ghcr.io/zitadel/zitadel:v4.0.0-rc.1-debug' + image: 'ghcr.io/zitadel/zitadel:v4.0.0-debug' user: root entrypoint: '/bin/bash' command: [ "-c", "/app/zitadel setup --config /example-zitadel-config.yaml --config /example-zitadel-secrets.yaml --steps /example-zitadel-init-steps.yaml --masterkey \"my_test_masterkey_0123456789ABEF\" && echo \"--- ZITADEL SETUP COMPLETE ---\" && echo \"Personal Access Token (PAT) will be in ./zitadel_output/pat.txt on your host.\" && echo \"Service Account Key will be in ./zitadel_output/sa-key.json on your host.\" && echo \"OAuth Client ID and Secret will be in 'zitadel' service logs (grep for 'Application created').\"" ] @@ -55,7 +55,7 @@ services: networks: - backend - storage - image: 'ghcr.io/zitadel/zitadel:v4.0.0-rc.1' + image: 'ghcr.io/zitadel/zitadel:v4.0.0' command: > start --config /example-zitadel-config.yaml --config /example-zitadel-secrets.yaml diff --git a/zitadel_client/api/__init__.py b/zitadel_client/api/__init__.py index 47e2959c..ad877cc5 100644 --- a/zitadel_client/api/__init__.py +++ b/zitadel_client/api/__init__.py @@ -1,6 +1,7 @@ # flake8: noqa # import apis into api package +from zitadel_client.api.action_service_api import ActionServiceApi from zitadel_client.api.beta_action_service_api import BetaActionServiceApi from zitadel_client.api.beta_app_service_api import BetaAppServiceApi from zitadel_client.api.beta_authorization_service_api import BetaAuthorizationServiceApi diff --git a/zitadel_client/api/action_service_api.py b/zitadel_client/api/action_service_api.py new file mode 100644 index 00000000..15bcefca --- /dev/null +++ b/zitadel_client/api/action_service_api.py @@ -0,0 +1,1339 @@ +# 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 typing import Any, Dict +from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest +from zitadel_client.models.action_service_create_target_response import ActionServiceCreateTargetResponse +from zitadel_client.models.action_service_delete_target_request import ActionServiceDeleteTargetRequest +from zitadel_client.models.action_service_delete_target_response import ActionServiceDeleteTargetResponse +from zitadel_client.models.action_service_get_target_request import ActionServiceGetTargetRequest +from zitadel_client.models.action_service_get_target_response import ActionServiceGetTargetResponse +from zitadel_client.models.action_service_list_execution_functions_response import ActionServiceListExecutionFunctionsResponse +from zitadel_client.models.action_service_list_execution_methods_response import ActionServiceListExecutionMethodsResponse +from zitadel_client.models.action_service_list_execution_services_response import ActionServiceListExecutionServicesResponse +from zitadel_client.models.action_service_list_executions_request import ActionServiceListExecutionsRequest +from zitadel_client.models.action_service_list_executions_response import ActionServiceListExecutionsResponse +from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest +from zitadel_client.models.action_service_list_targets_response import ActionServiceListTargetsResponse +from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest +from zitadel_client.models.action_service_set_execution_response import ActionServiceSetExecutionResponse +from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest +from zitadel_client.models.action_service_update_target_response import ActionServiceUpdateTargetResponse + +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 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, ) -> ActionServiceCreateTargetResponse: + """CreateTarget + + 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._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': "ActionServiceCreateTargetResponse", + } + 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 + + def _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='/zitadel.action.v2.ActionService/CreateTarget', + 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 delete_target( self, action_service_delete_target_request: ActionServiceDeleteTargetRequest, _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, ) -> ActionServiceDeleteTargetResponse: + """DeleteTarget + + 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 action_service_delete_target_request: (required) + :type action_service_delete_target_request: ActionServiceDeleteTargetRequest + :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._delete_target_serialize( + action_service_delete_target_request=action_service_delete_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceDeleteTargetResponse", + } + 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 + + def _delete_target_serialize( + self, + action_service_delete_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_delete_target_request is not None: + _body_params = action_service_delete_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='/zitadel.action.v2.ActionService/DeleteTarget', + 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 get_target( self, action_service_get_target_request: ActionServiceGetTargetRequest, _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, ) -> ActionServiceGetTargetResponse: + """GetTarget + + Get Target Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + + :param action_service_get_target_request: (required) + :type action_service_get_target_request: ActionServiceGetTargetRequest + :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._get_target_serialize( + action_service_get_target_request=action_service_get_target_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceGetTargetResponse", + } + 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 + + def _get_target_serialize( + self, + action_service_get_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_get_target_request is not None: + _body_params = action_service_get_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='/zitadel.action.v2.ActionService/GetTarget', + 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 list_execution_functions( self, body: Optional[Dict[str, Any]] = 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, ) -> ActionServiceListExecutionFunctionsResponse: + if body is None: + body = {} + """ListExecutionFunctions + + List Execution Functions List all available functions which can be used as condition for executions. + + :param body: (required) + :type body: object + :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._list_execution_functions_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceListExecutionFunctionsResponse", + } + 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 + + def _list_execution_functions_serialize( + self, + body, + _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 body is not None: + _body_params = body + + + # 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='/zitadel.action.v2.ActionService/ListExecutionFunctions', + 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 list_execution_methods( self, body: Optional[Dict[str, Any]] = 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, ) -> ActionServiceListExecutionMethodsResponse: + if body is None: + body = {} + """ListExecutionMethods + + List Execution Methods List all available methods which can be used as condition for executions. + + :param body: (required) + :type body: object + :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._list_execution_methods_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceListExecutionMethodsResponse", + } + 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 + + def _list_execution_methods_serialize( + self, + body, + _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 body is not None: + _body_params = body + + + # 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='/zitadel.action.v2.ActionService/ListExecutionMethods', + 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 list_execution_services( self, body: Optional[Dict[str, Any]] = 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, ) -> ActionServiceListExecutionServicesResponse: + if body is None: + body = {} + """ListExecutionServices + + List Execution Services List all available services which can be used as condition for executions. + + :param body: (required) + :type body: object + :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._list_execution_services_serialize( + body=body, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceListExecutionServicesResponse", + } + 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 + + def _list_execution_services_serialize( + self, + body, + _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 body is not None: + _body_params = body + + + # 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='/zitadel.action.v2.ActionService/ListExecutionServices', + 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 list_executions( self, action_service_list_executions_request: ActionServiceListExecutionsRequest, _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, ) -> ActionServiceListExecutionsResponse: + """ListExecutions + + 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 action_service_list_executions_request: (required) + :type action_service_list_executions_request: ActionServiceListExecutionsRequest + :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._list_executions_serialize( + action_service_list_executions_request=action_service_list_executions_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ActionServiceListExecutionsResponse", + } + 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 + + def _list_executions_serialize( + self, + action_service_list_executions_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_executions_request is not None: + _body_params = action_service_list_executions_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='/zitadel.action.v2.ActionService/ListExecutions', + 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 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, ) -> ActionServiceListTargetsResponse: + """ListTargets + + 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._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': "ActionServiceListTargetsResponse", + } + 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 + + def _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='/zitadel.action.v2.ActionService/ListTargets', + 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 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, ) -> ActionServiceSetExecutionResponse: + """SetExecution + + 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._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': "ActionServiceSetExecutionResponse", + } + 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 + + def _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='POST', + resource_path='/zitadel.action.v2.ActionService/SetExecution', + 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 update_target( self, 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, ) -> ActionServiceUpdateTargetResponse: + """UpdateTarget + + 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 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._update_target_serialize( + 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': "ActionServiceUpdateTargetResponse", + } + 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 + + def _update_target_serialize( + self, + 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 + # 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='/zitadel.action.v2.ActionService/UpdateTarget', + 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/beta_organization_service_api.py b/zitadel_client/api/beta_organization_service_api.py index 59af5012..1e6ba381 100644 --- a/zitadel_client/api/beta_organization_service_api.py +++ b/zitadel_client/api/beta_organization_service_api.py @@ -323,7 +323,7 @@ def _add_organization_domain_serialize( def create_organization( self, beta_organization_service_create_organization_request: BetaOrganizationServiceCreateOrganizationRequest, _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, ) -> BetaOrganizationServiceCreateOrganizationResponse: """CreateOrganization - Create Organization Create a new organization with an administrative user. If no specific roles are sent for the users, they will be granted the role ORG_OWNER. Required permission: - `org.create` + Create Organization Create a new organization with an administrative user. If no specific roles are sent for the users, they will be granted the role ORG_OWNER. Required permission: - `org.create` Deprecated: Use [AddOrganization](/apis/resources/org_service_v2/organization-service-add-organization.api.mdx) instead to create an organization. :param beta_organization_service_create_organization_request: (required) :type beta_organization_service_create_organization_request: BetaOrganizationServiceCreateOrganizationRequest @@ -1347,7 +1347,7 @@ def _list_organization_metadata_serialize( def list_organizations( self, beta_organization_service_list_organizations_request: BetaOrganizationServiceListOrganizationsRequest, _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, ) -> BetaOrganizationServiceListOrganizationsResponse: """ListOrganizations - List Organizations Returns a list of organizations that match the requesting filters. All filters are applied with an AND condition. Required permission: - `iam.read` + List Organizations Returns a list of organizations that match the requesting filters. All filters are applied with an AND condition. Required permission: - `iam.read` Deprecated: Use [ListOrganizations](/apis/resources/org_service_v2/organization-service-list-organizations.api.mdx) instead to list organizations. :param beta_organization_service_list_organizations_request: (required) :type beta_organization_service_list_organizations_request: BetaOrganizationServiceListOrganizationsRequest diff --git a/zitadel_client/models/__init__.py b/zitadel_client/models/__init__.py index 508430b1..a1faff0e 100644 --- a/zitadel_client/models/__init__.py +++ b/zitadel_client/models/__init__.py @@ -14,6 +14,47 @@ # import models into model package +from zitadel_client.models.action_service_any import ActionServiceAny +from zitadel_client.models.action_service_condition import ActionServiceCondition +from zitadel_client.models.action_service_connect_error import ActionServiceConnectError +from zitadel_client.models.action_service_create_target_request import ActionServiceCreateTargetRequest +from zitadel_client.models.action_service_create_target_response import ActionServiceCreateTargetResponse +from zitadel_client.models.action_service_delete_target_request import ActionServiceDeleteTargetRequest +from zitadel_client.models.action_service_delete_target_response import ActionServiceDeleteTargetResponse +from zitadel_client.models.action_service_event_execution import ActionServiceEventExecution +from zitadel_client.models.action_service_execution import ActionServiceExecution +from zitadel_client.models.action_service_execution_field_name import ActionServiceExecutionFieldName +from zitadel_client.models.action_service_execution_search_filter import ActionServiceExecutionSearchFilter +from zitadel_client.models.action_service_execution_type import ActionServiceExecutionType +from zitadel_client.models.action_service_execution_type_filter import ActionServiceExecutionTypeFilter +from zitadel_client.models.action_service_function_execution import ActionServiceFunctionExecution +from zitadel_client.models.action_service_get_target_request import ActionServiceGetTargetRequest +from zitadel_client.models.action_service_get_target_response import ActionServiceGetTargetResponse +from zitadel_client.models.action_service_in_conditions_filter import ActionServiceInConditionsFilter +from zitadel_client.models.action_service_in_target_ids_filter import ActionServiceInTargetIDsFilter +from zitadel_client.models.action_service_list_execution_functions_response import ActionServiceListExecutionFunctionsResponse +from zitadel_client.models.action_service_list_execution_methods_response import ActionServiceListExecutionMethodsResponse +from zitadel_client.models.action_service_list_execution_services_response import ActionServiceListExecutionServicesResponse +from zitadel_client.models.action_service_list_executions_request import ActionServiceListExecutionsRequest +from zitadel_client.models.action_service_list_executions_response import ActionServiceListExecutionsResponse +from zitadel_client.models.action_service_list_targets_request import ActionServiceListTargetsRequest +from zitadel_client.models.action_service_list_targets_response import ActionServiceListTargetsResponse +from zitadel_client.models.action_service_pagination_request import ActionServicePaginationRequest +from zitadel_client.models.action_service_pagination_response import ActionServicePaginationResponse +from zitadel_client.models.action_service_rest_call import ActionServiceRESTCall +from zitadel_client.models.action_service_rest_webhook import ActionServiceRESTWebhook +from zitadel_client.models.action_service_request_execution import ActionServiceRequestExecution +from zitadel_client.models.action_service_response_execution import ActionServiceResponseExecution +from zitadel_client.models.action_service_set_execution_request import ActionServiceSetExecutionRequest +from zitadel_client.models.action_service_set_execution_response import ActionServiceSetExecutionResponse +from zitadel_client.models.action_service_target import ActionServiceTarget +from zitadel_client.models.action_service_target_field_name import ActionServiceTargetFieldName +from zitadel_client.models.action_service_target_filter import ActionServiceTargetFilter +from zitadel_client.models.action_service_target_name_filter import ActionServiceTargetNameFilter +from zitadel_client.models.action_service_target_search_filter import ActionServiceTargetSearchFilter +from zitadel_client.models.action_service_text_filter_method import ActionServiceTextFilterMethod +from zitadel_client.models.action_service_update_target_request import ActionServiceUpdateTargetRequest +from zitadel_client.models.action_service_update_target_response import ActionServiceUpdateTargetResponse from zitadel_client.models.beta_action_service_any import BetaActionServiceAny from zitadel_client.models.beta_action_service_condition import BetaActionServiceCondition from zitadel_client.models.beta_action_service_connect_error import BetaActionServiceConnectError diff --git a/zitadel_client/models/action_service_any.py b/zitadel_client/models/action_service_any.py new file mode 100644 index 00000000..5bfc1248 --- /dev/null +++ b/zitadel_client/models/action_service_any.py @@ -0,0 +1,104 @@ +# 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, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceAny(BaseModel): + """ + Contains an arbitrary serialized message along with a @type that describes the type of the serialized message. + """ # noqa: E501 + type: Optional[StrictStr] = None + value: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + debug: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type", "value", "debug"] + + 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 ActionServiceAny 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceAny 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"), + "value": obj.get("value"), + "debug": obj.get("debug") + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + return _obj + + diff --git a/zitadel_client/models/action_service_condition.py b/zitadel_client/models/action_service_condition.py new file mode 100644 index 00000000..31868d01 --- /dev/null +++ b/zitadel_client/models/action_service_condition.py @@ -0,0 +1,109 @@ +# 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, Optional +from zitadel_client.models.action_service_event_execution import ActionServiceEventExecution +from zitadel_client.models.action_service_function_execution import ActionServiceFunctionExecution +from zitadel_client.models.action_service_request_execution import ActionServiceRequestExecution +from zitadel_client.models.action_service_response_execution import ActionServiceResponseExecution +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceCondition(BaseModel): + """ + ActionServiceCondition + """ # noqa: E501 + event: Optional[ActionServiceEventExecution] = None + function: Optional[ActionServiceFunctionExecution] = None + request: Optional[ActionServiceRequestExecution] = None + response: Optional[ActionServiceResponseExecution] = None + __properties: ClassVar[List[str]] = ["event", "function", "request", "response"] + + 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 ActionServiceCondition 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 event + if self.event: + _dict['event'] = self.event.to_dict() + # override the default output from pydantic by calling `to_dict()` of function + if self.function: + _dict['function'] = self.function.to_dict() + # override the default output from pydantic by calling `to_dict()` of request + if self.request: + _dict['request'] = self.request.to_dict() + # override the default output from pydantic by calling `to_dict()` of response + if self.response: + _dict['response'] = self.response.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceCondition from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "event": ActionServiceEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None, + "function": ActionServiceFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None, + "request": ActionServiceRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None, + "response": ActionServiceResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_connect_error.py b/zitadel_client/models/action_service_connect_error.py new file mode 100644 index 00000000..a0fda804 --- /dev/null +++ b/zitadel_client/models/action_service_connect_error.py @@ -0,0 +1,118 @@ +# 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, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_any import ActionServiceAny +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceConnectError(BaseModel): + """ + Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation + """ # noqa: E501 + code: Optional[StrictStr] = Field(default=None, description="The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].") + message: Optional[StrictStr] = Field(default=None, description="A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.") + detail: Optional[ActionServiceAny] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "detail"] + + @field_validator('code') + def code_validate_enum(cls, value): + """Validates the enum""" + if value is None: + return value + + if value not in set(['canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated']): + raise ValueError("must be one of enum values ('canceled', 'unknown', 'invalid_argument', 'deadline_exceeded', 'not_found', 'already_exists', 'permission_denied', 'resource_exhausted', 'failed_precondition', 'aborted', 'out_of_range', 'unimplemented', 'internal', 'unavailable', 'data_loss', 'unauthenticated')") + return value + + 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 ActionServiceConnectError 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. + * Fields in `self.additional_properties` are added to the output dict. + """ + excluded_fields: Set[str] = set([ + "additional_properties", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of detail + if self.detail: + _dict['detail'] = self.detail.to_dict() + # puts key-value pairs in additional_properties in the top level + if self.additional_properties is not None: + for _key, _value in self.additional_properties.items(): + _dict[_key] = _value + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceConnectError 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"), + "detail": ActionServiceAny.from_dict(obj["detail"]) if obj.get("detail") is not None else None + }) + # store additional fields in additional_properties + for _key in obj.keys(): + if _key not in cls.__properties: + _obj.additional_properties[_key] = obj.get(_key) + + 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..d26806fb --- /dev/null +++ b/zitadel_client/models/action_service_create_target_request.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 pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.action_service_rest_call import ActionServiceRESTCall +from zitadel_client.models.action_service_rest_webhook import ActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceCreateTargetRequest(BaseModel): + """ + ActionServiceCreateTargetRequest + """ # noqa: E501 + name: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + endpoint: Optional[StrictStr] = None + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + rest_call: Optional[ActionServiceRESTCall] = Field(default=None, alias="restCall") + rest_webhook: Optional[ActionServiceRESTWebhook] = Field(default=None, alias="restWebhook") + __properties: ClassVar[List[str]] = ["name", "timeout", "endpoint", "restAsync", "restCall", "restWebhook"] + + 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, + ) + # override the default output from pydantic by calling `to_dict()` of rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + 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"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "restAsync": obj.get("restAsync"), + "restCall": ActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restWebhook": ActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_create_target_response.py b/zitadel_client/models/action_service_create_target_response.py new file mode 100644 index 00000000..c8de02a9 --- /dev/null +++ b/zitadel_client/models/action_service_create_target_response.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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceCreateTargetResponse(BaseModel): + """ + ActionServiceCreateTargetResponse + """ # 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="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + __properties: ClassVar[List[str]] = ["id", "creationDate", "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 ActionServiceCreateTargetResponse 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 ActionServiceCreateTargetResponse 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_delete_target_request.py b/zitadel_client/models/action_service_delete_target_request.py new file mode 100644 index 00000000..78ecc8e1 --- /dev/null +++ b/zitadel_client/models/action_service_delete_target_request.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, StrictStr +from typing import Any, ClassVar, Dict +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceDeleteTargetRequest(BaseModel): + """ + ActionServiceDeleteTargetRequest + """ # noqa: E501 + id: StrictStr + __properties: ClassVar[List[str]] = ["id"] + + 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 ActionServiceDeleteTargetRequest 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 ActionServiceDeleteTargetRequest 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") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_delete_target_response.py b/zitadel_client/models/action_service_delete_target_response.py new file mode 100644 index 00000000..65df7b41 --- /dev/null +++ b/zitadel_client/models/action_service_delete_target_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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceDeleteTargetResponse(BaseModel): + """ + ActionServiceDeleteTargetResponse + """ # noqa: E501 + deletion_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="deletionDate") + __properties: ClassVar[List[str]] = ["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 ActionServiceDeleteTargetResponse 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 ActionServiceDeleteTargetResponse 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_event_execution.py b/zitadel_client/models/action_service_event_execution.py new file mode 100644 index 00000000..1d230564 --- /dev/null +++ b/zitadel_client/models/action_service_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, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceEventExecution(BaseModel): + """ + ActionServiceEventExecution + """ # noqa: E501 + all: Optional[StrictBool] = Field(default=None, description="all events as condition.") + event: Optional[StrictStr] = Field(default=None, description="Event name as condition.") + group: Optional[StrictStr] = Field(default=None, description="Event group as condition, all events under this group.") + __properties: ClassVar[List[str]] = ["all", "event", "group"] + + 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 ActionServiceEventExecution 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 ActionServiceEventExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all"), + "event": obj.get("event"), + "group": obj.get("group") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_execution.py b/zitadel_client/models/action_service_execution.py new file mode 100644 index 00000000..e18aca16 --- /dev/null +++ b/zitadel_client/models/action_service_execution.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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_condition import ActionServiceCondition +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceExecution(BaseModel): + """ + ActionServiceExecution + """ # noqa: E501 + condition: Optional[ActionServiceCondition] = None + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + __properties: ClassVar[List[str]] = ["condition", "creationDate", "changeDate", "targets"] + + 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 ActionServiceExecution 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() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "condition": ActionServiceCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "creationDate": obj.get("creationDate"), + "changeDate": obj.get("changeDate"), + "targets": obj.get("targets") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_execution_field_name.py b/zitadel_client/models/action_service_execution_field_name.py new file mode 100644 index 00000000..d4e36378 --- /dev/null +++ b/zitadel_client/models/action_service_execution_field_name.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 ActionServiceExecutionFieldName(str, Enum): + """ + ActionServiceExecutionFieldName + """ + + """ + allowed enum values + """ + EXECUTION_FIELD_NAME_UNSPECIFIED = 'EXECUTION_FIELD_NAME_UNSPECIFIED' + EXECUTION_FIELD_NAME_ID = 'EXECUTION_FIELD_NAME_ID' + EXECUTION_FIELD_NAME_CREATED_DATE = 'EXECUTION_FIELD_NAME_CREATED_DATE' + EXECUTION_FIELD_NAME_CHANGED_DATE = 'EXECUTION_FIELD_NAME_CHANGED_DATE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ActionServiceExecutionFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_execution_search_filter.py b/zitadel_client/models/action_service_execution_search_filter.py new file mode 100644 index 00000000..b4919c6f --- /dev/null +++ b/zitadel_client/models/action_service_execution_search_filter.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, Optional +from zitadel_client.models.action_service_execution_type_filter import ActionServiceExecutionTypeFilter +from zitadel_client.models.action_service_in_conditions_filter import ActionServiceInConditionsFilter +from zitadel_client.models.action_service_target_filter import ActionServiceTargetFilter +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceExecutionSearchFilter(BaseModel): + """ + ActionServiceExecutionSearchFilter + """ # noqa: E501 + execution_type_filter: Optional[ActionServiceExecutionTypeFilter] = Field(default=None, alias="executionTypeFilter") + in_conditions_filter: Optional[ActionServiceInConditionsFilter] = Field(default=None, alias="inConditionsFilter") + target_filter: Optional[ActionServiceTargetFilter] = Field(default=None, alias="targetFilter") + __properties: ClassVar[List[str]] = ["executionTypeFilter", "inConditionsFilter", "targetFilter"] + + 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 ActionServiceExecutionSearchFilter 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 execution_type_filter + if self.execution_type_filter: + _dict['executionTypeFilter'] = self.execution_type_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of in_conditions_filter + if self.in_conditions_filter: + _dict['inConditionsFilter'] = self.in_conditions_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_filter + if self.target_filter: + _dict['targetFilter'] = self.target_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceExecutionSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "executionTypeFilter": ActionServiceExecutionTypeFilter.from_dict(obj["executionTypeFilter"]) if obj.get("executionTypeFilter") is not None else None, + "inConditionsFilter": ActionServiceInConditionsFilter.from_dict(obj["inConditionsFilter"]) if obj.get("inConditionsFilter") is not None else None, + "targetFilter": ActionServiceTargetFilter.from_dict(obj["targetFilter"]) if obj.get("targetFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_execution_type.py b/zitadel_client/models/action_service_execution_type.py new file mode 100644 index 00000000..4a69af1f --- /dev/null +++ b/zitadel_client/models/action_service_execution_type.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 ActionServiceExecutionType(str, Enum): + """ + ActionServiceExecutionType + """ + + """ + allowed enum values + """ + EXECUTION_TYPE_UNSPECIFIED = 'EXECUTION_TYPE_UNSPECIFIED' + EXECUTION_TYPE_REQUEST = 'EXECUTION_TYPE_REQUEST' + EXECUTION_TYPE_RESPONSE = 'EXECUTION_TYPE_RESPONSE' + EXECUTION_TYPE_EVENT = 'EXECUTION_TYPE_EVENT' + EXECUTION_TYPE_FUNCTION = 'EXECUTION_TYPE_FUNCTION' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of ActionServiceExecutionType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_execution_type_filter.py b/zitadel_client/models/action_service_execution_type_filter.py new file mode 100644 index 00000000..f959f358 --- /dev/null +++ b/zitadel_client/models/action_service_execution_type_filter.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 +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.action_service_execution_type import ActionServiceExecutionType +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceExecutionTypeFilter(BaseModel): + """ + ActionServiceExecutionTypeFilter + """ # noqa: E501 + execution_type: Optional[ActionServiceExecutionType] = Field(default=None, alias="executionType") + __properties: ClassVar[List[str]] = ["executionType"] + + 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 ActionServiceExecutionTypeFilter 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 ActionServiceExecutionTypeFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "executionType": obj.get("executionType") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_function_execution.py b/zitadel_client/models/action_service_function_execution.py new file mode 100644 index 00000000..9780d926 --- /dev/null +++ b/zitadel_client/models/action_service_function_execution.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, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceFunctionExecution(BaseModel): + """ + Executed on the specified function + """ # noqa: E501 + name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["name"] + + 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 ActionServiceFunctionExecution 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 ActionServiceFunctionExecution 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_get_target_request.py b/zitadel_client/models/action_service_get_target_request.py new file mode 100644 index 00000000..ec6de089 --- /dev/null +++ b/zitadel_client/models/action_service_get_target_request.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, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceGetTargetRequest(BaseModel): + """ + ActionServiceGetTargetRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["id"] + + 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 ActionServiceGetTargetRequest 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 ActionServiceGetTargetRequest 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") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_get_target_response.py b/zitadel_client/models/action_service_get_target_response.py new file mode 100644 index 00000000..8036cab1 --- /dev/null +++ b/zitadel_client/models/action_service_get_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 pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.action_service_target import ActionServiceTarget +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceGetTargetResponse(BaseModel): + """ + ActionServiceGetTargetResponse + """ # noqa: E501 + target: Optional[ActionServiceTarget] = None + __properties: ClassVar[List[str]] = ["target"] + + 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 ActionServiceGetTargetResponse 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 ActionServiceGetTargetResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "target": ActionServiceTarget.from_dict(obj["target"]) if obj.get("target") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_in_conditions_filter.py b/zitadel_client/models/action_service_in_conditions_filter.py new file mode 100644 index 00000000..b53e396d --- /dev/null +++ b/zitadel_client/models/action_service_in_conditions_filter.py @@ -0,0 +1,95 @@ +# 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_condition import ActionServiceCondition +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceInConditionsFilter(BaseModel): + """ + ActionServiceInConditionsFilter + """ # noqa: E501 + conditions: Optional[List[ActionServiceCondition]] = Field(default=None, description="Defines the conditions to query for.") + __properties: ClassVar[List[str]] = ["conditions"] + + 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 ActionServiceInConditionsFilter 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 conditions (list) + _items = [] + if self.conditions: + for _item_conditions in self.conditions: + if _item_conditions: + _items.append(_item_conditions.to_dict()) + _dict['conditions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceInConditionsFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "conditions": [ActionServiceCondition.from_dict(_item) for _item in obj["conditions"]] if obj.get("conditions") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_in_target_ids_filter.py b/zitadel_client/models/action_service_in_target_ids_filter.py new file mode 100644 index 00000000..28bd7a58 --- /dev/null +++ b/zitadel_client/models/action_service_in_target_ids_filter.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, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceInTargetIDsFilter(BaseModel): + """ + ActionServiceInTargetIDsFilter + """ # noqa: E501 + target_ids: Optional[List[StrictStr]] = Field(default=None, description="Defines the ids to query for.", alias="targetIds") + __properties: ClassVar[List[str]] = ["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 ActionServiceInTargetIDsFilter 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 ActionServiceInTargetIDsFilter 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_list_execution_functions_response.py b/zitadel_client/models/action_service_list_execution_functions_response.py new file mode 100644 index 00000000..ab5079be --- /dev/null +++ b/zitadel_client/models/action_service_list_execution_functions_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 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 ActionServiceListExecutionFunctionsResponse(BaseModel): + """ + ActionServiceListExecutionFunctionsResponse + """ # noqa: E501 + functions: Optional[List[StrictStr]] = Field(default=None, description="All available methods") + __properties: ClassVar[List[str]] = ["functions"] + + 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 ActionServiceListExecutionFunctionsResponse 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 ActionServiceListExecutionFunctionsResponse 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_list_execution_methods_response.py b/zitadel_client/models/action_service_list_execution_methods_response.py new file mode 100644 index 00000000..5cc4b0b9 --- /dev/null +++ b/zitadel_client/models/action_service_list_execution_methods_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 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 ActionServiceListExecutionMethodsResponse(BaseModel): + """ + ActionServiceListExecutionMethodsResponse + """ # noqa: E501 + methods: Optional[List[StrictStr]] = Field(default=None, description="All available methods") + __properties: ClassVar[List[str]] = ["methods"] + + 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 ActionServiceListExecutionMethodsResponse 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 ActionServiceListExecutionMethodsResponse 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_list_execution_services_response.py b/zitadel_client/models/action_service_list_execution_services_response.py new file mode 100644 index 00000000..04ce570d --- /dev/null +++ b/zitadel_client/models/action_service_list_execution_services_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 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 ActionServiceListExecutionServicesResponse(BaseModel): + """ + ActionServiceListExecutionServicesResponse + """ # noqa: E501 + services: Optional[List[StrictStr]] = Field(default=None, description="All available methods") + __properties: ClassVar[List[str]] = ["services"] + + 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 ActionServiceListExecutionServicesResponse 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 ActionServiceListExecutionServicesResponse 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_list_executions_request.py b/zitadel_client/models/action_service_list_executions_request.py new file mode 100644 index 00000000..1acd0dbf --- /dev/null +++ b/zitadel_client/models/action_service_list_executions_request.py @@ -0,0 +1,104 @@ +# 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_execution_field_name import ActionServiceExecutionFieldName +from zitadel_client.models.action_service_execution_search_filter import ActionServiceExecutionSearchFilter +from zitadel_client.models.action_service_pagination_request import ActionServicePaginationRequest +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceListExecutionsRequest(BaseModel): + """ + ActionServiceListExecutionsRequest + """ # noqa: E501 + pagination: Optional[ActionServicePaginationRequest] = None + sorting_column: Optional[ActionServiceExecutionFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[ActionServiceExecutionSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + 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 ActionServiceListExecutionsRequest 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 ActionServiceListExecutionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": ActionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [ActionServiceExecutionSearchFilter.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_list_executions_response.py b/zitadel_client/models/action_service_list_executions_response.py new file mode 100644 index 00000000..42d38cb5 --- /dev/null +++ b/zitadel_client/models/action_service_list_executions_response.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 +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_execution import ActionServiceExecution +from zitadel_client.models.action_service_pagination_response import ActionServicePaginationResponse +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceListExecutionsResponse(BaseModel): + """ + ActionServiceListExecutionsResponse + """ # noqa: E501 + pagination: Optional[ActionServicePaginationResponse] = None + executions: Optional[List[ActionServiceExecution]] = None + __properties: ClassVar[List[str]] = ["pagination", "executions"] + + 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 ActionServiceListExecutionsResponse 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 executions (list) + _items = [] + if self.executions: + for _item_executions in self.executions: + if _item_executions: + _items.append(_item_executions.to_dict()) + _dict['executions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceListExecutionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": ActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "executions": [ActionServiceExecution.from_dict(_item) for _item in obj["executions"]] if obj.get("executions") is not None else None + }) + 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..cd821c68 --- /dev/null +++ b/zitadel_client/models/action_service_list_targets_request.py @@ -0,0 +1,104 @@ +# 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_pagination_request import ActionServicePaginationRequest +from zitadel_client.models.action_service_target_field_name import ActionServiceTargetFieldName +from zitadel_client.models.action_service_target_search_filter import ActionServiceTargetSearchFilter +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceListTargetsRequest(BaseModel): + """ + ActionServiceListTargetsRequest + """ # noqa: E501 + pagination: Optional[ActionServicePaginationRequest] = None + sorting_column: Optional[ActionServiceTargetFieldName] = Field(default=None, alias="sortingColumn") + filters: Optional[List[ActionServiceTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] + + 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": ActionServicePaginationRequest.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "sortingColumn": obj.get("sortingColumn"), + "filters": [ActionServiceTargetSearchFilter.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_list_targets_response.py b/zitadel_client/models/action_service_list_targets_response.py new file mode 100644 index 00000000..f86b36c0 --- /dev/null +++ b/zitadel_client/models/action_service_list_targets_response.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 +from typing import Any, ClassVar, Dict, List, Optional +from zitadel_client.models.action_service_pagination_response import ActionServicePaginationResponse +from zitadel_client.models.action_service_target import ActionServiceTarget +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceListTargetsResponse(BaseModel): + """ + ActionServiceListTargetsResponse + """ # noqa: E501 + pagination: Optional[ActionServicePaginationResponse] = None + targets: Optional[List[ActionServiceTarget]] = None + __properties: ClassVar[List[str]] = ["pagination", "targets"] + + 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 ActionServiceListTargetsResponse 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 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 ActionServiceListTargetsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "pagination": ActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, + "targets": [ActionServiceTarget.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_pagination_request.py b/zitadel_client/models/action_service_pagination_request.py new file mode 100644 index 00000000..7a12d7d3 --- /dev/null +++ b/zitadel_client/models/action_service_pagination_request.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, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServicePaginationRequest(BaseModel): + """ + ActionServicePaginationRequest + """ # noqa: E501 + offset: Optional[Any] = 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.") + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] + + 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 ActionServicePaginationRequest 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, + ) + # set to None if offset (nullable) is None + # and model_fields_set contains the field + if self.offset is None and "offset" in self.model_fields_set: + _dict['offset'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServicePaginationRequest 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_pagination_response.py b/zitadel_client/models/action_service_pagination_response.py new file mode 100644 index 00000000..966ecce4 --- /dev/null +++ b/zitadel_client/models/action_service_pagination_response.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 +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServicePaginationResponse(BaseModel): + """ + ActionServicePaginationResponse + """ # noqa: E501 + total_result: Optional[Any] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") + applied_limit: Optional[Any] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + __properties: ClassVar[List[str]] = ["totalResult", "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 ActionServicePaginationResponse 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, + ) + # set to None if total_result (nullable) is None + # and model_fields_set contains the field + if self.total_result is None and "total_result" in self.model_fields_set: + _dict['totalResult'] = None + + # set to None if applied_limit (nullable) is None + # and model_fields_set contains the field + if self.applied_limit is None and "applied_limit" in self.model_fields_set: + _dict['appliedLimit'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServicePaginationResponse 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_request_execution.py b/zitadel_client/models/action_service_request_execution.py new file mode 100644 index 00000000..caf41340 --- /dev/null +++ b/zitadel_client/models/action_service_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, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceRequestExecution(BaseModel): + """ + ActionServiceRequestExecution + """ # noqa: E501 + all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + method: Optional[StrictStr] = Field(default=None, description="GRPC-method as condition.") + service: Optional[StrictStr] = Field(default=None, description="GRPC-service as condition.") + __properties: ClassVar[List[str]] = ["all", "method", "service"] + + 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 ActionServiceRequestExecution 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 ActionServiceRequestExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all"), + "method": obj.get("method"), + "service": obj.get("service") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_response_execution.py b/zitadel_client/models/action_service_response_execution.py new file mode 100644 index 00000000..67849fd5 --- /dev/null +++ b/zitadel_client/models/action_service_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, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceResponseExecution(BaseModel): + """ + ActionServiceResponseExecution + """ # noqa: E501 + all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + method: Optional[StrictStr] = Field(default=None, description="GRPC-method as condition.") + service: Optional[StrictStr] = Field(default=None, description="GRPC-service as condition.") + __properties: ClassVar[List[str]] = ["all", "method", "service"] + + 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 ActionServiceResponseExecution 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 ActionServiceResponseExecution from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "all": obj.get("all"), + "method": obj.get("method"), + "service": obj.get("service") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_rest_call.py b/zitadel_client/models/action_service_rest_call.py new file mode 100644 index 00000000..fc1ece7d --- /dev/null +++ b/zitadel_client/models/action_service_rest_call.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, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceRESTCall(BaseModel): + """ + ActionServiceRESTCall + """ # 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") + __properties: ClassVar[List[str]] = ["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 ActionServiceRESTCall 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 ActionServiceRESTCall 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_rest_webhook.py b/zitadel_client/models/action_service_rest_webhook.py new file mode 100644 index 00000000..d165fa23 --- /dev/null +++ b/zitadel_client/models/action_service_rest_webhook.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, Field, StrictBool +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceRESTWebhook(BaseModel): + """ + ActionServiceRESTWebhook + """ # 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") + __properties: ClassVar[List[str]] = ["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 ActionServiceRESTWebhook 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 ActionServiceRESTWebhook 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_set_execution_request.py b/zitadel_client/models/action_service_set_execution_request.py new file mode 100644 index 00000000..5dc2079c --- /dev/null +++ b/zitadel_client/models/action_service_set_execution_request.py @@ -0,0 +1,93 @@ +# 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_condition import ActionServiceCondition +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceSetExecutionRequest(BaseModel): + """ + ActionServiceSetExecutionRequest + """ # noqa: E501 + condition: Optional[ActionServiceCondition] = None + targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + __properties: ClassVar[List[str]] = ["condition", "targets"] + + 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() + 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": ActionServiceCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, + "targets": obj.get("targets") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_set_execution_response.py b/zitadel_client/models/action_service_set_execution_response.py new file mode 100644 index 00000000..fd5eecc0 --- /dev/null +++ b/zitadel_client/models/action_service_set_execution_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 datetime import datetime +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceSetExecutionResponse(BaseModel): + """ + ActionServiceSetExecutionResponse + """ # noqa: E501 + set_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="setDate") + __properties: ClassVar[List[str]] = ["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 ActionServiceSetExecutionResponse 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 ActionServiceSetExecutionResponse 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_target.py b/zitadel_client/models/action_service_target.py new file mode 100644 index 00000000..87957e22 --- /dev/null +++ b/zitadel_client/models/action_service_target.py @@ -0,0 +1,114 @@ +# 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, Optional +from zitadel_client.models.action_service_rest_call import ActionServiceRESTCall +from zitadel_client.models.action_service_rest_webhook import ActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceTarget(BaseModel): + """ + ActionServiceTarget + """ # noqa: E501 + id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the target.") + creation_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="creationDate") + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + name: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + endpoint: Optional[StrictStr] = None + signing_key: Optional[StrictStr] = Field(default=None, alias="signingKey") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + rest_call: Optional[ActionServiceRESTCall] = Field(default=None, alias="restCall") + rest_webhook: Optional[ActionServiceRESTWebhook] = Field(default=None, alias="restWebhook") + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "name", "timeout", "endpoint", "signingKey", "restAsync", "restCall", "restWebhook"] + + 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 ActionServiceTarget 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 rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceTarget 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"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "signingKey": obj.get("signingKey"), + "restAsync": obj.get("restAsync"), + "restCall": ActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restWebhook": ActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_target_field_name.py b/zitadel_client/models/action_service_target_field_name.py new file mode 100644 index 00000000..e4b3ff56 --- /dev/null +++ b/zitadel_client/models/action_service_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 ActionServiceTargetFieldName(str, Enum): + """ + ActionServiceTargetFieldName + """ + + """ + 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 ActionServiceTargetFieldName from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/zitadel_client/models/action_service_target_filter.py b/zitadel_client/models/action_service_target_filter.py new file mode 100644 index 00000000..29783668 --- /dev/null +++ b/zitadel_client/models/action_service_target_filter.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, Field, StrictStr +from typing import Any, ClassVar, Dict, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceTargetFilter(BaseModel): + """ + ActionServiceTargetFilter + """ # noqa: E501 + target_id: Optional[StrictStr] = Field(default=None, description="Defines the id to query for.", alias="targetId") + __properties: ClassVar[List[str]] = ["targetId"] + + 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 ActionServiceTargetFilter 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 ActionServiceTargetFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "targetId": obj.get("targetId") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_target_name_filter.py b/zitadel_client/models/action_service_target_name_filter.py new file mode 100644 index 00000000..0909d70c --- /dev/null +++ b/zitadel_client/models/action_service_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, StrictStr +from typing import Any, ClassVar, Dict, Optional +from zitadel_client.models.action_service_text_filter_method import ActionServiceTextFilterMethod +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceTargetNameFilter(BaseModel): + """ + ActionServiceTargetNameFilter + """ # noqa: E501 + target_name: Optional[StrictStr] = Field(default=None, description="Defines the name of the target to query for.", alias="targetName") + method: Optional[ActionServiceTextFilterMethod] = None + __properties: ClassVar[List[str]] = ["targetName", "method"] + + 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 ActionServiceTargetNameFilter 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 ActionServiceTargetNameFilter 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") + }) + return _obj + + diff --git a/zitadel_client/models/action_service_target_search_filter.py b/zitadel_client/models/action_service_target_search_filter.py new file mode 100644 index 00000000..e9f53131 --- /dev/null +++ b/zitadel_client/models/action_service_target_search_filter.py @@ -0,0 +1,97 @@ +# 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, Optional +from zitadel_client.models.action_service_in_target_ids_filter import ActionServiceInTargetIDsFilter +from zitadel_client.models.action_service_target_name_filter import ActionServiceTargetNameFilter +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceTargetSearchFilter(BaseModel): + """ + ActionServiceTargetSearchFilter + """ # noqa: E501 + in_target_ids_filter: Optional[ActionServiceInTargetIDsFilter] = Field(default=None, alias="inTargetIdsFilter") + target_name_filter: Optional[ActionServiceTargetNameFilter] = Field(default=None, alias="targetNameFilter") + __properties: ClassVar[List[str]] = ["inTargetIdsFilter", "targetNameFilter"] + + 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 ActionServiceTargetSearchFilter 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 in_target_ids_filter + if self.in_target_ids_filter: + _dict['inTargetIdsFilter'] = self.in_target_ids_filter.to_dict() + # override the default output from pydantic by calling `to_dict()` of target_name_filter + if self.target_name_filter: + _dict['targetNameFilter'] = self.target_name_filter.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceTargetSearchFilter from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "inTargetIdsFilter": ActionServiceInTargetIDsFilter.from_dict(obj["inTargetIdsFilter"]) if obj.get("inTargetIdsFilter") is not None else None, + "targetNameFilter": ActionServiceTargetNameFilter.from_dict(obj["targetNameFilter"]) if obj.get("targetNameFilter") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_text_filter_method.py b/zitadel_client/models/action_service_text_filter_method.py new file mode 100644 index 00000000..1ab70ae4 --- /dev/null +++ b/zitadel_client/models/action_service_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 ActionServiceTextFilterMethod(str, Enum): + """ + ActionServiceTextFilterMethod + """ + + """ + 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 ActionServiceTextFilterMethod from a JSON string""" + return cls(json.loads(json_str)) + + 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..d783d566 --- /dev/null +++ b/zitadel_client/models/action_service_update_target_request.py @@ -0,0 +1,119 @@ +# 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, Optional +from zitadel_client.models.action_service_rest_call import ActionServiceRESTCall +from zitadel_client.models.action_service_rest_webhook import ActionServiceRESTWebhook +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceUpdateTargetRequest(BaseModel): + """ + ActionServiceUpdateTargetRequest + """ # noqa: E501 + id: Optional[StrictStr] = None + name: Optional[StrictStr] = None + timeout: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".") + endpoint: Optional[StrictStr] = None + expiration_signing_key: Optional[StrictStr] = Field(default=None, description="A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like \"day\" or \"month\". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years. # Examples Example 1: Compute Duration from two Timestamps in pseudo code. Timestamp start = ...; Timestamp end = ...; Duration duration = ...; duration.seconds = end.seconds - start.seconds; duration.nanos = end.nanos - start.nanos; if (duration.seconds < 0 && duration.nanos > 0) { duration.seconds += 1; duration.nanos -= 1000000000; } else if (duration.seconds > 0 && duration.nanos < 0) { duration.seconds -= 1; duration.nanos += 1000000000; } Example 2: Compute Timestamp from Timestamp + Duration in pseudo code. Timestamp start = ...; Duration duration = ...; Timestamp end = ...; end.seconds = start.seconds + duration.seconds; end.nanos = start.nanos + duration.nanos; if (end.nanos < 0) { end.seconds -= 1; end.nanos += 1000000000; } else if (end.nanos >= 1000000000) { end.seconds += 1; end.nanos -= 1000000000; } Example 3: Compute Duration from datetime.timedelta in Python. td = datetime.timedelta(days=3, minutes=10) duration = Duration() duration.FromTimedelta(td) # JSON Mapping In JSON format, the Duration type is encoded as a string rather than an object, where the string ends in the suffix \"s\" (indicating seconds) and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds. For example, 3 seconds with 0 nanoseconds should be encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1 microsecond should be expressed in JSON format as \"3.000001s\".", alias="expirationSigningKey") + rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") + rest_call: Optional[ActionServiceRESTCall] = Field(default=None, alias="restCall") + rest_webhook: Optional[ActionServiceRESTWebhook] = Field(default=None, alias="restWebhook") + __properties: ClassVar[List[str]] = ["id", "name", "timeout", "endpoint", "expirationSigningKey", "restAsync", "restCall", "restWebhook"] + + 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, + ) + # override the default output from pydantic by calling `to_dict()` of rest_call + if self.rest_call: + _dict['restCall'] = self.rest_call.to_dict() + # override the default output from pydantic by calling `to_dict()` of rest_webhook + if self.rest_webhook: + _dict['restWebhook'] = self.rest_webhook.to_dict() + # set to None if name (nullable) is None + # and model_fields_set contains the field + if self.name is None and "name" in self.model_fields_set: + _dict['name'] = None + + # set to None if endpoint (nullable) is None + # and model_fields_set contains the field + if self.endpoint is None and "endpoint" in self.model_fields_set: + _dict['endpoint'] = None + + 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({ + "id": obj.get("id"), + "name": obj.get("name"), + "timeout": obj.get("timeout"), + "endpoint": obj.get("endpoint"), + "expirationSigningKey": obj.get("expirationSigningKey"), + "restAsync": obj.get("restAsync"), + "restCall": ActionServiceRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, + "restWebhook": ActionServiceRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None + }) + return _obj + + diff --git a/zitadel_client/models/action_service_update_target_response.py b/zitadel_client/models/action_service_update_target_response.py new file mode 100644 index 00000000..0530ac82 --- /dev/null +++ b/zitadel_client/models/action_service_update_target_response.py @@ -0,0 +1,95 @@ +# 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, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ActionServiceUpdateTargetResponse(BaseModel): + """ + ActionServiceUpdateTargetResponse + """ # noqa: E501 + change_date: Optional[datetime] = Field(default=None, description="A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are \"smeared\" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is \"{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z\" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The \"Z\" suffix indicates the timezone (\"UTC\"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by \"Z\") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, \"2017-01-15T01:30:15.01Z\" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`]( http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime() ) to obtain a formatter capable of generating timestamps in this format.", alias="changeDate") + signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + __properties: ClassVar[List[str]] = ["changeDate", "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 ActionServiceUpdateTargetResponse 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, + ) + # set to None if signing_key (nullable) is None + # and model_fields_set contains the field + if self.signing_key is None and "signing_key" in self.model_fields_set: + _dict['signingKey'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ActionServiceUpdateTargetResponse 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/beta_action_service_list_executions_response.py b/zitadel_client/models/beta_action_service_list_executions_response.py index d1715b5d..cbfd7b2d 100644 --- a/zitadel_client/models/beta_action_service_list_executions_response.py +++ b/zitadel_client/models/beta_action_service_list_executions_response.py @@ -29,8 +29,8 @@ class BetaActionServiceListExecutionsResponse(BaseModel): BetaActionServiceListExecutionsResponse """ # noqa: E501 pagination: Optional[BetaActionServicePaginationResponse] = None - result: Optional[List[BetaActionServiceExecution]] = None - __properties: ClassVar[List[str]] = ["pagination", "result"] + executions: Optional[List[BetaActionServiceExecution]] = None + __properties: ClassVar[List[str]] = ["pagination", "executions"] model_config = ConfigDict( populate_by_name=True, @@ -74,13 +74,13 @@ def to_dict(self) -> Dict[str, Any]: # 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) + # override the default output from pydantic by calling `to_dict()` of each item in executions (list) _items = [] - if self.result: - for _item_result in self.result: - if _item_result: - _items.append(_item_result.to_dict()) - _dict['result'] = _items + if self.executions: + for _item_executions in self.executions: + if _item_executions: + _items.append(_item_executions.to_dict()) + _dict['executions'] = _items return _dict @classmethod @@ -94,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "pagination": BetaActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "result": [BetaActionServiceExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "executions": [BetaActionServiceExecution.from_dict(_item) for _item in obj["executions"]] if obj.get("executions") is not None else None }) return _obj diff --git a/zitadel_client/models/beta_action_service_list_targets_response.py b/zitadel_client/models/beta_action_service_list_targets_response.py index da3e0cf1..63d50760 100644 --- a/zitadel_client/models/beta_action_service_list_targets_response.py +++ b/zitadel_client/models/beta_action_service_list_targets_response.py @@ -29,8 +29,8 @@ class BetaActionServiceListTargetsResponse(BaseModel): BetaActionServiceListTargetsResponse """ # noqa: E501 pagination: Optional[BetaActionServicePaginationResponse] = None - result: Optional[List[BetaActionServiceTarget]] = None - __properties: ClassVar[List[str]] = ["pagination", "result"] + targets: Optional[List[BetaActionServiceTarget]] = None + __properties: ClassVar[List[str]] = ["pagination", "targets"] model_config = ConfigDict( populate_by_name=True, @@ -74,13 +74,13 @@ def to_dict(self) -> Dict[str, Any]: # 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) + # override the default output from pydantic by calling `to_dict()` of each item in targets (list) _items = [] - if self.result: - for _item_result in self.result: - if _item_result: - _items.append(_item_result.to_dict()) - _dict['result'] = _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 @@ -94,7 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "pagination": BetaActionServicePaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, - "result": [BetaActionServiceTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None + "targets": [BetaActionServiceTarget.from_dict(_item) for _item in obj["targets"]] if obj.get("targets") is not None else None }) return _obj diff --git a/zitadel_client/zitadel.py b/zitadel_client/zitadel.py index 9b271c55..d3830650 100644 --- a/zitadel_client/zitadel.py +++ b/zitadel_client/zitadel.py @@ -24,6 +24,7 @@ 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 +from zitadel_client.api.action_service_api import ActionServiceApi from zitadel_client.api_client import ApiClient from zitadel_client.auth.authenticator import Authenticator from zitadel_client.auth.client_credentials_authenticator import ClientCredentialsAuthenticator @@ -59,6 +60,8 @@ class Zitadel: Endpoints for end-user management. webkeys (WebKeyServiceApi) Endpoints for WebCrypto keys (JWKS). + actions (ActionServiceApi)) + Endpoints for custom action workflows. beta_projects (BetaProjectServiceApi) Preview endpoints for project management. beta_apps (BetaAppServiceApi) @@ -122,6 +125,7 @@ def __init__( self.settings = SettingsServiceApi(client) self.users = UserServiceApi(client) self.webkeys = WebKeyServiceApi(client) + self.actions = ActionServiceApi(client) self.beta_projects = BetaProjectServiceApi(client) self.beta_apps = BetaAppServiceApi(client) self.beta_oidc = BetaOIDCServiceApi(client)