From 611c7b3558b390a82db47dc604f8661822364716 Mon Sep 17 00:00:00 2001 From: Mridang Agarwalla Date: Mon, 16 Jun 2025 22:04:27 +0300 Subject: [PATCH] chore: update generated output under .openapi markers --- zitadel_client/api/action_service_api.py | 2308 +--- zitadel_client/api/feature_service_api.py | 2820 +--- .../api/identity_provider_service_api.py | 140 +- zitadel_client/api/oidc_service_api.py | 786 +- .../api/organization_service_api.py | 282 +- zitadel_client/api/saml_service_api.py | 288 +- zitadel_client/api/session_service_api.py | 1126 +- zitadel_client/api/settings_service_api.py | 2524 +--- zitadel_client/api/user_service_api.py | 11397 ++++------------ zitadel_client/api/web_key_service_api.py | 562 +- .../models/action_service_beta_condition.py | 18 +- ...ion_service_beta_create_target_response.py | 14 + ...ion_service_beta_delete_target_response.py | 14 + .../action_service_beta_event_execution.py | 17 +- .../models/action_service_beta_execution.py | 14 + .../action_service_beta_function_execution.py | 14 + ...action_service_beta_get_target_response.py | 14 + ...ction_service_beta_in_target_ids_filter.py | 14 + ..._beta_list_execution_functions_response.py | 14 + ...ce_beta_list_execution_methods_response.py | 14 + ...e_beta_list_execution_services_response.py | 14 + ...n_service_beta_list_executions_response.py | 14 + ...tion_service_beta_list_targets_response.py | 14 + .../action_service_beta_pagination_request.py | 14 + ...action_service_beta_pagination_response.py | 14 + .../action_service_beta_request_execution.py | 17 +- .../action_service_beta_response_execution.py | 17 +- .../models/action_service_beta_rest_call.py | 14 + .../action_service_beta_rest_webhook.py | 14 + ...ion_service_beta_set_execution_response.py | 14 + .../models/action_service_beta_target.py | 24 +- .../action_service_beta_target_name_filter.py | 14 + ...ction_service_beta_target_search_filter.py | 16 +- ...ion_service_beta_update_target_response.py | 14 + .../action_service_create_target_request.py | 20 +- .../action_service_list_targets_request.py | 14 + .../models/action_service_protobuf_any.py | 14 + .../models/action_service_rpc_status.py | 14 + .../action_service_set_execution_request.py | 14 + .../action_service_update_target_request.py | 21 +- .../models/feature_service_details.py | 14 + .../models/feature_service_feature_flag.py | 14 + ..._service_get_instance_features_response.py | 14 + ...vice_get_organization_features_response.py | 14 + ...re_service_get_system_features_response.py | 14 + ...ture_service_get_user_features_response.py | 14 + ...rvice_improved_performance_feature_flag.py | 14 + .../models/feature_service_login_v2.py | 14 + .../feature_service_login_v2_feature_flag.py | 14 + .../models/feature_service_protobuf_any.py | 14 + ...ervice_reset_instance_features_response.py | 14 + ...ce_reset_organization_features_response.py | 14 + ..._service_reset_system_features_response.py | 14 + ...re_service_reset_user_features_response.py | 14 + .../models/feature_service_rpc_status.py | 14 + ...e_service_set_instance_features_request.py | 14 + ..._service_set_instance_features_response.py | 14 + ...vice_set_organization_features_response.py | 14 + ...ure_service_set_system_features_request.py | 14 + ...re_service_set_system_features_response.py | 14 + ...ture_service_set_user_features_response.py | 14 + .../identity_provider_service_apple_config.py | 14 + ...entity_provider_service_azure_ad_config.py | 14 + ...entity_provider_service_azure_ad_tenant.py | 16 +- .../identity_provider_service_details.py | 14 + ...ty_provider_service_generic_oidc_config.py | 14 + ..._provider_service_get_idpby_id_response.py | 14 + ...dentity_provider_service_git_hub_config.py | 14 + ...ervice_git_hub_enterprise_server_config.py | 14 + ...dentity_provider_service_git_lab_config.py | 14 + ...ider_service_git_lab_self_hosted_config.py | 14 + ...identity_provider_service_google_config.py | 14 + .../models/identity_provider_service_idp.py | 14 + .../identity_provider_service_idp_config.py | 27 +- .../identity_provider_service_jwt_config.py | 14 + ...entity_provider_service_ldap_attributes.py | 14 + .../identity_provider_service_ldap_config.py | 14 + ...identity_provider_service_o_auth_config.py | 14 + .../identity_provider_service_options.py | 14 + .../identity_provider_service_protobuf_any.py | 14 + .../identity_provider_service_rpc_status.py | 14 + .../identity_provider_service_saml_config.py | 14 + .../models/oidc_service_auth_request.py | 14 + .../oidc_service_authorization_error.py | 14 + ...ze_or_deny_device_authorization_request.py | 16 +- .../oidc_service_create_callback_request.py | 16 +- .../oidc_service_create_callback_response.py | 14 + zitadel_client/models/oidc_service_details.py | 14 + ...dc_service_device_authorization_request.py | 14 + .../oidc_service_get_auth_request_response.py | 14 + ...t_device_authorization_request_response.py | 14 + .../models/oidc_service_protobuf_any.py | 14 + .../models/oidc_service_rpc_status.py | 14 + zitadel_client/models/oidc_service_session.py | 14 + ...nization_service_add_human_user_request.py | 25 +- ...zation_service_add_organization_request.py | 14 + ..._service_add_organization_request_admin.py | 17 +- ...ation_service_add_organization_response.py | 14 + ...add_organization_response_created_admin.py | 14 + .../models/organization_service_details.py | 14 + .../organization_service_hashed_password.py | 14 + .../models/organization_service_idp_link.py | 14 + .../organization_service_list_details.py | 14 + ...tion_service_list_organizations_request.py | 14 + ...ion_service_list_organizations_response.py | 14 + .../models/organization_service_list_query.py | 14 + ...ation_service_organization_domain_query.py | 14 + ...anization_service_organization_id_query.py | 14 + ...ization_service_organization_name_query.py | 14 + ...zation_service_organization_state_query.py | 14 + .../models/organization_service_password.py | 14 + .../organization_service_protobuf_any.py | 14 + .../models/organization_service_rpc_status.py | 14 + .../organization_service_search_query.py | 19 +- ...on_service_send_email_verification_code.py | 14 + .../organization_service_set_human_email.py | 18 +- .../organization_service_set_human_phone.py | 18 +- .../organization_service_set_human_profile.py | 14 + ...organization_service_set_metadata_entry.py | 14 + .../saml_service_authorization_error.py | 14 + .../saml_service_create_response_request.py | 16 +- .../saml_service_create_response_response.py | 18 +- zitadel_client/models/saml_service_details.py | 14 + .../saml_service_get_saml_request_response.py | 14 + .../models/saml_service_post_response.py | 14 + .../models/saml_service_protobuf_any.py | 14 + .../models/saml_service_rpc_status.py | 14 + .../models/saml_service_saml_request.py | 14 + zitadel_client/models/saml_service_session.py | 14 + .../models/session_service_challenges.py | 14 + .../session_service_challenges_web_auth_n.py | 14 + .../session_service_check_idp_intent.py | 14 + .../models/session_service_check_otp.py | 14 + .../models/session_service_check_password.py | 14 + .../models/session_service_check_totp.py | 14 + .../models/session_service_check_user.py | 16 +- .../session_service_check_web_auth_n.py | 14 + .../models/session_service_checks.py | 14 + .../session_service_create_session_request.py | 14 + ...session_service_create_session_response.py | 14 + .../session_service_creation_date_query.py | 14 + .../models/session_service_creator_query.py | 14 + .../session_service_delete_session_request.py | 14 + ...session_service_delete_session_response.py | 14 + .../models/session_service_details.py | 14 + .../models/session_service_factors.py | 14 + .../session_service_get_session_response.py | 14 + .../models/session_service_ids_query.py | 14 + .../models/session_service_intent_factor.py | 14 + .../models/session_service_list_details.py | 14 + .../models/session_service_list_query.py | 14 + .../session_service_list_sessions_request.py | 14 + .../session_service_list_sessions_response.py | 14 + .../session_service_otp_email_send_code.py | 14 + .../models/session_service_otp_factor.py | 14 + .../models/session_service_password_factor.py | 14 + .../models/session_service_protobuf_any.py | 14 + .../session_service_request_challenges.py | 14 + ...on_service_request_challenges_otp_email.py | 16 +- ...ssion_service_request_challenges_otpsms.py | 14 + ...n_service_request_challenges_web_auth_n.py | 14 + .../models/session_service_rpc_status.py | 14 + .../models/session_service_search_query.py | 19 +- .../models/session_service_session.py | 14 + .../session_service_set_session_request.py | 14 + .../session_service_set_session_response.py | 14 + .../models/session_service_totp_factor.py | 14 + .../models/session_service_user_agent.py | 14 + ...ession_service_user_agent_header_values.py | 14 + .../session_service_user_agent_query.py | 14 + .../models/session_service_user_factor.py | 14 + .../models/session_service_user_id_query.py | 14 + .../session_service_web_auth_n_factor.py | 14 + .../settings_service_branding_settings.py | 14 + .../models/settings_service_details.py | 14 + .../settings_service_domain_settings.py | 14 + ...ttings_service_embedded_iframe_settings.py | 14 + ..._get_active_identity_providers_response.py | 14 + ..._service_get_branding_settings_response.py | 14 + ...gs_service_get_domain_settings_response.py | 14 + ...s_service_get_general_settings_response.py | 14 + ...get_legal_and_support_settings_response.py | 14 + ...s_service_get_lockout_settings_response.py | 14 + ...ngs_service_get_login_settings_response.py | 14 + ...t_password_complexity_settings_response.py | 14 + ...e_get_password_expiry_settings_response.py | 14 + ..._service_get_security_settings_response.py | 14 + .../settings_service_identity_provider.py | 14 + ...ings_service_legal_and_support_settings.py | 14 + .../models/settings_service_list_details.py | 14 + .../settings_service_lockout_settings.py | 14 + .../models/settings_service_login_settings.py | 14 + .../models/settings_service_options.py | 14 + ...gs_service_password_complexity_settings.py | 14 + ...ttings_service_password_expiry_settings.py | 14 + .../models/settings_service_protobuf_any.py | 14 + .../models/settings_service_rpc_status.py | 14 + .../settings_service_security_settings.py | 14 + ...s_service_set_security_settings_request.py | 14 + ..._service_set_security_settings_response.py | 14 + .../models/settings_service_theme.py | 14 + .../user_service_add_human_user_request.py | 25 +- .../user_service_add_human_user_response.py | 14 + .../user_service_add_idp_link_request.py | 14 + .../user_service_add_idp_link_response.py | 14 + .../user_service_add_otp_email_response.py | 14 + .../user_service_add_otpsms_response.py | 14 + .../models/user_service_and_query.py | 14 + .../models/user_service_auth_factor.py | 19 +- .../models/user_service_auth_factor_u2_f.py | 14 + ...user_service_create_invite_code_request.py | 16 +- ...ser_service_create_invite_code_response.py | 14 + ...reate_passkey_registration_link_request.py | 16 +- ...eate_passkey_registration_link_response.py | 14 + .../user_service_deactivate_user_response.py | 14 + .../user_service_delete_user_response.py | 14 + zitadel_client/models/user_service_details.py | 14 + .../models/user_service_display_name_query.py | 14 + .../models/user_service_email_query.py | 14 + .../models/user_service_first_name_query.py | 14 + .../user_service_get_user_by_id_response.py | 14 + .../models/user_service_hashed_password.py | 14 + .../models/user_service_human_email.py | 14 + ...service_human_mfa_init_skipped_response.py | 14 + .../models/user_service_human_phone.py | 14 + .../models/user_service_human_profile.py | 14 + .../models/user_service_human_user.py | 14 + .../models/user_service_idp_information.py | 21 +- .../models/user_service_idp_intent.py | 14 + .../models/user_service_idp_link.py | 14 + ...user_service_idpldap_access_information.py | 14 + ...er_service_idpo_auth_access_information.py | 14 + ...user_service_idpsaml_access_information.py | 14 + .../user_service_in_user_emails_query.py | 14 + .../models/user_service_in_user_id_query.py | 14 + .../models/user_service_last_name_query.py | 14 + .../models/user_service_ldap_credentials.py | 14 + ...ce_list_authentication_factors_response.py | 14 + ...st_authentication_method_types_response.py | 14 + .../models/user_service_list_details.py | 14 + .../user_service_list_idp_links_request.py | 14 + .../user_service_list_idp_links_response.py | 14 + .../user_service_list_passkeys_response.py | 14 + .../models/user_service_list_query.py | 14 + .../models/user_service_list_users_request.py | 14 + .../user_service_list_users_response.py | 14 + .../models/user_service_lock_user_response.py | 14 + .../models/user_service_login_name_query.py | 14 + .../models/user_service_machine_user.py | 14 + .../models/user_service_nick_name_query.py | 14 + .../models/user_service_not_query.py | 14 + .../models/user_service_or_query.py | 14 + .../models/user_service_organization.py | 16 +- .../user_service_organization_id_query.py | 14 + zitadel_client/models/user_service_passkey.py | 14 + .../user_service_passkey_registration_code.py | 14 + .../models/user_service_password.py | 14 + .../user_service_password_reset_request.py | 16 +- .../user_service_password_reset_response.py | 14 + .../models/user_service_phone_query.py | 14 + .../models/user_service_protobuf_any.py | 14 + .../user_service_reactivate_user_response.py | 14 + .../models/user_service_redirect_urls.py | 14 + .../user_service_register_passkey_request.py | 14 + .../user_service_register_passkey_response.py | 14 + .../user_service_register_totp_response.py | 14 + .../user_service_register_u2_f_request.py | 14 + .../user_service_register_u2_f_response.py | 14 + .../user_service_remove_idp_link_response.py | 14 + .../user_service_remove_otp_email_response.py | 14 + .../user_service_remove_otpsms_response.py | 14 + .../user_service_remove_passkey_response.py | 14 + .../user_service_remove_phone_response.py | 14 + .../user_service_remove_totp_response.py | 14 + .../user_service_remove_u2_f_response.py | 14 + .../user_service_resend_email_code_request.py | 16 +- ...user_service_resend_email_code_response.py | 14 + ...ser_service_resend_invite_code_response.py | 14 + .../user_service_resend_phone_code_request.py | 16 +- ...user_service_resend_phone_code_response.py | 14 + ...trieve_identity_provider_intent_request.py | 14 + ...rieve_identity_provider_intent_response.py | 14 + .../models/user_service_rpc_status.py | 14 + .../models/user_service_search_query.py | 30 +- .../user_service_send_email_code_request.py | 16 +- .../user_service_send_email_code_response.py | 14 + ...er_service_send_email_verification_code.py | 14 + .../models/user_service_send_invite_code.py | 14 + ..._service_send_passkey_registration_link.py | 14 + .../user_service_send_password_reset_link.py | 14 + .../models/user_service_set_email_request.py | 18 +- .../models/user_service_set_email_response.py | 14 + .../models/user_service_set_human_email.py | 18 +- .../models/user_service_set_human_phone.py | 18 +- .../models/user_service_set_human_profile.py | 14 + .../models/user_service_set_metadata_entry.py | 14 + .../models/user_service_set_password.py | 18 +- .../user_service_set_password_request.py | 17 +- .../user_service_set_password_response.py | 14 + .../models/user_service_set_phone_request.py | 18 +- .../models/user_service_set_phone_response.py | 14 + ..._start_identity_provider_intent_request.py | 17 +- ...start_identity_provider_intent_response.py | 18 +- .../models/user_service_state_query.py | 14 + .../models/user_service_type_query.py | 14 + .../user_service_unlock_user_response.py | 14 + .../user_service_update_human_user_request.py | 14 + ...user_service_update_human_user_response.py | 14 + zitadel_client/models/user_service_user.py | 22 +- .../models/user_service_user_name_query.py | 14 + .../user_service_verify_email_request.py | 14 + .../user_service_verify_email_response.py | 14 + ...user_service_verify_invite_code_request.py | 14 + ...ser_service_verify_invite_code_response.py | 14 + ...ice_verify_passkey_registration_request.py | 14 + ...ce_verify_passkey_registration_response.py | 14 + .../user_service_verify_phone_request.py | 14 + .../user_service_verify_phone_response.py | 14 + ...ervice_verify_totp_registration_request.py | 14 + ...rvice_verify_totp_registration_response.py | 14 + ...ervice_verify_u2_f_registration_request.py | 14 + ...rvice_verify_u2_f_registration_response.py | 14 + ..._service_beta_activate_web_key_response.py | 14 + ...ey_service_beta_create_web_key_response.py | 14 + ...ey_service_beta_delete_web_key_response.py | 14 + .../models/web_key_service_beta_ecdsa.py | 14 + ...key_service_beta_list_web_keys_response.py | 14 + .../models/web_key_service_beta_rsa.py | 14 + .../models/web_key_service_beta_web_key.py | 21 +- .../web_key_service_create_web_key_request.py | 17 +- .../models/web_key_service_protobuf_any.py | 14 + .../models/web_key_service_rpc_status.py | 14 + .../models/zitadelobjectv2_organization.py | 16 +- .../models/zitadelorgv2_organization.py | 14 + 334 files changed, 8938 insertions(+), 18033 deletions(-) diff --git a/zitadel_client/api/action_service_api.py b/zitadel_client/api/action_service_api.py index 5afad3ab..077394b6 100644 --- a/zitadel_client/api/action_service_api.py +++ b/zitadel_client/api/action_service_api.py @@ -97,7 +97,7 @@ def action_service_create_target( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_create_target_serialize( + _param = self.__action_service_create_target_serialize( action_service_create_target_request=action_service_create_target_request, _request_auth=_request_auth, _content_type=_content_type, @@ -112,6 +112,7 @@ def action_service_create_target( '404': "ActionServiceRpcStatus", '409': "object", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -122,11 +123,87 @@ def action_service_create_target( response_types_map=_response_types_map, ).data + def __action_service_create_target_serialize( + self, + action_service_create_target_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if action_service_create_target_request is not None: + _body_params = action_service_create_target_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/actions/targets', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + @validate_call - def action_service_create_target_with_http_info( + def action_service_delete_target( self, - action_service_create_target_request: ActionServiceCreateTargetRequest, + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -139,13 +216,13 @@ def action_service_create_target_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaCreateTargetResponse]: - """Create Target + ) -> ActionServiceBetaDeleteTargetResponse: + """Delete Target - Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + 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_create_target_request: (required) - :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -168,8 +245,8 @@ def action_service_create_target_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_create_target_serialize( - action_service_create_target_request=action_service_create_target_request, + _param = self.__action_service_delete_target_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -177,12 +254,12 @@ def action_service_create_target_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaCreateTargetResponse", + '200': "ActionServiceBetaDeleteTargetResponse", '400': "object", '403': "ActionServiceRpcStatus", '404': "ActionServiceRpcStatus", - '409': "object", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -191,13 +268,76 @@ def action_service_create_target_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __action_service_delete_target_serialize( + self, + id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if id is not None: + _path_params['id'] = id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2beta/actions/targets/{id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def action_service_create_target_without_preload_content( + def action_service_get_target( self, - action_service_create_target_request: ActionServiceCreateTargetRequest, + id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -210,13 +350,13 @@ def action_service_create_target_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create Target + ) -> ActionServiceBetaGetTargetResponse: + """Get Target - Create a new target to your endpoint, which can be used in executions. Required permission: - `action.target.write` Required feature flag: - `actions` + Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` - :param action_service_create_target_request: (required) - :type action_service_create_target_request: ActionServiceCreateTargetRequest + :param id: (required) + :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -239,8 +379,8 @@ def action_service_create_target_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_create_target_serialize( - action_service_create_target_request=action_service_create_target_request, + _param = self.__action_service_get_target_serialize( + id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -248,22 +388,25 @@ def action_service_create_target_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaCreateTargetResponse", + '200': "ActionServiceBetaGetTargetResponse", '400': "object", '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - '409': "object", + '404': "object", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _action_service_create_target_serialize( + def __action_service_get_target_serialize( self, - action_service_create_target_request, + id, _request_auth, _content_type, _headers, @@ -285,12 +428,12 @@ def _action_service_create_target_serialize( _body_params: Optional[bytes] = None # process the path parameters + if id is not None: + _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if action_service_create_target_request is not None: - _body_params = action_service_create_target_request # set the HTTP header `Accept` @@ -301,19 +444,6 @@ def _action_service_create_target_serialize( ] ) - # 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] = [ @@ -321,8 +451,8 @@ def _action_service_create_target_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2beta/actions/targets', + method='GET', + resource_path='/v2beta/actions/targets/{id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -339,9 +469,8 @@ def _action_service_create_target_serialize( @validate_call - def action_service_delete_target( + def action_service_list_execution_functions( self, - id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -354,13 +483,11 @@ def action_service_delete_target( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaDeleteTargetResponse: - """Delete Target + ) -> ActionServiceBetaListExecutionFunctionsResponse: + """List Execution Functions - 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` + List all available functions which can be used as condition for executions. - :param id: (required) - :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -383,8 +510,7 @@ def action_service_delete_target( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_delete_target_serialize( - id=id, + _param = self.__action_service_list_execution_functions_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -392,11 +518,11 @@ def action_service_delete_target( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", + '200': "ActionServiceBetaListExecutionFunctionsResponse", '403': "ActionServiceRpcStatus", '404': "ActionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -407,81 +533,70 @@ def action_service_delete_target( response_types_map=_response_types_map, ).data - - @validate_call - def action_service_delete_target_with_http_info( + def __action_service_list_execution_functions_serialize( self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaDeleteTargetResponse]: - """Delete Target + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - 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` + _host = None - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 + _collection_formats: Dict[str, str] = { + } - _param = self._action_service_delete_target_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/actions/executions/functions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def action_service_delete_target_without_preload_content( + def action_service_list_execution_methods( self, - id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -494,13 +609,11 @@ def action_service_delete_target_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete Target + ) -> ActionServiceBetaListExecutionMethodsResponse: + """List Execution Methods - 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` + List all available methods which can be used as condition for executions. - :param id: (required) - :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -523,8 +636,7 @@ def action_service_delete_target_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_delete_target_serialize( - id=id, + _param = self.__action_service_list_execution_methods_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -532,21 +644,23 @@ def action_service_delete_target_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaDeleteTargetResponse", - '400': "object", + '200': "ActionServiceBetaListExecutionMethodsResponse", '403': "ActionServiceRpcStatus", '404': "ActionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _action_service_delete_target_serialize( + def __action_service_list_execution_methods_serialize( self, - id, _request_auth, _content_type, _headers, @@ -568,8 +682,6 @@ def _action_service_delete_target_serialize( _body_params: Optional[bytes] = None # process the path parameters - if id is not None: - _path_params['id'] = id # process the query parameters # process the header parameters # process the form parameters @@ -591,8 +703,8 @@ def _action_service_delete_target_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2beta/actions/targets/{id}', + method='GET', + resource_path='/v2beta/actions/executions/methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -609,9 +721,8 @@ def _action_service_delete_target_serialize( @validate_call - def action_service_get_target( + def action_service_list_execution_services( self, - id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -624,13 +735,11 @@ def action_service_get_target( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaGetTargetResponse: - """Get Target + ) -> ActionServiceBetaListExecutionServicesResponse: + """List Execution Services - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + List all available services which can be used as condition for executions. - :param id: (required) - :type id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -653,8 +762,7 @@ def action_service_get_target( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_get_target_serialize( - id=id, + _param = self.__action_service_list_execution_services_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -662,11 +770,11 @@ def action_service_get_target( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", - '400': "object", + '200': "ActionServiceBetaListExecutionServicesResponse", '403': "ActionServiceRpcStatus", - '404': "object", + '404': "ActionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -677,11 +785,74 @@ def action_service_get_target( response_types_map=_response_types_map, ).data + def __action_service_list_execution_services_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2beta/actions/executions/services', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + @validate_call - def action_service_get_target_with_http_info( + def action_service_list_executions( self, - id: StrictStr, + pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, + pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, + pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, + sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -694,13 +865,19 @@ def action_service_get_target_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaGetTargetResponse]: - """Get Target + ) -> ActionServiceBetaListExecutionsResponse: + """List Executions - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` + 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 id: (required) - :type id: str + :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. + :type pagination_offset: str + :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. + :type pagination_limit: int + :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. + :type pagination_asc: bool + :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. + :type sorting_column: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -723,8 +900,11 @@ def action_service_get_target_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_get_target_serialize( - id=id, + _param = self.__action_service_list_executions_serialize( + pagination_offset=pagination_offset, + pagination_limit=pagination_limit, + pagination_asc=pagination_asc, + sorting_column=sorting_column, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -732,11 +912,12 @@ def action_service_get_target_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", + '200': "ActionServiceBetaListExecutionsResponse", '400': "object", '403': "ActionServiceRpcStatus", - '404': "object", + '404': "ActionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -745,1434 +926,21 @@ def action_service_get_target_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data - @validate_call - def action_service_get_target_without_preload_content( + def __action_service_list_executions_serialize( self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Target + pagination_offset, + pagination_limit, + pagination_asc, + sorting_column, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Returns the target identified by the requested ID. Required permission: - `action.target.read` Required feature flag: - `actions` - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_get_target_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaGetTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _action_service_get_target_serialize( - self, - id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if id is not None: - _path_params['id'] = id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/targets/{id}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_execution_functions( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaListExecutionFunctionsResponse: - """List Execution Functions - - List all available functions which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_functions_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def action_service_list_execution_functions_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaListExecutionFunctionsResponse]: - """List Execution Functions - - List all available functions which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_functions_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def action_service_list_execution_functions_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List Execution Functions - - List all available functions which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_functions_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionFunctionsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _action_service_list_execution_functions_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/functions', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_execution_methods( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaListExecutionMethodsResponse: - """List Execution Methods - - List all available methods which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_methods_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def action_service_list_execution_methods_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaListExecutionMethodsResponse]: - """List Execution Methods - - List all available methods which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_methods_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def action_service_list_execution_methods_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List Execution Methods - - List all available methods which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_methods_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionMethodsResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _action_service_list_execution_methods_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/methods', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_execution_services( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaListExecutionServicesResponse: - """List Execution Services - - List all available services which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_services_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def action_service_list_execution_services_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaListExecutionServicesResponse]: - """List Execution Services - - List all available services which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_services_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def action_service_list_execution_services_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List Execution Services - - List all available services which can be used as condition for executions. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_execution_services_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionServicesResponse", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _action_service_list_execution_services_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2beta/actions/executions/services', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_executions( - self, - pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, - pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, - pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, - sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaListExecutionsResponse: - """List Executions - - List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` - - :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. - :type pagination_offset: str - :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. - :type pagination_limit: int - :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. - :type pagination_asc: bool - :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. - :type sorting_column: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_executions_serialize( - pagination_offset=pagination_offset, - pagination_limit=pagination_limit, - pagination_asc=pagination_asc, - sorting_column=sorting_column, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def action_service_list_executions_with_http_info( - self, - pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, - pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, - pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, - sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaListExecutionsResponse]: - """List Executions - - List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` - - :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. - :type pagination_offset: str - :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. - :type pagination_limit: int - :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. - :type pagination_asc: bool - :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. - :type sorting_column: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_executions_serialize( - pagination_offset=pagination_offset, - pagination_limit=pagination_limit, - pagination_asc=pagination_asc, - sorting_column=sorting_column, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def action_service_list_executions_without_preload_content( - self, - pagination_offset: Annotated[Optional[StrictStr], Field(description="Starting point for retrieval, in combination of offset used to query a set list of objects.")] = None, - pagination_limit: Annotated[Optional[StrictInt], Field(description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.")] = None, - pagination_asc: Annotated[Optional[StrictBool], Field(description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.")] = None, - sorting_column: Annotated[Optional[StrictStr], Field(description="The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List Executions - - List all matching executions. By default all executions of the instance are returned that have at least one execution target. Make sure to include a limit and sorting for pagination. Required permission: - `action.execution.read` Required feature flag: - `actions` - - :param pagination_offset: Starting point for retrieval, in combination of offset used to query a set list of objects. - :type pagination_offset: str - :param pagination_limit: limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken. - :type pagination_limit: int - :param pagination_asc: Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending. - :type pagination_asc: bool - :param sorting_column: The field the result is sorted by. The default is the creation date. Beware that if you change this, your result pagination might be inconsistent. - :type sorting_column: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_executions_serialize( - pagination_offset=pagination_offset, - pagination_limit=pagination_limit, - pagination_asc=pagination_asc, - sorting_column=sorting_column, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListExecutionsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _action_service_list_executions_serialize( - self, - pagination_offset, - pagination_limit, - pagination_asc, - sorting_column, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if pagination_offset is not None: - - _query_params.append(('pagination.offset', pagination_offset)) - - if pagination_limit is not None: - - _query_params.append(('pagination.limit', pagination_limit)) - - if pagination_asc is not None: - - _query_params.append(('pagination.asc', pagination_asc)) - - if sorting_column is not None: - - _query_params.append(('sortingColumn', sorting_column)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2beta/actions/executions/_search', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def action_service_list_targets( - self, - action_service_list_targets_request: ActionServiceListTargetsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaListTargetsResponse: - """List targets - - List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` - - :param action_service_list_targets_request: (required) - :type action_service_list_targets_request: ActionServiceListTargetsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def action_service_list_targets_with_http_info( - self, - action_service_list_targets_request: ActionServiceListTargetsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaListTargetsResponse]: - """List targets - - List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` - - :param action_service_list_targets_request: (required) - :type action_service_list_targets_request: ActionServiceListTargetsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def action_service_list_targets_without_preload_content( - self, - action_service_list_targets_request: ActionServiceListTargetsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List targets - - List all matching targets. By default all targets of the instance are returned. Make sure to include a limit and sorting for pagination. Required permission: - `action.target.read` Required feature flag: - `actions` - - :param action_service_list_targets_request: (required) - :type action_service_list_targets_request: ActionServiceListTargetsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_list_targets_serialize( - action_service_list_targets_request=action_service_list_targets_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaListTargetsResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _action_service_list_targets_serialize( - self, - action_service_list_targets_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None + _host = None _collection_formats: Dict[str, str] = { } @@ -2188,11 +956,25 @@ def _action_service_list_targets_serialize( # process the path parameters # process the query parameters + if pagination_offset is not None: + + _query_params.append(('pagination.offset', pagination_offset)) + + if pagination_limit is not None: + + _query_params.append(('pagination.limit', pagination_limit)) + + if pagination_asc is not None: + + _query_params.append(('pagination.asc', pagination_asc)) + + if sorting_column is not None: + + _query_params.append(('sortingColumn', sorting_column)) + # process the header parameters # process the form parameters # process the body parameter - if action_service_list_targets_request is not None: - _body_params = action_service_list_targets_request # set the HTTP header `Accept` @@ -2203,19 +985,6 @@ def _action_service_list_targets_serialize( ] ) - # 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] = [ @@ -2224,7 +993,7 @@ def _action_service_list_targets_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2beta/actions/targets/_search', + resource_path='/v2beta/actions/executions/_search', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2237,83 +1006,13 @@ def _action_service_list_targets_serialize( _request_auth=_request_auth ) - - - - @validate_call - def action_service_set_execution( - self, - action_service_set_execution_request: ActionServiceSetExecutionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ActionServiceBetaSetExecutionResponse: - """Set Execution - - Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` - - :param action_service_set_execution_request: (required) - :type action_service_set_execution_request: ActionServiceSetExecutionRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_set_execution_serialize( - action_service_set_execution_request=action_service_set_execution_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaSetExecutionResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "ActionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data + @validate_call - def action_service_set_execution_with_http_info( + def action_service_list_targets( self, - action_service_set_execution_request: ActionServiceSetExecutionRequest, + action_service_list_targets_request: ActionServiceListTargetsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2326,13 +1025,13 @@ def action_service_set_execution_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaSetExecutionResponse]: - """Set Execution + ) -> ActionServiceBetaListTargetsResponse: + """List targets - 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` + 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_set_execution_request: (required) - :type action_service_set_execution_request: ActionServiceSetExecutionRequest + :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 @@ -2355,8 +1054,8 @@ def action_service_set_execution_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_set_execution_serialize( - action_service_set_execution_request=action_service_set_execution_request, + _param = self.__action_service_list_targets_serialize( + action_service_list_targets_request=action_service_list_targets_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2364,11 +1063,12 @@ def action_service_set_execution_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaSetExecutionResponse", + '200': "ActionServiceBetaListTargetsResponse", '400': "object", '403': "ActionServiceRpcStatus", '404': "ActionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2377,11 +1077,87 @@ def action_service_set_execution_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __action_service_list_targets_serialize( + self, + action_service_list_targets_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if action_service_list_targets_request is not None: + _body_params = action_service_list_targets_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2beta/actions/targets/_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def action_service_set_execution_without_preload_content( + def action_service_set_execution( self, action_service_set_execution_request: ActionServiceSetExecutionRequest, _request_timeout: Union[ @@ -2396,7 +1172,7 @@ def action_service_set_execution_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: + ) -> ActionServiceBetaSetExecutionResponse: """Set Execution Sets an execution to call a target or include the targets of another execution. Setting an empty list of targets will remove all targets from the execution, making it a noop. Required permission: - `action.execution.write` Required feature flag: - `actions` @@ -2425,7 +1201,7 @@ def action_service_set_execution_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_set_execution_serialize( + _param = self.__action_service_set_execution_serialize( action_service_set_execution_request=action_service_set_execution_request, _request_auth=_request_auth, _content_type=_content_type, @@ -2439,14 +1215,18 @@ def action_service_set_execution_without_preload_content( '403': "ActionServiceRpcStatus", '404': "ActionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _action_service_set_execution_serialize( + def __action_service_set_execution_serialize( self, action_service_set_execution_request, _request_auth, @@ -2571,7 +1351,7 @@ def action_service_update_target( :return: Returns the result object. """ # noqa: E501 - _param = self._action_service_update_target_serialize( + _param = self.__action_service_update_target_serialize( id=id, action_service_update_target_request=action_service_update_target_request, _request_auth=_request_auth, @@ -2586,80 +1366,7 @@ def action_service_update_target( '403': "ActionServiceRpcStatus", '404': "object", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def action_service_update_target_with_http_info( - self, - id: StrictStr, - action_service_update_target_request: ActionServiceUpdateTargetRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ActionServiceBetaUpdateTargetResponse]: - """Update Target - - Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` - - :param id: (required) - :type id: str - :param action_service_update_target_request: (required) - :type action_service_update_target_request: ActionServiceUpdateTargetRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_update_target_serialize( - id=id, - action_service_update_target_request=action_service_update_target_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaUpdateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2668,80 +1375,9 @@ def action_service_update_target_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def action_service_update_target_without_preload_content( - self, - id: StrictStr, - action_service_update_target_request: ActionServiceUpdateTargetRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update Target - - Update an existing target. To generate a new signing key set the optional expirationSigningKey. Required permission: - `action.target.write` Required feature flag: - `actions` - - :param id: (required) - :type id: str - :param action_service_update_target_request: (required) - :type action_service_update_target_request: ActionServiceUpdateTargetRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._action_service_update_target_serialize( - id=id, - action_service_update_target_request=action_service_update_target_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ActionServiceBetaUpdateTargetResponse", - '400': "object", - '403': "ActionServiceRpcStatus", - '404': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _action_service_update_target_serialize( + def __action_service_update_target_serialize( self, id, action_service_update_target_request, diff --git a/zitadel_client/api/feature_service_api.py b/zitadel_client/api/feature_service_api.py index 9d60962b..266e8c72 100644 --- a/zitadel_client/api/feature_service_api.py +++ b/zitadel_client/api/feature_service_api.py @@ -97,7 +97,7 @@ def feature_service_get_instance_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_instance_features_serialize( + _param = self.__feature_service_get_instance_features_serialize( inheritance=inheritance, _request_auth=_request_auth, _content_type=_content_type, @@ -110,6 +110,7 @@ def feature_service_get_instance_features( '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -120,80 +121,77 @@ def feature_service_get_instance_features( response_types_map=_response_types_map, ).data - - @validate_call - def feature_service_get_instance_features_with_http_info( + def __feature_service_get_instance_features_serialize( self, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the instance, it will be omitted from the response or Not Found is returned when the instance has no features flags at all.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceGetInstanceFeaturesResponse]: - """Get Instance Features + inheritance, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + _host = None - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the instance, it will be omitted from the response or Not Found is returned when the instance has no features flags at all. - :type inheritance: bool - :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 + _collection_formats: Dict[str, str] = { + } - _param = self._feature_service_get_instance_features_serialize( - inheritance=inheritance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - 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, + # process the path parameters + # process the query parameters + if inheritance is not None: + + _query_params.append(('inheritance', inheritance)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/features/instance', + 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 feature_service_get_instance_features_without_preload_content( + def feature_service_get_organization_features( self, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the instance, it will be omitted from the response or Not Found is returned when the instance has no features flags at all.")] = None, + organization_id: StrictStr, + inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -206,12 +204,14 @@ def feature_service_get_instance_features_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Instance Features + ) -> FeatureServiceGetOrganizationFeaturesResponse: + """Get Organization Features - Returns all configured features for an instance. Unset fields mean the feature is the current system default. Required permissions: - none + Returns all configured features for an organization. Unset fields mean the feature is the current instance default. Required permissions: - org.feature.read - no permission required for the organization the user belongs to - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the instance, it will be omitted from the response or Not Found is returned when the instance has no features flags at all. + :param organization_id: (required) + :type organization_id: str + :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all. :type inheritance: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -235,7 +235,8 @@ def feature_service_get_instance_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_instance_features_serialize( + _param = self.__feature_service_get_organization_features_serialize( + organization_id=organization_id, inheritance=inheritance, _request_auth=_request_auth, _content_type=_content_type, @@ -244,19 +245,24 @@ def feature_service_get_instance_features_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetInstanceFeaturesResponse", + '200': "FeatureServiceGetOrganizationFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _feature_service_get_instance_features_serialize( + def __feature_service_get_organization_features_serialize( self, + organization_id, inheritance, _request_auth, _content_type, @@ -279,6 +285,8 @@ def _feature_service_get_instance_features_serialize( _body_params: Optional[bytes] = None # process the path parameters + if organization_id is not None: + _path_params['organizationId'] = organization_id # process the query parameters if inheritance is not None: @@ -305,7 +313,7 @@ def _feature_service_get_instance_features_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/features/instance', + resource_path='/v2/features/organization/{organizationId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -322,10 +330,8 @@ def _feature_service_get_instance_features_serialize( @validate_call - def feature_service_get_organization_features( + def feature_service_get_system_features( self, - organization_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -338,15 +344,11 @@ def feature_service_get_organization_features( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceGetOrganizationFeaturesResponse: - """Get Organization Features + ) -> FeatureServiceGetSystemFeaturesResponse: + """Get System Features - Returns all configured features for an organization. Unset fields mean the feature is the current instance default. Required permissions: - org.feature.read - no permission required for the organization the user belongs to + Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - :param organization_id: (required) - :type organization_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all. - :type inheritance: bool :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 @@ -369,9 +371,7 @@ def feature_service_get_organization_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_organization_features_serialize( - organization_id=organization_id, - inheritance=inheritance, + _param = self.__feature_service_get_system_features_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -379,10 +379,11 @@ def feature_service_get_organization_features( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetOrganizationFeaturesResponse", + '200': "FeatureServiceGetSystemFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -393,12 +394,72 @@ def feature_service_get_organization_features( response_types_map=_response_types_map, ).data + def __feature_service_get_system_features_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/features/system', + 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 feature_service_get_organization_features_with_http_info( + def feature_service_get_user_features( self, - organization_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all.")] = None, + user_id: StrictStr, + inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -411,14 +472,14 @@ def feature_service_get_organization_features_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceGetOrganizationFeaturesResponse]: - """Get Organization Features + ) -> FeatureServiceGetUserFeaturesResponse: + """Get User Features - Returns all configured features for an organization. Unset fields mean the feature is the current instance default. Required permissions: - org.feature.read - no permission required for the organization the user belongs to + Returns all configured features for a user. Unset fields mean the feature is the current organization default. Required permissions: - user.feature.read - no permission required for the own user - :param organization_id: (required) - :type organization_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all. + :param user_id: (required) + :type user_id: str + :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all. :type inheritance: bool :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -442,8 +503,8 @@ def feature_service_get_organization_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_get_organization_features_serialize( - organization_id=organization_id, + _param = self.__feature_service_get_user_features_serialize( + user_id=user_id, inheritance=inheritance, _request_auth=_request_auth, _content_type=_content_type, @@ -452,10 +513,11 @@ def feature_service_get_organization_features_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetOrganizationFeaturesResponse", + '200': "FeatureServiceGetUserFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -464,81 +526,11 @@ def feature_service_get_organization_features_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - + ).data - @validate_call - def feature_service_get_organization_features_without_preload_content( + def __feature_service_get_user_features_serialize( self, - organization_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Organization Features - - Returns all configured features for an organization. Unset fields mean the feature is the current instance default. Required permissions: - org.feature.read - no permission required for the organization the user belongs to - - :param organization_id: (required) - :type organization_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the organization, it will be omitted from the response or Not Found is returned when the organization has no features flags at all. - :type inheritance: bool - :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._feature_service_get_organization_features_serialize( - organization_id=organization_id, - inheritance=inheritance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_get_organization_features_serialize( - self, - organization_id, + user_id, inheritance, _request_auth, _content_type, @@ -561,8 +553,8 @@ def _feature_service_get_organization_features_serialize( _body_params: Optional[bytes] = None # process the path parameters - if organization_id is not None: - _path_params['organizationId'] = organization_id + if user_id is not None: + _path_params['userId'] = user_id # process the query parameters if inheritance is not None: @@ -589,7 +581,7 @@ def _feature_service_get_organization_features_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/features/organization/{organizationId}', + resource_path='/v2/features/user/{userId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -603,1935 +595,11 @@ def _feature_service_get_organization_features_serialize( ) - - - @validate_call - def feature_service_get_system_features( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceGetSystemFeaturesResponse: - """Get System Features - - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - - :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._feature_service_get_system_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_get_system_features_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceGetSystemFeaturesResponse]: - """Get System Features - - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - - :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._feature_service_get_system_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_get_system_features_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get System Features - - Returns all configured features for the system. Unset fields mean the feature is the current system default. Required permissions: - none - - :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._feature_service_get_system_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_get_system_features_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/system', - 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 feature_service_get_user_features( - self, - user_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all.")] = 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, - ) -> FeatureServiceGetUserFeaturesResponse: - """Get User Features - - Returns all configured features for a user. Unset fields mean the feature is the current organization default. Required permissions: - user.feature.read - no permission required for the own user - - :param user_id: (required) - :type user_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all. - :type inheritance: bool - :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._feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_get_user_features_with_http_info( - self, - user_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceGetUserFeaturesResponse]: - """Get User Features - - Returns all configured features for a user. Unset fields mean the feature is the current organization default. Required permissions: - user.feature.read - no permission required for the own user - - :param user_id: (required) - :type user_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all. - :type inheritance: bool - :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._feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_get_user_features_without_preload_content( - self, - user_id: StrictStr, - inheritance: Annotated[Optional[StrictBool], Field(description="Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get User Features - - Returns all configured features for a user. Unset fields mean the feature is the current organization default. Required permissions: - user.feature.read - no permission required for the own user - - :param user_id: (required) - :type user_id: str - :param inheritance: Inherit unset features from the resource owners. This option is recursive: if the flag is set, the resource's ancestors are consulted up to system defaults. If this option is disabled and the feature is not set on the user, it will be ommitted from the response or Not Found is returned when the user has no features flags at all. - :type inheritance: bool - :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._feature_service_get_user_features_serialize( - user_id=user_id, - inheritance=inheritance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceGetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_get_user_features_serialize( - self, - user_id, - inheritance, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - if inheritance is not None: - - _query_params.append(('inheritance', inheritance)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/features/user/{userId}', - 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 feature_service_reset_instance_features( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceResetInstanceFeaturesResponse: - """Reset Instance Features - - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - - :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._feature_service_reset_instance_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_reset_instance_features_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceResetInstanceFeaturesResponse]: - """Reset Instance Features - - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - - :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._feature_service_reset_instance_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_reset_instance_features_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Reset Instance Features - - Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - - :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._feature_service_reset_instance_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_reset_instance_features_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/instance', - 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 feature_service_reset_organization_features( - self, - organization_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceResetOrganizationFeaturesResponse: - """Reset Organization Features - - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete - - :param organization_id: (required) - :type organization_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_reset_organization_features_serialize( - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_reset_organization_features_with_http_info( - self, - organization_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceResetOrganizationFeaturesResponse]: - """Reset Organization Features - - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete - - :param organization_id: (required) - :type organization_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_reset_organization_features_serialize( - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_reset_organization_features_without_preload_content( - self, - organization_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Reset Organization Features - - Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete - - :param organization_id: (required) - :type organization_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_reset_organization_features_serialize( - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_reset_organization_features_serialize( - self, - organization_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if organization_id is not None: - _path_params['organizationId'] = organization_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/organization/{organizationId}', - 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 feature_service_reset_system_features( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceResetSystemFeaturesResponse: - """Reset System Features - - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - - :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._feature_service_reset_system_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_reset_system_features_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceResetSystemFeaturesResponse]: - """Reset System Features - - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - - :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._feature_service_reset_system_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_reset_system_features_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Reset System Features - - Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - - :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._feature_service_reset_system_features_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_reset_system_features_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/system', - 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 feature_service_reset_user_features( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceResetUserFeaturesResponse: - """Reset User Features - - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_reset_user_features_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_reset_user_features_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceResetUserFeaturesResponse]: - """Reset User Features - - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_reset_user_features_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_reset_user_features_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Reset User Features - - Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_reset_user_features_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceResetUserFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_reset_user_features_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/features/user/{userId}', - 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 feature_service_set_instance_features( - self, - feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, - _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, - ) -> FeatureServiceSetInstanceFeaturesResponse: - """Set Instance Features - - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - iam.feature.write - - :param feature_service_set_instance_features_request: (required) - :type feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest - :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._feature_service_set_instance_features_serialize( - feature_service_set_instance_features_request=feature_service_set_instance_features_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def feature_service_set_instance_features_with_http_info( - self, - feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceSetInstanceFeaturesResponse]: - """Set Instance Features - - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - iam.feature.write - - :param feature_service_set_instance_features_request: (required) - :type feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest - :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._feature_service_set_instance_features_serialize( - feature_service_set_instance_features_request=feature_service_set_instance_features_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def feature_service_set_instance_features_without_preload_content( - self, - feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set Instance Features - - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - iam.feature.write - - :param feature_service_set_instance_features_request: (required) - :type feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest - :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._feature_service_set_instance_features_serialize( - feature_service_set_instance_features_request=feature_service_set_instance_features_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetInstanceFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _feature_service_set_instance_features_serialize( - self, - feature_service_set_instance_features_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 feature_service_set_instance_features_request is not None: - _body_params = feature_service_set_instance_features_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/features/instance', - 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 feature_service_set_organization_features( - self, - organization_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceSetOrganizationFeaturesResponse: - """Set Organization Features - - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - org.feature.write - - :param organization_id: (required) - :type organization_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._feature_service_set_organization_features_serialize( - organization_id=organization_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetOrganizationFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - + + @validate_call - def feature_service_set_organization_features_with_http_info( + def feature_service_reset_instance_features( self, - organization_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2544,13 +612,11 @@ def feature_service_set_organization_features_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceSetOrganizationFeaturesResponse]: - """Set Organization Features + ) -> FeatureServiceResetInstanceFeaturesResponse: + """Reset Instance Features - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - org.feature.write + Deletes ALL configured features for an instance, reverting the behaviors to system defaults. Required permissions: - iam.feature.delete - :param organization_id: (required) - :type organization_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2573,8 +639,7 @@ def feature_service_set_organization_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_organization_features_serialize( - organization_id=organization_id, + _param = self.__feature_service_reset_instance_features_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2582,10 +647,11 @@ def feature_service_set_organization_features_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetOrganizationFeaturesResponse", + '200': "FeatureServiceResetInstanceFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2594,11 +660,71 @@ def feature_service_set_organization_features_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __feature_service_reset_instance_features_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/features/instance', + 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 feature_service_set_organization_features_without_preload_content( + def feature_service_reset_organization_features( self, organization_id: StrictStr, _request_timeout: Union[ @@ -2613,10 +739,10 @@ def feature_service_set_organization_features_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set Organization Features + ) -> FeatureServiceResetOrganizationFeaturesResponse: + """Reset Organization Features - Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - org.feature.write + Deletes ALL configured features for an organization, reverting the behaviors to instance defaults. Required permissions: - org.feature.delete :param organization_id: (required) :type organization_id: str @@ -2642,7 +768,7 @@ def feature_service_set_organization_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_organization_features_serialize( + _param = self.__feature_service_reset_organization_features_serialize( organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2651,18 +777,22 @@ def feature_service_set_organization_features_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetOrganizationFeaturesResponse", + '200': "FeatureServiceResetOrganizationFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _feature_service_set_organization_features_serialize( + def __feature_service_reset_organization_features_serialize( self, organization_id, _request_auth, @@ -2702,19 +832,6 @@ def _feature_service_set_organization_features_serialize( ] ) - # 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] = [ @@ -2722,7 +839,7 @@ def _feature_service_set_organization_features_serialize( ] return self.api_client.param_serialize( - method='PUT', + method='DELETE', resource_path='/v2/features/organization/{organizationId}', path_params=_path_params, query_params=_query_params, @@ -2740,9 +857,8 @@ def _feature_service_set_organization_features_serialize( @validate_call - def feature_service_set_system_features( + def feature_service_reset_system_features( self, - feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2755,13 +871,11 @@ def feature_service_set_system_features( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceSetSystemFeaturesResponse: - """Set System Features + ) -> FeatureServiceResetSystemFeaturesResponse: + """Reset System Features - Configure and set features that apply to the complete system. Only fields present in the request are set or unset. Required permissions: - system.feature.write + Deletes ALL configured features for the system, reverting the behaviors to system defaults. Required permissions: - system.feature.delete - :param feature_service_set_system_features_request: (required) - :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest :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 @@ -2784,8 +898,7 @@ def feature_service_set_system_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_system_features_serialize( - feature_service_set_system_features_request=feature_service_set_system_features_request, + _param = self.__feature_service_reset_system_features_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2793,10 +906,11 @@ def feature_service_set_system_features( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetSystemFeaturesResponse", + '200': "FeatureServiceResetSystemFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2807,11 +921,71 @@ def feature_service_set_system_features( response_types_map=_response_types_map, ).data + def __feature_service_reset_system_features_serialize( + self, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/features/system', + 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 feature_service_set_system_features_with_http_info( + def feature_service_reset_user_features( self, - feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, + user_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2824,13 +998,13 @@ def feature_service_set_system_features_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceSetSystemFeaturesResponse]: - """Set System Features + ) -> FeatureServiceResetUserFeaturesResponse: + """Reset User Features - Configure and set features that apply to the complete system. Only fields present in the request are set or unset. Required permissions: - system.feature.write + Deletes ALL configured features for a user, reverting the behaviors to organization defaults. Required permissions: - user.feature.delete - :param feature_service_set_system_features_request: (required) - :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest + :param user_id: (required) + :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2853,34 +1027,98 @@ def feature_service_set_system_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_system_features_serialize( - feature_service_set_system_features_request=feature_service_set_system_features_request, + _param = self.__feature_service_reset_user_features_serialize( + user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetSystemFeaturesResponse", - '403': "FeatureServiceRpcStatus", - '404': "FeatureServiceRpcStatus", - } - 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, + _response_types_map: Dict[str, Optional[str]] = { + '200': "FeatureServiceResetUserFeaturesResponse", + '403': "FeatureServiceRpcStatus", + '404': "FeatureServiceRpcStatus", + } + + 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 __feature_service_reset_user_features_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/features/user/{userId}', + 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 feature_service_set_system_features_without_preload_content( + def feature_service_set_instance_features( self, - feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, + feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2893,13 +1131,13 @@ def feature_service_set_system_features_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set System Features + ) -> FeatureServiceSetInstanceFeaturesResponse: + """Set Instance Features - Configure and set features that apply to the complete system. Only fields present in the request are set or unset. Required permissions: - system.feature.write + Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - iam.feature.write - :param feature_service_set_system_features_request: (required) - :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest + :param feature_service_set_instance_features_request: (required) + :type feature_service_set_instance_features_request: FeatureServiceSetInstanceFeaturesRequest :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 @@ -2922,8 +1160,8 @@ def feature_service_set_system_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_system_features_serialize( - feature_service_set_system_features_request=feature_service_set_system_features_request, + _param = self.__feature_service_set_instance_features_serialize( + feature_service_set_instance_features_request=feature_service_set_instance_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2931,20 +1169,24 @@ def feature_service_set_system_features_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetSystemFeaturesResponse", + '200': "FeatureServiceSetInstanceFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _feature_service_set_system_features_serialize( + def __feature_service_set_instance_features_serialize( self, - feature_service_set_system_features_request, + feature_service_set_instance_features_request, _request_auth, _content_type, _headers, @@ -2970,8 +1212,8 @@ def _feature_service_set_system_features_serialize( # process the header parameters # process the form parameters # process the body parameter - if feature_service_set_system_features_request is not None: - _body_params = feature_service_set_system_features_request + if feature_service_set_instance_features_request is not None: + _body_params = feature_service_set_instance_features_request # set the HTTP header `Accept` @@ -3003,7 +1245,7 @@ def _feature_service_set_system_features_serialize( return self.api_client.param_serialize( method='PUT', - resource_path='/v2/features/system', + resource_path='/v2/features/instance', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3020,9 +1262,9 @@ def _feature_service_set_system_features_serialize( @validate_call - def feature_service_set_user_features( + def feature_service_set_organization_features( self, - user_id: StrictStr, + organization_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3035,13 +1277,13 @@ def feature_service_set_user_features( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> FeatureServiceSetUserFeaturesResponse: - """Set User Features + ) -> FeatureServiceSetOrganizationFeaturesResponse: + """Set Organization Features - Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write + Configure and set features that apply to a complete instance. Only fields present in the request are set or unset. Required permissions: - org.feature.write - :param user_id: (required) - :type user_id: str + :param organization_id: (required) + :type organization_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3064,8 +1306,8 @@ def feature_service_set_user_features( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_user_features_serialize( - user_id=user_id, + _param = self.__feature_service_set_organization_features_serialize( + organization_id=organization_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3073,10 +1315,11 @@ def feature_service_set_user_features( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetUserFeaturesResponse", + '200': "FeatureServiceSetOrganizationFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3087,11 +1330,74 @@ def feature_service_set_user_features( response_types_map=_response_types_map, ).data + def __feature_service_set_organization_features_serialize( + self, + organization_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if organization_id is not None: + _path_params['organizationId'] = organization_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v2/features/organization/{organizationId}', + 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 feature_service_set_user_features_with_http_info( + def feature_service_set_system_features( self, - user_id: StrictStr, + feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3104,13 +1410,13 @@ def feature_service_set_user_features_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[FeatureServiceSetUserFeaturesResponse]: - """Set User Features + ) -> FeatureServiceSetSystemFeaturesResponse: + """Set System Features - Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write + Configure and set features that apply to the complete system. Only fields present in the request are set or unset. Required permissions: - system.feature.write - :param user_id: (required) - :type user_id: str + :param feature_service_set_system_features_request: (required) + :type feature_service_set_system_features_request: FeatureServiceSetSystemFeaturesRequest :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 @@ -3133,8 +1439,8 @@ def feature_service_set_user_features_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_user_features_serialize( - user_id=user_id, + _param = self.__feature_service_set_system_features_serialize( + feature_service_set_system_features_request=feature_service_set_system_features_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3142,10 +1448,11 @@ def feature_service_set_user_features_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "FeatureServiceSetUserFeaturesResponse", + '200': "FeatureServiceSetSystemFeaturesResponse", '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3154,11 +1461,87 @@ def feature_service_set_user_features_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __feature_service_set_system_features_serialize( + self, + feature_service_set_system_features_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 feature_service_set_system_features_request is not None: + _body_params = feature_service_set_system_features_request + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='PUT', + resource_path='/v2/features/system', + 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 feature_service_set_user_features_without_preload_content( + def feature_service_set_user_features( self, user_id: StrictStr, _request_timeout: Union[ @@ -3173,7 +1556,7 @@ def feature_service_set_user_features_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: + ) -> FeatureServiceSetUserFeaturesResponse: """Set User Features Configure and set features that apply to an user. Only fields present in the request are set or unset. Required permissions: - user.feature.write @@ -3202,7 +1585,7 @@ def feature_service_set_user_features_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._feature_service_set_user_features_serialize( + _param = self.__feature_service_set_user_features_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -3215,14 +1598,18 @@ def feature_service_set_user_features_without_preload_content( '403': "FeatureServiceRpcStatus", '404': "FeatureServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _feature_service_set_user_features_serialize( + def __feature_service_set_user_features_serialize( self, user_id, _request_auth, @@ -3262,19 +1649,6 @@ def _feature_service_set_user_features_serialize( ] ) - # 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] = [ diff --git a/zitadel_client/api/identity_provider_service_api.py b/zitadel_client/api/identity_provider_service_api.py index f8c82b16..a3f2d87d 100644 --- a/zitadel_client/api/identity_provider_service_api.py +++ b/zitadel_client/api/identity_provider_service_api.py @@ -82,7 +82,7 @@ def identity_provider_service_get_idpby_id( :return: Returns the result object. """ # noqa: E501 - _param = self._identity_provider_service_get_idpby_id_serialize( + _param = self.__identity_provider_service_get_idpby_id_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -95,75 +95,7 @@ def identity_provider_service_get_idpby_id( '403': "IdentityProviderServiceRpcStatus", '404': "IdentityProviderServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def identity_provider_service_get_idpby_id_with_http_info( - self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[IdentityProviderServiceGetIDPByIDResponse]: - """Get identity provider (IdP) by ID - - Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._identity_provider_service_get_idpby_id_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "IdentityProviderServiceGetIDPByIDResponse", - '403': "IdentityProviderServiceRpcStatus", - '404': "IdentityProviderServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -172,75 +104,9 @@ def identity_provider_service_get_idpby_id_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def identity_provider_service_get_idpby_id_without_preload_content( - self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get identity provider (IdP) by ID - - Returns an identity provider (social/enterprise login) by its ID, which can be of the type Google, AzureAD, etc. - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._identity_provider_service_get_idpby_id_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "IdentityProviderServiceGetIDPByIDResponse", - '403': "IdentityProviderServiceRpcStatus", - '404': "IdentityProviderServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _identity_provider_service_get_idpby_id_serialize( + def __identity_provider_service_get_idpby_id_serialize( self, id, _request_auth, diff --git a/zitadel_client/api/oidc_service_api.py b/zitadel_client/api/oidc_service_api.py index 44789c09..685aa278 100644 --- a/zitadel_client/api/oidc_service_api.py +++ b/zitadel_client/api/oidc_service_api.py @@ -91,7 +91,7 @@ def o_idc_service_authorize_or_deny_device_authorization( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_authorize_or_deny_device_authorization_serialize( + _param = self.__o_idc_service_authorize_or_deny_device_authorization_serialize( device_authorization_id=device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, _request_auth=_request_auth, @@ -105,79 +105,7 @@ def o_idc_service_authorize_or_deny_device_authorization( '403': "OIDCServiceRpcStatus", '404': "OIDCServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def o_idc_service_authorize_or_deny_device_authorization_with_http_info( - self, - device_authorization_id: Annotated[StrictStr, Field(description="The device authorization id returned when submitting the user code.")], - oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[object]: - """Authorize or deny device authorization - - Authorize or deny the device authorization request based on the provided device authorization id. - - :param device_authorization_id: The device authorization id returned when submitting the user code. (required) - :type device_authorization_id: str - :param oidc_service_authorize_or_deny_device_authorization_request: (required) - :type oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest - :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._o_idc_service_authorize_or_deny_device_authorization_serialize( - device_authorization_id=device_authorization_id, - oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -186,79 +114,9 @@ def o_idc_service_authorize_or_deny_device_authorization_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def o_idc_service_authorize_or_deny_device_authorization_without_preload_content( - self, - device_authorization_id: Annotated[StrictStr, Field(description="The device authorization id returned when submitting the user code.")], - oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Authorize or deny device authorization - - Authorize or deny the device authorization request based on the provided device authorization id. - - :param device_authorization_id: The device authorization id returned when submitting the user code. (required) - :type device_authorization_id: str - :param oidc_service_authorize_or_deny_device_authorization_request: (required) - :type oidc_service_authorize_or_deny_device_authorization_request: OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest - :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._o_idc_service_authorize_or_deny_device_authorization_serialize( - device_authorization_id=device_authorization_id, - oidc_service_authorize_or_deny_device_authorization_request=oidc_service_authorize_or_deny_device_authorization_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "object", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _o_idc_service_authorize_or_deny_device_authorization_serialize( + def __o_idc_service_authorize_or_deny_device_authorization_serialize( self, device_authorization_id, oidc_service_authorize_or_deny_device_authorization_request, @@ -325,387 +183,24 @@ def _o_idc_service_authorize_or_deny_device_authorization_serialize( resource_path='/v2/oidc/device_authorization/{deviceAuthorizationId}', 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 o_idc_service_create_callback( - self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request.")], - oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest, - _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, - ) -> OIDCServiceCreateCallbackResponse: - """Finalize an Auth Request and get the callback URL. - - Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - - :param auth_request_id: ID of the Auth Request. (required) - :type auth_request_id: str - :param oidc_service_create_callback_request: (required) - :type oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest - :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._o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, - oidc_service_create_callback_request=oidc_service_create_callback_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def o_idc_service_create_callback_with_http_info( - self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request.")], - oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OIDCServiceCreateCallbackResponse]: - """Finalize an Auth Request and get the callback URL. - - Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - - :param auth_request_id: ID of the Auth Request. (required) - :type auth_request_id: str - :param oidc_service_create_callback_request: (required) - :type oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest - :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._o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, - oidc_service_create_callback_request=oidc_service_create_callback_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def o_idc_service_create_callback_without_preload_content( - self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request.")], - oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Finalize an Auth Request and get the callback URL. - - Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - - :param auth_request_id: ID of the Auth Request. (required) - :type auth_request_id: str - :param oidc_service_create_callback_request: (required) - :type oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest - :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._o_idc_service_create_callback_serialize( - auth_request_id=auth_request_id, - oidc_service_create_callback_request=oidc_service_create_callback_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceCreateCallbackResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _o_idc_service_create_callback_serialize( - self, - auth_request_id, - oidc_service_create_callback_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if auth_request_id is not None: - _path_params['authRequestId'] = auth_request_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if oidc_service_create_callback_request is not None: - _body_params = oidc_service_create_callback_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='/v2/oidc/auth_requests/{authRequestId}', - 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 o_idc_service_get_auth_request( - self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], - _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, - ) -> OIDCServiceGetAuthRequestResponse: - """Get OIDC Auth Request details - - Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. - - :param auth_request_id: ID of the Auth Request, as obtained from the redirect URL. (required) - :type auth_request_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._o_idc_service_get_auth_request_serialize( - auth_request_id=auth_request_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + 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 ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceGetAuthRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data + @validate_call - def o_idc_service_get_auth_request_with_http_info( + def o_idc_service_create_callback( self, - auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], + auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request.")], + oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -718,13 +213,15 @@ def o_idc_service_get_auth_request_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OIDCServiceGetAuthRequestResponse]: - """Get OIDC Auth Request details + ) -> OIDCServiceCreateCallbackResponse: + """Finalize an Auth Request and get the callback URL. - Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. + Finalize an Auth Request and get the callback URL for success or failure. The user must be redirected to the URL in order to inform the application about the success or failure. On success, the URL contains details for the application to obtain the tokens. This method can only be called once for an Auth request. - :param auth_request_id: ID of the Auth Request, as obtained from the redirect URL. (required) + :param auth_request_id: ID of the Auth Request. (required) :type auth_request_id: str + :param oidc_service_create_callback_request: (required) + :type oidc_service_create_callback_request: OIDCServiceCreateCallbackRequest :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 @@ -747,8 +244,9 @@ def o_idc_service_get_auth_request_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_get_auth_request_serialize( + _param = self.__o_idc_service_create_callback_serialize( auth_request_id=auth_request_id, + oidc_service_create_callback_request=oidc_service_create_callback_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -756,10 +254,11 @@ def o_idc_service_get_auth_request_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceGetAuthRequestResponse", + '200': "OIDCServiceCreateCallbackResponse", '403': "OIDCServiceRpcStatus", '404': "OIDCServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -768,11 +267,90 @@ def o_idc_service_get_auth_request_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __o_idc_service_create_callback_serialize( + self, + auth_request_id, + oidc_service_create_callback_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if auth_request_id is not None: + _path_params['authRequestId'] = auth_request_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if oidc_service_create_callback_request is not None: + _body_params = oidc_service_create_callback_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='/v2/oidc/auth_requests/{authRequestId}', + 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 o_idc_service_get_auth_request_without_preload_content( + def o_idc_service_get_auth_request( self, auth_request_id: Annotated[StrictStr, Field(description="ID of the Auth Request, as obtained from the redirect URL.")], _request_timeout: Union[ @@ -787,7 +365,7 @@ def o_idc_service_get_auth_request_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: + ) -> OIDCServiceGetAuthRequestResponse: """Get OIDC Auth Request details Get OIDC Auth Request details by ID, obtained from the redirect URL. Returns details that are parsed from the application's Auth Request. @@ -816,7 +394,7 @@ def o_idc_service_get_auth_request_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_get_auth_request_serialize( + _param = self.__o_idc_service_get_auth_request_serialize( auth_request_id=auth_request_id, _request_auth=_request_auth, _content_type=_content_type, @@ -829,14 +407,18 @@ def o_idc_service_get_auth_request_without_preload_content( '403': "OIDCServiceRpcStatus", '404': "OIDCServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _o_idc_service_get_auth_request_serialize( + def __o_idc_service_get_auth_request_serialize( self, auth_request_id, _request_auth, @@ -945,7 +527,7 @@ def o_idc_service_get_device_authorization_request( :return: Returns the result object. """ # noqa: E501 - _param = self._o_idc_service_get_device_authorization_request_serialize( + _param = self.__o_idc_service_get_device_authorization_request_serialize( user_code=user_code, _request_auth=_request_auth, _content_type=_content_type, @@ -958,75 +540,7 @@ def o_idc_service_get_device_authorization_request( '403': "OIDCServiceRpcStatus", '404': "OIDCServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def o_idc_service_get_device_authorization_request_with_http_info( - self, - user_code: Annotated[StrictStr, Field(description="The user_code returned by the device authorization request and provided to the user by the device.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OIDCServiceGetDeviceAuthorizationRequestResponse]: - """Get device authorization request - - Get the device authorization based on the provided \"user code\". This will return the device authorization request, which contains the device authorization id that is required to authorize the request once the user signed in or to deny it. - - :param user_code: The user_code returned by the device authorization request and provided to the user by the device. (required) - :type user_code: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._o_idc_service_get_device_authorization_request_serialize( - user_code=user_code, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceGetDeviceAuthorizationRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1035,75 +549,9 @@ def o_idc_service_get_device_authorization_request_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def o_idc_service_get_device_authorization_request_without_preload_content( - self, - user_code: Annotated[StrictStr, Field(description="The user_code returned by the device authorization request and provided to the user by the device.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get device authorization request - - Get the device authorization based on the provided \"user code\". This will return the device authorization request, which contains the device authorization id that is required to authorize the request once the user signed in or to deny it. - - :param user_code: The user_code returned by the device authorization request and provided to the user by the device. (required) - :type user_code: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._o_idc_service_get_device_authorization_request_serialize( - user_code=user_code, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OIDCServiceGetDeviceAuthorizationRequestResponse", - '403': "OIDCServiceRpcStatus", - '404': "OIDCServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _o_idc_service_get_device_authorization_request_serialize( + def __o_idc_service_get_device_authorization_request_serialize( self, user_code, _request_auth, diff --git a/zitadel_client/api/organization_service_api.py b/zitadel_client/api/organization_service_api.py index cbf423e9..d4253052 100644 --- a/zitadel_client/api/organization_service_api.py +++ b/zitadel_client/api/organization_service_api.py @@ -84,7 +84,7 @@ def organization_service_add_organization( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_add_organization_serialize( + _param = self.__organization_service_add_organization_serialize( organization_service_add_organization_request=organization_service_add_organization_request, _request_auth=_request_auth, _content_type=_content_type, @@ -97,75 +97,7 @@ def organization_service_add_organization( '403': "OrganizationServiceRpcStatus", '404': "OrganizationServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def organization_service_add_organization_with_http_info( - self, - organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OrganizationServiceAddOrganizationResponse]: - """Create an 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. - - :param organization_service_add_organization_request: (required) - :type organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest - :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._organization_service_add_organization_serialize( - organization_service_add_organization_request=organization_service_add_organization_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationServiceAddOrganizationResponse", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -174,75 +106,9 @@ def organization_service_add_organization_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def organization_service_add_organization_without_preload_content( - self, - organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create an 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. - - :param organization_service_add_organization_request: (required) - :type organization_service_add_organization_request: OrganizationServiceAddOrganizationRequest - :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._organization_service_add_organization_serialize( - organization_service_add_organization_request=organization_service_add_organization_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationServiceAddOrganizationResponse", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _organization_service_add_organization_serialize( + def __organization_service_add_organization_serialize( self, organization_service_add_organization_request, _request_auth, @@ -364,7 +230,7 @@ def organization_service_list_organizations( :return: Returns the result object. """ # noqa: E501 - _param = self._organization_service_list_organizations_serialize( + _param = self.__organization_service_list_organizations_serialize( organization_service_list_organizations_request=organization_service_list_organizations_request, _request_auth=_request_auth, _content_type=_content_type, @@ -378,76 +244,7 @@ def organization_service_list_organizations( '403': "OrganizationServiceRpcStatus", '404': "OrganizationServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - @validate_call - def organization_service_list_organizations_with_http_info( - self, - organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[OrganizationServiceListOrganizationsResponse]: - """Search Organizations - - Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. - - :param organization_service_list_organizations_request: (required) - :type organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest - :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._organization_service_list_organizations_serialize( - organization_service_list_organizations_request=organization_service_list_organizations_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationServiceListOrganizationsResponse", - '400': "OrganizationServiceRpcStatus", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -456,76 +253,9 @@ def organization_service_list_organizations_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def organization_service_list_organizations_without_preload_content( - self, - organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Search Organizations - - Search for Organizations. By default, we will return all organization of the instance. Make sure to include a limit and sorting for pagination.. - - :param organization_service_list_organizations_request: (required) - :type organization_service_list_organizations_request: OrganizationServiceListOrganizationsRequest - :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._organization_service_list_organizations_serialize( - organization_service_list_organizations_request=organization_service_list_organizations_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "OrganizationServiceListOrganizationsResponse", - '400': "OrganizationServiceRpcStatus", - '403': "OrganizationServiceRpcStatus", - '404': "OrganizationServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _organization_service_list_organizations_serialize( + def __organization_service_list_organizations_serialize( self, organization_service_list_organizations_request, _request_auth, diff --git a/zitadel_client/api/saml_service_api.py b/zitadel_client/api/saml_service_api.py index b0476a2c..676368ad 100644 --- a/zitadel_client/api/saml_service_api.py +++ b/zitadel_client/api/saml_service_api.py @@ -88,7 +88,7 @@ def s_aml_service_create_response( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_create_response_serialize( + _param = self.__s_aml_service_create_response_serialize( saml_request_id=saml_request_id, saml_service_create_response_request=saml_service_create_response_request, _request_auth=_request_auth, @@ -102,79 +102,7 @@ def s_aml_service_create_response( '403': "SAMLServiceRpcStatus", '404': "SAMLServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def s_aml_service_create_response_with_http_info( - self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request.")], - saml_service_create_response_request: SAMLServiceCreateResponseRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SAMLServiceCreateResponseResponse]: - """Finalize a SAML Request and get the response. - - Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. - :param saml_request_id: ID of the SAML Request. (required) - :type saml_request_id: str - :param saml_service_create_response_request: (required) - :type saml_service_create_response_request: SAMLServiceCreateResponseRequest - :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._s_aml_service_create_response_serialize( - saml_request_id=saml_request_id, - saml_service_create_response_request=saml_service_create_response_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SAMLServiceCreateResponseResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -183,79 +111,9 @@ def s_aml_service_create_response_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def s_aml_service_create_response_without_preload_content( - self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request.")], - saml_service_create_response_request: SAMLServiceCreateResponseRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Finalize a SAML Request and get the response. - - Finalize a SAML Request and get the response definition for success or failure. The response must be handled as per the SAML definition to inform the application about the success or failure. On success, the response contains details for the application to obtain the SAMLResponse. This method can only be called once for an SAML request. - - :param saml_request_id: ID of the SAML Request. (required) - :type saml_request_id: str - :param saml_service_create_response_request: (required) - :type saml_service_create_response_request: SAMLServiceCreateResponseRequest - :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._s_aml_service_create_response_serialize( - saml_request_id=saml_request_id, - saml_service_create_response_request=saml_service_create_response_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SAMLServiceCreateResponseResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _s_aml_service_create_response_serialize( + def __s_aml_service_create_response_serialize( self, saml_request_id, saml_service_create_response_request, @@ -380,7 +238,7 @@ def s_aml_service_get_saml_request( :return: Returns the result object. """ # noqa: E501 - _param = self._s_aml_service_get_saml_request_serialize( + _param = self.__s_aml_service_get_saml_request_serialize( saml_request_id=saml_request_id, _request_auth=_request_auth, _content_type=_content_type, @@ -393,75 +251,7 @@ def s_aml_service_get_saml_request( '403': "SAMLServiceRpcStatus", '404': "SAMLServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def s_aml_service_get_saml_request_with_http_info( - self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request, as obtained from the redirect URL.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SAMLServiceGetSAMLRequestResponse]: - """Get SAML Request details - - Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. - :param saml_request_id: ID of the SAML Request, as obtained from the redirect URL. (required) - :type saml_request_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._s_aml_service_get_saml_request_serialize( - saml_request_id=saml_request_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SAMLServiceGetSAMLRequestResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -470,75 +260,9 @@ def s_aml_service_get_saml_request_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def s_aml_service_get_saml_request_without_preload_content( - self, - saml_request_id: Annotated[StrictStr, Field(description="ID of the SAML Request, as obtained from the redirect URL.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get SAML Request details - - Get SAML Request details by ID. Returns details that are parsed from the application's SAML Request. - - :param saml_request_id: ID of the SAML Request, as obtained from the redirect URL. (required) - :type saml_request_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._s_aml_service_get_saml_request_serialize( - saml_request_id=saml_request_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SAMLServiceGetSAMLRequestResponse", - '403': "SAMLServiceRpcStatus", - '404': "SAMLServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _s_aml_service_get_saml_request_serialize( + def __s_aml_service_get_saml_request_serialize( self, saml_request_id, _request_auth, diff --git a/zitadel_client/api/session_service_api.py b/zitadel_client/api/session_service_api.py index f7de7684..7dbb90b8 100644 --- a/zitadel_client/api/session_service_api.py +++ b/zitadel_client/api/session_service_api.py @@ -92,7 +92,7 @@ def session_service_create_session( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_create_session_serialize( + _param = self.__session_service_create_session_serialize( session_service_create_session_request=session_service_create_session_request, _request_auth=_request_auth, _content_type=_content_type, @@ -105,75 +105,7 @@ def session_service_create_session( '403': "SessionServiceRpcStatus", '404': "SessionServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def session_service_create_session_with_http_info( - self, - session_service_create_session_request: SessionServiceCreateSessionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SessionServiceCreateSessionResponse]: - """Create a new session - - Create a new session. A token will be returned, which is required for further updates of the session. - - :param session_service_create_session_request: (required) - :type session_service_create_session_request: SessionServiceCreateSessionRequest - :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._session_service_create_session_serialize( - session_service_create_session_request=session_service_create_session_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -182,75 +114,9 @@ def session_service_create_session_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def session_service_create_session_without_preload_content( - self, - session_service_create_session_request: SessionServiceCreateSessionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a new session - - Create a new session. A token will be returned, which is required for further updates of the session. - - :param session_service_create_session_request: (required) - :type session_service_create_session_request: SessionServiceCreateSessionRequest - :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._session_service_create_session_serialize( - session_service_create_session_request=session_service_create_session_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "SessionServiceCreateSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _session_service_create_session_serialize( + def __session_service_create_session_serialize( self, session_service_create_session_request, _request_auth, @@ -319,737 +185,19 @@ def _session_service_create_session_serialize( post_params=_form_params, files=_files, auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def session_service_delete_session( - self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to terminate\"")], - session_service_delete_session_request: SessionServiceDeleteSessionRequest, - _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, - ) -> SessionServiceDeleteSessionResponse: - """Terminate an existing session - - Terminate your own session or if granted any other session. - - :param session_id: \"id of the session to terminate\" (required) - :type session_id: str - :param session_service_delete_session_request: (required) - :type session_service_delete_session_request: SessionServiceDeleteSessionRequest - :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._session_service_delete_session_serialize( - session_id=session_id, - session_service_delete_session_request=session_service_delete_session_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def session_service_delete_session_with_http_info( - self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to terminate\"")], - session_service_delete_session_request: SessionServiceDeleteSessionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SessionServiceDeleteSessionResponse]: - """Terminate an existing session - - Terminate your own session or if granted any other session. - - :param session_id: \"id of the session to terminate\" (required) - :type session_id: str - :param session_service_delete_session_request: (required) - :type session_service_delete_session_request: SessionServiceDeleteSessionRequest - :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._session_service_delete_session_serialize( - session_id=session_id, - session_service_delete_session_request=session_service_delete_session_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def session_service_delete_session_without_preload_content( - self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to terminate\"")], - session_service_delete_session_request: SessionServiceDeleteSessionRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Terminate an existing session - - Terminate your own session or if granted any other session. - - :param session_id: \"id of the session to terminate\" (required) - :type session_id: str - :param session_service_delete_session_request: (required) - :type session_service_delete_session_request: SessionServiceDeleteSessionRequest - :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._session_service_delete_session_serialize( - session_id=session_id, - session_service_delete_session_request=session_service_delete_session_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceDeleteSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _session_service_delete_session_serialize( - self, - session_id, - session_service_delete_session_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if session_id is not None: - _path_params['sessionId'] = session_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if session_service_delete_session_request is not None: - _body_params = session_service_delete_session_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='DELETE', - resource_path='/v2/sessions/{sessionId}', - 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 session_service_get_session( - self, - session_id: StrictStr, - session_token: Optional[StrictStr] = 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, - ) -> SessionServiceGetSessionResponse: - """Get a session - - Get a session and all its information like the time of the user or password verification - - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def session_service_get_session_with_http_info( - self, - session_id: StrictStr, - session_token: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SessionServiceGetSessionResponse]: - """Get a session - - Get a session and all its information like the time of the user or password verification - - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def session_service_get_session_without_preload_content( - self, - session_id: StrictStr, - session_token: Optional[StrictStr] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get a session - - Get a session and all its information like the time of the user or password verification - - :param session_id: (required) - :type session_id: str - :param session_token: - :type session_token: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._session_service_get_session_serialize( - session_id=session_id, - session_token=session_token, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceGetSessionResponse", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _session_service_get_session_serialize( - self, - session_id, - session_token, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if session_id is not None: - _path_params['sessionId'] = session_id - # process the query parameters - if session_token is not None: - - _query_params.append(('sessionToken', session_token)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/sessions/{sessionId}', - 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 session_service_list_sessions( - self, - session_service_list_sessions_request: SessionServiceListSessionsRequest, - _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, - ) -> SessionServiceListSessionsResponse: - """Search sessions - - Search for sessions - - :param session_service_list_sessions_request: (required) - :type session_service_list_sessions_request: SessionServiceListSessionsRequest - :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._session_service_list_sessions_serialize( - session_service_list_sessions_request=session_service_list_sessions_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def session_service_list_sessions_with_http_info( - self, - session_service_list_sessions_request: SessionServiceListSessionsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SessionServiceListSessionsResponse]: - """Search sessions - - Search for sessions - - :param session_service_list_sessions_request: (required) - :type session_service_list_sessions_request: SessionServiceListSessionsRequest - :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._session_service_list_sessions_serialize( - session_service_list_sessions_request=session_service_list_sessions_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", - '403': "SessionServiceRpcStatus", - '404': "SessionServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) + @validate_call - def session_service_list_sessions_without_preload_content( + def session_service_delete_session( self, - session_service_list_sessions_request: SessionServiceListSessionsRequest, + session_id: Annotated[StrictStr, Field(description="\"id of the session to terminate\"")], + session_service_delete_session_request: SessionServiceDeleteSessionRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1062,13 +210,15 @@ def session_service_list_sessions_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Search sessions + ) -> SessionServiceDeleteSessionResponse: + """Terminate an existing session - Search for sessions + Terminate your own session or if granted any other session. - :param session_service_list_sessions_request: (required) - :type session_service_list_sessions_request: SessionServiceListSessionsRequest + :param session_id: \"id of the session to terminate\" (required) + :type session_id: str + :param session_service_delete_session_request: (required) + :type session_service_delete_session_request: SessionServiceDeleteSessionRequest :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 @@ -1091,8 +241,9 @@ def session_service_list_sessions_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_list_sessions_serialize( - session_service_list_sessions_request=session_service_list_sessions_request, + _param = self.__session_service_delete_session_serialize( + session_id=session_id, + session_service_delete_session_request=session_service_delete_session_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1100,21 +251,25 @@ def session_service_list_sessions_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceListSessionsResponse", - '400': "SessionServiceRpcStatus", + '200': "SessionServiceDeleteSessionResponse", '403': "SessionServiceRpcStatus", '404': "SessionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _session_service_list_sessions_serialize( + def __session_service_delete_session_serialize( self, - session_service_list_sessions_request, + session_id, + session_service_delete_session_request, _request_auth, _content_type, _headers, @@ -1136,12 +291,14 @@ def _session_service_list_sessions_serialize( _body_params: Optional[bytes] = None # process the path parameters + if session_id is not None: + _path_params['sessionId'] = session_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if session_service_list_sessions_request is not None: - _body_params = session_service_list_sessions_request + if session_service_delete_session_request is not None: + _body_params = session_service_delete_session_request # set the HTTP header `Accept` @@ -1172,8 +329,8 @@ def _session_service_list_sessions_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/sessions/search', + method='DELETE', + resource_path='/v2/sessions/{sessionId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1190,10 +347,10 @@ def _session_service_list_sessions_serialize( @validate_call - def session_service_set_session( + def session_service_get_session( self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], - session_service_set_session_request: SessionServiceSetSessionRequest, + session_id: StrictStr, + session_token: Optional[StrictStr] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1206,15 +363,15 @@ def session_service_set_session( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SessionServiceSetSessionResponse: - """Update an existing session + ) -> SessionServiceGetSessionResponse: + """Get a session - Update an existing session with new information. + Get a session and all its information like the time of the user or password verification - :param session_id: \"id of the session to update\" (required) + :param session_id: (required) :type session_id: str - :param session_service_set_session_request: (required) - :type session_service_set_session_request: SessionServiceSetSessionRequest + :param session_token: + :type session_token: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1237,9 +394,9 @@ def session_service_set_session( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_set_session_serialize( + _param = self.__session_service_get_session_serialize( session_id=session_id, - session_service_set_session_request=session_service_set_session_request, + session_token=session_token, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1247,10 +404,11 @@ def session_service_set_session( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceSetSessionResponse", + '200': "SessionServiceGetSessionResponse", '403': "SessionServiceRpcStatus", '404': "SessionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1261,12 +419,79 @@ def session_service_set_session( response_types_map=_response_types_map, ).data + def __session_service_get_session_serialize( + self, + session_id, + session_token, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if session_id is not None: + _path_params['sessionId'] = session_id + # process the query parameters + if session_token is not None: + + _query_params.append(('sessionToken', session_token)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/sessions/{sessionId}', + 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 session_service_set_session_with_http_info( + def session_service_list_sessions( self, - session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], - session_service_set_session_request: SessionServiceSetSessionRequest, + session_service_list_sessions_request: SessionServiceListSessionsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1279,15 +504,13 @@ def session_service_set_session_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SessionServiceSetSessionResponse]: - """Update an existing session + ) -> SessionServiceListSessionsResponse: + """Search sessions - Update an existing session with new information. + Search for sessions - :param session_id: \"id of the session to update\" (required) - :type session_id: str - :param session_service_set_session_request: (required) - :type session_service_set_session_request: SessionServiceSetSessionRequest + :param session_service_list_sessions_request: (required) + :type session_service_list_sessions_request: SessionServiceListSessionsRequest :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 @@ -1310,9 +533,8 @@ def session_service_set_session_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_set_session_serialize( - session_id=session_id, - session_service_set_session_request=session_service_set_session_request, + _param = self.__session_service_list_sessions_serialize( + session_service_list_sessions_request=session_service_list_sessions_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1320,10 +542,12 @@ def session_service_set_session_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SessionServiceSetSessionResponse", + '200': "SessionServiceListSessionsResponse", + '400': "SessionServiceRpcStatus", '403': "SessionServiceRpcStatus", '404': "SessionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1332,11 +556,87 @@ def session_service_set_session_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __session_service_list_sessions_serialize( + self, + session_service_list_sessions_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 session_service_list_sessions_request is not None: + _body_params = session_service_list_sessions_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='/v2/sessions/search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def session_service_set_session_without_preload_content( + def session_service_set_session( self, session_id: Annotated[StrictStr, Field(description="\"id of the session to update\"")], session_service_set_session_request: SessionServiceSetSessionRequest, @@ -1352,7 +652,7 @@ def session_service_set_session_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: + ) -> SessionServiceSetSessionResponse: """Update an existing session Update an existing session with new information. @@ -1383,7 +683,7 @@ def session_service_set_session_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._session_service_set_session_serialize( + _param = self.__session_service_set_session_serialize( session_id=session_id, session_service_set_session_request=session_service_set_session_request, _request_auth=_request_auth, @@ -1397,14 +697,18 @@ def session_service_set_session_without_preload_content( '403': "SessionServiceRpcStatus", '404': "SessionServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _session_service_set_session_serialize( + def __session_service_set_session_serialize( self, session_id, session_service_set_session_request, diff --git a/zitadel_client/api/settings_service_api.py b/zitadel_client/api/settings_service_api.py index 2a59f07a..b5b8fce0 100644 --- a/zitadel_client/api/settings_service_api.py +++ b/zitadel_client/api/settings_service_api.py @@ -109,7 +109,7 @@ def settings_service_get_active_identity_providers( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_active_identity_providers_serialize( + _param = self.__settings_service_get_active_identity_providers_serialize( ctx_org_id=ctx_org_id, ctx_instance=ctx_instance, creation_allowed=creation_allowed, @@ -127,6 +127,7 @@ def settings_service_get_active_identity_providers( '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -137,16 +138,102 @@ def settings_service_get_active_identity_providers( response_types_map=_response_types_map, ).data + def __settings_service_get_active_identity_providers_serialize( + self, + ctx_org_id, + ctx_instance, + creation_allowed, + linking_allowed, + auto_creation, + auto_linking, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if ctx_org_id is not None: + + _query_params.append(('ctx.orgId', ctx_org_id)) + + if ctx_instance is not None: + + _query_params.append(('ctx.instance', ctx_instance)) + + if creation_allowed is not None: + + _query_params.append(('creationAllowed', creation_allowed)) + + if linking_allowed is not None: + + _query_params.append(('linkingAllowed', linking_allowed)) + + if auto_creation is not None: + + _query_params.append(('autoCreation', auto_creation)) + + if auto_linking is not None: + + _query_params.append(('autoLinking', auto_linking)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/settings/login/idps', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + @validate_call - def settings_service_get_active_identity_providers_with_http_info( + def settings_service_get_branding_settings( self, ctx_org_id: Optional[StrictStr] = None, ctx_instance: Optional[StrictBool] = None, - creation_allowed: Optional[StrictBool] = None, - linking_allowed: Optional[StrictBool] = None, - auto_creation: Optional[StrictBool] = None, - auto_linking: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -159,23 +246,15 @@ def settings_service_get_active_identity_providers_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetActiveIdentityProvidersResponse]: - """Get the current active identity providers + ) -> SettingsServiceGetBrandingSettingsResponse: + """Get the current active branding settings - Return the current active identity providers for the requested context + Return the current active branding settings for the requested context :param ctx_org_id: :type ctx_org_id: str :param ctx_instance: :type ctx_instance: bool - :param creation_allowed: - :type creation_allowed: bool - :param linking_allowed: - :type linking_allowed: bool - :param auto_creation: - :type auto_creation: bool - :param auto_linking: - :type auto_linking: bool :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 @@ -198,13 +277,9 @@ def settings_service_get_active_identity_providers_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_active_identity_providers_serialize( + _param = self.__settings_service_get_branding_settings_serialize( ctx_org_id=ctx_org_id, ctx_instance=ctx_instance, - creation_allowed=creation_allowed, - linking_allowed=linking_allowed, - auto_creation=auto_creation, - auto_linking=auto_linking, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -212,10 +287,11 @@ def settings_service_get_active_identity_providers_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetActiveIdentityProvidersResponse", + '200': "SettingsServiceGetBrandingSettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -224,18 +300,84 @@ def settings_service_get_active_identity_providers_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __settings_service_get_branding_settings_serialize( + self, + ctx_org_id, + ctx_instance, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if ctx_org_id is not None: + + _query_params.append(('ctx.orgId', ctx_org_id)) + + if ctx_instance is not None: + + _query_params.append(('ctx.instance', ctx_instance)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/settings/branding', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def settings_service_get_active_identity_providers_without_preload_content( + def settings_service_get_domain_settings( self, ctx_org_id: Optional[StrictStr] = None, ctx_instance: Optional[StrictBool] = None, - creation_allowed: Optional[StrictBool] = None, - linking_allowed: Optional[StrictBool] = None, - auto_creation: Optional[StrictBool] = None, - auto_linking: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -248,23 +390,15 @@ def settings_service_get_active_identity_providers_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the current active identity providers + ) -> SettingsServiceGetDomainSettingsResponse: + """Get the domain settings - Return the current active identity providers for the requested context + Return the domain settings for the requested context :param ctx_org_id: :type ctx_org_id: str :param ctx_instance: :type ctx_instance: bool - :param creation_allowed: - :type creation_allowed: bool - :param linking_allowed: - :type linking_allowed: bool - :param auto_creation: - :type auto_creation: bool - :param auto_linking: - :type auto_linking: bool :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 @@ -287,13 +421,9 @@ def settings_service_get_active_identity_providers_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_active_identity_providers_serialize( + _param = self.__settings_service_get_domain_settings_serialize( ctx_org_id=ctx_org_id, ctx_instance=ctx_instance, - creation_allowed=creation_allowed, - linking_allowed=linking_allowed, - auto_creation=auto_creation, - auto_linking=auto_linking, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -301,25 +431,25 @@ def settings_service_get_active_identity_providers_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetActiveIdentityProvidersResponse", + '200': "SettingsServiceGetDomainSettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _settings_service_get_active_identity_providers_serialize( + def __settings_service_get_domain_settings_serialize( self, ctx_org_id, ctx_instance, - creation_allowed, - linking_allowed, - auto_creation, - auto_linking, _request_auth, _content_type, _headers, @@ -350,22 +480,6 @@ def _settings_service_get_active_identity_providers_serialize( _query_params.append(('ctx.instance', ctx_instance)) - if creation_allowed is not None: - - _query_params.append(('creationAllowed', creation_allowed)) - - if linking_allowed is not None: - - _query_params.append(('linkingAllowed', linking_allowed)) - - if auto_creation is not None: - - _query_params.append(('autoCreation', auto_creation)) - - if auto_linking is not None: - - _query_params.append(('autoLinking', auto_linking)) - # process the header parameters # process the form parameters # process the body parameter @@ -387,7 +501,7 @@ def _settings_service_get_active_identity_providers_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/settings/login/idps', + resource_path='/v2/settings/domain', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -404,10 +518,8 @@ def _settings_service_get_active_identity_providers_serialize( @validate_call - def settings_service_get_branding_settings( + def settings_service_get_general_settings( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -420,15 +532,11 @@ def settings_service_get_branding_settings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceGetBrandingSettingsResponse: - """Get the current active branding settings + ) -> SettingsServiceGetGeneralSettingsResponse: + """Get basic information over the instance - Return the current active branding settings for the requested context + Return the basic information of the instance for the requested context - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool :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 @@ -451,9 +559,7 @@ def settings_service_get_branding_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_branding_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, + _param = self.__settings_service_get_general_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -461,10 +567,11 @@ def settings_service_get_branding_settings( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetBrandingSettingsResponse", + '200': "SettingsServiceGetGeneralSettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -475,1549 +582,8 @@ def settings_service_get_branding_settings( response_types_map=_response_types_map, ).data - - @validate_call - def settings_service_get_branding_settings_with_http_info( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetBrandingSettingsResponse]: - """Get the current active branding settings - - Return the current active branding settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_branding_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetBrandingSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_branding_settings_without_preload_content( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the current active branding settings - - Return the current active branding settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_branding_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetBrandingSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_branding_settings_serialize( - self, - ctx_org_id, - ctx_instance, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/branding', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_get_domain_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = 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, - ) -> SettingsServiceGetDomainSettingsResponse: - """Get the domain settings - - Return the domain settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_domain_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_domain_settings_with_http_info( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetDomainSettingsResponse]: - """Get the domain settings - - Return the domain settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_domain_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_domain_settings_without_preload_content( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the domain settings - - Return the domain settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_domain_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetDomainSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_domain_settings_serialize( - self, - ctx_org_id, - ctx_instance, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/domain', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_get_general_settings( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceGetGeneralSettingsResponse: - """Get basic information over the instance - - Return the basic information of the instance for the requested context - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_general_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_general_settings_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetGeneralSettingsResponse]: - """Get basic information over the instance - - Return the basic information of the instance for the requested context - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_general_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_general_settings_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get basic information over the instance - - Return the basic information of the instance for the requested context - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_general_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetGeneralSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_general_settings_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_get_legal_and_support_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = 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, - ) -> SettingsServiceGetLegalAndSupportSettingsResponse: - """Get the legal and support settings - - Return the legal settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_legal_and_support_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_legal_and_support_settings_with_http_info( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetLegalAndSupportSettingsResponse]: - """Get the legal and support settings - - Return the legal settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_legal_and_support_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_legal_and_support_settings_without_preload_content( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the legal and support settings - - Return the legal settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_legal_and_support_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLegalAndSupportSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_legal_and_support_settings_serialize( - self, - ctx_org_id, - ctx_instance, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/legal_support', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_get_lockout_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = 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, - ) -> SettingsServiceGetLockoutSettingsResponse: - """Get the lockout settings - - Return the lockout settings for the requested context, which define when a user will be locked - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_lockout_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_lockout_settings_with_http_info( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetLockoutSettingsResponse]: - """Get the lockout settings - - Return the lockout settings for the requested context, which define when a user will be locked - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_lockout_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_lockout_settings_without_preload_content( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the lockout settings - - Return the lockout settings for the requested context, which define when a user will be locked - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_lockout_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLockoutSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_lockout_settings_serialize( - self, - ctx_org_id, - ctx_instance, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/settings/lockout', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_get_login_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = 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, - ) -> SettingsServiceGetLoginSettingsResponse: - """Get the login settings - - Return the settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_login_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_login_settings_with_http_info( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetLoginSettingsResponse]: - """Get the login settings - - Return the settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_login_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def settings_service_get_login_settings_without_preload_content( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the login settings - - Return the settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_login_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetLoginSettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _settings_service_get_login_settings_serialize( + def __settings_service_get_general_settings_serialize( self, - ctx_org_id, - ctx_instance, _request_auth, _content_type, _headers, @@ -2040,14 +606,6 @@ def _settings_service_get_login_settings_serialize( # process the path parameters # process the query parameters - if ctx_org_id is not None: - - _query_params.append(('ctx.orgId', ctx_org_id)) - - if ctx_instance is not None: - - _query_params.append(('ctx.instance', ctx_instance)) - # process the header parameters # process the form parameters # process the body parameter @@ -2069,170 +627,24 @@ def _settings_service_get_login_settings_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/settings/login', + resource_path='/v2/settings', path_params=_path_params, query_params=_query_params, header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def settings_service_get_password_complexity_settings( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = 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, - ) -> SettingsServiceGetPasswordComplexitySettingsResponse: - """Get the password complexity settings - - Return the password complexity settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_password_complexity_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetPasswordComplexitySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_password_complexity_settings_with_http_info( - self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetPasswordComplexitySettingsResponse]: - """Get the password complexity settings - - Return the password complexity settings for the requested context - - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_password_complexity_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetPasswordComplexitySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) + @validate_call - def settings_service_get_password_complexity_settings_without_preload_content( + def settings_service_get_legal_and_support_settings( self, ctx_org_id: Optional[StrictStr] = None, ctx_instance: Optional[StrictBool] = None, @@ -2248,10 +660,10 @@ def settings_service_get_password_complexity_settings_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the password complexity settings + ) -> SettingsServiceGetLegalAndSupportSettingsResponse: + """Get the legal and support settings - Return the password complexity settings for the requested context + Return the legal settings for the requested context :param ctx_org_id: :type ctx_org_id: str @@ -2279,7 +691,7 @@ def settings_service_get_password_complexity_settings_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_password_complexity_settings_serialize( + _param = self.__settings_service_get_legal_and_support_settings_serialize( ctx_org_id=ctx_org_id, ctx_instance=ctx_instance, _request_auth=_request_auth, @@ -2289,18 +701,22 @@ def settings_service_get_password_complexity_settings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetPasswordComplexitySettingsResponse", + '200': "SettingsServiceGetLegalAndSupportSettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _settings_service_get_password_complexity_settings_serialize( + def __settings_service_get_legal_and_support_settings_serialize( self, ctx_org_id, ctx_instance, @@ -2355,7 +771,7 @@ def _settings_service_get_password_complexity_settings_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/settings/password/complexity', + resource_path='/v2/settings/legal_support', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2372,7 +788,7 @@ def _settings_service_get_password_complexity_settings_serialize( @validate_call - def settings_service_get_password_expiry_settings( + def settings_service_get_lockout_settings( self, ctx_org_id: Optional[StrictStr] = None, ctx_instance: Optional[StrictBool] = None, @@ -2388,10 +804,10 @@ def settings_service_get_password_expiry_settings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceGetPasswordExpirySettingsResponse: - """Get the password expiry settings + ) -> SettingsServiceGetLockoutSettingsResponse: + """Get the lockout settings - Return the password expiry settings for the requested context + Return the lockout settings for the requested context, which define when a user will be locked :param ctx_org_id: :type ctx_org_id: str @@ -2419,7 +835,7 @@ def settings_service_get_password_expiry_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_password_expiry_settings_serialize( + _param = self.__settings_service_get_lockout_settings_serialize( ctx_org_id=ctx_org_id, ctx_instance=ctx_instance, _request_auth=_request_auth, @@ -2429,10 +845,11 @@ def settings_service_get_password_expiry_settings( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetPasswordExpirySettingsResponse", + '200': "SettingsServiceGetLockoutSettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2443,82 +860,79 @@ def settings_service_get_password_expiry_settings( response_types_map=_response_types_map, ).data - - @validate_call - def settings_service_get_password_expiry_settings_with_http_info( + def __settings_service_get_lockout_settings_serialize( self, - ctx_org_id: Optional[StrictStr] = None, - ctx_instance: Optional[StrictBool] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetPasswordExpirySettingsResponse]: - """Get the password expiry settings + ctx_org_id, + ctx_instance, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Return the password expiry settings for the requested context + _host = None - :param ctx_org_id: - :type ctx_org_id: str - :param ctx_instance: - :type ctx_instance: bool - :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 + _collection_formats: Dict[str, str] = { + } - _param = self._settings_service_get_password_expiry_settings_serialize( - ctx_org_id=ctx_org_id, - ctx_instance=ctx_instance, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetPasswordExpirySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, + # process the path parameters + # process the query parameters + if ctx_org_id is not None: + + _query_params.append(('ctx.orgId', ctx_org_id)) + + if ctx_instance is not None: + + _query_params.append(('ctx.instance', ctx_instance)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/settings/lockout', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def settings_service_get_password_expiry_settings_without_preload_content( + def settings_service_get_login_settings( self, ctx_org_id: Optional[StrictStr] = None, ctx_instance: Optional[StrictBool] = None, @@ -2534,10 +948,10 @@ def settings_service_get_password_expiry_settings_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get the password expiry settings + ) -> SettingsServiceGetLoginSettingsResponse: + """Get the login settings - Return the password expiry settings for the requested context + Return the settings for the requested context :param ctx_org_id: :type ctx_org_id: str @@ -2565,7 +979,7 @@ def settings_service_get_password_expiry_settings_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_password_expiry_settings_serialize( + _param = self.__settings_service_get_login_settings_serialize( ctx_org_id=ctx_org_id, ctx_instance=ctx_instance, _request_auth=_request_auth, @@ -2575,18 +989,22 @@ def settings_service_get_password_expiry_settings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetPasswordExpirySettingsResponse", + '200': "SettingsServiceGetLoginSettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _settings_service_get_password_expiry_settings_serialize( + def __settings_service_get_login_settings_serialize( self, ctx_org_id, ctx_instance, @@ -2641,7 +1059,7 @@ def _settings_service_get_password_expiry_settings_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/settings/password/expiry', + resource_path='/v2/settings/login', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2658,73 +1076,10 @@ def _settings_service_get_password_expiry_settings_serialize( @validate_call - def settings_service_get_security_settings( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceGetSecuritySettingsResponse: - """Get Security Settings - - Returns the security settings of the ZITADEL instance. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._settings_service_get_security_settings_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def settings_service_get_security_settings_with_http_info( + def settings_service_get_password_complexity_settings( self, + ctx_org_id: Optional[StrictStr] = None, + ctx_instance: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2737,11 +1092,15 @@ def settings_service_get_security_settings_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceGetSecuritySettingsResponse]: - """Get Security Settings + ) -> SettingsServiceGetPasswordComplexitySettingsResponse: + """Get the password complexity settings - Returns the security settings of the ZITADEL instance. + Return the password complexity settings for the requested context + :param ctx_org_id: + :type ctx_org_id: str + :param ctx_instance: + :type ctx_instance: bool :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 @@ -2764,7 +1123,9 @@ def settings_service_get_security_settings_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_security_settings_serialize( + _param = self.__settings_service_get_password_complexity_settings_serialize( + ctx_org_id=ctx_org_id, + ctx_instance=ctx_instance, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2772,10 +1133,11 @@ def settings_service_get_security_settings_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetSecuritySettingsResponse", + '200': "SettingsServiceGetPasswordComplexitySettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2784,12 +1146,84 @@ def settings_service_get_security_settings_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __settings_service_get_password_complexity_settings_serialize( + self, + ctx_org_id, + ctx_instance, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + if ctx_org_id is not None: + + _query_params.append(('ctx.orgId', ctx_org_id)) + + if ctx_instance is not None: + + _query_params.append(('ctx.instance', ctx_instance)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/settings/password/complexity', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def settings_service_get_security_settings_without_preload_content( + def settings_service_get_password_expiry_settings( self, + ctx_org_id: Optional[StrictStr] = None, + ctx_instance: Optional[StrictBool] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2802,11 +1236,15 @@ def settings_service_get_security_settings_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get Security Settings + ) -> SettingsServiceGetPasswordExpirySettingsResponse: + """Get the password expiry settings - Returns the security settings of the ZITADEL instance. + Return the password expiry settings for the requested context + :param ctx_org_id: + :type ctx_org_id: str + :param ctx_instance: + :type ctx_instance: bool :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 @@ -2829,7 +1267,9 @@ def settings_service_get_security_settings_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_get_security_settings_serialize( + _param = self.__settings_service_get_password_expiry_settings_serialize( + ctx_org_id=ctx_org_id, + ctx_instance=ctx_instance, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2837,19 +1277,25 @@ def settings_service_get_security_settings_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceGetSecuritySettingsResponse", + '200': "SettingsServiceGetPasswordExpirySettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _settings_service_get_security_settings_serialize( + def __settings_service_get_password_expiry_settings_serialize( self, + ctx_org_id, + ctx_instance, _request_auth, _content_type, _headers, @@ -2872,6 +1318,14 @@ def _settings_service_get_security_settings_serialize( # process the path parameters # process the query parameters + if ctx_org_id is not None: + + _query_params.append(('ctx.orgId', ctx_org_id)) + + if ctx_instance is not None: + + _query_params.append(('ctx.instance', ctx_instance)) + # process the header parameters # process the form parameters # process the body parameter @@ -2893,7 +1347,7 @@ def _settings_service_get_security_settings_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/settings/security', + resource_path='/v2/settings/password/expiry', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2910,9 +1364,8 @@ def _settings_service_get_security_settings_serialize( @validate_call - def settings_service_set_security_settings( + def settings_service_get_security_settings( self, - settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2925,13 +1378,11 @@ def settings_service_set_security_settings( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> SettingsServiceSetSecuritySettingsResponse: - """Set Security Settings + ) -> SettingsServiceGetSecuritySettingsResponse: + """Get Security Settings - Set the security settings of the ZITADEL instance. + Returns the security settings of the ZITADEL instance. - :param settings_service_set_security_settings_request: (required) - :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2954,8 +1405,7 @@ def settings_service_set_security_settings( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_set_security_settings_serialize( - settings_service_set_security_settings_request=settings_service_set_security_settings_request, + _param = self.__settings_service_get_security_settings_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2963,10 +1413,11 @@ def settings_service_set_security_settings( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceSetSecuritySettingsResponse", + '200': "SettingsServiceGetSecuritySettingsResponse", '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2977,78 +1428,69 @@ def settings_service_set_security_settings( response_types_map=_response_types_map, ).data - - @validate_call - def settings_service_set_security_settings_with_http_info( + def __settings_service_get_security_settings_serialize( self, - settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[SettingsServiceSetSecuritySettingsResponse]: - """Set Security Settings + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Set the security settings of the ZITADEL instance. + _host = None - :param settings_service_set_security_settings_request: (required) - :type settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 + _collection_formats: Dict[str, str] = { + } - _param = self._settings_service_set_security_settings_serialize( - settings_service_set_security_settings_request=settings_service_set_security_settings_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '200': "SettingsServiceSetSecuritySettingsResponse", - '403': "SettingsServiceRpcStatus", - '404': "SettingsServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/settings/security', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def settings_service_set_security_settings_without_preload_content( + def settings_service_set_security_settings( self, settings_service_set_security_settings_request: SettingsServiceSetSecuritySettingsRequest, _request_timeout: Union[ @@ -3063,7 +1505,7 @@ def settings_service_set_security_settings_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: + ) -> SettingsServiceSetSecuritySettingsResponse: """Set Security Settings Set the security settings of the ZITADEL instance. @@ -3092,7 +1534,7 @@ def settings_service_set_security_settings_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._settings_service_set_security_settings_serialize( + _param = self.__settings_service_set_security_settings_serialize( settings_service_set_security_settings_request=settings_service_set_security_settings_request, _request_auth=_request_auth, _content_type=_content_type, @@ -3105,14 +1547,18 @@ def settings_service_set_security_settings_without_preload_content( '403': "SettingsServiceRpcStatus", '404': "SettingsServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _settings_service_set_security_settings_serialize( + def __settings_service_set_security_settings_serialize( self, settings_service_set_security_settings_request, _request_auth, diff --git a/zitadel_client/api/user_service_api.py b/zitadel_client/api/user_service_api.py index 2c7f5c25..0c8eba9e 100644 --- a/zitadel_client/api/user_service_api.py +++ b/zitadel_client/api/user_service_api.py @@ -152,7 +152,7 @@ def user_service_add_human_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_human_user_serialize( + _param = self.__user_service_add_human_user_serialize( user_service_add_human_user_request=user_service_add_human_user_request, _request_auth=_request_auth, _content_type=_content_type, @@ -165,6 +165,7 @@ def user_service_add_human_user( '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -175,80 +176,88 @@ def user_service_add_human_user( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_add_human_user_with_http_info( + def __user_service_add_human_user_serialize( self, - user_service_add_human_user_request: UserServiceAddHumanUserRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceAddHumanUserResponse]: - """Create a new human user + user_service_add_human_user_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. + _host = None - :param user_service_add_human_user_request: (required) - :type user_service_add_human_user_request: UserServiceAddHumanUserRequest - :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 + _collection_formats: Dict[str, str] = { + } - _param = self._user_service_add_human_user_serialize( - user_service_add_human_user_request=user_service_add_human_user_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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, + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_add_human_user_request is not None: + _body_params = user_service_add_human_user_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='/v2/users/human', + 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 user_service_add_human_user_without_preload_content( + def user_service_add_idp_link( self, - user_service_add_human_user_request: UserServiceAddHumanUserRequest, + user_id: StrictStr, + user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -261,13 +270,15 @@ def user_service_add_human_user_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a new human user + ) -> UserServiceAddIDPLinkResponse: + """Add link to an identity provider to an user - Create/import a new user with the type human. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned. + Add link to an identity provider to an user.. - :param user_service_add_human_user_request: (required) - :type user_service_add_human_user_request: UserServiceAddHumanUserRequest + :param user_id: (required) + :type user_id: str + :param user_service_add_idp_link_request: (required) + :type user_service_add_idp_link_request: UserServiceAddIDPLinkRequest :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 @@ -290,8 +301,9 @@ def user_service_add_human_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_human_user_serialize( - user_service_add_human_user_request=user_service_add_human_user_request, + _param = self.__user_service_add_idp_link_serialize( + user_id=user_id, + user_service_add_idp_link_request=user_service_add_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -299,20 +311,25 @@ def user_service_add_human_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': "UserServiceAddHumanUserResponse", + '200': "UserServiceAddIDPLinkResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_add_human_user_serialize( + def __user_service_add_idp_link_serialize( self, - user_service_add_human_user_request, + user_id, + user_service_add_idp_link_request, _request_auth, _content_type, _headers, @@ -334,12 +351,14 @@ def _user_service_add_human_user_serialize( _body_params: Optional[bytes] = None # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_add_human_user_request is not None: - _body_params = user_service_add_human_user_request + if user_service_add_idp_link_request is not None: + _body_params = user_service_add_idp_link_request # set the HTTP header `Accept` @@ -371,7 +390,7 @@ def _user_service_add_human_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/human', + resource_path='/v2/users/{userId}/links', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -388,10 +407,9 @@ def _user_service_add_human_user_serialize( @validate_call - def user_service_add_idp_link( + def user_service_add_otp_email( self, user_id: StrictStr, - user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -404,15 +422,13 @@ def user_service_add_idp_link( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceAddIDPLinkResponse: - """Add link to an identity provider to an user + ) -> UserServiceAddOTPEmailResponse: + """Add OTP Email for a user - Add link to an identity provider to an user.. + Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. :param user_id: (required) :type user_id: str - :param user_service_add_idp_link_request: (required) - :type user_service_add_idp_link_request: UserServiceAddIDPLinkRequest :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 @@ -435,9 +451,8 @@ def user_service_add_idp_link( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_idp_link_serialize( + _param = self.__user_service_add_otp_email_serialize( user_id=user_id, - user_service_add_idp_link_request=user_service_add_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -445,10 +460,11 @@ def user_service_add_idp_link( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddIDPLinkResponse", + '200': "UserServiceAddOTPEmailResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -459,12 +475,74 @@ def user_service_add_idp_link( response_types_map=_response_types_map, ).data + def __user_service_add_otp_email_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/otp_email', + 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 user_service_add_idp_link_with_http_info( + def user_service_add_otpsms( self, user_id: StrictStr, - user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -477,15 +555,13 @@ def user_service_add_idp_link_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceAddIDPLinkResponse]: - """Add link to an identity provider to an user + ) -> UserServiceAddOTPSMSResponse: + """Add OTP SMS for a user - Add link to an identity provider to an user.. + Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. :param user_id: (required) :type user_id: str - :param user_service_add_idp_link_request: (required) - :type user_service_add_idp_link_request: UserServiceAddIDPLinkRequest :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 @@ -508,9 +584,8 @@ def user_service_add_idp_link_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_idp_link_serialize( + _param = self.__user_service_add_otpsms_serialize( user_id=user_id, - user_service_add_idp_link_request=user_service_add_idp_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -518,10 +593,11 @@ def user_service_add_idp_link_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddIDPLinkResponse", + '200': "UserServiceAddOTPSMSResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -530,14 +606,77 @@ def user_service_add_idp_link_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_add_otpsms_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/otp_sms', + 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 user_service_add_idp_link_without_preload_content( + def user_service_create_invite_code( self, user_id: StrictStr, - user_service_add_idp_link_request: UserServiceAddIDPLinkRequest, + user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -550,15 +689,15 @@ def user_service_add_idp_link_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Add link to an identity provider to an user + ) -> UserServiceCreateInviteCodeResponse: + """Create an invite code for a user - Add link to an identity provider to an user.. + Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. :param user_id: (required) :type user_id: str - :param user_service_add_idp_link_request: (required) - :type user_service_add_idp_link_request: UserServiceAddIDPLinkRequest + :param user_service_create_invite_code_request: (required) + :type user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest :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 @@ -581,9 +720,9 @@ def user_service_add_idp_link_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_idp_link_serialize( + _param = self.__user_service_create_invite_code_serialize( user_id=user_id, - user_service_add_idp_link_request=user_service_add_idp_link_request, + user_service_create_invite_code_request=user_service_create_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -591,21 +730,25 @@ def user_service_add_idp_link_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddIDPLinkResponse", + '200': "UserServiceCreateInviteCodeResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_add_idp_link_serialize( + def __user_service_create_invite_code_serialize( self, user_id, - user_service_add_idp_link_request, + user_service_create_invite_code_request, _request_auth, _content_type, _headers, @@ -633,8 +776,8 @@ def _user_service_add_idp_link_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_add_idp_link_request is not None: - _body_params = user_service_add_idp_link_request + if user_service_create_invite_code_request is not None: + _body_params = user_service_create_invite_code_request # set the HTTP header `Accept` @@ -666,7 +809,7 @@ def _user_service_add_idp_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/links', + resource_path='/v2/users/{userId}/invite_code', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -683,9 +826,10 @@ def _user_service_add_idp_link_serialize( @validate_call - def user_service_add_otp_email( + def user_service_create_passkey_registration_link( self, user_id: StrictStr, + user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -698,13 +842,15 @@ def user_service_add_otp_email( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceAddOTPEmailResponse: - """Add OTP Email for a user + ) -> UserServiceCreatePasskeyRegistrationLinkResponse: + """Create a passkey registration link for a user - Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. + Create a passkey registration link which includes a code and either return it or send it to the user.. :param user_id: (required) :type user_id: str + :param user_service_create_passkey_registration_link_request: (required) + :type user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest :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 @@ -727,8 +873,9 @@ def user_service_add_otp_email( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otp_email_serialize( + _param = self.__user_service_create_passkey_registration_link_serialize( user_id=user_id, + user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -736,79 +883,11 @@ def user_service_add_otp_email( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPEmailResponse", + '200': "UserServiceCreatePasskeyRegistrationLinkResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_add_otp_email_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceAddOTPEmailResponse]: - """Add OTP Email for a user - - Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - _param = self._user_service_add_otp_email_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -817,77 +896,12 @@ def user_service_add_otp_email_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_add_otp_email_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Add OTP Email for a user - - Add a new One-Time Password (OTP) Email factor to the authenticated user. OTP Email will enable the user to verify a OTP with the latest verified email. The email has to be verified to add the second factor.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_add_otp_email_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _user_service_add_otp_email_serialize( + def __user_service_create_passkey_registration_link_serialize( self, user_id, + user_service_create_passkey_registration_link_request, _request_auth, _content_type, _headers, @@ -915,6 +929,8 @@ def _user_service_add_otp_email_serialize( # process the header parameters # process the form parameters # process the body parameter + if user_service_create_passkey_registration_link_request is not None: + _body_params = user_service_create_passkey_registration_link_request # set the HTTP header `Accept` @@ -946,7 +962,7 @@ def _user_service_add_otp_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/otp_email', + resource_path='/v2/users/{userId}/passkeys/registration_link', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -963,7 +979,7 @@ def _user_service_add_otp_email_serialize( @validate_call - def user_service_add_otpsms( + def user_service_deactivate_user( self, user_id: StrictStr, _request_timeout: Union[ @@ -978,10 +994,10 @@ def user_service_add_otpsms( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceAddOTPSMSResponse: - """Add OTP SMS for a user + ) -> UserServiceDeactivateUserResponse: + """Deactivate user - Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. + The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. :param user_id: (required) :type user_id: str @@ -1007,7 +1023,7 @@ def user_service_add_otpsms( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otpsms_serialize( + _param = self.__user_service_deactivate_user_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1016,10 +1032,11 @@ def user_service_add_otpsms( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPSMSResponse", + '200': "UserServiceDeactivateUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1030,12 +1047,75 @@ def user_service_add_otpsms( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_add_otpsms_with_http_info( + def __user_service_deactivate_user_serialize( self, - user_id: StrictStr, - _request_timeout: Union[ + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/deactivate', + 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 user_service_delete_user( + self, + user_id: StrictStr, + _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], Tuple[ @@ -1047,10 +1127,10 @@ def user_service_add_otpsms_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceAddOTPSMSResponse]: - """Add OTP SMS for a user + ) -> UserServiceDeleteUserResponse: + """Delete user - Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. + The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. :param user_id: (required) :type user_id: str @@ -1076,7 +1156,7 @@ def user_service_add_otpsms_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otpsms_serialize( + _param = self.__user_service_delete_user_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1085,10 +1165,11 @@ def user_service_add_otpsms_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPSMSResponse", + '200': "UserServiceDeleteUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1097,13 +1178,76 @@ def user_service_add_otpsms_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_delete_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/users/{userId}', + 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 user_service_add_otpsms_without_preload_content( + def user_service_get_user_by_id( self, - user_id: StrictStr, + user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1116,12 +1260,12 @@ def user_service_add_otpsms_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Add OTP SMS for a user + ) -> UserServiceGetUserByIDResponse: + """User by ID - Add a new One-Time Password (OTP) SMS factor to the authenticated user. OTP SMS will enable the user to verify a OTP with the latest verified phone number. The phone number has to be verified to add the second factor.. + Returns the full user object (human or machine) including the profile, email, etc.. - :param user_id: (required) + :param user_id: User ID of the user you like to get. (required) :type user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1145,7 +1289,7 @@ def user_service_add_otpsms_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_add_otpsms_serialize( + _param = self.__user_service_get_user_by_id_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1154,18 +1298,22 @@ def user_service_add_otpsms_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceAddOTPSMSResponse", + '200': "UserServiceGetUserByIDResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_add_otpsms_serialize( + def __user_service_get_user_by_id_serialize( self, user_id, _request_auth, @@ -1205,19 +1353,6 @@ def _user_service_add_otpsms_serialize( ] ) - # 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] = [ @@ -1225,8 +1360,8 @@ def _user_service_add_otpsms_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/otp_sms', + method='GET', + resource_path='/v2/users/{userId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1243,10 +1378,9 @@ def _user_service_add_otpsms_serialize( @validate_call - def user_service_create_invite_code( + def user_service_human_mfa_init_skipped( self, user_id: StrictStr, - user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1259,15 +1393,13 @@ def user_service_create_invite_code( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceCreateInviteCodeResponse: - """Create an invite code for a user + ) -> UserServiceHumanMFAInitSkippedResponse: + """MFA Init Skipped - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + Update the last time the user has skipped MFA initialization. The server timestamp is used. :param user_id: (required) :type user_id: str - :param user_service_create_invite_code_request: (required) - :type user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest :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 @@ -1290,9 +1422,8 @@ def user_service_create_invite_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_invite_code_serialize( + _param = self.__user_service_human_mfa_init_skipped_serialize( user_id=user_id, - user_service_create_invite_code_request=user_service_create_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1300,10 +1431,11 @@ def user_service_create_invite_code( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreateInviteCodeResponse", + '200': "UserServiceHumanMFAInitSkippedResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1314,12 +1446,76 @@ def user_service_create_invite_code( response_types_map=_response_types_map, ).data + def __user_service_human_mfa_init_skipped_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/mfa_init_skipped', + 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 user_service_create_invite_code_with_http_info( + def user_service_list_authentication_factors( self, user_id: StrictStr, - user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, + auth_factors: Annotated[Optional[List[StrictStr]], Field(description="Specify the Auth Factors you are interested in")] = None, + states: Annotated[Optional[List[StrictStr]], Field(description="Specify the state of the Auth Factors")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1332,15 +1528,16 @@ def user_service_create_invite_code_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceCreateInviteCodeResponse]: - """Create an invite code for a user - - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + ) -> UserServiceListAuthenticationFactorsResponse: + """user_service_list_authentication_factors + :param user_id: (required) :type user_id: str - :param user_service_create_invite_code_request: (required) - :type user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest + :param auth_factors: Specify the Auth Factors you are interested in + :type auth_factors: List[str] + :param states: Specify the state of the Auth Factors + :type states: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1363,9 +1560,10 @@ def user_service_create_invite_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_invite_code_serialize( + _param = self.__user_service_list_authentication_factors_serialize( user_id=user_id, - user_service_create_invite_code_request=user_service_create_invite_code_request, + auth_factors=auth_factors, + states=states, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1373,10 +1571,11 @@ def user_service_create_invite_code_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreateInviteCodeResponse", + '200': "UserServiceListAuthenticationFactorsResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1385,14 +1584,90 @@ def user_service_create_invite_code_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_list_authentication_factors_serialize( + self, + user_id, + auth_factors, + states, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + 'authFactors': 'csv', + 'states': 'csv', + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + if auth_factors is not None: + + _query_params.append(('authFactors', auth_factors)) + + if states is not None: + + _query_params.append(('states', states)) + + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/authentication_factors/_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def user_service_create_invite_code_without_preload_content( + def user_service_list_authentication_method_types( self, user_id: StrictStr, - user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest, + domain_query_include_without_domain: Annotated[Optional[StrictBool], Field(description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.")] = None, + domain_query_domain: Annotated[Optional[StrictStr], Field(description="List only auth methods with specific domain.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1405,15 +1680,17 @@ def user_service_create_invite_code_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create an invite code for a user + ) -> UserServiceListAuthenticationMethodTypesResponse: + """List all possible authentication methods of a user - Create an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. :param user_id: (required) :type user_id: str - :param user_service_create_invite_code_request: (required) - :type user_service_create_invite_code_request: UserServiceCreateInviteCodeRequest + :param domain_query_include_without_domain: List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. + :type domain_query_include_without_domain: bool + :param domain_query_domain: List only auth methods with specific domain. + :type domain_query_domain: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -1436,9 +1713,10 @@ def user_service_create_invite_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_invite_code_serialize( + _param = self.__user_service_list_authentication_method_types_serialize( user_id=user_id, - user_service_create_invite_code_request=user_service_create_invite_code_request, + domain_query_include_without_domain=domain_query_include_without_domain, + domain_query_domain=domain_query_domain, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1446,21 +1724,26 @@ def user_service_create_invite_code_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreateInviteCodeResponse", + '200': "UserServiceListAuthenticationMethodTypesResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_create_invite_code_serialize( + def __user_service_list_authentication_method_types_serialize( self, user_id, - user_service_create_invite_code_request, + domain_query_include_without_domain, + domain_query_domain, _request_auth, _content_type, _headers, @@ -1485,11 +1768,17 @@ def _user_service_create_invite_code_serialize( if user_id is not None: _path_params['userId'] = user_id # process the query parameters + if domain_query_include_without_domain is not None: + + _query_params.append(('domainQuery.includeWithoutDomain', domain_query_include_without_domain)) + + if domain_query_domain is not None: + + _query_params.append(('domainQuery.domain', domain_query_domain)) + # process the header parameters # process the form parameters # process the body parameter - if user_service_create_invite_code_request is not None: - _body_params = user_service_create_invite_code_request # set the HTTP header `Accept` @@ -1500,19 +1789,6 @@ def _user_service_create_invite_code_serialize( ] ) - # 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] = [ @@ -1520,8 +1796,8 @@ def _user_service_create_invite_code_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/invite_code', + method='GET', + resource_path='/v2/users/{userId}/authentication_methods', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1538,10 +1814,10 @@ def _user_service_create_invite_code_serialize( @validate_call - def user_service_create_passkey_registration_link( + def user_service_list_idp_links( self, user_id: StrictStr, - user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, + user_service_list_idp_links_request: UserServiceListIDPLinksRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1554,15 +1830,15 @@ def user_service_create_passkey_registration_link( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceCreatePasskeyRegistrationLinkResponse: - """Create a passkey registration link for a user + ) -> UserServiceListIDPLinksResponse: + """List links to an identity provider of an user - Create a passkey registration link which includes a code and either return it or send it to the user.. + List links to an identity provider of an user. :param user_id: (required) :type user_id: str - :param user_service_create_passkey_registration_link_request: (required) - :type user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest + :param user_service_list_idp_links_request: (required) + :type user_service_list_idp_links_request: UserServiceListIDPLinksRequest :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 @@ -1585,9 +1861,9 @@ def user_service_create_passkey_registration_link( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_passkey_registration_link_serialize( + _param = self.__user_service_list_idp_links_serialize( user_id=user_id, - user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, + user_service_list_idp_links_request=user_service_list_idp_links_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1595,10 +1871,11 @@ def user_service_create_passkey_registration_link( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreatePasskeyRegistrationLinkResponse", + '200': "UserServiceListIDPLinksResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1609,12 +1886,90 @@ def user_service_create_passkey_registration_link( response_types_map=_response_types_map, ).data + def __user_service_list_idp_links_serialize( + self, + user_id, + user_service_list_idp_links_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_list_idp_links_request is not None: + _body_params = user_service_list_idp_links_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='/v2/users/{userId}/links/_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + @validate_call - def user_service_create_passkey_registration_link_with_http_info( + def user_service_list_passkeys( self, user_id: StrictStr, - user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1627,15 +1982,13 @@ def user_service_create_passkey_registration_link_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceCreatePasskeyRegistrationLinkResponse]: - """Create a passkey registration link for a user + ) -> UserServiceListPasskeysResponse: + """List passkeys of an user - Create a passkey registration link which includes a code and either return it or send it to the user.. + List passkeys of an user :param user_id: (required) :type user_id: str - :param user_service_create_passkey_registration_link_request: (required) - :type user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest :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 @@ -1658,9 +2011,8 @@ def user_service_create_passkey_registration_link_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_passkey_registration_link_serialize( + _param = self.__user_service_list_passkeys_serialize( user_id=user_id, - user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1668,10 +2020,11 @@ def user_service_create_passkey_registration_link_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreatePasskeyRegistrationLinkResponse", + '200': "UserServiceListPasskeysResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1680,14 +2033,76 @@ def user_service_create_passkey_registration_link_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_list_passkeys_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/passkeys/_search', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth ) + + @validate_call - def user_service_create_passkey_registration_link_without_preload_content( + def user_service_list_users( self, - user_id: StrictStr, - user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest, + user_service_list_users_request: UserServiceListUsersRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1700,15 +2115,13 @@ def user_service_create_passkey_registration_link_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create a passkey registration link for a user + ) -> UserServiceListUsersResponse: + """Search Users - Create a passkey registration link which includes a code and either return it or send it to the user.. + Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. - :param user_id: (required) - :type user_id: str - :param user_service_create_passkey_registration_link_request: (required) - :type user_service_create_passkey_registration_link_request: UserServiceCreatePasskeyRegistrationLinkRequest + :param user_service_list_users_request: (required) + :type user_service_list_users_request: UserServiceListUsersRequest :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 @@ -1731,9 +2144,8 @@ def user_service_create_passkey_registration_link_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_create_passkey_registration_link_serialize( - user_id=user_id, - user_service_create_passkey_registration_link_request=user_service_create_passkey_registration_link_request, + _param = self.__user_service_list_users_serialize( + user_service_list_users_request=user_service_list_users_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1741,21 +2153,25 @@ def user_service_create_passkey_registration_link_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceCreatePasskeyRegistrationLinkResponse", + '200': "UserServiceListUsersResponse", + '400': "UserServiceRpcStatus", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_create_passkey_registration_link_serialize( + def __user_service_list_users_serialize( self, - user_id, - user_service_create_passkey_registration_link_request, + user_service_list_users_request, _request_auth, _content_type, _headers, @@ -1777,14 +2193,12 @@ def _user_service_create_passkey_registration_link_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_create_passkey_registration_link_request is not None: - _body_params = user_service_create_passkey_registration_link_request + if user_service_list_users_request is not None: + _body_params = user_service_list_users_request # set the HTTP header `Accept` @@ -1816,7 +2230,7 @@ def _user_service_create_passkey_registration_link_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys/registration_link', + resource_path='/v2/users', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1833,7 +2247,7 @@ def _user_service_create_passkey_registration_link_serialize( @validate_call - def user_service_deactivate_user( + def user_service_lock_user( self, user_id: StrictStr, _request_timeout: Union[ @@ -1848,10 +2262,10 @@ def user_service_deactivate_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceDeactivateUserResponse: - """Deactivate user + ) -> UserServiceLockUserResponse: + """Lock user - The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. + The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. :param user_id: (required) :type user_id: str @@ -1877,7 +2291,7 @@ def user_service_deactivate_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_deactivate_user_serialize( + _param = self.__user_service_lock_user_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1886,10 +2300,11 @@ def user_service_deactivate_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeactivateUserResponse", + '200': "UserServiceLockUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -1900,80 +2315,75 @@ def user_service_deactivate_user( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_deactivate_user_with_http_info( + def __user_service_lock_user_serialize( self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceDeactivateUserResponse]: - """Deactivate user + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. + _host = None - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 + _collection_formats: Dict[str, str] = { + } - _param = self._user_service_deactivate_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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, + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/lock', + 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 user_service_deactivate_user_without_preload_content( + def user_service_password_reset( self, user_id: StrictStr, + user_service_password_reset_request: UserServicePasswordResetRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1986,13 +2396,15 @@ def user_service_deactivate_user_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Deactivate user + ) -> UserServicePasswordResetResponse: + """Request a code to reset a password - The state of the user will be changed to 'deactivated'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'deactivated'. Use deactivate user when the user should not be able to use the account anymore, but you still need access to the user data.. + Request a code to reset a password.. :param user_id: (required) :type user_id: str + :param user_service_password_reset_request: (required) + :type user_service_password_reset_request: UserServicePasswordResetRequest :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 @@ -2015,8 +2427,9 @@ def user_service_deactivate_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_deactivate_user_serialize( + _param = self.__user_service_password_reset_serialize( user_id=user_id, + user_service_password_reset_request=user_service_password_reset_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2024,20 +2437,25 @@ def user_service_deactivate_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeactivateUserResponse", + '200': "UserServicePasswordResetResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_deactivate_user_serialize( + def __user_service_password_reset_serialize( self, user_id, + user_service_password_reset_request, _request_auth, _content_type, _headers, @@ -2065,6 +2483,8 @@ def _user_service_deactivate_user_serialize( # process the header parameters # process the form parameters # process the body parameter + if user_service_password_reset_request is not None: + _body_params = user_service_password_reset_request # set the HTTP header `Accept` @@ -2096,7 +2516,7 @@ def _user_service_deactivate_user_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/deactivate', + resource_path='/v2/users/{userId}/password_reset', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2113,7 +2533,7 @@ def _user_service_deactivate_user_serialize( @validate_call - def user_service_delete_user( + def user_service_reactivate_user( self, user_id: StrictStr, _request_timeout: Union[ @@ -2128,10 +2548,10 @@ def user_service_delete_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceDeleteUserResponse: - """Delete user - - The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + ) -> UserServiceReactivateUserResponse: + """Reactivate user + + Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. :param user_id: (required) :type user_id: str @@ -2157,7 +2577,7 @@ def user_service_delete_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_delete_user_serialize( + _param = self.__user_service_reactivate_user_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2166,10 +2586,11 @@ def user_service_delete_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeleteUserResponse", + '200': "UserServiceReactivateUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2180,11 +2601,75 @@ def user_service_delete_user( response_types_map=_response_types_map, ).data + def __user_service_reactivate_user_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/reactivate', + 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 user_service_delete_user_with_http_info( + def user_service_register_passkey( self, user_id: StrictStr, + user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2197,13 +2682,15 @@ def user_service_delete_user_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceDeleteUserResponse]: - """Delete user + ) -> UserServiceRegisterPasskeyResponse: + """Start the registration of passkey for a user - The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. :param user_id: (required) :type user_id: str + :param user_service_register_passkey_request: (required) + :type user_service_register_passkey_request: UserServiceRegisterPasskeyRequest :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 @@ -2226,8 +2713,9 @@ def user_service_delete_user_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_delete_user_serialize( + _param = self.__user_service_register_passkey_serialize( user_id=user_id, + user_service_register_passkey_request=user_service_register_passkey_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2235,10 +2723,11 @@ def user_service_delete_user_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeleteUserResponse", + '200': "UserServiceRegisterPasskeyResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2247,11 +2736,90 @@ def user_service_delete_user_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_register_passkey_serialize( + self, + user_id, + user_service_register_passkey_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_register_passkey_request is not None: + _body_params = user_service_register_passkey_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='/v2/users/{userId}/passkeys', + 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 user_service_delete_user_without_preload_content( + def user_service_register_totp( self, user_id: StrictStr, _request_timeout: Union[ @@ -2266,10 +2834,10 @@ def user_service_delete_user_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete user + ) -> UserServiceRegisterTOTPResponse: + """Start the registration of a TOTP generator for a user - The state of the user will be changed to 'deleted'. The user will not be able to log in anymore. Endpoints requesting this user will return an error 'User not found.. + Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. :param user_id: (required) :type user_id: str @@ -2295,7 +2863,7 @@ def user_service_delete_user_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_delete_user_serialize( + _param = self.__user_service_register_totp_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2304,18 +2872,22 @@ def user_service_delete_user_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceDeleteUserResponse", + '200': "UserServiceRegisterTOTPResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_delete_user_serialize( + def __user_service_register_totp_serialize( self, user_id, _request_auth, @@ -2362,8 +2934,8 @@ def _user_service_delete_user_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}', + method='POST', + resource_path='/v2/users/{userId}/totp', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2380,9 +2952,10 @@ def _user_service_delete_user_serialize( @validate_call - def user_service_get_user_by_id( + def user_service_register_u2_f( self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], + user_id: StrictStr, + user_service_register_u2_f_request: UserServiceRegisterU2FRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2395,13 +2968,15 @@ def user_service_get_user_by_id( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceGetUserByIDResponse: - """User by ID + ) -> UserServiceRegisterU2FResponse: + """Start the registration of a u2f token for a user - Returns the full user object (human or machine) including the profile, email, etc.. + Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. - :param user_id: User ID of the user you like to get. (required) + :param user_id: (required) :type user_id: str + :param user_service_register_u2_f_request: (required) + :type user_service_register_u2_f_request: UserServiceRegisterU2FRequest :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 @@ -2424,8 +2999,9 @@ def user_service_get_user_by_id( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_get_user_by_id_serialize( + _param = self.__user_service_register_u2_f_serialize( user_id=user_id, + user_service_register_u2_f_request=user_service_register_u2_f_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2433,10 +3009,11 @@ def user_service_get_user_by_id( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceGetUserByIDResponse", + '200': "UserServiceRegisterU2FResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2447,80 +3024,92 @@ def user_service_get_user_by_id( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_get_user_by_id_with_http_info( + def __user_service_register_u2_f_serialize( self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceGetUserByIDResponse]: - """User by ID - - Returns the full user object (human or machine) including the profile, email, etc.. + user_id, + user_service_register_u2_f_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - :param user_id: User ID of the user you like to get. (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 + _host = None - _param = self._user_service_get_user_by_id_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _collection_formats: Dict[str, str] = { + } - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceGetUserByIDResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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, + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_register_u2_f_request is not None: + _body_params = user_service_register_u2_f_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='/v2/users/{userId}/u2f', + 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 user_service_get_user_by_id_without_preload_content( + def user_service_remove_idp_link( self, - user_id: Annotated[StrictStr, Field(description="User ID of the user you like to get.")], + user_id: StrictStr, + idp_id: StrictStr, + linked_user_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2533,13 +3122,17 @@ def user_service_get_user_by_id_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """User by ID + ) -> UserServiceRemoveIDPLinkResponse: + """Remove link of an identity provider to an user - Returns the full user object (human or machine) including the profile, email, etc.. + Remove link of an identity provider to an user. - :param user_id: User ID of the user you like to get. (required) + :param user_id: (required) :type user_id: str + :param idp_id: (required) + :type idp_id: str + :param linked_user_id: (required) + :type linked_user_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2562,8 +3155,10 @@ def user_service_get_user_by_id_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_get_user_by_id_serialize( + _param = self.__user_service_remove_idp_link_serialize( user_id=user_id, + idp_id=idp_id, + linked_user_id=linked_user_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2571,20 +3166,26 @@ def user_service_get_user_by_id_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceGetUserByIDResponse", + '200': "UserServiceRemoveIDPLinkResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_get_user_by_id_serialize( + def __user_service_remove_idp_link_serialize( self, user_id, + idp_id, + linked_user_id, _request_auth, _content_type, _headers, @@ -2608,6 +3209,10 @@ def _user_service_get_user_by_id_serialize( # process the path parameters if user_id is not None: _path_params['userId'] = user_id + if idp_id is not None: + _path_params['idpId'] = idp_id + if linked_user_id is not None: + _path_params['linkedUserId'] = linked_user_id # process the query parameters # process the header parameters # process the form parameters @@ -2629,8 +3234,8 @@ def _user_service_get_user_by_id_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/users/{userId}', + method='DELETE', + resource_path='/v2/users/{userId}/links/{idpId}/{linkedUserId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2647,7 +3252,7 @@ def _user_service_get_user_by_id_serialize( @validate_call - def user_service_human_mfa_init_skipped( + def user_service_remove_otp_email( self, user_id: StrictStr, _request_timeout: Union[ @@ -2662,10 +3267,10 @@ def user_service_human_mfa_init_skipped( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceHumanMFAInitSkippedResponse: - """MFA Init Skipped + ) -> UserServiceRemoveOTPEmailResponse: + """Remove One-Time Password (OTP) Email from a user - Update the last time the user has skipped MFA initialization. The server timestamp is used. + Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. :param user_id: (required) :type user_id: str @@ -2691,7 +3296,7 @@ def user_service_human_mfa_init_skipped( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_human_mfa_init_skipped_serialize( + _param = self.__user_service_remove_otp_email_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2700,10 +3305,11 @@ def user_service_human_mfa_init_skipped( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceHumanMFAInitSkippedResponse", + '200': "UserServiceRemoveOTPEmailResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -2714,78 +3320,72 @@ def user_service_human_mfa_init_skipped( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_human_mfa_init_skipped_with_http_info( + def __user_service_remove_otp_email_serialize( self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceHumanMFAInitSkippedResponse]: - """MFA Init Skipped + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Update the last time the user has skipped MFA initialization. The server timestamp is used. + _host = None - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 + _collection_formats: Dict[str, str] = { + } - _param = self._user_service_human_mfa_init_skipped_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + _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 - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceHumanMFAInitSkippedResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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, + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/users/{userId}/otp_email', + 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 user_service_human_mfa_init_skipped_without_preload_content( + def user_service_remove_otpsms( self, user_id: StrictStr, _request_timeout: Union[ @@ -2800,10 +3400,10 @@ def user_service_human_mfa_init_skipped_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """MFA Init Skipped + ) -> UserServiceRemoveOTPSMSResponse: + """Remove One-Time Password (OTP) SMS from a user - Update the last time the user has skipped MFA initialization. The server timestamp is used. + Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. :param user_id: (required) :type user_id: str @@ -2829,7 +3429,7 @@ def user_service_human_mfa_init_skipped_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_human_mfa_init_skipped_serialize( + _param = self.__user_service_remove_otpsms_serialize( user_id=user_id, _request_auth=_request_auth, _content_type=_content_type, @@ -2838,18 +3438,22 @@ def user_service_human_mfa_init_skipped_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceHumanMFAInitSkippedResponse", + '200': "UserServiceRemoveOTPSMSResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_human_mfa_init_skipped_serialize( + def __user_service_remove_otpsms_serialize( self, user_id, _request_auth, @@ -2889,19 +3493,6 @@ def _user_service_human_mfa_init_skipped_serialize( ] ) - # 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] = [ @@ -2909,8 +3500,8 @@ def _user_service_human_mfa_init_skipped_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/mfa_init_skipped', + method='DELETE', + resource_path='/v2/users/{userId}/otp_sms', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -2927,11 +3518,10 @@ def _user_service_human_mfa_init_skipped_serialize( @validate_call - def user_service_list_authentication_factors( + def user_service_remove_passkey( self, user_id: StrictStr, - auth_factors: Annotated[Optional[List[StrictStr]], Field(description="Specify the Auth Factors you are interested in")] = None, - states: Annotated[Optional[List[StrictStr]], Field(description="Specify the state of the Auth Factors")] = None, + passkey_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -2944,16 +3534,15 @@ def user_service_list_authentication_factors( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceListAuthenticationFactorsResponse: - """user_service_list_authentication_factors + ) -> UserServiceRemovePasskeyResponse: + """Remove passkey from a user + Remove passkey from a user. :param user_id: (required) :type user_id: str - :param auth_factors: Specify the Auth Factors you are interested in - :type auth_factors: List[str] - :param states: Specify the state of the Auth Factors - :type states: List[str] + :param passkey_id: (required) + :type passkey_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -2976,10 +3565,9 @@ def user_service_list_authentication_factors( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_authentication_factors_serialize( + _param = self.__user_service_remove_passkey_serialize( user_id=user_id, - auth_factors=auth_factors, - states=states, + passkey_id=passkey_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -2987,10 +3575,11 @@ def user_service_list_authentication_factors( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationFactorsResponse", + '200': "UserServiceRemovePasskeyResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3001,13 +3590,77 @@ def user_service_list_authentication_factors( response_types_map=_response_types_map, ).data + def __user_service_remove_passkey_serialize( + self, + user_id, + passkey_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + if passkey_id is not None: + _path_params['passkeyId'] = passkey_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/users/{userId}/passkeys/{passkeyId}', + 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 user_service_list_authentication_factors_with_http_info( + def user_service_remove_phone( self, user_id: StrictStr, - auth_factors: Annotated[Optional[List[StrictStr]], Field(description="Specify the Auth Factors you are interested in")] = None, - states: Annotated[Optional[List[StrictStr]], Field(description="Specify the state of the Auth Factors")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3020,16 +3673,13 @@ def user_service_list_authentication_factors_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceListAuthenticationFactorsResponse]: - """user_service_list_authentication_factors + ) -> UserServiceRemovePhoneResponse: + """Delete the user phone + Delete the phone number of a user. :param user_id: (required) :type user_id: str - :param auth_factors: Specify the Auth Factors you are interested in - :type auth_factors: List[str] - :param states: Specify the state of the Auth Factors - :type states: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3052,10 +3702,8 @@ def user_service_list_authentication_factors_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_authentication_factors_serialize( + _param = self.__user_service_remove_phone_serialize( user_id=user_id, - auth_factors=auth_factors, - states=states, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3063,10 +3711,11 @@ def user_service_list_authentication_factors_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationFactorsResponse", + '200': "UserServiceRemovePhoneResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3075,15 +3724,76 @@ def user_service_list_authentication_factors_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_remove_phone_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v2/users/{userId}/phone', + 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 user_service_list_authentication_factors_without_preload_content( + def user_service_remove_totp( self, user_id: StrictStr, - auth_factors: Annotated[Optional[List[StrictStr]], Field(description="Specify the Auth Factors you are interested in")] = None, - states: Annotated[Optional[List[StrictStr]], Field(description="Specify the state of the Auth Factors")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3096,16 +3806,13 @@ def user_service_list_authentication_factors_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """user_service_list_authentication_factors + ) -> UserServiceRemoveTOTPResponse: + """Remove TOTP generator from a user + Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. :param user_id: (required) :type user_id: str - :param auth_factors: Specify the Auth Factors you are interested in - :type auth_factors: List[str] - :param states: Specify the state of the Auth Factors - :type states: List[str] :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3128,10 +3835,8 @@ def user_service_list_authentication_factors_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_authentication_factors_serialize( + _param = self.__user_service_remove_totp_serialize( user_id=user_id, - auth_factors=auth_factors, - states=states, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3139,22 +3844,24 @@ def user_service_list_authentication_factors_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationFactorsResponse", + '200': "UserServiceRemoveTOTPResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_list_authentication_factors_serialize( + def __user_service_remove_totp_serialize( self, user_id, - auth_factors, - states, _request_auth, _content_type, _headers, @@ -3164,8 +3871,6 @@ def _user_service_list_authentication_factors_serialize( _host = None _collection_formats: Dict[str, str] = { - 'authFactors': 'csv', - 'states': 'csv', } _path_params: Dict[str, str] = {} @@ -3181,14 +3886,6 @@ def _user_service_list_authentication_factors_serialize( if user_id is not None: _path_params['userId'] = user_id # process the query parameters - if auth_factors is not None: - - _query_params.append(('authFactors', auth_factors)) - - if states is not None: - - _query_params.append(('states', states)) - # process the header parameters # process the form parameters # process the body parameter @@ -3209,8 +3906,8 @@ def _user_service_list_authentication_factors_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/authentication_factors/_search', + method='DELETE', + resource_path='/v2/users/{userId}/totp', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -3227,11 +3924,10 @@ def _user_service_list_authentication_factors_serialize( @validate_call - def user_service_list_authentication_method_types( + def user_service_remove_u2_f( self, user_id: StrictStr, - domain_query_include_without_domain: Annotated[Optional[StrictBool], Field(description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.")] = None, - domain_query_domain: Annotated[Optional[StrictStr], Field(description="List only auth methods with specific domain.")] = None, + u2f_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -3244,17 +3940,15 @@ def user_service_list_authentication_method_types( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceListAuthenticationMethodTypesResponse: - """List all possible authentication methods of a user + ) -> UserServiceRemoveU2FResponse: + """Remove u2f token from a user - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. + Remove u2f token from a user :param user_id: (required) :type user_id: str - :param domain_query_include_without_domain: List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. - :type domain_query_include_without_domain: bool - :param domain_query_domain: List only auth methods with specific domain. - :type domain_query_domain: str + :param u2f_id: (required) + :type u2f_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -3277,10 +3971,9 @@ def user_service_list_authentication_method_types( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_list_authentication_method_types_serialize( + _param = self.__user_service_remove_u2_f_serialize( user_id=user_id, - domain_query_include_without_domain=domain_query_include_without_domain, - domain_query_domain=domain_query_domain, + u2f_id=u2f_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -3288,10 +3981,11 @@ def user_service_list_authentication_method_types( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationMethodTypesResponse", + '200': "UserServiceRemoveU2FResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -3302,7587 +3996,10 @@ def user_service_list_authentication_method_types( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_list_authentication_method_types_with_http_info( - self, - user_id: StrictStr, - domain_query_include_without_domain: Annotated[Optional[StrictBool], Field(description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.")] = None, - domain_query_domain: Annotated[Optional[StrictStr], Field(description="List only auth methods with specific domain.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceListAuthenticationMethodTypesResponse]: - """List all possible authentication methods of a user - - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. - - :param user_id: (required) - :type user_id: str - :param domain_query_include_without_domain: List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. - :type domain_query_include_without_domain: bool - :param domain_query_domain: List only auth methods with specific domain. - :type domain_query_domain: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_list_authentication_method_types_serialize( - user_id=user_id, - domain_query_include_without_domain=domain_query_include_without_domain, - domain_query_domain=domain_query_domain, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationMethodTypesResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_list_authentication_method_types_without_preload_content( - self, - user_id: StrictStr, - domain_query_include_without_domain: Annotated[Optional[StrictBool], Field(description="List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI.")] = None, - domain_query_domain: Annotated[Optional[StrictStr], Field(description="List only auth methods with specific domain.")] = None, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List all possible authentication methods of a user - - List all possible authentication methods of a user like password, passwordless, (T)OTP and more.. - - :param user_id: (required) - :type user_id: str - :param domain_query_include_without_domain: List also auth method types without domain information like passkey and U2F added through V1 APIs / Login UI. - :type domain_query_include_without_domain: bool - :param domain_query_domain: List only auth methods with specific domain. - :type domain_query_domain: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_list_authentication_method_types_serialize( - user_id=user_id, - domain_query_include_without_domain=domain_query_include_without_domain, - domain_query_domain=domain_query_domain, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListAuthenticationMethodTypesResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_list_authentication_method_types_serialize( - self, - user_id, - domain_query_include_without_domain, - domain_query_domain, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - if domain_query_include_without_domain is not None: - - _query_params.append(('domainQuery.includeWithoutDomain', domain_query_include_without_domain)) - - if domain_query_domain is not None: - - _query_params.append(('domainQuery.domain', domain_query_domain)) - - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v2/users/{userId}/authentication_methods', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def user_service_list_idp_links( - self, - user_id: StrictStr, - user_service_list_idp_links_request: UserServiceListIDPLinksRequest, - _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, - ) -> UserServiceListIDPLinksResponse: - """List links to an identity provider of an user - - List links to an identity provider of an user. - - :param user_id: (required) - :type user_id: str - :param user_service_list_idp_links_request: (required) - :type user_service_list_idp_links_request: UserServiceListIDPLinksRequest - :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._user_service_list_idp_links_serialize( - user_id=user_id, - user_service_list_idp_links_request=user_service_list_idp_links_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_list_idp_links_with_http_info( - self, - user_id: StrictStr, - user_service_list_idp_links_request: UserServiceListIDPLinksRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceListIDPLinksResponse]: - """List links to an identity provider of an user - - List links to an identity provider of an user. - - :param user_id: (required) - :type user_id: str - :param user_service_list_idp_links_request: (required) - :type user_service_list_idp_links_request: UserServiceListIDPLinksRequest - :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._user_service_list_idp_links_serialize( - user_id=user_id, - user_service_list_idp_links_request=user_service_list_idp_links_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_list_idp_links_without_preload_content( - self, - user_id: StrictStr, - user_service_list_idp_links_request: UserServiceListIDPLinksRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List links to an identity provider of an user - - List links to an identity provider of an user. - - :param user_id: (required) - :type user_id: str - :param user_service_list_idp_links_request: (required) - :type user_service_list_idp_links_request: UserServiceListIDPLinksRequest - :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._user_service_list_idp_links_serialize( - user_id=user_id, - user_service_list_idp_links_request=user_service_list_idp_links_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListIDPLinksResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_list_idp_links_serialize( - self, - user_id, - user_service_list_idp_links_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_list_idp_links_request is not None: - _body_params = user_service_list_idp_links_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='/v2/users/{userId}/links/_search', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def user_service_list_passkeys( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceListPasskeysResponse: - """List passkeys of an user - - List passkeys of an user - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_list_passkeys_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_list_passkeys_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceListPasskeysResponse]: - """List passkeys of an user - - List passkeys of an user - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_list_passkeys_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_list_passkeys_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List passkeys of an user - - List passkeys of an user - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_list_passkeys_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListPasskeysResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_list_passkeys_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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='/v2/users/{userId}/passkeys/_search', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def user_service_list_users( - self, - user_service_list_users_request: UserServiceListUsersRequest, - _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, - ) -> UserServiceListUsersResponse: - """Search Users - - Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. - - :param user_service_list_users_request: (required) - :type user_service_list_users_request: UserServiceListUsersRequest - :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._user_service_list_users_serialize( - user_service_list_users_request=user_service_list_users_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_list_users_with_http_info( - self, - user_service_list_users_request: UserServiceListUsersRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceListUsersResponse]: - """Search Users - - Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. - - :param user_service_list_users_request: (required) - :type user_service_list_users_request: UserServiceListUsersRequest - :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._user_service_list_users_serialize( - user_service_list_users_request=user_service_list_users_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_list_users_without_preload_content( - self, - user_service_list_users_request: UserServiceListUsersRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Search Users - - Search for users. By default, we will return all users of your instance that you have permission to read. Make sure to include a limit and sorting for pagination. - - :param user_service_list_users_request: (required) - :type user_service_list_users_request: UserServiceListUsersRequest - :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._user_service_list_users_serialize( - user_service_list_users_request=user_service_list_users_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceListUsersResponse", - '400': "UserServiceRpcStatus", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_list_users_serialize( - self, - user_service_list_users_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 user_service_list_users_request is not None: - _body_params = user_service_list_users_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='/v2/users', - 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 user_service_lock_user( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceLockUserResponse: - """Lock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_lock_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_lock_user_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceLockUserResponse]: - """Lock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_lock_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_lock_user_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Lock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_lock_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceLockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_lock_user_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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='/v2/users/{userId}/lock', - 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 user_service_password_reset( - self, - user_id: StrictStr, - user_service_password_reset_request: UserServicePasswordResetRequest, - _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, - ) -> UserServicePasswordResetResponse: - """Request a code to reset a password - - Request a code to reset a password.. - - :param user_id: (required) - :type user_id: str - :param user_service_password_reset_request: (required) - :type user_service_password_reset_request: UserServicePasswordResetRequest - :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._user_service_password_reset_serialize( - user_id=user_id, - user_service_password_reset_request=user_service_password_reset_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_password_reset_with_http_info( - self, - user_id: StrictStr, - user_service_password_reset_request: UserServicePasswordResetRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServicePasswordResetResponse]: - """Request a code to reset a password - - Request a code to reset a password.. - - :param user_id: (required) - :type user_id: str - :param user_service_password_reset_request: (required) - :type user_service_password_reset_request: UserServicePasswordResetRequest - :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._user_service_password_reset_serialize( - user_id=user_id, - user_service_password_reset_request=user_service_password_reset_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_password_reset_without_preload_content( - self, - user_id: StrictStr, - user_service_password_reset_request: UserServicePasswordResetRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Request a code to reset a password - - Request a code to reset a password.. - - :param user_id: (required) - :type user_id: str - :param user_service_password_reset_request: (required) - :type user_service_password_reset_request: UserServicePasswordResetRequest - :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._user_service_password_reset_serialize( - user_id=user_id, - user_service_password_reset_request=user_service_password_reset_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServicePasswordResetResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_password_reset_serialize( - self, - user_id, - user_service_password_reset_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_password_reset_request is not None: - _body_params = user_service_password_reset_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='/v2/users/{userId}/password_reset', - 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 user_service_reactivate_user( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceReactivateUserResponse: - """Reactivate user - - Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_reactivate_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_reactivate_user_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceReactivateUserResponse]: - """Reactivate user - - Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_reactivate_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_reactivate_user_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Reactivate user - - Reactivate a user with the state 'deactivated'. The user will be able to log in again afterward. The endpoint returns an error if the user is not in the state 'deactivated'.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_reactivate_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceReactivateUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_reactivate_user_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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='/v2/users/{userId}/reactivate', - 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 user_service_register_passkey( - self, - user_id: StrictStr, - user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, - _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, - ) -> UserServiceRegisterPasskeyResponse: - """Start the registration of passkey for a user - - Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_passkey_request: (required) - :type user_service_register_passkey_request: UserServiceRegisterPasskeyRequest - :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._user_service_register_passkey_serialize( - user_id=user_id, - user_service_register_passkey_request=user_service_register_passkey_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_register_passkey_with_http_info( - self, - user_id: StrictStr, - user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRegisterPasskeyResponse]: - """Start the registration of passkey for a user - - Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_passkey_request: (required) - :type user_service_register_passkey_request: UserServiceRegisterPasskeyRequest - :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._user_service_register_passkey_serialize( - user_id=user_id, - user_service_register_passkey_request=user_service_register_passkey_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_register_passkey_without_preload_content( - self, - user_id: StrictStr, - user_service_register_passkey_request: UserServiceRegisterPasskeyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Start the registration of passkey for a user - - Start the registration of a passkey for a user, as a response the public key credential creation options are returned, which are used to verify the passkey.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_passkey_request: (required) - :type user_service_register_passkey_request: UserServiceRegisterPasskeyRequest - :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._user_service_register_passkey_serialize( - user_id=user_id, - user_service_register_passkey_request=user_service_register_passkey_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterPasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_register_passkey_serialize( - self, - user_id, - user_service_register_passkey_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_register_passkey_request is not None: - _body_params = user_service_register_passkey_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='/v2/users/{userId}/passkeys', - 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 user_service_register_totp( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRegisterTOTPResponse: - """Start the registration of a TOTP generator for a user - - Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_register_totp_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_register_totp_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRegisterTOTPResponse]: - """Start the registration of a TOTP generator for a user - - Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_register_totp_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_register_totp_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Start the registration of a TOTP generator for a user - - Start the registration of a TOTP generator for a user, as a response a secret returned, which is used to initialize a TOTP app or device.. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_register_totp_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_register_totp_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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='/v2/users/{userId}/totp', - 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 user_service_register_u2_f( - self, - user_id: StrictStr, - user_service_register_u2_f_request: UserServiceRegisterU2FRequest, - _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, - ) -> UserServiceRegisterU2FResponse: - """Start the registration of a u2f token for a user - - Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_u2_f_request: (required) - :type user_service_register_u2_f_request: UserServiceRegisterU2FRequest - :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._user_service_register_u2_f_serialize( - user_id=user_id, - user_service_register_u2_f_request=user_service_register_u2_f_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_register_u2_f_with_http_info( - self, - user_id: StrictStr, - user_service_register_u2_f_request: UserServiceRegisterU2FRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRegisterU2FResponse]: - """Start the registration of a u2f token for a user - - Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_u2_f_request: (required) - :type user_service_register_u2_f_request: UserServiceRegisterU2FRequest - :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._user_service_register_u2_f_serialize( - user_id=user_id, - user_service_register_u2_f_request=user_service_register_u2_f_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_register_u2_f_without_preload_content( - self, - user_id: StrictStr, - user_service_register_u2_f_request: UserServiceRegisterU2FRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Start the registration of a u2f token for a user - - Start the registration of a u2f token for a user, as a response the public key credential creation options are returned, which are used to verify the u2f token.. - - :param user_id: (required) - :type user_id: str - :param user_service_register_u2_f_request: (required) - :type user_service_register_u2_f_request: UserServiceRegisterU2FRequest - :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._user_service_register_u2_f_serialize( - user_id=user_id, - user_service_register_u2_f_request=user_service_register_u2_f_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRegisterU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_register_u2_f_serialize( - self, - user_id, - user_service_register_u2_f_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_register_u2_f_request is not None: - _body_params = user_service_register_u2_f_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='/v2/users/{userId}/u2f', - 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 user_service_remove_idp_link( - self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemoveIDPLinkResponse: - """Remove link of an identity provider to an user - - Remove link of an identity provider to an user. - - :param user_id: (required) - :type user_id: str - :param idp_id: (required) - :type idp_id: str - :param linked_user_id: (required) - :type linked_user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_idp_link_serialize( - user_id=user_id, - idp_id=idp_id, - linked_user_id=linked_user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_idp_link_with_http_info( - self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemoveIDPLinkResponse]: - """Remove link of an identity provider to an user - - Remove link of an identity provider to an user. - - :param user_id: (required) - :type user_id: str - :param idp_id: (required) - :type idp_id: str - :param linked_user_id: (required) - :type linked_user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_idp_link_serialize( - user_id=user_id, - idp_id=idp_id, - linked_user_id=linked_user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_idp_link_without_preload_content( - self, - user_id: StrictStr, - idp_id: StrictStr, - linked_user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove link of an identity provider to an user - - Remove link of an identity provider to an user. - - :param user_id: (required) - :type user_id: str - :param idp_id: (required) - :type idp_id: str - :param linked_user_id: (required) - :type linked_user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_idp_link_serialize( - user_id=user_id, - idp_id=idp_id, - linked_user_id=linked_user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveIDPLinkResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_idp_link_serialize( - self, - user_id, - idp_id, - linked_user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if idp_id is not None: - _path_params['idpId'] = idp_id - if linked_user_id is not None: - _path_params['linkedUserId'] = linked_user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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='DELETE', - resource_path='/v2/users/{userId}/links/{idpId}/{linkedUserId}', - 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 user_service_remove_otp_email( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemoveOTPEmailResponse: - """Remove One-Time Password (OTP) Email from a user - - Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_otp_email_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_otp_email_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemoveOTPEmailResponse]: - """Remove One-Time Password (OTP) Email from a user - - Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_otp_email_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_otp_email_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove One-Time Password (OTP) Email from a user - - Remove the configured One-Time Password (OTP) Email factor of a user. As only one OTP Email per user is allowed, the user will not have OTP Email as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_otp_email_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_otp_email_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/otp_email', - 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 user_service_remove_otpsms( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemoveOTPSMSResponse: - """Remove One-Time Password (OTP) SMS from a user - - Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_otpsms_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_otpsms_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemoveOTPSMSResponse]: - """Remove One-Time Password (OTP) SMS from a user - - Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_otpsms_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_otpsms_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove One-Time Password (OTP) SMS from a user - - Remove the configured One-Time Password (OTP) SMS factor of a user. As only one OTP SMS per user is allowed, the user will not have OTP SMS as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_otpsms_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveOTPSMSResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_otpsms_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/otp_sms', - 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 user_service_remove_passkey( - self, - user_id: StrictStr, - passkey_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemovePasskeyResponse: - """Remove passkey from a user - - Remove passkey from a user. - - :param user_id: (required) - :type user_id: str - :param passkey_id: (required) - :type passkey_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_passkey_with_http_info( - self, - user_id: StrictStr, - passkey_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemovePasskeyResponse]: - """Remove passkey from a user - - Remove passkey from a user. - - :param user_id: (required) - :type user_id: str - :param passkey_id: (required) - :type passkey_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_passkey_without_preload_content( - self, - user_id: StrictStr, - passkey_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove passkey from a user - - Remove passkey from a user. - - :param user_id: (required) - :type user_id: str - :param passkey_id: (required) - :type passkey_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_passkey_serialize( - user_id=user_id, - passkey_id=passkey_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePasskeyResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_passkey_serialize( - self, - user_id, - passkey_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if passkey_id is not None: - _path_params['passkeyId'] = passkey_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/passkeys/{passkeyId}', - 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 user_service_remove_phone( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemovePhoneResponse: - """Delete the user phone - - Delete the phone number of a user. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_phone_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_phone_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemovePhoneResponse]: - """Delete the user phone - - Delete the phone number of a user. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_phone_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_phone_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete the user phone - - Delete the phone number of a user. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_phone_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemovePhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_phone_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # 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='DELETE', - resource_path='/v2/users/{userId}/phone', - 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 user_service_remove_totp( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemoveTOTPResponse: - """Remove TOTP generator from a user - - Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_totp_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_totp_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemoveTOTPResponse]: - """Remove TOTP generator from a user - - Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_totp_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_totp_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove TOTP generator from a user - - Remove the configured TOTP generator of a user. As only one TOTP generator per user is allowed, the user will not have TOTP as a second factor afterward. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_totp_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveTOTPResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_totp_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/totp', - 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 user_service_remove_u2_f( - self, - user_id: StrictStr, - u2f_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceRemoveU2FResponse: - """Remove u2f token from a user - - Remove u2f token from a user - - :param user_id: (required) - :type user_id: str - :param u2f_id: (required) - :type u2f_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_remove_u2_f_with_http_info( - self, - user_id: StrictStr, - u2f_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRemoveU2FResponse]: - """Remove u2f token from a user - - Remove u2f token from a user - - :param user_id: (required) - :type user_id: str - :param u2f_id: (required) - :type u2f_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_remove_u2_f_without_preload_content( - self, - user_id: StrictStr, - u2f_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Remove u2f token from a user - - Remove u2f token from a user - - :param user_id: (required) - :type user_id: str - :param u2f_id: (required) - :type u2f_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_remove_u2_f_serialize( - user_id=user_id, - u2f_id=u2f_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRemoveU2FResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_remove_u2_f_serialize( - self, - user_id, - u2f_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if u2f_id is not None: - _path_params['u2fId'] = u2f_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/users/{userId}/u2f/{u2fId}', - 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 user_service_resend_email_code( - self, - user_id: StrictStr, - user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, - _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, - ) -> UserServiceResendEmailCodeResponse: - """Resend code to verify user email - - Resend code to verify user email. - - :param user_id: (required) - :type user_id: str - :param user_service_resend_email_code_request: (required) - :type user_service_resend_email_code_request: UserServiceResendEmailCodeRequest - :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._user_service_resend_email_code_serialize( - user_id=user_id, - user_service_resend_email_code_request=user_service_resend_email_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_resend_email_code_with_http_info( - self, - user_id: StrictStr, - user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceResendEmailCodeResponse]: - """Resend code to verify user email - - Resend code to verify user email. - - :param user_id: (required) - :type user_id: str - :param user_service_resend_email_code_request: (required) - :type user_service_resend_email_code_request: UserServiceResendEmailCodeRequest - :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._user_service_resend_email_code_serialize( - user_id=user_id, - user_service_resend_email_code_request=user_service_resend_email_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_resend_email_code_without_preload_content( - self, - user_id: StrictStr, - user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Resend code to verify user email - - Resend code to verify user email. - - :param user_id: (required) - :type user_id: str - :param user_service_resend_email_code_request: (required) - :type user_service_resend_email_code_request: UserServiceResendEmailCodeRequest - :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._user_service_resend_email_code_serialize( - user_id=user_id, - user_service_resend_email_code_request=user_service_resend_email_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_resend_email_code_serialize( - self, - user_id, - user_service_resend_email_code_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_resend_email_code_request is not None: - _body_params = user_service_resend_email_code_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='/v2/users/{userId}/email/resend', - 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 user_service_resend_invite_code( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceResendInviteCodeResponse: - """Resend an invite code for a user - - Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_resend_invite_code_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_resend_invite_code_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceResendInviteCodeResponse]: - """Resend an invite code for a user - - Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_resend_invite_code_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_resend_invite_code_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Resend an invite code for a user - - Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_resend_invite_code_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_resend_invite_code_serialize( - self, - user_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/invite_code/resend', - 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 user_service_resend_phone_code( - self, - user_id: StrictStr, - user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, - _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, - ) -> UserServiceResendPhoneCodeResponse: - """Resend code to verify user phone - - Resend code to verify user phone. - - :param user_id: (required) - :type user_id: str - :param user_service_resend_phone_code_request: (required) - :type user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest - :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._user_service_resend_phone_code_serialize( - user_id=user_id, - user_service_resend_phone_code_request=user_service_resend_phone_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_resend_phone_code_with_http_info( - self, - user_id: StrictStr, - user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceResendPhoneCodeResponse]: - """Resend code to verify user phone - - Resend code to verify user phone. - - :param user_id: (required) - :type user_id: str - :param user_service_resend_phone_code_request: (required) - :type user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest - :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._user_service_resend_phone_code_serialize( - user_id=user_id, - user_service_resend_phone_code_request=user_service_resend_phone_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_resend_phone_code_without_preload_content( - self, - user_id: StrictStr, - user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Resend code to verify user phone - - Resend code to verify user phone. - - :param user_id: (required) - :type user_id: str - :param user_service_resend_phone_code_request: (required) - :type user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest - :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._user_service_resend_phone_code_serialize( - user_id=user_id, - user_service_resend_phone_code_request=user_service_resend_phone_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceResendPhoneCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_resend_phone_code_serialize( - self, - user_id, - user_service_resend_phone_code_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_resend_phone_code_request is not None: - _body_params = user_service_resend_phone_code_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='/v2/users/{userId}/phone/resend', - 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 user_service_retrieve_identity_provider_intent( - self, - idp_intent_id: Annotated[StrictStr, Field(description="ID of the idp intent, previously returned on the success response of the IDP callback")], - user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest, - _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, - ) -> UserServiceRetrieveIdentityProviderIntentResponse: - """Retrieve the information returned by the identity provider - - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. - - :param idp_intent_id: ID of the idp intent, previously returned on the success response of the IDP callback (required) - :type idp_intent_id: str - :param user_service_retrieve_identity_provider_intent_request: (required) - :type user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest - :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._user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, - user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_retrieve_identity_provider_intent_with_http_info( - self, - idp_intent_id: Annotated[StrictStr, Field(description="ID of the idp intent, previously returned on the success response of the IDP callback")], - user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceRetrieveIdentityProviderIntentResponse]: - """Retrieve the information returned by the identity provider - - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. - - :param idp_intent_id: ID of the idp intent, previously returned on the success response of the IDP callback (required) - :type idp_intent_id: str - :param user_service_retrieve_identity_provider_intent_request: (required) - :type user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest - :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._user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, - user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_retrieve_identity_provider_intent_without_preload_content( - self, - idp_intent_id: Annotated[StrictStr, Field(description="ID of the idp intent, previously returned on the success response of the IDP callback")], - user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Retrieve the information returned by the identity provider - - Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. - - :param idp_intent_id: ID of the idp intent, previously returned on the success response of the IDP callback (required) - :type idp_intent_id: str - :param user_service_retrieve_identity_provider_intent_request: (required) - :type user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest - :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._user_service_retrieve_identity_provider_intent_serialize( - idp_intent_id=idp_intent_id, - user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceRetrieveIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_retrieve_identity_provider_intent_serialize( - self, - idp_intent_id, - user_service_retrieve_identity_provider_intent_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if idp_intent_id is not None: - _path_params['idpIntentId'] = idp_intent_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_retrieve_identity_provider_intent_request is not None: - _body_params = user_service_retrieve_identity_provider_intent_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='/v2/idp_intents/{idpIntentId}', - 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 user_service_send_email_code( - self, - user_id: StrictStr, - user_service_send_email_code_request: UserServiceSendEmailCodeRequest, - _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, - ) -> UserServiceSendEmailCodeResponse: - """Send code to verify user email - - Send code to verify user email. - - :param user_id: (required) - :type user_id: str - :param user_service_send_email_code_request: (required) - :type user_service_send_email_code_request: UserServiceSendEmailCodeRequest - :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._user_service_send_email_code_serialize( - user_id=user_id, - user_service_send_email_code_request=user_service_send_email_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_send_email_code_with_http_info( - self, - user_id: StrictStr, - user_service_send_email_code_request: UserServiceSendEmailCodeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceSendEmailCodeResponse]: - """Send code to verify user email - - Send code to verify user email. - - :param user_id: (required) - :type user_id: str - :param user_service_send_email_code_request: (required) - :type user_service_send_email_code_request: UserServiceSendEmailCodeRequest - :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._user_service_send_email_code_serialize( - user_id=user_id, - user_service_send_email_code_request=user_service_send_email_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_send_email_code_without_preload_content( - self, - user_id: StrictStr, - user_service_send_email_code_request: UserServiceSendEmailCodeRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Send code to verify user email - - Send code to verify user email. - - :param user_id: (required) - :type user_id: str - :param user_service_send_email_code_request: (required) - :type user_service_send_email_code_request: UserServiceSendEmailCodeRequest - :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._user_service_send_email_code_serialize( - user_id=user_id, - user_service_send_email_code_request=user_service_send_email_code_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSendEmailCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_send_email_code_serialize( - self, - user_id, - user_service_send_email_code_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_send_email_code_request is not None: - _body_params = user_service_send_email_code_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='/v2/users/{userId}/email/send', - 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 user_service_set_email( - self, - user_id: StrictStr, - user_service_set_email_request: UserServiceSetEmailRequest, - _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, - ) -> UserServiceSetEmailResponse: - """Change the user email - - Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_email_request: (required) - :type user_service_set_email_request: UserServiceSetEmailRequest - :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._user_service_set_email_serialize( - user_id=user_id, - user_service_set_email_request=user_service_set_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_set_email_with_http_info( - self, - user_id: StrictStr, - user_service_set_email_request: UserServiceSetEmailRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceSetEmailResponse]: - """Change the user email - - Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_email_request: (required) - :type user_service_set_email_request: UserServiceSetEmailRequest - :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._user_service_set_email_serialize( - user_id=user_id, - user_service_set_email_request=user_service_set_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_set_email_without_preload_content( - self, - user_id: StrictStr, - user_service_set_email_request: UserServiceSetEmailRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change the user email - - Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_email_request: (required) - :type user_service_set_email_request: UserServiceSetEmailRequest - :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._user_service_set_email_serialize( - user_id=user_id, - user_service_set_email_request=user_service_set_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_set_email_serialize( - self, - user_id, - user_service_set_email_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_set_email_request is not None: - _body_params = user_service_set_email_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='/v2/users/{userId}/email', - 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 user_service_set_password( - self, - user_id: StrictStr, - user_service_set_password_request: UserServiceSetPasswordRequest, - _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, - ) -> UserServiceSetPasswordResponse: - """Change password - - Change the password of a user with either a verification code or the current password.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_password_request: (required) - :type user_service_set_password_request: UserServiceSetPasswordRequest - :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._user_service_set_password_serialize( - user_id=user_id, - user_service_set_password_request=user_service_set_password_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_set_password_with_http_info( - self, - user_id: StrictStr, - user_service_set_password_request: UserServiceSetPasswordRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceSetPasswordResponse]: - """Change password - - Change the password of a user with either a verification code or the current password.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_password_request: (required) - :type user_service_set_password_request: UserServiceSetPasswordRequest - :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._user_service_set_password_serialize( - user_id=user_id, - user_service_set_password_request=user_service_set_password_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_set_password_without_preload_content( - self, - user_id: StrictStr, - user_service_set_password_request: UserServiceSetPasswordRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Change password - - Change the password of a user with either a verification code or the current password.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_password_request: (required) - :type user_service_set_password_request: UserServiceSetPasswordRequest - :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._user_service_set_password_serialize( - user_id=user_id, - user_service_set_password_request=user_service_set_password_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPasswordResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_set_password_serialize( - self, - user_id, - user_service_set_password_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_set_password_request is not None: - _body_params = user_service_set_password_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='/v2/users/{userId}/password', - 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 user_service_set_phone( - self, - user_id: StrictStr, - user_service_set_phone_request: UserServiceSetPhoneRequest, - _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, - ) -> UserServiceSetPhoneResponse: - """Set the user phone - - Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_phone_request: (required) - :type user_service_set_phone_request: UserServiceSetPhoneRequest - :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._user_service_set_phone_serialize( - user_id=user_id, - user_service_set_phone_request=user_service_set_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_set_phone_with_http_info( - self, - user_id: StrictStr, - user_service_set_phone_request: UserServiceSetPhoneRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceSetPhoneResponse]: - """Set the user phone - - Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_phone_request: (required) - :type user_service_set_phone_request: UserServiceSetPhoneRequest - :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._user_service_set_phone_serialize( - user_id=user_id, - user_service_set_phone_request=user_service_set_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_set_phone_without_preload_content( - self, - user_id: StrictStr, - user_service_set_phone_request: UserServiceSetPhoneRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Set the user phone - - Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. - - :param user_id: (required) - :type user_id: str - :param user_service_set_phone_request: (required) - :type user_service_set_phone_request: UserServiceSetPhoneRequest - :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._user_service_set_phone_serialize( - user_id=user_id, - user_service_set_phone_request=user_service_set_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceSetPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_set_phone_serialize( - self, - user_id, - user_service_set_phone_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if user_service_set_phone_request is not None: - _body_params = user_service_set_phone_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='/v2/users/{userId}/phone', - 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 user_service_start_identity_provider_intent( - self, - user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, - _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, - ) -> UserServiceStartIdentityProviderIntentResponse: - """Start flow with an identity provider - - Start a flow with an identity provider, for external login, registration or linking.. - - :param user_service_start_identity_provider_intent_request: (required) - :type user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest - :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._user_service_start_identity_provider_intent_serialize( - user_service_start_identity_provider_intent_request=user_service_start_identity_provider_intent_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_start_identity_provider_intent_with_http_info( - self, - user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceStartIdentityProviderIntentResponse]: - """Start flow with an identity provider - - Start a flow with an identity provider, for external login, registration or linking.. - - :param user_service_start_identity_provider_intent_request: (required) - :type user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest - :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._user_service_start_identity_provider_intent_serialize( - user_service_start_identity_provider_intent_request=user_service_start_identity_provider_intent_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_start_identity_provider_intent_without_preload_content( - self, - user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Start flow with an identity provider - - Start a flow with an identity provider, for external login, registration or linking.. - - :param user_service_start_identity_provider_intent_request: (required) - :type user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest - :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._user_service_start_identity_provider_intent_serialize( - user_service_start_identity_provider_intent_request=user_service_start_identity_provider_intent_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceStartIdentityProviderIntentResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_start_identity_provider_intent_serialize( - self, - user_service_start_identity_provider_intent_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 user_service_start_identity_provider_intent_request is not None: - _body_params = user_service_start_identity_provider_intent_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='/v2/idp_intents', - 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 user_service_unlock_user( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceUnlockUserResponse: - """Unlock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_unlock_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_unlock_user_with_http_info( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceUnlockUserResponse]: - """Unlock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_unlock_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_unlock_user_without_preload_content( - self, - user_id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Unlock user - - The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. - - :param user_id: (required) - :type user_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._user_service_unlock_user_serialize( - user_id=user_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUnlockUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _user_service_unlock_user_serialize( + def __user_service_remove_u2_f_serialize( self, user_id, + u2f_id, _request_auth, _content_type, _headers, @@ -10906,6 +4023,8 @@ def _user_service_unlock_user_serialize( # process the path parameters if user_id is not None: _path_params['userId'] = user_id + if u2f_id is not None: + _path_params['u2fId'] = u2f_id # process the query parameters # process the header parameters # process the form parameters @@ -10920,19 +4039,6 @@ def _user_service_unlock_user_serialize( ] ) - # 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] = [ @@ -10940,8 +4046,8 @@ def _user_service_unlock_user_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/unlock', + method='DELETE', + resource_path='/v2/users/{userId}/u2f/{u2fId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -10958,10 +4064,10 @@ def _user_service_unlock_user_serialize( @validate_call - def user_service_update_human_user( + def user_service_resend_email_code( self, user_id: StrictStr, - user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, + user_service_resend_email_code_request: UserServiceResendEmailCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -10974,15 +4080,15 @@ def user_service_update_human_user( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceUpdateHumanUserResponse: - """Update User + ) -> UserServiceResendEmailCodeResponse: + """Resend code to verify user email - Update all information from a user.. + Resend code to verify user email. :param user_id: (required) :type user_id: str - :param user_service_update_human_user_request: (required) - :type user_service_update_human_user_request: UserServiceUpdateHumanUserRequest + :param user_service_resend_email_code_request: (required) + :type user_service_resend_email_code_request: UserServiceResendEmailCodeRequest :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 @@ -11005,9 +4111,9 @@ def user_service_update_human_user( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_update_human_user_serialize( + _param = self.__user_service_resend_email_code_serialize( user_id=user_id, - user_service_update_human_user_request=user_service_update_human_user_request, + user_service_resend_email_code_request=user_service_resend_email_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11015,83 +4121,11 @@ def user_service_update_human_user( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUpdateHumanUserResponse", + '200': "UserServiceResendEmailCodeResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def user_service_update_human_user_with_http_info( - self, - user_id: StrictStr, - user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceUpdateHumanUserResponse]: - """Update User - - Update all information from a user.. - - :param user_id: (required) - :type user_id: str - :param user_service_update_human_user_request: (required) - :type user_service_update_human_user_request: UserServiceUpdateHumanUserRequest - :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._user_service_update_human_user_serialize( - user_id=user_id, - user_service_update_human_user_request=user_service_update_human_user_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUpdateHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -11100,82 +4134,12 @@ def user_service_update_human_user_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def user_service_update_human_user_without_preload_content( - self, - user_id: StrictStr, - user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update User - - Update all information from a user.. - - :param user_id: (required) - :type user_id: str - :param user_service_update_human_user_request: (required) - :type user_service_update_human_user_request: UserServiceUpdateHumanUserRequest - :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._user_service_update_human_user_serialize( - user_id=user_id, - user_service_update_human_user_request=user_service_update_human_user_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceUpdateHumanUserResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _user_service_update_human_user_serialize( + def __user_service_resend_email_code_serialize( self, user_id, - user_service_update_human_user_request, + user_service_resend_email_code_request, _request_auth, _content_type, _headers, @@ -11203,8 +4167,8 @@ def _user_service_update_human_user_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_update_human_user_request is not None: - _body_params = user_service_update_human_user_request + if user_service_resend_email_code_request is not None: + _body_params = user_service_resend_email_code_request # set the HTTP header `Accept` @@ -11226,110 +4190,36 @@ def _user_service_update_human_user_serialize( ] ) ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'zitadelAccessToken' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v2/users/human/{userId}', - 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 user_service_verify_email( - self, - user_id: StrictStr, - user_service_verify_email_request: UserServiceVerifyEmailRequest, - _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, - ) -> UserServiceVerifyEmailResponse: - """Verify the email - - Verify the email with the generated code. - - :param user_id: (required) - :type user_id: str - :param user_service_verify_email_request: (required) - :type user_service_verify_email_request: UserServiceVerifyEmailRequest - :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 + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type - _param = self._user_service_verify_email_serialize( - user_id=user_id, - user_service_verify_email_request=user_service_verify_email_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyEmailResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/email/resend', + 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 ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data + + @validate_call - def user_service_verify_email_with_http_info( + def user_service_resend_invite_code( self, user_id: StrictStr, - user_service_verify_email_request: UserServiceVerifyEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11342,15 +4232,13 @@ def user_service_verify_email_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceVerifyEmailResponse]: - """Verify the email + ) -> UserServiceResendInviteCodeResponse: + """Resend an invite code for a user - Verify the email with the generated code. + Resend an invite code for a user to initialize their first authentication method (password, passkeys, IdP) depending on the organization's available methods. A resend is only possible if a code has been created previously and sent to the user. If there is no code or it was directly returned, an error will be returned. :param user_id: (required) :type user_id: str - :param user_service_verify_email_request: (required) - :type user_service_verify_email_request: UserServiceVerifyEmailRequest :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 @@ -11373,9 +4261,8 @@ def user_service_verify_email_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_email_serialize( + _param = self.__user_service_resend_invite_code_serialize( user_id=user_id, - user_service_verify_email_request=user_service_verify_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11383,10 +4270,11 @@ def user_service_verify_email_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyEmailResponse", + '200': "UserServiceResendInviteCodeResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -11395,14 +4283,77 @@ def user_service_verify_email_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_resend_invite_code_serialize( + self, + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/invite_code/resend', + 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 user_service_verify_email_without_preload_content( + def user_service_resend_phone_code( self, user_id: StrictStr, - user_service_verify_email_request: UserServiceVerifyEmailRequest, + user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11415,15 +4366,15 @@ def user_service_verify_email_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Verify the email + ) -> UserServiceResendPhoneCodeResponse: + """Resend code to verify user phone - Verify the email with the generated code. + Resend code to verify user phone. :param user_id: (required) :type user_id: str - :param user_service_verify_email_request: (required) - :type user_service_verify_email_request: UserServiceVerifyEmailRequest + :param user_service_resend_phone_code_request: (required) + :type user_service_resend_phone_code_request: UserServiceResendPhoneCodeRequest :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 @@ -11446,9 +4397,9 @@ def user_service_verify_email_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_email_serialize( + _param = self.__user_service_resend_phone_code_serialize( user_id=user_id, - user_service_verify_email_request=user_service_verify_email_request, + user_service_resend_phone_code_request=user_service_resend_phone_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11456,21 +4407,25 @@ def user_service_verify_email_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyEmailResponse", + '200': "UserServiceResendPhoneCodeResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_verify_email_serialize( + def __user_service_resend_phone_code_serialize( self, user_id, - user_service_verify_email_request, + user_service_resend_phone_code_request, _request_auth, _content_type, _headers, @@ -11498,8 +4453,8 @@ def _user_service_verify_email_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_verify_email_request is not None: - _body_params = user_service_verify_email_request + if user_service_resend_phone_code_request is not None: + _body_params = user_service_resend_phone_code_request # set the HTTP header `Accept` @@ -11531,7 +4486,7 @@ def _user_service_verify_email_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/email/verify', + resource_path='/v2/users/{userId}/phone/resend', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11548,10 +4503,10 @@ def _user_service_verify_email_serialize( @validate_call - def user_service_verify_invite_code( + def user_service_retrieve_identity_provider_intent( self, - user_id: StrictStr, - user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, + idp_intent_id: Annotated[StrictStr, Field(description="ID of the idp intent, previously returned on the success response of the IDP callback")], + user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11564,15 +4519,15 @@ def user_service_verify_invite_code( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceVerifyInviteCodeResponse: - """Verify an invite code for a user + ) -> UserServiceRetrieveIdentityProviderIntentResponse: + """Retrieve the information returned by the identity provider - Verify the invite code of a user previously issued. This will set their email to a verified state and allow the user to set up their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + Retrieve the information returned by the identity provider for registration or updating an existing user with new information.. - :param user_id: (required) - :type user_id: str - :param user_service_verify_invite_code_request: (required) - :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest + :param idp_intent_id: ID of the idp intent, previously returned on the success response of the IDP callback (required) + :type idp_intent_id: str + :param user_service_retrieve_identity_provider_intent_request: (required) + :type user_service_retrieve_identity_provider_intent_request: UserServiceRetrieveIdentityProviderIntentRequest :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 @@ -11595,36 +4550,116 @@ def user_service_verify_invite_code( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_invite_code_serialize( - user_id=user_id, - user_service_verify_invite_code_request=user_service_verify_invite_code_request, + _param = self.__user_service_retrieve_identity_provider_intent_serialize( + idp_intent_id=idp_intent_id, + user_service_retrieve_identity_provider_intent_request=user_service_retrieve_identity_provider_intent_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyInviteCodeResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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 + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceRetrieveIdentityProviderIntentResponse", + '403': "UserServiceRpcStatus", + '404': "UserServiceRpcStatus", + } + + 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 __user_service_retrieve_identity_provider_intent_serialize( + self, + idp_intent_id, + user_service_retrieve_identity_provider_intent_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if idp_intent_id is not None: + _path_params['idpIntentId'] = idp_intent_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_retrieve_identity_provider_intent_request is not None: + _body_params = user_service_retrieve_identity_provider_intent_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='/v2/idp_intents/{idpIntentId}', + 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 user_service_verify_invite_code_with_http_info( + def user_service_send_email_code( self, user_id: StrictStr, - user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, + user_service_send_email_code_request: UserServiceSendEmailCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11637,15 +4672,15 @@ def user_service_verify_invite_code_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceVerifyInviteCodeResponse]: - """Verify an invite code for a user + ) -> UserServiceSendEmailCodeResponse: + """Send code to verify user email - Verify the invite code of a user previously issued. This will set their email to a verified state and allow the user to set up their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + Send code to verify user email. :param user_id: (required) :type user_id: str - :param user_service_verify_invite_code_request: (required) - :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest + :param user_service_send_email_code_request: (required) + :type user_service_send_email_code_request: UserServiceSendEmailCodeRequest :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 @@ -11668,9 +4703,9 @@ def user_service_verify_invite_code_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_invite_code_serialize( + _param = self.__user_service_send_email_code_serialize( user_id=user_id, - user_service_verify_invite_code_request=user_service_verify_invite_code_request, + user_service_send_email_code_request=user_service_send_email_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11678,10 +4713,11 @@ def user_service_verify_invite_code_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyInviteCodeResponse", + '200': "UserServiceSendEmailCodeResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -11690,14 +4726,93 @@ def user_service_verify_invite_code_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_send_email_code_serialize( + self, + user_id, + user_service_send_email_code_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_send_email_code_request is not None: + _body_params = user_service_send_email_code_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='/v2/users/{userId}/email/send', + 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 user_service_verify_invite_code_without_preload_content( + def user_service_set_email( self, user_id: StrictStr, - user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, + user_service_set_email_request: UserServiceSetEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11710,15 +4825,15 @@ def user_service_verify_invite_code_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Verify an invite code for a user + ) -> UserServiceSetEmailResponse: + """Change the user email - Verify the invite code of a user previously issued. This will set their email to a verified state and allow the user to set up their first authentication method (password, passkeys, IdP) depending on the organization's available methods. + Change the email address of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by email.. :param user_id: (required) :type user_id: str - :param user_service_verify_invite_code_request: (required) - :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest + :param user_service_set_email_request: (required) + :type user_service_set_email_request: UserServiceSetEmailRequest :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 @@ -11741,9 +4856,9 @@ def user_service_verify_invite_code_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_invite_code_serialize( + _param = self.__user_service_set_email_serialize( user_id=user_id, - user_service_verify_invite_code_request=user_service_verify_invite_code_request, + user_service_set_email_request=user_service_set_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11751,21 +4866,25 @@ def user_service_verify_invite_code_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyInviteCodeResponse", + '200': "UserServiceSetEmailResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_verify_invite_code_serialize( + def __user_service_set_email_serialize( self, user_id, - user_service_verify_invite_code_request, + user_service_set_email_request, _request_auth, _content_type, _headers, @@ -11793,8 +4912,8 @@ def _user_service_verify_invite_code_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_verify_invite_code_request is not None: - _body_params = user_service_verify_invite_code_request + if user_service_set_email_request is not None: + _body_params = user_service_set_email_request # set the HTTP header `Accept` @@ -11826,7 +4945,7 @@ def _user_service_verify_invite_code_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/invite_code/verify', + resource_path='/v2/users/{userId}/email', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -11843,11 +4962,10 @@ def _user_service_verify_invite_code_serialize( @validate_call - def user_service_verify_passkey_registration( + def user_service_set_password( self, user_id: StrictStr, - passkey_id: StrictStr, - user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, + user_service_set_password_request: UserServiceSetPasswordRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11860,17 +4978,15 @@ def user_service_verify_passkey_registration( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceVerifyPasskeyRegistrationResponse: - """Verify a passkey for a user + ) -> UserServiceSetPasswordResponse: + """Change password - Verify the passkey registration with the public key credential.. + Change the password of a user with either a verification code or the current password.. :param user_id: (required) :type user_id: str - :param passkey_id: (required) - :type passkey_id: str - :param user_service_verify_passkey_registration_request: (required) - :type user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest + :param user_service_set_password_request: (required) + :type user_service_set_password_request: UserServiceSetPasswordRequest :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 @@ -11893,38 +5009,116 @@ def user_service_verify_passkey_registration( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_passkey_registration_serialize( + _param = self.__user_service_set_password_serialize( user_id=user_id, - passkey_id=passkey_id, - user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, + user_service_set_password_request=user_service_set_password_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyPasskeyRegistrationResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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 + _response_types_map: Dict[str, Optional[str]] = { + '200': "UserServiceSetPasswordResponse", + '403': "UserServiceRpcStatus", + '404': "UserServiceRpcStatus", + } + + 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 __user_service_set_password_serialize( + self, + user_id, + user_service_set_password_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_set_password_request is not None: + _body_params = user_service_set_password_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='/v2/users/{userId}/password', + 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 user_service_verify_passkey_registration_with_http_info( + def user_service_set_phone( self, user_id: StrictStr, - passkey_id: StrictStr, - user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, + user_service_set_phone_request: UserServiceSetPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -11937,17 +5131,15 @@ def user_service_verify_passkey_registration_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceVerifyPasskeyRegistrationResponse]: - """Verify a passkey for a user + ) -> UserServiceSetPhoneResponse: + """Set the user phone - Verify the passkey registration with the public key credential.. + Set the phone number of a user. If the state is set to not verified, a verification code will be generated, which can be either returned or sent to the user by sms.. :param user_id: (required) :type user_id: str - :param passkey_id: (required) - :type passkey_id: str - :param user_service_verify_passkey_registration_request: (required) - :type user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest + :param user_service_set_phone_request: (required) + :type user_service_set_phone_request: UserServiceSetPhoneRequest :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 @@ -11970,10 +5162,9 @@ def user_service_verify_passkey_registration_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_passkey_registration_serialize( + _param = self.__user_service_set_phone_serialize( user_id=user_id, - passkey_id=passkey_id, - user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, + user_service_set_phone_request=user_service_set_phone_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -11981,10 +5172,11 @@ def user_service_verify_passkey_registration_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyPasskeyRegistrationResponse", + '200': "UserServiceSetPhoneResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -11993,15 +5185,92 @@ def user_service_verify_passkey_registration_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_set_phone_serialize( + self, + user_id, + user_service_set_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_set_phone_request is not None: + _body_params = user_service_set_phone_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='/v2/users/{userId}/phone', + 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 user_service_verify_passkey_registration_without_preload_content( + def user_service_start_identity_provider_intent( self, - user_id: StrictStr, - passkey_id: StrictStr, - user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, + user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12014,17 +5283,13 @@ def user_service_verify_passkey_registration_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Verify a passkey for a user + ) -> UserServiceStartIdentityProviderIntentResponse: + """Start flow with an identity provider - Verify the passkey registration with the public key credential.. + Start a flow with an identity provider, for external login, registration or linking.. - :param user_id: (required) - :type user_id: str - :param passkey_id: (required) - :type passkey_id: str - :param user_service_verify_passkey_registration_request: (required) - :type user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest + :param user_service_start_identity_provider_intent_request: (required) + :type user_service_start_identity_provider_intent_request: UserServiceStartIdentityProviderIntentRequest :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 @@ -12047,10 +5312,8 @@ def user_service_verify_passkey_registration_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_passkey_registration_serialize( - user_id=user_id, - passkey_id=passkey_id, - user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, + _param = self.__user_service_start_identity_provider_intent_serialize( + user_service_start_identity_provider_intent_request=user_service_start_identity_provider_intent_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12058,22 +5321,24 @@ def user_service_verify_passkey_registration_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyPasskeyRegistrationResponse", + '200': "UserServiceStartIdentityProviderIntentResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_verify_passkey_registration_serialize( + def __user_service_start_identity_provider_intent_serialize( self, - user_id, - passkey_id, - user_service_verify_passkey_registration_request, + user_service_start_identity_provider_intent_request, _request_auth, _content_type, _headers, @@ -12095,16 +5360,12 @@ def _user_service_verify_passkey_registration_serialize( _body_params: Optional[bytes] = None # process the path parameters - if user_id is not None: - _path_params['userId'] = user_id - if passkey_id is not None: - _path_params['passkeyId'] = passkey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_verify_passkey_registration_request is not None: - _body_params = user_service_verify_passkey_registration_request + if user_service_start_identity_provider_intent_request is not None: + _body_params = user_service_start_identity_provider_intent_request # set the HTTP header `Accept` @@ -12136,7 +5397,7 @@ def _user_service_verify_passkey_registration_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/passkeys/{passkeyId}', + resource_path='/v2/idp_intents', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12153,10 +5414,9 @@ def _user_service_verify_passkey_registration_serialize( @validate_call - def user_service_verify_phone( + def user_service_unlock_user( self, user_id: StrictStr, - user_service_verify_phone_request: UserServiceVerifyPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12169,15 +5429,13 @@ def user_service_verify_phone( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceVerifyPhoneResponse: - """Verify the phone + ) -> UserServiceUnlockUserResponse: + """Unlock user - Verify the phone with the generated code.. + The state of the user will be changed to 'locked'. The user will not be able to log in anymore. The endpoint returns an error if the user is already in the state 'locked'. Use this endpoint if the user should not be able to log in temporarily because of an event that happened (wrong password, etc.).. :param user_id: (required) :type user_id: str - :param user_service_verify_phone_request: (required) - :type user_service_verify_phone_request: UserServiceVerifyPhoneRequest :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 @@ -12200,9 +5458,8 @@ def user_service_verify_phone( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_phone_serialize( + _param = self.__user_service_unlock_user_serialize( user_id=user_id, - user_service_verify_phone_request=user_service_verify_phone_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12210,10 +5467,11 @@ def user_service_verify_phone( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyPhoneResponse", + '200': "UserServiceUnlockUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -12224,85 +5482,75 @@ def user_service_verify_phone( response_types_map=_response_types_map, ).data - - @validate_call - def user_service_verify_phone_with_http_info( + def __user_service_unlock_user_serialize( self, - user_id: StrictStr, - user_service_verify_phone_request: UserServiceVerifyPhoneRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceVerifyPhoneResponse]: - """Verify the phone + user_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: - Verify the phone with the generated code.. + _host = None - :param user_id: (required) - :type user_id: str - :param user_service_verify_phone_request: (required) - :type user_service_verify_phone_request: UserServiceVerifyPhoneRequest - :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 + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) - _param = self._user_service_verify_phone_serialize( - user_id=user_id, - user_service_verify_phone_request=user_service_verify_phone_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyPhoneResponse", - '403': "UserServiceRpcStatus", - '404': "UserServiceRpcStatus", - } - 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, + # authentication setting + _auth_settings: List[str] = [ + 'zitadelAccessToken' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v2/users/{userId}/unlock', + 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 user_service_verify_phone_without_preload_content( + def user_service_update_human_user( self, user_id: StrictStr, - user_service_verify_phone_request: UserServiceVerifyPhoneRequest, + user_service_update_human_user_request: UserServiceUpdateHumanUserRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12315,15 +5563,15 @@ def user_service_verify_phone_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Verify the phone + ) -> UserServiceUpdateHumanUserResponse: + """Update User - Verify the phone with the generated code.. + Update all information from a user.. :param user_id: (required) :type user_id: str - :param user_service_verify_phone_request: (required) - :type user_service_verify_phone_request: UserServiceVerifyPhoneRequest + :param user_service_update_human_user_request: (required) + :type user_service_update_human_user_request: UserServiceUpdateHumanUserRequest :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 @@ -12346,9 +5594,9 @@ def user_service_verify_phone_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_phone_serialize( + _param = self.__user_service_update_human_user_serialize( user_id=user_id, - user_service_verify_phone_request=user_service_verify_phone_request, + user_service_update_human_user_request=user_service_update_human_user_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12356,21 +5604,25 @@ def user_service_verify_phone_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyPhoneResponse", + '200': "UserServiceUpdateHumanUserResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_verify_phone_serialize( + def __user_service_update_human_user_serialize( self, user_id, - user_service_verify_phone_request, + user_service_update_human_user_request, _request_auth, _content_type, _headers, @@ -12398,8 +5650,8 @@ def _user_service_verify_phone_serialize( # process the header parameters # process the form parameters # process the body parameter - if user_service_verify_phone_request is not None: - _body_params = user_service_verify_phone_request + if user_service_update_human_user_request is not None: + _body_params = user_service_update_human_user_request # set the HTTP header `Accept` @@ -12430,8 +5682,8 @@ def _user_service_verify_phone_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/v2/users/{userId}/phone/verify', + method='PUT', + resource_path='/v2/users/human/{userId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12448,10 +5700,10 @@ def _user_service_verify_phone_serialize( @validate_call - def user_service_verify_totp_registration( + def user_service_verify_email( self, user_id: StrictStr, - user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, + user_service_verify_email_request: UserServiceVerifyEmailRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12464,15 +5716,15 @@ def user_service_verify_totp_registration( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceVerifyTOTPRegistrationResponse: - """Verify a TOTP generator for a user + ) -> UserServiceVerifyEmailResponse: + """Verify the email - Verify the TOTP registration with a generated code.. + Verify the email with the generated code. :param user_id: (required) :type user_id: str - :param user_service_verify_totp_registration_request: (required) - :type user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest + :param user_service_verify_email_request: (required) + :type user_service_verify_email_request: UserServiceVerifyEmailRequest :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 @@ -12495,9 +5747,9 @@ def user_service_verify_totp_registration( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_totp_registration_serialize( + _param = self.__user_service_verify_email_serialize( user_id=user_id, - user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, + user_service_verify_email_request=user_service_verify_email_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12505,10 +5757,11 @@ def user_service_verify_totp_registration( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyTOTPRegistrationResponse", + '200': "UserServiceVerifyEmailResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -12519,12 +5772,91 @@ def user_service_verify_totp_registration( response_types_map=_response_types_map, ).data + def __user_service_verify_email_serialize( + self, + user_id, + user_service_verify_email_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_verify_email_request is not None: + _body_params = user_service_verify_email_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='/v2/users/{userId}/email/verify', + 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 user_service_verify_totp_registration_with_http_info( + def user_service_verify_invite_code( self, user_id: StrictStr, - user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, + user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12537,15 +5869,15 @@ def user_service_verify_totp_registration_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceVerifyTOTPRegistrationResponse]: - """Verify a TOTP generator for a user + ) -> UserServiceVerifyInviteCodeResponse: + """Verify an invite code for a user - Verify the TOTP registration with a generated code.. + Verify the invite code of a user previously issued. This will set their email to a verified state and allow the user to set up their first authentication method (password, passkeys, IdP) depending on the organization's available methods. :param user_id: (required) :type user_id: str - :param user_service_verify_totp_registration_request: (required) - :type user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest + :param user_service_verify_invite_code_request: (required) + :type user_service_verify_invite_code_request: UserServiceVerifyInviteCodeRequest :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 @@ -12568,9 +5900,9 @@ def user_service_verify_totp_registration_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_totp_registration_serialize( + _param = self.__user_service_verify_invite_code_serialize( user_id=user_id, - user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, + user_service_verify_invite_code_request=user_service_verify_invite_code_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12578,10 +5910,11 @@ def user_service_verify_totp_registration_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyTOTPRegistrationResponse", + '200': "UserServiceVerifyInviteCodeResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -12590,14 +5923,94 @@ def user_service_verify_totp_registration_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_verify_invite_code_serialize( + self, + user_id, + user_service_verify_invite_code_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_verify_invite_code_request is not None: + _body_params = user_service_verify_invite_code_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='/v2/users/{userId}/invite_code/verify', + 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 user_service_verify_totp_registration_without_preload_content( + def user_service_verify_passkey_registration( self, user_id: StrictStr, - user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, + passkey_id: StrictStr, + user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12610,15 +6023,17 @@ def user_service_verify_totp_registration_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Verify a TOTP generator for a user + ) -> UserServiceVerifyPasskeyRegistrationResponse: + """Verify a passkey for a user - Verify the TOTP registration with a generated code.. + Verify the passkey registration with the public key credential.. :param user_id: (required) :type user_id: str - :param user_service_verify_totp_registration_request: (required) - :type user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest + :param passkey_id: (required) + :type passkey_id: str + :param user_service_verify_passkey_registration_request: (required) + :type user_service_verify_passkey_registration_request: UserServiceVerifyPasskeyRegistrationRequest :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 @@ -12641,9 +6056,10 @@ def user_service_verify_totp_registration_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_totp_registration_serialize( + _param = self.__user_service_verify_passkey_registration_serialize( user_id=user_id, - user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, + passkey_id=passkey_id, + user_service_verify_passkey_registration_request=user_service_verify_passkey_registration_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12651,21 +6067,26 @@ def user_service_verify_totp_registration_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyTOTPRegistrationResponse", + '200': "UserServiceVerifyPasskeyRegistrationResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_verify_totp_registration_serialize( + def __user_service_verify_passkey_registration_serialize( self, user_id, - user_service_verify_totp_registration_request, + passkey_id, + user_service_verify_passkey_registration_request, _request_auth, _content_type, _headers, @@ -12689,12 +6110,14 @@ def _user_service_verify_totp_registration_serialize( # process the path parameters if user_id is not None: _path_params['userId'] = user_id + if passkey_id is not None: + _path_params['passkeyId'] = passkey_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter - if user_service_verify_totp_registration_request is not None: - _body_params = user_service_verify_totp_registration_request + if user_service_verify_passkey_registration_request is not None: + _body_params = user_service_verify_passkey_registration_request # set the HTTP header `Accept` @@ -12726,7 +6149,7 @@ def _user_service_verify_totp_registration_serialize( return self.api_client.param_serialize( method='POST', - resource_path='/v2/users/{userId}/totp/verify', + resource_path='/v2/users/{userId}/passkeys/{passkeyId}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -12743,11 +6166,10 @@ def _user_service_verify_totp_registration_serialize( @validate_call - def user_service_verify_u2_f_registration( + def user_service_verify_phone( self, user_id: StrictStr, - u2f_id: StrictStr, - user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, + user_service_verify_phone_request: UserServiceVerifyPhoneRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12760,17 +6182,15 @@ def user_service_verify_u2_f_registration( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UserServiceVerifyU2FRegistrationResponse: - """Verify a u2f token for a user + ) -> UserServiceVerifyPhoneResponse: + """Verify the phone - Verify the u2f token registration with the public key credential.. + Verify the phone with the generated code.. :param user_id: (required) :type user_id: str - :param u2f_id: (required) - :type u2f_id: str - :param user_service_verify_u2_f_registration_request: (required) - :type user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest + :param user_service_verify_phone_request: (required) + :type user_service_verify_phone_request: UserServiceVerifyPhoneRequest :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 @@ -12793,10 +6213,9 @@ def user_service_verify_u2_f_registration( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_u2_f_registration_serialize( + _param = self.__user_service_verify_phone_serialize( user_id=user_id, - u2f_id=u2f_id, - user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, + user_service_verify_phone_request=user_service_verify_phone_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12804,10 +6223,11 @@ def user_service_verify_u2_f_registration( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyU2FRegistrationResponse", + '200': "UserServiceVerifyPhoneResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -12818,13 +6238,91 @@ def user_service_verify_u2_f_registration( response_types_map=_response_types_map, ).data + def __user_service_verify_phone_serialize( + self, + user_id, + user_service_verify_phone_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_verify_phone_request is not None: + _body_params = user_service_verify_phone_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='/v2/users/{userId}/phone/verify', + 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 user_service_verify_u2_f_registration_with_http_info( + def user_service_verify_totp_registration( self, user_id: StrictStr, - u2f_id: StrictStr, - user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest, + user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -12837,17 +6335,15 @@ def user_service_verify_u2_f_registration_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UserServiceVerifyU2FRegistrationResponse]: - """Verify a u2f token for a user + ) -> UserServiceVerifyTOTPRegistrationResponse: + """Verify a TOTP generator for a user - Verify the u2f token registration with the public key credential.. + Verify the TOTP registration with a generated code.. :param user_id: (required) :type user_id: str - :param u2f_id: (required) - :type u2f_id: str - :param user_service_verify_u2_f_registration_request: (required) - :type user_service_verify_u2_f_registration_request: UserServiceVerifyU2FRegistrationRequest + :param user_service_verify_totp_registration_request: (required) + :type user_service_verify_totp_registration_request: UserServiceVerifyTOTPRegistrationRequest :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 @@ -12870,10 +6366,9 @@ def user_service_verify_u2_f_registration_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_u2_f_registration_serialize( + _param = self.__user_service_verify_totp_registration_serialize( user_id=user_id, - u2f_id=u2f_id, - user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, + user_service_verify_totp_registration_request=user_service_verify_totp_registration_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -12881,10 +6376,11 @@ def user_service_verify_u2_f_registration_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "UserServiceVerifyU2FRegistrationResponse", + '200': "UserServiceVerifyTOTPRegistrationResponse", '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -12893,11 +6389,90 @@ def user_service_verify_u2_f_registration_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, + ).data + + def __user_service_verify_totp_registration_serialize( + self, + user_id, + user_service_verify_totp_registration_request, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if user_id is not None: + _path_params['userId'] = user_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if user_service_verify_totp_registration_request is not None: + _body_params = user_service_verify_totp_registration_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='/v2/users/{userId}/totp/verify', + 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 user_service_verify_u2_f_registration_without_preload_content( + def user_service_verify_u2_f_registration( self, user_id: StrictStr, u2f_id: StrictStr, @@ -12914,7 +6489,7 @@ def user_service_verify_u2_f_registration_without_preload_content( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: + ) -> UserServiceVerifyU2FRegistrationResponse: """Verify a u2f token for a user Verify the u2f token registration with the public key credential.. @@ -12947,7 +6522,7 @@ def user_service_verify_u2_f_registration_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._user_service_verify_u2_f_registration_serialize( + _param = self.__user_service_verify_u2_f_registration_serialize( user_id=user_id, u2f_id=u2f_id, user_service_verify_u2_f_registration_request=user_service_verify_u2_f_registration_request, @@ -12962,14 +6537,18 @@ def user_service_verify_u2_f_registration_without_preload_content( '403': "UserServiceRpcStatus", '404': "UserServiceRpcStatus", } + response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout ) - return response_data.response - + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data - def _user_service_verify_u2_f_registration_serialize( + def __user_service_verify_u2_f_registration_serialize( self, user_id, u2f_id, diff --git a/zitadel_client/api/web_key_service_api.py b/zitadel_client/api/web_key_service_api.py index bf3b1c15..d7277414 100644 --- a/zitadel_client/api/web_key_service_api.py +++ b/zitadel_client/api/web_key_service_api.py @@ -86,7 +86,7 @@ def web_key_service_activate_web_key( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_activate_web_key_serialize( + _param = self.__web_key_service_activate_web_key_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -100,76 +100,7 @@ def web_key_service_activate_web_key( '403': "WebKeyServiceRpcStatus", '404': "object", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def web_key_service_activate_web_key_with_http_info( - self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebKeyServiceBetaActivateWebKeyResponse]: - """Activate Web Key - - Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_activate_web_key_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaActivateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "object", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -178,76 +109,9 @@ def web_key_service_activate_web_key_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def web_key_service_activate_web_key_without_preload_content( - self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Activate Web Key - - Switch the active signing web key. The previously active key will be deactivated. Note that the JWKs OIDC endpoint returns a cacheable response. Therefore it is not advised to activate a key that has been created within the cache duration (default is 5min), as the public key may not have been propagated to caches and clients yet. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_activate_web_key_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaActivateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "object", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _web_key_service_activate_web_key_serialize( + def __web_key_service_activate_web_key_serialize( self, id, _request_auth, @@ -356,7 +220,7 @@ def web_key_service_create_web_key( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_create_web_key_serialize( + _param = self.__web_key_service_create_web_key_serialize( web_key_service_create_web_key_request=web_key_service_create_web_key_request, _request_auth=_request_auth, _content_type=_content_type, @@ -370,76 +234,7 @@ def web_key_service_create_web_key( '403': "WebKeyServiceRpcStatus", '404': "WebKeyServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def web_key_service_create_web_key_with_http_info( - self, - web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebKeyServiceBetaCreateWebKeyResponse]: - """Create Web Key - - Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` - - :param web_key_service_create_web_key_request: (required) - :type web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_create_web_key_serialize( - web_key_service_create_web_key_request=web_key_service_create_web_key_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaCreateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -447,77 +242,10 @@ def web_key_service_create_web_key_with_http_info( response_data.read() return self.api_client.response_deserialize( response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def web_key_service_create_web_key_without_preload_content( - self, - web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create Web Key - - Generate a private and public key pair. The private key can be used to sign OIDC tokens after activation. The public key can be used to validate OIDC tokens. The newly created key will have the state `STATE_INITIAL` and is published to the public key endpoint. Note that the JWKs OIDC endpoint returns a cacheable response. If no key type is provided, a RSA key pair with 2048 bits and SHA256 hashing will be created. Required permission: - `iam.web_key.write` Required feature flag: - `web_key` - - :param web_key_service_create_web_key_request: (required) - :type web_key_service_create_web_key_request: WebKeyServiceCreateWebKeyRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_create_web_key_serialize( - web_key_service_create_web_key_request=web_key_service_create_web_key_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaCreateWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + response_types_map=_response_types_map, + ).data - def _web_key_service_create_web_key_serialize( + def __web_key_service_create_web_key_serialize( self, web_key_service_create_web_key_request, _request_auth, @@ -639,7 +367,7 @@ def web_key_service_delete_web_key( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_delete_web_key_serialize( + _param = self.__web_key_service_delete_web_key_serialize( id=id, _request_auth=_request_auth, _content_type=_content_type, @@ -653,76 +381,7 @@ def web_key_service_delete_web_key( '403': "WebKeyServiceRpcStatus", '404': "WebKeyServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def web_key_service_delete_web_key_with_http_info( - self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebKeyServiceBetaDeleteWebKeyResponse]: - """Delete Web Key - - Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_delete_web_key_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaDeleteWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -731,76 +390,9 @@ def web_key_service_delete_web_key_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def web_key_service_delete_web_key_without_preload_content( - self, - id: StrictStr, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete Web Key - - Delete a web key pair. Only inactive keys can be deleted. Once a key is deleted, any tokens signed by this key will be invalid. Note that the JWKs OIDC endpoint returns a cacheable response. In case the web key is not found, the request will return a successful response as the desired state is already achieved. You can check the change date in the response to verify if the web key was deleted during the request. Required permission: - `iam.web_key.delete` Required feature flag: - `web_key` - - :param id: (required) - :type id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_delete_web_key_serialize( - id=id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaDeleteWebKeyResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _web_key_service_delete_web_key_serialize( + def __web_key_service_delete_web_key_serialize( self, id, _request_auth, @@ -906,7 +498,7 @@ def web_key_service_list_web_keys( :return: Returns the result object. """ # noqa: E501 - _param = self._web_key_service_list_web_keys_serialize( + _param = self.__web_key_service_list_web_keys_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -919,72 +511,7 @@ def web_key_service_list_web_keys( '403': "WebKeyServiceRpcStatus", '404': "WebKeyServiceRpcStatus", } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def web_key_service_list_web_keys_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[WebKeyServiceBetaListWebKeysResponse]: - """List Web Keys - - List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_list_web_keys_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaListWebKeysResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", - } response_data = self.api_client.call_api( *_param, _request_timeout=_request_timeout @@ -993,72 +520,9 @@ def web_key_service_list_web_keys_with_http_info( return self.api_client.response_deserialize( response_data=response_data, response_types_map=_response_types_map, - ) - - - @validate_call - def web_key_service_list_web_keys_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List Web Keys - - List all web keys and their states. Required permission: - `iam.web_key.read` Required feature flag: - `web_key` - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._web_key_service_list_web_keys_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "WebKeyServiceBetaListWebKeysResponse", - '400': "object", - '403': "WebKeyServiceRpcStatus", - '404': "WebKeyServiceRpcStatus", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - + ).data - def _web_key_service_list_web_keys_serialize( + def __web_key_service_list_web_keys_serialize( self, _request_auth, _content_type, diff --git a/zitadel_client/models/action_service_beta_condition.py b/zitadel_client/models/action_service_beta_condition.py index d8fc622f..6099a5df 100644 --- a/zitadel_client/models/action_service_beta_condition.py +++ b/zitadel_client/models/action_service_beta_condition.py @@ -34,6 +34,8 @@ class ActionServiceBetaCondition(BaseModel): response: Optional[ActionServiceBetaResponseExecution] = None function: Optional[ActionServiceBetaFunctionExecution] = None event: Optional[ActionServiceBetaEventExecution] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,11 +95,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "request": ActionServiceBetaRequestExecution.from_dict(obj["request"]) if obj.get("request") is not None else None, - "response": ActionServiceBetaResponseExecution.from_dict(obj["response"]) if obj.get("response") is not None else None, - "function": ActionServiceBetaFunctionExecution.from_dict(obj["function"]) if obj.get("function") is not None else None, - "event": ActionServiceBetaEventExecution.from_dict(obj["event"]) if obj.get("event") is not None else None }) + # 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_beta_create_target_response.py b/zitadel_client/models/action_service_beta_create_target_response.py index d13b9481..22443158 100644 --- a/zitadel_client/models/action_service_beta_create_target_response.py +++ b/zitadel_client/models/action_service_beta_create_target_response.py @@ -30,6 +30,8 @@ class ActionServiceBetaCreateTargetResponse(BaseModel): id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created target.") creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the target creation.", alias="creationDate") signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "signingKey"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creationDate": obj.get("creationDate"), "signingKey": obj.get("signingKey") }) + # 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_beta_delete_target_response.py b/zitadel_client/models/action_service_beta_delete_target_response.py index d25a2fad..bc2e2ccc 100644 --- a/zitadel_client/models/action_service_beta_delete_target_response.py +++ b/zitadel_client/models/action_service_beta_delete_target_response.py @@ -28,6 +28,8 @@ class ActionServiceBetaDeleteTargetResponse(BaseModel): ActionServiceBetaDeleteTargetResponse """ # noqa: E501 deletion_date: Optional[datetime] = Field(default=None, description="The timestamp of the deletion of the target. Note that the deletion date is only guaranteed to be set if the deletion was successful during the request. In case the deletion occurred in a previous request, the deletion date might be empty.", alias="deletionDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deletionDate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "deletionDate": obj.get("deletionDate") }) + # 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_beta_event_execution.py b/zitadel_client/models/action_service_beta_event_execution.py index 5bf99774..95203121 100644 --- a/zitadel_client/models/action_service_beta_event_execution.py +++ b/zitadel_client/models/action_service_beta_event_execution.py @@ -30,6 +30,8 @@ class ActionServiceBetaEventExecution(BaseModel): event: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event name as condition.") group: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="Event group as condition, all events under this group.") all: Optional[StrictBool] = Field(default=None, description="all events as condition.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,10 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "event": obj.get("event"), - "group": obj.get("group"), - "all": obj.get("all") }) + # 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_beta_execution.py b/zitadel_client/models/action_service_beta_execution.py index dd544268..c86ee7f2 100644 --- a/zitadel_client/models/action_service_beta_execution.py +++ b/zitadel_client/models/action_service_beta_execution.py @@ -32,6 +32,8 @@ class ActionServiceBetaExecution(BaseModel): creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution creation.", alias="creationDate") change_date: Optional[datetime] = Field(default=None, description="The timestamp of the last change to the execution.", alias="changeDate") targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["condition", "creationDate", "changeDate", "targets"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of condition if self.condition: _dict['condition'] = self.condition.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 @@ -92,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "changeDate": obj.get("changeDate"), "targets": obj.get("targets") }) + # 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_beta_function_execution.py b/zitadel_client/models/action_service_beta_function_execution.py index 4e10174c..82fef2c4 100644 --- a/zitadel_client/models/action_service_beta_function_execution.py +++ b/zitadel_client/models/action_service_beta_function_execution.py @@ -27,6 +27,8 @@ class ActionServiceBetaFunctionExecution(BaseModel): ActionServiceBetaFunctionExecution """ # noqa: E501 name: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "name": obj.get("name") }) + # 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_beta_get_target_response.py b/zitadel_client/models/action_service_beta_get_target_response.py index 5c23917a..e9dceb5b 100644 --- a/zitadel_client/models/action_service_beta_get_target_response.py +++ b/zitadel_client/models/action_service_beta_get_target_response.py @@ -28,6 +28,8 @@ class ActionServiceBetaGetTargetResponse(BaseModel): ActionServiceBetaGetTargetResponse """ # noqa: E501 target: Optional[ActionServiceBetaTarget] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["target"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of target if self.target: _dict['target'] = self.target.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "target": ActionServiceBetaTarget.from_dict(obj["target"]) if obj.get("target") 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_beta_in_target_ids_filter.py b/zitadel_client/models/action_service_beta_in_target_ids_filter.py index d26f8389..56d1010a 100644 --- a/zitadel_client/models/action_service_beta_in_target_ids_filter.py +++ b/zitadel_client/models/action_service_beta_in_target_ids_filter.py @@ -27,6 +27,8 @@ class ActionServiceBetaInTargetIDsFilter(BaseModel): ActionServiceBetaInTargetIDsFilter """ # noqa: E501 target_ids: Optional[List[StrictStr]] = Field(default=None, description="the ids of the targets to include", alias="targetIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["targetIds"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "targetIds": obj.get("targetIds") }) + # 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_beta_list_execution_functions_response.py b/zitadel_client/models/action_service_beta_list_execution_functions_response.py index eff2f1d5..2188dae9 100644 --- a/zitadel_client/models/action_service_beta_list_execution_functions_response.py +++ b/zitadel_client/models/action_service_beta_list_execution_functions_response.py @@ -27,6 +27,8 @@ class ActionServiceBetaListExecutionFunctionsResponse(BaseModel): ActionServiceBetaListExecutionFunctionsResponse """ # noqa: E501 functions: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["functions"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "functions": obj.get("functions") }) + # 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_beta_list_execution_methods_response.py b/zitadel_client/models/action_service_beta_list_execution_methods_response.py index 87aa02d8..4cbd1b37 100644 --- a/zitadel_client/models/action_service_beta_list_execution_methods_response.py +++ b/zitadel_client/models/action_service_beta_list_execution_methods_response.py @@ -27,6 +27,8 @@ class ActionServiceBetaListExecutionMethodsResponse(BaseModel): ActionServiceBetaListExecutionMethodsResponse """ # noqa: E501 methods: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["methods"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "methods": obj.get("methods") }) + # 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_beta_list_execution_services_response.py b/zitadel_client/models/action_service_beta_list_execution_services_response.py index 10f01bb2..d0d90dc8 100644 --- a/zitadel_client/models/action_service_beta_list_execution_services_response.py +++ b/zitadel_client/models/action_service_beta_list_execution_services_response.py @@ -27,6 +27,8 @@ class ActionServiceBetaListExecutionServicesResponse(BaseModel): ActionServiceBetaListExecutionServicesResponse """ # noqa: E501 services: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["services"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "services": obj.get("services") }) + # 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_beta_list_executions_response.py b/zitadel_client/models/action_service_beta_list_executions_response.py index e401be66..7f85b7b9 100644 --- a/zitadel_client/models/action_service_beta_list_executions_response.py +++ b/zitadel_client/models/action_service_beta_list_executions_response.py @@ -30,6 +30,8 @@ class ActionServiceBetaListExecutionsResponse(BaseModel): """ # noqa: E501 pagination: Optional[ActionServiceBetaPaginationResponse] = None result: Optional[List[ActionServiceBetaExecution]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["pagination", "result"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, "result": [ActionServiceBetaExecution.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) + # 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_beta_list_targets_response.py b/zitadel_client/models/action_service_beta_list_targets_response.py index ea3a6666..a329154a 100644 --- a/zitadel_client/models/action_service_beta_list_targets_response.py +++ b/zitadel_client/models/action_service_beta_list_targets_response.py @@ -30,6 +30,8 @@ class ActionServiceBetaListTargetsResponse(BaseModel): """ # noqa: E501 pagination: Optional[ActionServiceBetaPaginationResponse] = None result: Optional[List[ActionServiceBetaTarget]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["pagination", "result"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "pagination": ActionServiceBetaPaginationResponse.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None, "result": [ActionServiceBetaTarget.from_dict(_item) for _item in obj["result"]] if obj.get("result") is not None else None }) + # 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_beta_pagination_request.py b/zitadel_client/models/action_service_beta_pagination_request.py index 203eda76..191f1db8 100644 --- a/zitadel_client/models/action_service_beta_pagination_request.py +++ b/zitadel_client/models/action_service_beta_pagination_request.py @@ -29,6 +29,8 @@ class ActionServiceBetaPaginationRequest(BaseModel): offset: Optional[StrictStr] = Field(default=None, description="Starting point for retrieval, in combination of offset used to query a set list of objects.") limit: Optional[StrictInt] = Field(default=None, description="limit is the maximum amount of objects returned. The default is set to 100 with a maximum of 1000 in the runtime configuration. If the limit exceeds the maximum configured ZITADEL will throw an error. If no limit is present the default is taken.") asc: Optional[StrictBool] = Field(default=None, description="Asc is the sorting order. If true the list is sorted ascending, if false the list is sorted descending. The default is descending.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "limit": obj.get("limit"), "asc": obj.get("asc") }) + # 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_beta_pagination_response.py b/zitadel_client/models/action_service_beta_pagination_response.py index ffc0b972..971d890b 100644 --- a/zitadel_client/models/action_service_beta_pagination_response.py +++ b/zitadel_client/models/action_service_beta_pagination_response.py @@ -28,6 +28,8 @@ class ActionServiceBetaPaginationResponse(BaseModel): """ # noqa: E501 total_result: Optional[StrictStr] = Field(default=None, description="Absolute number of objects matching the query, regardless of applied limit.", alias="totalResult") applied_limit: Optional[StrictStr] = Field(default=None, description="Applied limit from query, defines maximum amount of objects per request, to compare if all objects are returned.", alias="appliedLimit") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalResult", "appliedLimit"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "totalResult": obj.get("totalResult"), "appliedLimit": obj.get("appliedLimit") }) + # 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_beta_request_execution.py b/zitadel_client/models/action_service_beta_request_execution.py index b4f9848a..6ea9f86e 100644 --- a/zitadel_client/models/action_service_beta_request_execution.py +++ b/zitadel_client/models/action_service_beta_request_execution.py @@ -30,6 +30,8 @@ class ActionServiceBetaRequestExecution(BaseModel): method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,10 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "method": obj.get("method"), - "service": obj.get("service"), - "all": obj.get("all") }) + # 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_beta_response_execution.py b/zitadel_client/models/action_service_beta_response_execution.py index 761ee4bd..447d9b7c 100644 --- a/zitadel_client/models/action_service_beta_response_execution.py +++ b/zitadel_client/models/action_service_beta_response_execution.py @@ -30,6 +30,8 @@ class ActionServiceBetaResponseExecution(BaseModel): method: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-method as condition.") service: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = Field(default=None, description="GRPC-service as condition.") all: Optional[StrictBool] = Field(default=None, description="All calls to any available services and methods as condition.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,10 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "method": obj.get("method"), - "service": obj.get("service"), - "all": obj.get("all") }) + # 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_beta_rest_call.py b/zitadel_client/models/action_service_beta_rest_call.py index d1aa3e9a..7d0807a8 100644 --- a/zitadel_client/models/action_service_beta_rest_call.py +++ b/zitadel_client/models/action_service_beta_rest_call.py @@ -27,6 +27,8 @@ class ActionServiceBetaRESTCall(BaseModel): ActionServiceBetaRESTCall """ # noqa: E501 interrupt_on_error: Optional[StrictBool] = Field(default=None, description="Define if any error stops the whole execution. By default the process continues as normal.", alias="interruptOnError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interruptOnError"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "interruptOnError": obj.get("interruptOnError") }) + # 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_beta_rest_webhook.py b/zitadel_client/models/action_service_beta_rest_webhook.py index fd90bf0e..3acbbb97 100644 --- a/zitadel_client/models/action_service_beta_rest_webhook.py +++ b/zitadel_client/models/action_service_beta_rest_webhook.py @@ -27,6 +27,8 @@ class ActionServiceBetaRESTWebhook(BaseModel): ActionServiceBetaRESTWebhook """ # noqa: E501 interrupt_on_error: Optional[StrictBool] = Field(default=None, description="Define if any error stops the whole execution. By default the process continues as normal.", alias="interruptOnError") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["interruptOnError"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "interruptOnError": obj.get("interruptOnError") }) + # 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_beta_set_execution_response.py b/zitadel_client/models/action_service_beta_set_execution_response.py index 31850e3e..30fded40 100644 --- a/zitadel_client/models/action_service_beta_set_execution_response.py +++ b/zitadel_client/models/action_service_beta_set_execution_response.py @@ -28,6 +28,8 @@ class ActionServiceBetaSetExecutionResponse(BaseModel): ActionServiceBetaSetExecutionResponse """ # noqa: E501 set_date: Optional[datetime] = Field(default=None, description="The timestamp of the execution set.", alias="setDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["setDate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "setDate": obj.get("setDate") }) + # 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_beta_target.py b/zitadel_client/models/action_service_beta_target.py index 9c22e516..dee9df0b 100644 --- a/zitadel_client/models/action_service_beta_target.py +++ b/zitadel_client/models/action_service_beta_target.py @@ -39,6 +39,8 @@ class ActionServiceBetaTarget(BaseModel): timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, the the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") endpoint: Optional[StrictStr] = None signing_key: Optional[StrictStr] = Field(default=None, alias="signingKey") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -70,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -79,6 +83,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -91,17 +100,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint"), - "signingKey": obj.get("signingKey") }) + # 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_beta_target_name_filter.py b/zitadel_client/models/action_service_beta_target_name_filter.py index 20ed7475..950b2de4 100644 --- a/zitadel_client/models/action_service_beta_target_name_filter.py +++ b/zitadel_client/models/action_service_beta_target_name_filter.py @@ -30,6 +30,8 @@ class ActionServiceBetaTargetNameFilter(BaseModel): """ # noqa: E501 target_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Defines the name of the target to query for.", alias="targetName") method: Optional[ActionServiceBetaTextFilterMethod] = ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["targetName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "targetName": obj.get("targetName"), "method": obj.get("method") if obj.get("method") is not None else ActionServiceBetaTextFilterMethod.TEXT_FILTER_METHOD_EQUALS }) + # 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_beta_target_search_filter.py b/zitadel_client/models/action_service_beta_target_search_filter.py index 19fc84c4..8a0095fa 100644 --- a/zitadel_client/models/action_service_beta_target_search_filter.py +++ b/zitadel_client/models/action_service_beta_target_search_filter.py @@ -30,6 +30,8 @@ class ActionServiceBetaTargetSearchFilter(BaseModel): """ # noqa: E501 target_name_filter: Optional[ActionServiceBetaTargetNameFilter] = Field(default=None, alias="targetNameFilter") in_target_ids_filter: Optional[ActionServiceBetaInTargetIDsFilter] = Field(default=None, alias="inTargetIdsFilter") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,9 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "targetNameFilter": ActionServiceBetaTargetNameFilter.from_dict(obj["targetNameFilter"]) if obj.get("targetNameFilter") is not None else None, - "inTargetIdsFilter": ActionServiceBetaInTargetIDsFilter.from_dict(obj["inTargetIdsFilter"]) if obj.get("inTargetIdsFilter") is not None else None }) + # 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_beta_update_target_response.py b/zitadel_client/models/action_service_beta_update_target_response.py index 0056e065..3632b52a 100644 --- a/zitadel_client/models/action_service_beta_update_target_response.py +++ b/zitadel_client/models/action_service_beta_update_target_response.py @@ -29,6 +29,8 @@ class ActionServiceBetaUpdateTargetResponse(BaseModel): """ # noqa: E501 change_date: Optional[datetime] = Field(default=None, description="The timestamp of the change of the target.", alias="changeDate") signing_key: Optional[StrictStr] = Field(default=None, description="Key used to sign and check payload sent to the target.", alias="signingKey") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["changeDate", "signingKey"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "changeDate": obj.get("changeDate"), "signingKey": obj.get("signingKey") }) + # 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 index 8264c755..59a2392d 100644 --- a/zitadel_client/models/action_service_create_target_request.py +++ b/zitadel_client/models/action_service_create_target_request.py @@ -35,6 +35,8 @@ class ActionServiceCreateTargetRequest(BaseModel): rest_async: Optional[Dict[str, Any]] = Field(default=None, alias="restAsync") timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -66,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -87,13 +96,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint") }) + # 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_list_targets_request.py b/zitadel_client/models/action_service_list_targets_request.py index 8edc97d0..ba7b1468 100644 --- a/zitadel_client/models/action_service_list_targets_request.py +++ b/zitadel_client/models/action_service_list_targets_request.py @@ -32,6 +32,8 @@ class ActionServiceListTargetsRequest(BaseModel): pagination: Optional[ActionServiceBetaPaginationRequest] = None sorting_column: Optional[ActionServiceBetaTargetFieldName] = Field(default=ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") filters: Optional[List[ActionServiceBetaTargetSearchFilter]] = Field(default=None, description="Define the criteria to query for.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["pagination", "sortingColumn", "filters"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_filters: _items.append(_item_filters.to_dict()) _dict['filters'] = _items + # 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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else ActionServiceBetaTargetFieldName.TARGET_FIELD_NAME_UNSPECIFIED, "filters": [ActionServiceBetaTargetSearchFilter.from_dict(_item) for _item in obj["filters"]] if obj.get("filters") is not None else None }) + # 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_protobuf_any.py b/zitadel_client/models/action_service_protobuf_any.py index 61fa28f2..5cbf0fe7 100644 --- a/zitadel_client/models/action_service_protobuf_any.py +++ b/zitadel_client/models/action_service_protobuf_any.py @@ -27,6 +27,8 @@ class ActionServiceProtobufAny(BaseModel): ActionServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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_rpc_status.py b/zitadel_client/models/action_service_rpc_status.py index 06a47444..58f3848d 100644 --- a/zitadel_client/models/action_service_rpc_status.py +++ b/zitadel_client/models/action_service_rpc_status.py @@ -30,6 +30,8 @@ class ActionServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[ActionServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [ActionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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_set_execution_request.py b/zitadel_client/models/action_service_set_execution_request.py index 58b67bcf..69349a03 100644 --- a/zitadel_client/models/action_service_set_execution_request.py +++ b/zitadel_client/models/action_service_set_execution_request.py @@ -29,6 +29,8 @@ class ActionServiceSetExecutionRequest(BaseModel): """ # noqa: E501 condition: Optional[ActionServiceBetaCondition] = None targets: Optional[List[StrictStr]] = Field(default=None, description="Ordered list of targets called during the execution.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["condition", "targets"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of condition if self.condition: _dict['condition'] = self.condition.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "condition": ActionServiceBetaCondition.from_dict(obj["condition"]) if obj.get("condition") is not None else None, "targets": obj.get("targets") }) + # 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_update_target_request.py b/zitadel_client/models/action_service_update_target_request.py index 774add03..e03d286b 100644 --- a/zitadel_client/models/action_service_update_target_request.py +++ b/zitadel_client/models/action_service_update_target_request.py @@ -36,6 +36,8 @@ class ActionServiceUpdateTargetRequest(BaseModel): timeout: Optional[StrictStr] = Field(default=None, description="Timeout defines the duration until ZITADEL cancels the execution. If the target doesn't respond before this timeout expires, then the connection is closed and the action fails. Depending on the target type and possible setting on `interrupt_on_error` following targets will not be called. In case of a `rest_async` target only this specific target will fail, without any influence on other targets of the same execution.") endpoint: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=1000)]] = None expiration_signing_key: Optional[StrictStr] = Field(default=None, description="Regenerate the key used for signing and checking the payload sent to the target. Set the graceful period for the existing key. During that time, the previous signing key and the new one will be used to sign the request to allow you a smooth transition onf your API. Note that we currently only allow an immediate rotation (\"0s\") and will support longer expirations in the future.", alias="expirationSigningKey") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,14 +97,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "name": obj.get("name"), - "restWebhook": ActionServiceBetaRESTWebhook.from_dict(obj["restWebhook"]) if obj.get("restWebhook") is not None else None, - "restCall": ActionServiceBetaRESTCall.from_dict(obj["restCall"]) if obj.get("restCall") is not None else None, - "restAsync": obj.get("restAsync"), - "timeout": obj.get("timeout"), - "endpoint": obj.get("endpoint"), - "expirationSigningKey": obj.get("expirationSigningKey") }) + # 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/feature_service_details.py b/zitadel_client/models/feature_service_details.py index 55c30dc9..40ab9496 100644 --- a/zitadel_client/models/feature_service_details.py +++ b/zitadel_client/models/feature_service_details.py @@ -31,6 +31,8 @@ class FeatureServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/feature_service_feature_flag.py b/zitadel_client/models/feature_service_feature_flag.py index 8e847678..863b0d4e 100644 --- a/zitadel_client/models/feature_service_feature_flag.py +++ b/zitadel_client/models/feature_service_feature_flag.py @@ -29,6 +29,8 @@ class FeatureServiceFeatureFlag(BaseModel): """ # noqa: E501 enabled: Optional[StrictBool] = Field(default=None, description="Whether a feature is enabled.") source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "source"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "enabled": obj.get("enabled"), "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED }) + # 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/feature_service_get_instance_features_response.py b/zitadel_client/models/feature_service_get_instance_features_response.py index 768c1c54..66fd069a 100644 --- a/zitadel_client/models/feature_service_get_instance_features_response.py +++ b/zitadel_client/models/feature_service_get_instance_features_response.py @@ -45,6 +45,8 @@ class FeatureServiceGetInstanceFeaturesResponse(BaseModel): login_v2: Optional[FeatureServiceLoginV2FeatureFlag] = Field(default=None, alias="loginV2") permission_check_v2: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="permissionCheckV2") console_use_v2_user_api: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="consoleUseV2UserApi") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "loginDefaultOrg", "oidcTriggerIntrospectionProjections", "oidcLegacyIntrospection", "userSchema", "oidcTokenExchange", "improvedPerformance", "webKey", "debugOidcParentError", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2", "consoleUseV2UserApi"] model_config = ConfigDict( populate_by_name=True, @@ -76,8 +78,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -130,6 +134,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of console_use_v2_user_api if self.console_use_v2_user_api: _dict['consoleUseV2UserApi'] = self.console_use_v2_user_api.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 @@ -158,6 +167,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "permissionCheckV2": FeatureServiceFeatureFlag.from_dict(obj["permissionCheckV2"]) if obj.get("permissionCheckV2") is not None else None, "consoleUseV2UserApi": FeatureServiceFeatureFlag.from_dict(obj["consoleUseV2UserApi"]) if obj.get("consoleUseV2UserApi") 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/feature_service_get_organization_features_response.py b/zitadel_client/models/feature_service_get_organization_features_response.py index 189b90a2..724af5b8 100644 --- a/zitadel_client/models/feature_service_get_organization_features_response.py +++ b/zitadel_client/models/feature_service_get_organization_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceGetOrganizationFeaturesResponse(BaseModel): FeatureServiceGetOrganizationFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_get_system_features_response.py b/zitadel_client/models/feature_service_get_system_features_response.py index 5a638f46..b8fa21e4 100644 --- a/zitadel_client/models/feature_service_get_system_features_response.py +++ b/zitadel_client/models/feature_service_get_system_features_response.py @@ -42,6 +42,8 @@ class FeatureServiceGetSystemFeaturesResponse(BaseModel): enable_back_channel_logout: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="enableBackChannelLogout") login_v2: Optional[FeatureServiceLoginV2FeatureFlag] = Field(default=None, alias="loginV2") permission_check_v2: Optional[FeatureServiceFeatureFlag] = Field(default=None, alias="permissionCheckV2") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "loginDefaultOrg", "oidcTriggerIntrospectionProjections", "oidcLegacyIntrospection", "userSchema", "oidcTokenExchange", "improvedPerformance", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2"] model_config = ConfigDict( populate_by_name=True, @@ -73,8 +75,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -118,6 +122,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of permission_check_v2 if self.permission_check_v2: _dict['permissionCheckV2'] = self.permission_check_v2.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 @@ -143,6 +152,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "loginV2": FeatureServiceLoginV2FeatureFlag.from_dict(obj["loginV2"]) if obj.get("loginV2") is not None else None, "permissionCheckV2": FeatureServiceFeatureFlag.from_dict(obj["permissionCheckV2"]) if obj.get("permissionCheckV2") 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/feature_service_get_user_features_response.py b/zitadel_client/models/feature_service_get_user_features_response.py index 0bc3a5b9..be2c2a63 100644 --- a/zitadel_client/models/feature_service_get_user_features_response.py +++ b/zitadel_client/models/feature_service_get_user_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceGetUserFeaturesResponse(BaseModel): FeatureServiceGetUserFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_improved_performance_feature_flag.py b/zitadel_client/models/feature_service_improved_performance_feature_flag.py index 593cc98b..0a54e1e5 100644 --- a/zitadel_client/models/feature_service_improved_performance_feature_flag.py +++ b/zitadel_client/models/feature_service_improved_performance_feature_flag.py @@ -30,6 +30,8 @@ class FeatureServiceImprovedPerformanceFeatureFlag(BaseModel): """ # noqa: E501 execution_paths: Optional[List[FeatureServiceImprovedPerformance]] = Field(default=None, description="Which of the performance improvements is enabled", alias="executionPaths") source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["executionPaths", "source"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "executionPaths": obj.get("executionPaths"), "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED }) + # 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/feature_service_login_v2.py b/zitadel_client/models/feature_service_login_v2.py index 361d389d..0e9619b2 100644 --- a/zitadel_client/models/feature_service_login_v2.py +++ b/zitadel_client/models/feature_service_login_v2.py @@ -28,6 +28,8 @@ class FeatureServiceLoginV2(BaseModel): """ # noqa: E501 required: Optional[StrictBool] = Field(default=None, description="Require that all users must use the new login UI. If enabled, all users will be redirected to the login V2 regardless of the application's preference.") base_uri: Optional[StrictStr] = Field(default=None, description="Optionally specify a base uri of the login UI. If unspecified the default URI will be used.", alias="baseUri") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["required", "baseUri"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "required": obj.get("required"), "baseUri": obj.get("baseUri") }) + # 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/feature_service_login_v2_feature_flag.py b/zitadel_client/models/feature_service_login_v2_feature_flag.py index 56ee6c18..b1420a77 100644 --- a/zitadel_client/models/feature_service_login_v2_feature_flag.py +++ b/zitadel_client/models/feature_service_login_v2_feature_flag.py @@ -30,6 +30,8 @@ class FeatureServiceLoginV2FeatureFlag(BaseModel): required: Optional[StrictBool] = None base_uri: Optional[StrictStr] = Field(default=None, alias="baseUri") source: Optional[FeatureServiceSource] = FeatureServiceSource.SOURCE_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["required", "baseUri", "source"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "baseUri": obj.get("baseUri"), "source": obj.get("source") if obj.get("source") is not None else FeatureServiceSource.SOURCE_UNSPECIFIED }) + # 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/feature_service_protobuf_any.py b/zitadel_client/models/feature_service_protobuf_any.py index f154eec4..0a0fd952 100644 --- a/zitadel_client/models/feature_service_protobuf_any.py +++ b/zitadel_client/models/feature_service_protobuf_any.py @@ -27,6 +27,8 @@ class FeatureServiceProtobufAny(BaseModel): FeatureServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/feature_service_reset_instance_features_response.py b/zitadel_client/models/feature_service_reset_instance_features_response.py index d594f190..5717e460 100644 --- a/zitadel_client/models/feature_service_reset_instance_features_response.py +++ b/zitadel_client/models/feature_service_reset_instance_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceResetInstanceFeaturesResponse(BaseModel): FeatureServiceResetInstanceFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_reset_organization_features_response.py b/zitadel_client/models/feature_service_reset_organization_features_response.py index 4628470e..277e36b3 100644 --- a/zitadel_client/models/feature_service_reset_organization_features_response.py +++ b/zitadel_client/models/feature_service_reset_organization_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceResetOrganizationFeaturesResponse(BaseModel): FeatureServiceResetOrganizationFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_reset_system_features_response.py b/zitadel_client/models/feature_service_reset_system_features_response.py index 83f9a46d..a616753e 100644 --- a/zitadel_client/models/feature_service_reset_system_features_response.py +++ b/zitadel_client/models/feature_service_reset_system_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceResetSystemFeaturesResponse(BaseModel): FeatureServiceResetSystemFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_reset_user_features_response.py b/zitadel_client/models/feature_service_reset_user_features_response.py index c5b918d5..35a56c2e 100644 --- a/zitadel_client/models/feature_service_reset_user_features_response.py +++ b/zitadel_client/models/feature_service_reset_user_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceResetUserFeaturesResponse(BaseModel): FeatureServiceResetUserFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_rpc_status.py b/zitadel_client/models/feature_service_rpc_status.py index 2cd26f2b..b39d290c 100644 --- a/zitadel_client/models/feature_service_rpc_status.py +++ b/zitadel_client/models/feature_service_rpc_status.py @@ -30,6 +30,8 @@ class FeatureServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[FeatureServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [FeatureServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/feature_service_set_instance_features_request.py b/zitadel_client/models/feature_service_set_instance_features_request.py index d1e16799..54e69dab 100644 --- a/zitadel_client/models/feature_service_set_instance_features_request.py +++ b/zitadel_client/models/feature_service_set_instance_features_request.py @@ -42,6 +42,8 @@ class FeatureServiceSetInstanceFeaturesRequest(BaseModel): login_v2: Optional[FeatureServiceLoginV2] = Field(default=None, alias="loginV2") permission_check_v2: Optional[StrictBool] = Field(default=None, description="Enable a newer, more performant, permission check used for v2 and v3 resource based APIs.", alias="permissionCheckV2") console_use_v2_user_api: Optional[StrictBool] = Field(default=None, description="If this is enabled the console web client will use the new User v2 API for certain calls", alias="consoleUseV2UserApi") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["loginDefaultOrg", "oidcTriggerIntrospectionProjections", "oidcLegacyIntrospection", "userSchema", "oidcTokenExchange", "improvedPerformance", "webKey", "debugOidcParentError", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2", "consoleUseV2UserApi"] model_config = ConfigDict( populate_by_name=True, @@ -73,8 +75,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -85,6 +89,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of login_v2 if self.login_v2: _dict['loginV2'] = self.login_v2.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 @@ -112,6 +121,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "permissionCheckV2": obj.get("permissionCheckV2"), "consoleUseV2UserApi": obj.get("consoleUseV2UserApi") }) + # 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/feature_service_set_instance_features_response.py b/zitadel_client/models/feature_service_set_instance_features_response.py index ee5bf6f0..12c35e40 100644 --- a/zitadel_client/models/feature_service_set_instance_features_response.py +++ b/zitadel_client/models/feature_service_set_instance_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceSetInstanceFeaturesResponse(BaseModel): FeatureServiceSetInstanceFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_set_organization_features_response.py b/zitadel_client/models/feature_service_set_organization_features_response.py index 4cb04dbe..832e0af5 100644 --- a/zitadel_client/models/feature_service_set_organization_features_response.py +++ b/zitadel_client/models/feature_service_set_organization_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceSetOrganizationFeaturesResponse(BaseModel): FeatureServiceSetOrganizationFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_set_system_features_request.py b/zitadel_client/models/feature_service_set_system_features_request.py index fe71feb9..911d4924 100644 --- a/zitadel_client/models/feature_service_set_system_features_request.py +++ b/zitadel_client/models/feature_service_set_system_features_request.py @@ -39,6 +39,8 @@ class FeatureServiceSetSystemFeaturesRequest(BaseModel): enable_back_channel_logout: Optional[StrictBool] = Field(default=None, description="If the flag is enabled, you'll be able to use the OIDC Back-Channel Logout to be notified in your application about terminated user sessions.", alias="enableBackChannelLogout") login_v2: Optional[FeatureServiceLoginV2] = Field(default=None, alias="loginV2") permission_check_v2: Optional[StrictBool] = Field(default=None, description="Enable a newer, more performant, permission check used for v2 and v3 resource based APIs.", alias="permissionCheckV2") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["loginDefaultOrg", "oidcTriggerIntrospectionProjections", "oidcLegacyIntrospection", "userSchema", "oidcTokenExchange", "improvedPerformance", "oidcSingleV1SessionTermination", "disableUserTokenEvent", "enableBackChannelLogout", "loginV2", "permissionCheckV2"] model_config = ConfigDict( populate_by_name=True, @@ -70,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of login_v2 if self.login_v2: _dict['loginV2'] = self.login_v2.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 @@ -106,6 +115,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "loginV2": FeatureServiceLoginV2.from_dict(obj["loginV2"]) if obj.get("loginV2") is not None else None, "permissionCheckV2": obj.get("permissionCheckV2") }) + # 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/feature_service_set_system_features_response.py b/zitadel_client/models/feature_service_set_system_features_response.py index 5ed3f9f9..b1dbee49 100644 --- a/zitadel_client/models/feature_service_set_system_features_response.py +++ b/zitadel_client/models/feature_service_set_system_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceSetSystemFeaturesResponse(BaseModel): FeatureServiceSetSystemFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/feature_service_set_user_features_response.py b/zitadel_client/models/feature_service_set_user_features_response.py index a95e7915..0b868179 100644 --- a/zitadel_client/models/feature_service_set_user_features_response.py +++ b/zitadel_client/models/feature_service_set_user_features_response.py @@ -28,6 +28,8 @@ class FeatureServiceSetUserFeaturesResponse(BaseModel): FeatureServiceSetUserFeaturesResponse """ # noqa: E501 details: Optional[FeatureServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": FeatureServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/identity_provider_service_apple_config.py b/zitadel_client/models/identity_provider_service_apple_config.py index d3611661..26ec8639 100644 --- a/zitadel_client/models/identity_provider_service_apple_config.py +++ b/zitadel_client/models/identity_provider_service_apple_config.py @@ -30,6 +30,8 @@ class IdentityProviderServiceAppleConfig(BaseModel): team_id: Optional[StrictStr] = Field(default=None, description="Team ID provided by Apple.", alias="teamId") key_id: Optional[StrictStr] = Field(default=None, description="ID of the private key generated by Apple.", alias="keyId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to Apple.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "teamId", "keyId", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "keyId": obj.get("keyId"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_azure_ad_config.py b/zitadel_client/models/identity_provider_service_azure_ad_config.py index d864c386..aa4b3b52 100644 --- a/zitadel_client/models/identity_provider_service_azure_ad_config.py +++ b/zitadel_client/models/identity_provider_service_azure_ad_config.py @@ -31,6 +31,8 @@ class IdentityProviderServiceAzureADConfig(BaseModel): tenant: Optional[IdentityProviderServiceAzureADTenant] = None email_verified: Optional[StrictBool] = Field(default=None, description="Azure AD doesn't send if the email has been verified. Enable this if the user email should always be added verified in ZITADEL (no verification emails will be sent).", alias="emailVerified") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to Azure AD.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "tenant", "emailVerified", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of tenant if self.tenant: _dict['tenant'] = self.tenant.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "emailVerified": obj.get("emailVerified"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_azure_ad_tenant.py b/zitadel_client/models/identity_provider_service_azure_ad_tenant.py index e075284f..4a9b076e 100644 --- a/zitadel_client/models/identity_provider_service_azure_ad_tenant.py +++ b/zitadel_client/models/identity_provider_service_azure_ad_tenant.py @@ -29,6 +29,8 @@ class IdentityProviderServiceAzureADTenant(BaseModel): """ # noqa: E501 tenant_type: Optional[IdentityProviderServiceAzureADTenantType] = Field(default=IdentityProviderServiceAzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON, alias="tenantType") tenant_id: Optional[StrictStr] = Field(default=None, alias="tenantId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "tenantType": obj.get("tenantType") if obj.get("tenantType") is not None else IdentityProviderServiceAzureADTenantType.AZURE_AD_TENANT_TYPE_COMMON, - "tenantId": obj.get("tenantId") }) + # 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/identity_provider_service_details.py b/zitadel_client/models/identity_provider_service_details.py index 00c49b34..50816df3 100644 --- a/zitadel_client/models/identity_provider_service_details.py +++ b/zitadel_client/models/identity_provider_service_details.py @@ -31,6 +31,8 @@ class IdentityProviderServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/identity_provider_service_generic_oidc_config.py b/zitadel_client/models/identity_provider_service_generic_oidc_config.py index 421abdfc..5a9cada6 100644 --- a/zitadel_client/models/identity_provider_service_generic_oidc_config.py +++ b/zitadel_client/models/identity_provider_service_generic_oidc_config.py @@ -30,6 +30,8 @@ class IdentityProviderServiceGenericOIDCConfig(BaseModel): client_id: Optional[StrictStr] = Field(default=None, description="Client id generated by the identity provider.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request on the identity provider.") is_id_token_mapping: Optional[StrictBool] = Field(default=None, description="If true, provider information get mapped from the id token, not from the userinfo endpoint.", alias="isIdTokenMapping") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["issuer", "clientId", "scopes", "isIdTokenMapping"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "scopes": obj.get("scopes"), "isIdTokenMapping": obj.get("isIdTokenMapping") }) + # 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/identity_provider_service_get_idpby_id_response.py b/zitadel_client/models/identity_provider_service_get_idpby_id_response.py index b77a75aa..386a1527 100644 --- a/zitadel_client/models/identity_provider_service_get_idpby_id_response.py +++ b/zitadel_client/models/identity_provider_service_get_idpby_id_response.py @@ -28,6 +28,8 @@ class IdentityProviderServiceGetIDPByIDResponse(BaseModel): IdentityProviderServiceGetIDPByIDResponse """ # noqa: E501 idp: Optional[IdentityProviderServiceIDP] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idp"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of idp if self.idp: _dict['idp'] = self.idp.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "idp": IdentityProviderServiceIDP.from_dict(obj["idp"]) if obj.get("idp") 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/identity_provider_service_git_hub_config.py b/zitadel_client/models/identity_provider_service_git_hub_config.py index 677f220d..6ad11e1c 100644 --- a/zitadel_client/models/identity_provider_service_git_hub_config.py +++ b/zitadel_client/models/identity_provider_service_git_hub_config.py @@ -28,6 +28,8 @@ class IdentityProviderServiceGitHubConfig(BaseModel): """ # noqa: E501 client_id: Optional[StrictStr] = Field(default=None, description="The client ID of the GitHub App.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitHub.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "clientId": obj.get("clientId"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_git_hub_enterprise_server_config.py b/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py index f91db7b6..8ccedb2f 100644 --- a/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py +++ b/zitadel_client/models/identity_provider_service_git_hub_enterprise_server_config.py @@ -31,6 +31,8 @@ class IdentityProviderServiceGitHubEnterpriseServerConfig(BaseModel): token_endpoint: Optional[StrictStr] = Field(default=None, alias="tokenEndpoint") user_endpoint: Optional[StrictStr] = Field(default=None, alias="userEndpoint") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitHub.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "authorizationEndpoint", "tokenEndpoint", "userEndpoint", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userEndpoint": obj.get("userEndpoint"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_git_lab_config.py b/zitadel_client/models/identity_provider_service_git_lab_config.py index 177fef60..68988477 100644 --- a/zitadel_client/models/identity_provider_service_git_lab_config.py +++ b/zitadel_client/models/identity_provider_service_git_lab_config.py @@ -28,6 +28,8 @@ class IdentityProviderServiceGitLabConfig(BaseModel): """ # noqa: E501 client_id: Optional[StrictStr] = Field(default=None, description="Client id of the GitLab application.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitLab.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "clientId": obj.get("clientId"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_git_lab_self_hosted_config.py b/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py index 0ef3b900..239be8d2 100644 --- a/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py +++ b/zitadel_client/models/identity_provider_service_git_lab_self_hosted_config.py @@ -29,6 +29,8 @@ class IdentityProviderServiceGitLabSelfHostedConfig(BaseModel): issuer: Optional[StrictStr] = None client_id: Optional[StrictStr] = Field(default=None, description="Client id of the GitLab application.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to GitLab.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["issuer", "clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "clientId": obj.get("clientId"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_google_config.py b/zitadel_client/models/identity_provider_service_google_config.py index d1be469b..bbb514bd 100644 --- a/zitadel_client/models/identity_provider_service_google_config.py +++ b/zitadel_client/models/identity_provider_service_google_config.py @@ -28,6 +28,8 @@ class IdentityProviderServiceGoogleConfig(BaseModel): """ # noqa: E501 client_id: Optional[StrictStr] = Field(default=None, description="Client id of the Google application.", alias="clientId") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request to Google.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "scopes"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "clientId": obj.get("clientId"), "scopes": obj.get("scopes") }) + # 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/identity_provider_service_idp.py b/zitadel_client/models/identity_provider_service_idp.py index 7ad3700c..c1c1df27 100644 --- a/zitadel_client/models/identity_provider_service_idp.py +++ b/zitadel_client/models/identity_provider_service_idp.py @@ -36,6 +36,8 @@ class IdentityProviderServiceIDP(BaseModel): name: Optional[StrictStr] = None type: Optional[IdentityProviderServiceIDPType] = IdentityProviderServiceIDPType.IDP_TYPE_UNSPECIFIED config: Optional[IdentityProviderServiceIDPConfig] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "details", "state", "name", "type", "config"] model_config = ConfigDict( populate_by_name=True, @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of config if self.config: _dict['config'] = self.config.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 @@ -101,6 +110,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type") if obj.get("type") is not None else IdentityProviderServiceIDPType.IDP_TYPE_UNSPECIFIED, "config": IdentityProviderServiceIDPConfig.from_dict(obj["config"]) if obj.get("config") 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/identity_provider_service_idp_config.py b/zitadel_client/models/identity_provider_service_idp_config.py index 24872f8b..42fdd852 100644 --- a/zitadel_client/models/identity_provider_service_idp_config.py +++ b/zitadel_client/models/identity_provider_service_idp_config.py @@ -52,6 +52,8 @@ class IdentityProviderServiceIDPConfig(BaseModel): azure_ad: Optional[IdentityProviderServiceAzureADConfig] = Field(default=None, alias="azureAd") apple: Optional[IdentityProviderServiceAppleConfig] = None saml: Optional[IdentityProviderServiceSAMLConfig] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -83,8 +85,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -92,6 +96,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -104,20 +113,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "options": IdentityProviderServiceOptions.from_dict(obj["options"]) if obj.get("options") is not None else None, - "ldap": IdentityProviderServiceLDAPConfig.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, - "google": IdentityProviderServiceGoogleConfig.from_dict(obj["google"]) if obj.get("google") is not None else None, - "oauth": IdentityProviderServiceOAuthConfig.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "oidc": IdentityProviderServiceGenericOIDCConfig.from_dict(obj["oidc"]) if obj.get("oidc") is not None else None, - "jwt": IdentityProviderServiceJWTConfig.from_dict(obj["jwt"]) if obj.get("jwt") is not None else None, - "github": IdentityProviderServiceGitHubConfig.from_dict(obj["github"]) if obj.get("github") is not None else None, - "githubEs": IdentityProviderServiceGitHubEnterpriseServerConfig.from_dict(obj["githubEs"]) if obj.get("githubEs") is not None else None, - "gitlab": IdentityProviderServiceGitLabConfig.from_dict(obj["gitlab"]) if obj.get("gitlab") is not None else None, - "gitlabSelfHosted": IdentityProviderServiceGitLabSelfHostedConfig.from_dict(obj["gitlabSelfHosted"]) if obj.get("gitlabSelfHosted") is not None else None, - "azureAd": IdentityProviderServiceAzureADConfig.from_dict(obj["azureAd"]) if obj.get("azureAd") is not None else None, - "apple": IdentityProviderServiceAppleConfig.from_dict(obj["apple"]) if obj.get("apple") is not None else None, - "saml": IdentityProviderServiceSAMLConfig.from_dict(obj["saml"]) if obj.get("saml") 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/identity_provider_service_jwt_config.py b/zitadel_client/models/identity_provider_service_jwt_config.py index 8680c496..74842341 100644 --- a/zitadel_client/models/identity_provider_service_jwt_config.py +++ b/zitadel_client/models/identity_provider_service_jwt_config.py @@ -30,6 +30,8 @@ class IdentityProviderServiceJWTConfig(BaseModel): issuer: Optional[StrictStr] = Field(default=None, description="The issuer of the JWT (for validation).") keys_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint to the key (JWK) which is used to sign the JWT with.", alias="keysEndpoint") header_name: Optional[StrictStr] = Field(default=None, description="The name of the header where the JWT is sent in, default is authorization.", alias="headerName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["jwtEndpoint", "issuer", "keysEndpoint", "headerName"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "keysEndpoint": obj.get("keysEndpoint"), "headerName": obj.get("headerName") }) + # 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/identity_provider_service_ldap_attributes.py b/zitadel_client/models/identity_provider_service_ldap_attributes.py index c8477123..06a693ce 100644 --- a/zitadel_client/models/identity_provider_service_ldap_attributes.py +++ b/zitadel_client/models/identity_provider_service_ldap_attributes.py @@ -40,6 +40,8 @@ class IdentityProviderServiceLDAPAttributes(BaseModel): avatar_url_attribute: Optional[StrictStr] = Field(default=None, alias="avatarUrlAttribute") profile_attribute: Optional[StrictStr] = Field(default=None, alias="profileAttribute") root_ca: Optional[StrictStr] = Field(default=None, alias="rootCa") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idAttribute", "firstNameAttribute", "lastNameAttribute", "displayNameAttribute", "nickNameAttribute", "preferredUsernameAttribute", "emailAttribute", "emailVerifiedAttribute", "phoneAttribute", "phoneVerifiedAttribute", "preferredLanguageAttribute", "avatarUrlAttribute", "profileAttribute", "rootCa"] model_config = ConfigDict( populate_by_name=True, @@ -71,8 +73,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -107,6 +116,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "profileAttribute": obj.get("profileAttribute"), "rootCa": obj.get("rootCa") }) + # 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/identity_provider_service_ldap_config.py b/zitadel_client/models/identity_provider_service_ldap_config.py index 51215e5d..8b81b53c 100644 --- a/zitadel_client/models/identity_provider_service_ldap_config.py +++ b/zitadel_client/models/identity_provider_service_ldap_config.py @@ -37,6 +37,8 @@ class IdentityProviderServiceLDAPConfig(BaseModel): timeout: Optional[StrictStr] = None attributes: Optional[IdentityProviderServiceLDAPAttributes] = None root_ca: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, alias="rootCa") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["servers", "startTls", "baseDn", "bindDn", "userBase", "userObjectClasses", "userFilters", "timeout", "attributes", "rootCa"] model_config = ConfigDict( populate_by_name=True, @@ -68,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of attributes if self.attributes: _dict['attributes'] = self.attributes.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 @@ -103,6 +112,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "attributes": IdentityProviderServiceLDAPAttributes.from_dict(obj["attributes"]) if obj.get("attributes") is not None else None, "rootCa": obj.get("rootCa") }) + # 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/identity_provider_service_o_auth_config.py b/zitadel_client/models/identity_provider_service_o_auth_config.py index 5bf6405d..b05df41e 100644 --- a/zitadel_client/models/identity_provider_service_o_auth_config.py +++ b/zitadel_client/models/identity_provider_service_o_auth_config.py @@ -32,6 +32,8 @@ class IdentityProviderServiceOAuthConfig(BaseModel): user_endpoint: Optional[StrictStr] = Field(default=None, description="The endpoint where ZITADEL can get the user information.", alias="userEndpoint") scopes: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by ZITADEL during the request on the identity provider.") id_attribute: Optional[StrictStr] = Field(default=None, description="Defines how the attribute is called where ZITADEL can get the id of the user.", alias="idAttribute") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["clientId", "authorizationEndpoint", "tokenEndpoint", "userEndpoint", "scopes", "idAttribute"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "scopes": obj.get("scopes"), "idAttribute": obj.get("idAttribute") }) + # 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/identity_provider_service_options.py b/zitadel_client/models/identity_provider_service_options.py index 4e921e4f..cfa05d09 100644 --- a/zitadel_client/models/identity_provider_service_options.py +++ b/zitadel_client/models/identity_provider_service_options.py @@ -32,6 +32,8 @@ class IdentityProviderServiceOptions(BaseModel): is_auto_creation: Optional[StrictBool] = Field(default=None, description="Enable if a new account in ZITADEL should be created automatically when login with an external account.", alias="isAutoCreation") is_auto_update: Optional[StrictBool] = Field(default=None, description="Enable if a the ZITADEL account fields should be updated automatically on each login.", alias="isAutoUpdate") auto_linking: Optional[IdentityProviderServiceAutoLinkingOption] = Field(default=IdentityProviderServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED, alias="autoLinking") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["isLinkingAllowed", "isCreationAllowed", "isAutoCreation", "isAutoUpdate", "autoLinking"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -90,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isAutoUpdate": obj.get("isAutoUpdate"), "autoLinking": obj.get("autoLinking") if obj.get("autoLinking") is not None else IdentityProviderServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED }) + # 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/identity_provider_service_protobuf_any.py b/zitadel_client/models/identity_provider_service_protobuf_any.py index 82dbc75a..13bcde57 100644 --- a/zitadel_client/models/identity_provider_service_protobuf_any.py +++ b/zitadel_client/models/identity_provider_service_protobuf_any.py @@ -27,6 +27,8 @@ class IdentityProviderServiceProtobufAny(BaseModel): IdentityProviderServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/identity_provider_service_rpc_status.py b/zitadel_client/models/identity_provider_service_rpc_status.py index 7791068f..6eaec0c6 100644 --- a/zitadel_client/models/identity_provider_service_rpc_status.py +++ b/zitadel_client/models/identity_provider_service_rpc_status.py @@ -30,6 +30,8 @@ class IdentityProviderServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[IdentityProviderServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [IdentityProviderServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/identity_provider_service_saml_config.py b/zitadel_client/models/identity_provider_service_saml_config.py index c81b9e16..706b9ff4 100644 --- a/zitadel_client/models/identity_provider_service_saml_config.py +++ b/zitadel_client/models/identity_provider_service_saml_config.py @@ -34,6 +34,8 @@ class IdentityProviderServiceSAMLConfig(BaseModel): name_id_format: Optional[IdentityProviderServiceSAMLNameIDFormat] = Field(default=IdentityProviderServiceSAMLNameIDFormat.SAML_NAME_ID_FORMAT_UNSPECIFIED, alias="nameIdFormat") transient_mapping_attribute_name: Optional[StrictStr] = Field(default=None, description="Optional name of the attribute, which will be used to map the user in case the nameid-format returned is `urn:oasis:names:tc:SAML:2.0:nameid-format:transient`.", alias="transientMappingAttributeName") federated_logout_enabled: Optional[StrictBool] = Field(default=None, description="Boolean weather federated logout is enabled. If enabled, ZITADEL will send a logout request to the identity provider, if the user terminates the session in ZITADEL. Be sure to provide a SLO endpoint as part of the metadata.", alias="federatedLogoutEnabled") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["metadataXml", "binding", "withSignedRequest", "nameIdFormat", "transientMappingAttributeName", "federatedLogoutEnabled"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "transientMappingAttributeName": obj.get("transientMappingAttributeName"), "federatedLogoutEnabled": obj.get("federatedLogoutEnabled") }) + # 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/oidc_service_auth_request.py b/zitadel_client/models/oidc_service_auth_request.py index 79df6f1b..8f2542b6 100644 --- a/zitadel_client/models/oidc_service_auth_request.py +++ b/zitadel_client/models/oidc_service_auth_request.py @@ -38,6 +38,8 @@ class OIDCServiceAuthRequest(BaseModel): login_hint: Optional[StrictStr] = Field(default=None, description="Login hint can be set by the application with a user identifier such as an email or phone number.", alias="loginHint") max_age: Optional[StrictStr] = Field(default=None, description="Specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated. If the elapsed time is greater than this value, or the field is present with 0 duration, the user must be re-authenticated.", alias="maxAge") hint_user_id: Optional[StrictStr] = Field(default=None, description="User ID taken from a ID Token Hint if it was present and valid.", alias="hintUserId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "clientId", "scope", "redirectUri", "prompt", "uiLocales", "loginHint", "maxAge", "hintUserId"] model_config = ConfigDict( populate_by_name=True, @@ -69,8 +71,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -78,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -101,6 +110,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "maxAge": obj.get("maxAge"), "hintUserId": obj.get("hintUserId") }) + # 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/oidc_service_authorization_error.py b/zitadel_client/models/oidc_service_authorization_error.py index 0f0d403f..5df205e2 100644 --- a/zitadel_client/models/oidc_service_authorization_error.py +++ b/zitadel_client/models/oidc_service_authorization_error.py @@ -30,6 +30,8 @@ class OIDCServiceAuthorizationError(BaseModel): error: Optional[OIDCServiceErrorReason] = OIDCServiceErrorReason.ERROR_REASON_UNSPECIFIED error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") error_uri: Optional[StrictStr] = Field(default=None, alias="errorUri") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorDescription", "errorUri"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "errorDescription": obj.get("errorDescription"), "errorUri": obj.get("errorUri") }) + # 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/oidc_service_authorize_or_deny_device_authorization_request.py b/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py index 6fa741df..6eff582c 100644 --- a/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py +++ b/zitadel_client/models/oidc_service_authorize_or_deny_device_authorization_request.py @@ -29,6 +29,8 @@ class OIDCServiceAuthorizeOrDenyDeviceAuthorizationRequest(BaseModel): """ # noqa: E501 session: Optional[OIDCServiceSession] = None deny: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "deny": obj.get("deny") }) + # 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/oidc_service_create_callback_request.py b/zitadel_client/models/oidc_service_create_callback_request.py index da2ca5eb..09d04bd2 100644 --- a/zitadel_client/models/oidc_service_create_callback_request.py +++ b/zitadel_client/models/oidc_service_create_callback_request.py @@ -30,6 +30,8 @@ class OIDCServiceCreateCallbackRequest(BaseModel): """ # noqa: E501 session: Optional[OIDCServiceSession] = None error: Optional[OIDCServiceAuthorizationError] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,9 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "session": OIDCServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "error": OIDCServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") 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/oidc_service_create_callback_response.py b/zitadel_client/models/oidc_service_create_callback_response.py index d5232a49..a46a5da8 100644 --- a/zitadel_client/models/oidc_service_create_callback_response.py +++ b/zitadel_client/models/oidc_service_create_callback_response.py @@ -29,6 +29,8 @@ class OIDCServiceCreateCallbackResponse(BaseModel): """ # noqa: E501 details: Optional[OIDCServiceDetails] = None callback_url: Optional[StrictStr] = Field(default=None, description="Callback URL where the user should be redirected, using a \"302 FOUND\" status. Contains details for the application to obtain the tokens on success, or error details on failure. Note that this field must be treated as credentials, as the contained code can be used to obtain tokens on behalve of the user.", alias="callbackUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "callbackUrl"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": OIDCServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "callbackUrl": obj.get("callbackUrl") }) + # 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/oidc_service_details.py b/zitadel_client/models/oidc_service_details.py index c406cd44..51c38752 100644 --- a/zitadel_client/models/oidc_service_details.py +++ b/zitadel_client/models/oidc_service_details.py @@ -31,6 +31,8 @@ class OIDCServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/oidc_service_device_authorization_request.py b/zitadel_client/models/oidc_service_device_authorization_request.py index b455f219..05336f4c 100644 --- a/zitadel_client/models/oidc_service_device_authorization_request.py +++ b/zitadel_client/models/oidc_service_device_authorization_request.py @@ -31,6 +31,8 @@ class OIDCServiceDeviceAuthorizationRequest(BaseModel): scope: Optional[List[StrictStr]] = Field(default=None, description="The scopes requested by the application.") app_name: Optional[StrictStr] = Field(default=None, description="Name of the client application.", alias="appName") project_name: Optional[StrictStr] = Field(default=None, description="Name of the project the client application is part of.", alias="projectName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "clientId", "scope", "appName", "projectName"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "appName": obj.get("appName"), "projectName": obj.get("projectName") }) + # 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/oidc_service_get_auth_request_response.py b/zitadel_client/models/oidc_service_get_auth_request_response.py index b3f877b2..a380a425 100644 --- a/zitadel_client/models/oidc_service_get_auth_request_response.py +++ b/zitadel_client/models/oidc_service_get_auth_request_response.py @@ -28,6 +28,8 @@ class OIDCServiceGetAuthRequestResponse(BaseModel): OIDCServiceGetAuthRequestResponse """ # noqa: E501 auth_request: Optional[OIDCServiceAuthRequest] = Field(default=None, alias="authRequest") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["authRequest"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of auth_request if self.auth_request: _dict['authRequest'] = self.auth_request.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "authRequest": OIDCServiceAuthRequest.from_dict(obj["authRequest"]) if obj.get("authRequest") 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/oidc_service_get_device_authorization_request_response.py b/zitadel_client/models/oidc_service_get_device_authorization_request_response.py index c59077da..305520d6 100644 --- a/zitadel_client/models/oidc_service_get_device_authorization_request_response.py +++ b/zitadel_client/models/oidc_service_get_device_authorization_request_response.py @@ -28,6 +28,8 @@ class OIDCServiceGetDeviceAuthorizationRequestResponse(BaseModel): OIDCServiceGetDeviceAuthorizationRequestResponse """ # noqa: E501 device_authorization_request: Optional[OIDCServiceDeviceAuthorizationRequest] = Field(default=None, alias="deviceAuthorizationRequest") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deviceAuthorizationRequest"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of device_authorization_request if self.device_authorization_request: _dict['deviceAuthorizationRequest'] = self.device_authorization_request.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "deviceAuthorizationRequest": OIDCServiceDeviceAuthorizationRequest.from_dict(obj["deviceAuthorizationRequest"]) if obj.get("deviceAuthorizationRequest") 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/oidc_service_protobuf_any.py b/zitadel_client/models/oidc_service_protobuf_any.py index 4f92153a..3f2ddd09 100644 --- a/zitadel_client/models/oidc_service_protobuf_any.py +++ b/zitadel_client/models/oidc_service_protobuf_any.py @@ -27,6 +27,8 @@ class OIDCServiceProtobufAny(BaseModel): OIDCServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/oidc_service_rpc_status.py b/zitadel_client/models/oidc_service_rpc_status.py index 5dbf6d41..f36df29e 100644 --- a/zitadel_client/models/oidc_service_rpc_status.py +++ b/zitadel_client/models/oidc_service_rpc_status.py @@ -30,6 +30,8 @@ class OIDCServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[OIDCServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [OIDCServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/oidc_service_session.py b/zitadel_client/models/oidc_service_session.py index e3528758..88571e67 100644 --- a/zitadel_client/models/oidc_service_session.py +++ b/zitadel_client/models/oidc_service_session.py @@ -29,6 +29,8 @@ class OIDCServiceSession(BaseModel): """ # noqa: E501 session_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the session, used to login the user. Connects the session to the Auth Request.", alias="sessionId") session_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Token to verify the session is valid", alias="sessionToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sessionId": obj.get("sessionId"), "sessionToken": obj.get("sessionToken") }) + # 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/organization_service_add_human_user_request.py b/zitadel_client/models/organization_service_add_human_user_request.py index d4024aa7..e8e60daa 100644 --- a/zitadel_client/models/organization_service_add_human_user_request.py +++ b/zitadel_client/models/organization_service_add_human_user_request.py @@ -46,6 +46,8 @@ class OrganizationServiceAddHumanUserRequest(BaseModel): hashed_password: Optional[OrganizationServiceHashedPassword] = Field(default=None, alias="hashedPassword") idp_links: Optional[List[OrganizationServiceIDPLink]] = Field(default=None, alias="idpLinks") totp_secret: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -86,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -98,18 +107,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), - "username": obj.get("username"), - "organization": Zitadelobjectv2Organization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, - "profile": OrganizationServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, - "email": OrganizationServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, - "phone": OrganizationServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, - "metadata": [OrganizationServiceSetMetadataEntry.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "password": OrganizationServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, - "hashedPassword": OrganizationServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, - "idpLinks": [OrganizationServiceIDPLink.from_dict(_item) for _item in obj["idpLinks"]] if obj.get("idpLinks") is not None else None, - "totpSecret": obj.get("totpSecret") }) + # 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/organization_service_add_organization_request.py b/zitadel_client/models/organization_service_add_organization_request.py index b96f5ee9..708613e4 100644 --- a/zitadel_client/models/organization_service_add_organization_request.py +++ b/zitadel_client/models/organization_service_add_organization_request.py @@ -30,6 +30,8 @@ class OrganizationServiceAddOrganizationRequest(BaseModel): """ # noqa: E501 name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] admins: Optional[List[OrganizationServiceAddOrganizationRequestAdmin]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "admins"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_admins: _items.append(_item_admins.to_dict()) _dict['admins'] = _items + # 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 @@ -92,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "admins": [OrganizationServiceAddOrganizationRequestAdmin.from_dict(_item) for _item in obj["admins"]] if obj.get("admins") 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/organization_service_add_organization_request_admin.py b/zitadel_client/models/organization_service_add_organization_request_admin.py index 9bbb0bba..e4120254 100644 --- a/zitadel_client/models/organization_service_add_organization_request_admin.py +++ b/zitadel_client/models/organization_service_add_organization_request_admin.py @@ -30,6 +30,8 @@ class OrganizationServiceAddOrganizationRequestAdmin(BaseModel): user_id: Optional[StrictStr] = Field(default=None, alias="userId") human: Optional[OrganizationServiceAddHumanUserRequest] = None roles: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,10 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), - "human": OrganizationServiceAddHumanUserRequest.from_dict(obj["human"]) if obj.get("human") is not None else None, - "roles": obj.get("roles") }) + # 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/organization_service_add_organization_response.py b/zitadel_client/models/organization_service_add_organization_response.py index 39f9eba8..5cd7c351 100644 --- a/zitadel_client/models/organization_service_add_organization_response.py +++ b/zitadel_client/models/organization_service_add_organization_response.py @@ -31,6 +31,8 @@ class OrganizationServiceAddOrganizationResponse(BaseModel): details: Optional[OrganizationServiceDetails] = None organization_id: Optional[StrictStr] = Field(default=None, alias="organizationId") created_admins: Optional[List[OrganizationServiceAddOrganizationResponseCreatedAdmin]] = Field(default=None, alias="createdAdmins") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "organizationId", "createdAdmins"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -81,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_created_admins: _items.append(_item_created_admins.to_dict()) _dict['createdAdmins'] = _items + # 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 @@ -97,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "organizationId": obj.get("organizationId"), "createdAdmins": [OrganizationServiceAddOrganizationResponseCreatedAdmin.from_dict(_item) for _item in obj["createdAdmins"]] if obj.get("createdAdmins") 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/organization_service_add_organization_response_created_admin.py b/zitadel_client/models/organization_service_add_organization_response_created_admin.py index bb2a7eee..1becd09f 100644 --- a/zitadel_client/models/organization_service_add_organization_response_created_admin.py +++ b/zitadel_client/models/organization_service_add_organization_response_created_admin.py @@ -29,6 +29,8 @@ class OrganizationServiceAddOrganizationResponseCreatedAdmin(BaseModel): user_id: Optional[StrictStr] = Field(default=None, alias="userId") email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userId", "emailCode", "phoneCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "emailCode": obj.get("emailCode"), "phoneCode": obj.get("phoneCode") }) + # 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/organization_service_details.py b/zitadel_client/models/organization_service_details.py index a366bb3d..2c013830 100644 --- a/zitadel_client/models/organization_service_details.py +++ b/zitadel_client/models/organization_service_details.py @@ -31,6 +31,8 @@ class OrganizationServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/organization_service_hashed_password.py b/zitadel_client/models/organization_service_hashed_password.py index 65147fef..607ac97f 100644 --- a/zitadel_client/models/organization_service_hashed_password.py +++ b/zitadel_client/models/organization_service_hashed_password.py @@ -29,6 +29,8 @@ class OrganizationServiceHashedPassword(BaseModel): """ # noqa: E501 hash: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="\"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\"") change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "changeRequired"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "hash": obj.get("hash"), "changeRequired": obj.get("changeRequired") }) + # 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/organization_service_idp_link.py b/zitadel_client/models/organization_service_idp_link.py index f92913d7..8e2d2b1c 100644 --- a/zitadel_client/models/organization_service_idp_link.py +++ b/zitadel_client/models/organization_service_idp_link.py @@ -30,6 +30,8 @@ class OrganizationServiceIDPLink(BaseModel): idp_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the identity provider", alias="idpId") user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the user of the identity provider", alias="userId") user_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="username of the user of the identity provider", alias="userName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userId": obj.get("userId"), "userName": obj.get("userName") }) + # 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/organization_service_list_details.py b/zitadel_client/models/organization_service_list_details.py index 435b19cb..50599e3a 100644 --- a/zitadel_client/models/organization_service_list_details.py +++ b/zitadel_client/models/organization_service_list_details.py @@ -30,6 +30,8 @@ class OrganizationServiceListDetails(BaseModel): total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "processedSequence": obj.get("processedSequence"), "timestamp": obj.get("timestamp") }) + # 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/organization_service_list_organizations_request.py b/zitadel_client/models/organization_service_list_organizations_request.py index 599762aa..80d09fd4 100644 --- a/zitadel_client/models/organization_service_list_organizations_request.py +++ b/zitadel_client/models/organization_service_list_organizations_request.py @@ -32,6 +32,8 @@ class OrganizationServiceListOrganizationsRequest(BaseModel): query: Optional[OrganizationServiceListQuery] = None sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") queries: Optional[List[OrganizationServiceSearchQuery]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["query", "sortingColumn", "queries"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_queries: _items.append(_item_queries.to_dict()) _dict['queries'] = _items + # 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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, "queries": [OrganizationServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") 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/organization_service_list_organizations_response.py b/zitadel_client/models/organization_service_list_organizations_response.py index b00a8f9f..2aa5d61d 100644 --- a/zitadel_client/models/organization_service_list_organizations_response.py +++ b/zitadel_client/models/organization_service_list_organizations_response.py @@ -32,6 +32,8 @@ class OrganizationServiceListOrganizationsResponse(BaseModel): details: Optional[OrganizationServiceListDetails] = None sorting_column: Optional[OrganizationServiceOrganizationFieldName] = Field(default=OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") result: Optional[List[Zitadelorgv2Organization]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "sortingColumn", "result"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else OrganizationServiceOrganizationFieldName.ORGANIZATION_FIELD_NAME_UNSPECIFIED, "result": [Zitadelorgv2Organization.from_dict(_item) for _item in obj["result"]] if obj.get("result") 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/organization_service_list_query.py b/zitadel_client/models/organization_service_list_query.py index a738106a..9e7af1f1 100644 --- a/zitadel_client/models/organization_service_list_query.py +++ b/zitadel_client/models/organization_service_list_query.py @@ -29,6 +29,8 @@ class OrganizationServiceListQuery(BaseModel): offset: Optional[StrictStr] = None limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. 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="default is descending") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "limit": obj.get("limit"), "asc": obj.get("asc") }) + # 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/organization_service_organization_domain_query.py b/zitadel_client/models/organization_service_organization_domain_query.py index e3f96739..d50d2052 100644 --- a/zitadel_client/models/organization_service_organization_domain_query.py +++ b/zitadel_client/models/organization_service_organization_domain_query.py @@ -30,6 +30,8 @@ class OrganizationServiceOrganizationDomainQuery(BaseModel): """ # noqa: E501 domain: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="Domain used in organization, not necessary primary domain.") method: Optional[OrganizationServiceTextQueryMethod] = OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "domain": obj.get("domain"), "method": obj.get("method") if obj.get("method") is not None else OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/organization_service_organization_id_query.py b/zitadel_client/models/organization_service_organization_id_query.py index 27912135..66aa5bb5 100644 --- a/zitadel_client/models/organization_service_organization_id_query.py +++ b/zitadel_client/models/organization_service_organization_id_query.py @@ -28,6 +28,8 @@ class OrganizationServiceOrganizationIDQuery(BaseModel): OrganizationServiceOrganizationIDQuery """ # noqa: E501 id: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="Unique identifier of the organization.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id") }) + # 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/organization_service_organization_name_query.py b/zitadel_client/models/organization_service_organization_name_query.py index 36da656d..dd9b8da3 100644 --- a/zitadel_client/models/organization_service_organization_name_query.py +++ b/zitadel_client/models/organization_service_organization_name_query.py @@ -30,6 +30,8 @@ class OrganizationServiceOrganizationNameQuery(BaseModel): """ # noqa: E501 name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="Name of the organization.") method: Optional[OrganizationServiceTextQueryMethod] = OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "method": obj.get("method") if obj.get("method") is not None else OrganizationServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/organization_service_organization_state_query.py b/zitadel_client/models/organization_service_organization_state_query.py index fa3ae505..b9df89bf 100644 --- a/zitadel_client/models/organization_service_organization_state_query.py +++ b/zitadel_client/models/organization_service_organization_state_query.py @@ -28,6 +28,8 @@ class OrganizationServiceOrganizationStateQuery(BaseModel): OrganizationServiceOrganizationStateQuery """ # noqa: E501 state: Optional[OrganizationServiceOrganizationState] = OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "state": obj.get("state") if obj.get("state") is not None else OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED }) + # 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/organization_service_password.py b/zitadel_client/models/organization_service_password.py index 52595261..e54e4f82 100644 --- a/zitadel_client/models/organization_service_password.py +++ b/zitadel_client/models/organization_service_password.py @@ -29,6 +29,8 @@ class OrganizationServicePassword(BaseModel): """ # noqa: E501 password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password", "changeRequired"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "password": obj.get("password"), "changeRequired": obj.get("changeRequired") }) + # 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/organization_service_protobuf_any.py b/zitadel_client/models/organization_service_protobuf_any.py index 6abfad4a..42ac7403 100644 --- a/zitadel_client/models/organization_service_protobuf_any.py +++ b/zitadel_client/models/organization_service_protobuf_any.py @@ -27,6 +27,8 @@ class OrganizationServiceProtobufAny(BaseModel): OrganizationServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/organization_service_rpc_status.py b/zitadel_client/models/organization_service_rpc_status.py index d1da0b9a..94b67b9f 100644 --- a/zitadel_client/models/organization_service_rpc_status.py +++ b/zitadel_client/models/organization_service_rpc_status.py @@ -30,6 +30,8 @@ class OrganizationServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[OrganizationServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [OrganizationServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/organization_service_search_query.py b/zitadel_client/models/organization_service_search_query.py index 8543bf7d..0da3a0bc 100644 --- a/zitadel_client/models/organization_service_search_query.py +++ b/zitadel_client/models/organization_service_search_query.py @@ -35,6 +35,8 @@ class OrganizationServiceSearchQuery(BaseModel): state_query: Optional[OrganizationServiceOrganizationStateQuery] = Field(default=None, alias="stateQuery") id_query: Optional[OrganizationServiceOrganizationIDQuery] = Field(default=None, alias="idQuery") default_query: Optional[Dict[str, Any]] = Field(default=None, alias="defaultQuery") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -66,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -87,12 +96,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "nameQuery": OrganizationServiceOrganizationNameQuery.from_dict(obj["nameQuery"]) if obj.get("nameQuery") is not None else None, - "domainQuery": OrganizationServiceOrganizationDomainQuery.from_dict(obj["domainQuery"]) if obj.get("domainQuery") is not None else None, - "stateQuery": OrganizationServiceOrganizationStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None, - "idQuery": OrganizationServiceOrganizationIDQuery.from_dict(obj["idQuery"]) if obj.get("idQuery") is not None else None, - "defaultQuery": obj.get("defaultQuery") }) + # 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/organization_service_send_email_verification_code.py b/zitadel_client/models/organization_service_send_email_verification_code.py index b77071a8..6603ef8c 100644 --- a/zitadel_client/models/organization_service_send_email_verification_code.py +++ b/zitadel_client/models/organization_service_send_email_verification_code.py @@ -28,6 +28,8 @@ class OrganizationServiceSendEmailVerificationCode(BaseModel): OrganizationServiceSendEmailVerificationCode """ # noqa: E501 url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "urlTemplate": obj.get("urlTemplate") }) + # 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/organization_service_set_human_email.py b/zitadel_client/models/organization_service_set_human_email.py index eb545722..1c960a72 100644 --- a/zitadel_client/models/organization_service_set_human_email.py +++ b/zitadel_client/models/organization_service_set_human_email.py @@ -32,6 +32,8 @@ class OrganizationServiceSetHumanEmail(BaseModel): send_code: Optional[OrganizationServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,11 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "email": obj.get("email"), - "sendCode": OrganizationServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") }) + # 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/organization_service_set_human_phone.py b/zitadel_client/models/organization_service_set_human_phone.py index ef962e08..54527386 100644 --- a/zitadel_client/models/organization_service_set_human_phone.py +++ b/zitadel_client/models/organization_service_set_human_phone.py @@ -31,6 +31,8 @@ class OrganizationServiceSetHumanPhone(BaseModel): send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,11 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") }) + # 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/organization_service_set_human_profile.py b/zitadel_client/models/organization_service_set_human_profile.py index 828614f7..05a25e22 100644 --- a/zitadel_client/models/organization_service_set_human_profile.py +++ b/zitadel_client/models/organization_service_set_human_profile.py @@ -34,6 +34,8 @@ class OrganizationServiceSetHumanProfile(BaseModel): display_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="displayName") preferred_language: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, alias="preferredLanguage") gender: Optional[OrganizationServiceGender] = OrganizationServiceGender.GENDER_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "preferredLanguage": obj.get("preferredLanguage"), "gender": obj.get("gender") if obj.get("gender") is not None else OrganizationServiceGender.GENDER_UNSPECIFIED }) + # 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/organization_service_set_metadata_entry.py b/zitadel_client/models/organization_service_set_metadata_entry.py index 61329335..bd3bea43 100644 --- a/zitadel_client/models/organization_service_set_metadata_entry.py +++ b/zitadel_client/models/organization_service_set_metadata_entry.py @@ -29,6 +29,8 @@ class OrganizationServiceSetMetadataEntry(BaseModel): """ # noqa: E501 key: Annotated[str, Field(min_length=1, strict=True, max_length=200)] value: Union[Annotated[bytes, Field(min_length=1, strict=True, max_length=500000)], Annotated[str, Field(min_length=1, strict=True, max_length=500000)]] = Field(description="The value has to be base64 encoded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["key", "value"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "key": obj.get("key"), "value": obj.get("value") }) + # 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/saml_service_authorization_error.py b/zitadel_client/models/saml_service_authorization_error.py index 2792b3fc..f097c853 100644 --- a/zitadel_client/models/saml_service_authorization_error.py +++ b/zitadel_client/models/saml_service_authorization_error.py @@ -29,6 +29,8 @@ class SAMLServiceAuthorizationError(BaseModel): """ # noqa: E501 error: Optional[SAMLServiceErrorReason] = SAMLServiceErrorReason.ERROR_REASON_UNSPECIFIED error_description: Optional[StrictStr] = Field(default=None, alias="errorDescription") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["error", "errorDescription"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "error": obj.get("error") if obj.get("error") is not None else SAMLServiceErrorReason.ERROR_REASON_UNSPECIFIED, "errorDescription": obj.get("errorDescription") }) + # 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/saml_service_create_response_request.py b/zitadel_client/models/saml_service_create_response_request.py index eace7d37..4cba7501 100644 --- a/zitadel_client/models/saml_service_create_response_request.py +++ b/zitadel_client/models/saml_service_create_response_request.py @@ -30,6 +30,8 @@ class SAMLServiceCreateResponseRequest(BaseModel): """ # noqa: E501 session: Optional[SAMLServiceSession] = None error: Optional[SAMLServiceAuthorizationError] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,9 +91,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "session": SAMLServiceSession.from_dict(obj["session"]) if obj.get("session") is not None else None, - "error": SAMLServiceAuthorizationError.from_dict(obj["error"]) if obj.get("error") 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/saml_service_create_response_response.py b/zitadel_client/models/saml_service_create_response_response.py index 0e78e346..0bd7d3ca 100644 --- a/zitadel_client/models/saml_service_create_response_response.py +++ b/zitadel_client/models/saml_service_create_response_response.py @@ -32,6 +32,8 @@ class SAMLServiceCreateResponseResponse(BaseModel): url: Optional[StrictStr] = Field(default=None, description="URL including the Assertion Consumer Service where the user should be redirected or has to call per POST, depending on the binding. Contains details for the application to obtain the response on success, or error details on failure. Note that this field must be treated as credentials, as the contained SAMLResponse or code can be used on behalve of the user.") redirect: Optional[Dict[str, Any]] = None post: Optional[SAMLServicePostResponse] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,11 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "details": SAMLServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "url": obj.get("url"), - "redirect": obj.get("redirect"), - "post": SAMLServicePostResponse.from_dict(obj["post"]) if obj.get("post") 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/saml_service_details.py b/zitadel_client/models/saml_service_details.py index 76c92d1b..c5da0d00 100644 --- a/zitadel_client/models/saml_service_details.py +++ b/zitadel_client/models/saml_service_details.py @@ -31,6 +31,8 @@ class SAMLServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/saml_service_get_saml_request_response.py b/zitadel_client/models/saml_service_get_saml_request_response.py index 8574f66e..5c6294b3 100644 --- a/zitadel_client/models/saml_service_get_saml_request_response.py +++ b/zitadel_client/models/saml_service_get_saml_request_response.py @@ -28,6 +28,8 @@ class SAMLServiceGetSAMLRequestResponse(BaseModel): SAMLServiceGetSAMLRequestResponse """ # noqa: E501 saml_request: Optional[SAMLServiceSAMLRequest] = Field(default=None, alias="samlRequest") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["samlRequest"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of saml_request if self.saml_request: _dict['samlRequest'] = self.saml_request.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "samlRequest": SAMLServiceSAMLRequest.from_dict(obj["samlRequest"]) if obj.get("samlRequest") 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/saml_service_post_response.py b/zitadel_client/models/saml_service_post_response.py index 9c0141d4..fd4f201a 100644 --- a/zitadel_client/models/saml_service_post_response.py +++ b/zitadel_client/models/saml_service_post_response.py @@ -28,6 +28,8 @@ class SAMLServicePostResponse(BaseModel): """ # noqa: E501 relay_state: Optional[StrictStr] = Field(default=None, alias="relayState") saml_response: Optional[StrictStr] = Field(default=None, alias="samlResponse") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["relayState", "samlResponse"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "relayState": obj.get("relayState"), "samlResponse": obj.get("samlResponse") }) + # 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/saml_service_protobuf_any.py b/zitadel_client/models/saml_service_protobuf_any.py index 4d5ede7f..caba873f 100644 --- a/zitadel_client/models/saml_service_protobuf_any.py +++ b/zitadel_client/models/saml_service_protobuf_any.py @@ -27,6 +27,8 @@ class SAMLServiceProtobufAny(BaseModel): SAMLServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/saml_service_rpc_status.py b/zitadel_client/models/saml_service_rpc_status.py index 813edfca..7de48ab4 100644 --- a/zitadel_client/models/saml_service_rpc_status.py +++ b/zitadel_client/models/saml_service_rpc_status.py @@ -30,6 +30,8 @@ class SAMLServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[SAMLServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [SAMLServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/saml_service_saml_request.py b/zitadel_client/models/saml_service_saml_request.py index db94f7f4..2be59ed3 100644 --- a/zitadel_client/models/saml_service_saml_request.py +++ b/zitadel_client/models/saml_service_saml_request.py @@ -33,6 +33,8 @@ class SAMLServiceSAMLRequest(BaseModel): assertion_consumer_service: Optional[StrictStr] = Field(default=None, description="URL which points back to the assertion consumer service of the application", alias="assertionConsumerService") relay_state: Optional[StrictStr] = Field(default=None, description="RelayState provided by the application for the request", alias="relayState") binding: Optional[StrictStr] = Field(default=None, description="Binding used by the application for the request") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "issuer", "assertionConsumerService", "relayState", "binding"] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -92,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "relayState": obj.get("relayState"), "binding": obj.get("binding") }) + # 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/saml_service_session.py b/zitadel_client/models/saml_service_session.py index 34d121e9..215f9ed8 100644 --- a/zitadel_client/models/saml_service_session.py +++ b/zitadel_client/models/saml_service_session.py @@ -29,6 +29,8 @@ class SAMLServiceSession(BaseModel): """ # noqa: E501 session_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the session, used to login the user. Connects the session to the SAML Request.", alias="sessionId") session_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Token to verify the session is valid.", alias="sessionToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sessionId", "sessionToken"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sessionId": obj.get("sessionId"), "sessionToken": obj.get("sessionToken") }) + # 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/session_service_challenges.py b/zitadel_client/models/session_service_challenges.py index 0c9df904..d94029ec 100644 --- a/zitadel_client/models/session_service_challenges.py +++ b/zitadel_client/models/session_service_challenges.py @@ -30,6 +30,8 @@ class SessionServiceChallenges(BaseModel): web_auth_n: Optional[SessionServiceChallengesWebAuthN] = Field(default=None, alias="webAuthN") otp_sms: Optional[StrictStr] = Field(default=None, alias="otpSms") otp_email: Optional[StrictStr] = Field(default=None, alias="otpEmail") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["webAuthN", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of web_auth_n if self.web_auth_n: _dict['webAuthN'] = self.web_auth_n.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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "otpSms": obj.get("otpSms"), "otpEmail": obj.get("otpEmail") }) + # 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/session_service_challenges_web_auth_n.py b/zitadel_client/models/session_service_challenges_web_auth_n.py index 08a79dab..9254f545 100644 --- a/zitadel_client/models/session_service_challenges_web_auth_n.py +++ b/zitadel_client/models/session_service_challenges_web_auth_n.py @@ -27,6 +27,8 @@ class SessionServiceChallengesWebAuthN(BaseModel): SessionServiceChallengesWebAuthN """ # noqa: E501 public_key_credential_request_options: Optional[Dict[str, Any]] = Field(default=None, description="Options for Assertion Generaration (dictionary PublicKeyCredentialRequestOptions). Generated helper methods transform the field to JSON, for use in a WebauthN client. See also: https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialrequestoptions", alias="publicKeyCredentialRequestOptions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["publicKeyCredentialRequestOptions"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "publicKeyCredentialRequestOptions": obj.get("publicKeyCredentialRequestOptions") }) + # 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/session_service_check_idp_intent.py b/zitadel_client/models/session_service_check_idp_intent.py index e1f93e4f..b20bfe81 100644 --- a/zitadel_client/models/session_service_check_idp_intent.py +++ b/zitadel_client/models/session_service_check_idp_intent.py @@ -29,6 +29,8 @@ class SessionServiceCheckIDPIntent(BaseModel): """ # noqa: E501 idp_intent_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the idp intent, previously returned on the success response of the IDP callback", alias="idpIntentId") idp_intent_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="token of the idp intent, previously returned on the success response of the IDP callback", alias="idpIntentToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "idpIntentId": obj.get("idpIntentId"), "idpIntentToken": obj.get("idpIntentToken") }) + # 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/session_service_check_otp.py b/zitadel_client/models/session_service_check_otp.py index 6c68dd85..eb1bfc22 100644 --- a/zitadel_client/models/session_service_check_otp.py +++ b/zitadel_client/models/session_service_check_otp.py @@ -28,6 +28,8 @@ class SessionServiceCheckOTP(BaseModel): SessionServiceCheckOTP """ # noqa: E501 code: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "code": obj.get("code") }) + # 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/session_service_check_password.py b/zitadel_client/models/session_service_check_password.py index 0a3bb39e..ad0dd54f 100644 --- a/zitadel_client/models/session_service_check_password.py +++ b/zitadel_client/models/session_service_check_password.py @@ -28,6 +28,8 @@ class SessionServiceCheckPassword(BaseModel): SessionServiceCheckPassword """ # noqa: E501 password: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "password": obj.get("password") }) + # 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/session_service_check_totp.py b/zitadel_client/models/session_service_check_totp.py index 0d9281d3..5bb08ae7 100644 --- a/zitadel_client/models/session_service_check_totp.py +++ b/zitadel_client/models/session_service_check_totp.py @@ -28,6 +28,8 @@ class SessionServiceCheckTOTP(BaseModel): SessionServiceCheckTOTP """ # noqa: E501 code: Optional[Annotated[str, Field(min_length=6, strict=True, max_length=6)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "code": obj.get("code") }) + # 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/session_service_check_user.py b/zitadel_client/models/session_service_check_user.py index c1ca9328..b46fa970 100644 --- a/zitadel_client/models/session_service_check_user.py +++ b/zitadel_client/models/session_service_check_user.py @@ -29,6 +29,8 @@ class SessionServiceCheckUser(BaseModel): """ # noqa: E501 user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="userId") login_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, alias="loginName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), - "loginName": obj.get("loginName") }) + # 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/session_service_check_web_auth_n.py b/zitadel_client/models/session_service_check_web_auth_n.py index a681d4cc..c739b629 100644 --- a/zitadel_client/models/session_service_check_web_auth_n.py +++ b/zitadel_client/models/session_service_check_web_auth_n.py @@ -27,6 +27,8 @@ class SessionServiceCheckWebAuthN(BaseModel): SessionServiceCheckWebAuthN """ # noqa: E501 credential_assertion_data: Dict[str, Any] = Field(description="JSON representation of public key credential issued by the webAuthN client", alias="credentialAssertionData") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["credentialAssertionData"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "credentialAssertionData": obj.get("credentialAssertionData") }) + # 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/session_service_checks.py b/zitadel_client/models/session_service_checks.py index 986f82e5..3ae587c2 100644 --- a/zitadel_client/models/session_service_checks.py +++ b/zitadel_client/models/session_service_checks.py @@ -39,6 +39,8 @@ class SessionServiceChecks(BaseModel): totp: Optional[SessionServiceCheckTOTP] = None otp_sms: Optional[SessionServiceCheckOTP] = Field(default=None, alias="otpSms") otp_email: Optional[SessionServiceCheckOTP] = Field(default=None, alias="otpEmail") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user", "password", "webAuthN", "idpIntent", "totp", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, @@ -70,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -100,6 +104,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of otp_email if self.otp_email: _dict['otpEmail'] = self.otp_email.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 @@ -120,6 +129,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "otpSms": SessionServiceCheckOTP.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, "otpEmail": SessionServiceCheckOTP.from_dict(obj["otpEmail"]) if obj.get("otpEmail") 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/session_service_create_session_request.py b/zitadel_client/models/session_service_create_session_request.py index fdfc2c68..140a9f73 100644 --- a/zitadel_client/models/session_service_create_session_request.py +++ b/zitadel_client/models/session_service_create_session_request.py @@ -34,6 +34,8 @@ class SessionServiceCreateSessionRequest(BaseModel): challenges: Optional[SessionServiceRequestChallenges] = None user_agent: Optional[SessionServiceUserAgent] = Field(default=None, alias="userAgent") lifetime: Optional[StrictStr] = Field(default=None, description="\"duration (in seconds) after which the session will be automatically invalidated\"") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["checks", "metadata", "challenges", "userAgent", "lifetime"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -83,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of user_agent if self.user_agent: _dict['userAgent'] = self.user_agent.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 @@ -101,6 +110,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userAgent": SessionServiceUserAgent.from_dict(obj["userAgent"]) if obj.get("userAgent") is not None else None, "lifetime": obj.get("lifetime") }) + # 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/session_service_create_session_response.py b/zitadel_client/models/session_service_create_session_response.py index 8f721c91..2aa7277f 100644 --- a/zitadel_client/models/session_service_create_session_response.py +++ b/zitadel_client/models/session_service_create_session_response.py @@ -32,6 +32,8 @@ class SessionServiceCreateSessionResponse(BaseModel): session_id: Optional[StrictStr] = Field(default=None, description="\"id of the session\"", alias="sessionId") session_token: Optional[StrictStr] = Field(default=None, description="\"The current token of the session, which is required for delete session, get session or the request of other resources.\"", alias="sessionToken") challenges: Optional[SessionServiceChallenges] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "sessionId", "sessionToken", "challenges"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -78,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of challenges if self.challenges: _dict['challenges'] = self.challenges.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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sessionToken": obj.get("sessionToken"), "challenges": SessionServiceChallenges.from_dict(obj["challenges"]) if obj.get("challenges") 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/session_service_creation_date_query.py b/zitadel_client/models/session_service_creation_date_query.py index 838aefcc..608851e8 100644 --- a/zitadel_client/models/session_service_creation_date_query.py +++ b/zitadel_client/models/session_service_creation_date_query.py @@ -30,6 +30,8 @@ class SessionServiceCreationDateQuery(BaseModel): """ # noqa: E501 creation_date: Optional[datetime] = Field(default=None, alias="creationDate") method: Optional[SessionServiceTimestampQueryMethod] = SessionServiceTimestampQueryMethod.TIMESTAMP_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["creationDate", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creationDate": obj.get("creationDate"), "method": obj.get("method") if obj.get("method") is not None else SessionServiceTimestampQueryMethod.TIMESTAMP_QUERY_METHOD_EQUALS }) + # 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/session_service_creator_query.py b/zitadel_client/models/session_service_creator_query.py index da4b86a7..5e9aa1f2 100644 --- a/zitadel_client/models/session_service_creator_query.py +++ b/zitadel_client/models/session_service_creator_query.py @@ -28,6 +28,8 @@ class SessionServiceCreatorQuery(BaseModel): SessionServiceCreatorQuery """ # noqa: E501 id: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="ID of the user who created the session. If empty, the calling user's ID is used.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id") }) + # 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/session_service_delete_session_request.py b/zitadel_client/models/session_service_delete_session_request.py index e8de81bd..334cf313 100644 --- a/zitadel_client/models/session_service_delete_session_request.py +++ b/zitadel_client/models/session_service_delete_session_request.py @@ -27,6 +27,8 @@ class SessionServiceDeleteSessionRequest(BaseModel): SessionServiceDeleteSessionRequest """ # noqa: E501 session_token: Optional[StrictStr] = Field(default=None, description="\"The current token of the session, previously returned on the create / update request. The token is required unless the authenticated user terminates the own session or is granted the `session.delete` permission.\"", alias="sessionToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sessionToken"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "sessionToken": obj.get("sessionToken") }) + # 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/session_service_delete_session_response.py b/zitadel_client/models/session_service_delete_session_response.py index c3d11bc0..8c2530e9 100644 --- a/zitadel_client/models/session_service_delete_session_response.py +++ b/zitadel_client/models/session_service_delete_session_response.py @@ -28,6 +28,8 @@ class SessionServiceDeleteSessionResponse(BaseModel): SessionServiceDeleteSessionResponse """ # noqa: E501 details: Optional[SessionServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": SessionServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/session_service_details.py b/zitadel_client/models/session_service_details.py index f37a3b4b..062de5be 100644 --- a/zitadel_client/models/session_service_details.py +++ b/zitadel_client/models/session_service_details.py @@ -31,6 +31,8 @@ class SessionServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/session_service_factors.py b/zitadel_client/models/session_service_factors.py index 194fa345..81fa1c90 100644 --- a/zitadel_client/models/session_service_factors.py +++ b/zitadel_client/models/session_service_factors.py @@ -39,6 +39,8 @@ class SessionServiceFactors(BaseModel): totp: Optional[SessionServiceTOTPFactor] = None otp_sms: Optional[SessionServiceOTPFactor] = Field(default=None, alias="otpSms") otp_email: Optional[SessionServiceOTPFactor] = Field(default=None, alias="otpEmail") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["user", "password", "webAuthN", "intent", "totp", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, @@ -70,8 +72,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -100,6 +104,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of otp_email if self.otp_email: _dict['otpEmail'] = self.otp_email.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 @@ -120,6 +129,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "otpSms": SessionServiceOTPFactor.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, "otpEmail": SessionServiceOTPFactor.from_dict(obj["otpEmail"]) if obj.get("otpEmail") 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/session_service_get_session_response.py b/zitadel_client/models/session_service_get_session_response.py index 32f40878..73706cd9 100644 --- a/zitadel_client/models/session_service_get_session_response.py +++ b/zitadel_client/models/session_service_get_session_response.py @@ -28,6 +28,8 @@ class SessionServiceGetSessionResponse(BaseModel): SessionServiceGetSessionResponse """ # noqa: E501 session: Optional[SessionServiceSession] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["session"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of session if self.session: _dict['session'] = self.session.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "session": SessionServiceSession.from_dict(obj["session"]) if obj.get("session") 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/session_service_ids_query.py b/zitadel_client/models/session_service_ids_query.py index 48a40bb5..f1e3f1c4 100644 --- a/zitadel_client/models/session_service_ids_query.py +++ b/zitadel_client/models/session_service_ids_query.py @@ -27,6 +27,8 @@ class SessionServiceIDsQuery(BaseModel): SessionServiceIDsQuery """ # noqa: E501 ids: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["ids"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "ids": obj.get("ids") }) + # 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/session_service_intent_factor.py b/zitadel_client/models/session_service_intent_factor.py index 0c7652a4..c2143286 100644 --- a/zitadel_client/models/session_service_intent_factor.py +++ b/zitadel_client/models/session_service_intent_factor.py @@ -28,6 +28,8 @@ class SessionServiceIntentFactor(BaseModel): SessionServiceIntentFactor """ # noqa: E501 verified_at: Optional[datetime] = Field(default=None, description="\"time when an intent was last checked\"", alias="verifiedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verifiedAt": obj.get("verifiedAt") }) + # 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/session_service_list_details.py b/zitadel_client/models/session_service_list_details.py index e31d9ac0..7914da23 100644 --- a/zitadel_client/models/session_service_list_details.py +++ b/zitadel_client/models/session_service_list_details.py @@ -30,6 +30,8 @@ class SessionServiceListDetails(BaseModel): total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "processedSequence": obj.get("processedSequence"), "timestamp": obj.get("timestamp") }) + # 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/session_service_list_query.py b/zitadel_client/models/session_service_list_query.py index df019995..7049e33a 100644 --- a/zitadel_client/models/session_service_list_query.py +++ b/zitadel_client/models/session_service_list_query.py @@ -29,6 +29,8 @@ class SessionServiceListQuery(BaseModel): offset: Optional[StrictStr] = None limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. 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="default is descending") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "limit": obj.get("limit"), "asc": obj.get("asc") }) + # 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/session_service_list_sessions_request.py b/zitadel_client/models/session_service_list_sessions_request.py index 497208c7..08018aa9 100644 --- a/zitadel_client/models/session_service_list_sessions_request.py +++ b/zitadel_client/models/session_service_list_sessions_request.py @@ -32,6 +32,8 @@ class SessionServiceListSessionsRequest(BaseModel): query: Optional[SessionServiceListQuery] = None queries: Optional[List[SessionServiceSearchQuery]] = None sorting_column: Optional[SessionServiceSessionFieldName] = Field(default=SessionServiceSessionFieldName.SESSION_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["query", "queries", "sortingColumn"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_queries: _items.append(_item_queries.to_dict()) _dict['queries'] = _items + # 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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "queries": [SessionServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") is not None else None, "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else SessionServiceSessionFieldName.SESSION_FIELD_NAME_UNSPECIFIED }) + # 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/session_service_list_sessions_response.py b/zitadel_client/models/session_service_list_sessions_response.py index 707f3ec3..6de7ef96 100644 --- a/zitadel_client/models/session_service_list_sessions_response.py +++ b/zitadel_client/models/session_service_list_sessions_response.py @@ -30,6 +30,8 @@ class SessionServiceListSessionsResponse(BaseModel): """ # noqa: E501 details: Optional[SessionServiceListDetails] = None sessions: Optional[List[SessionServiceSession]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "sessions"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_sessions: _items.append(_item_sessions.to_dict()) _dict['sessions'] = _items + # 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SessionServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "sessions": [SessionServiceSession.from_dict(_item) for _item in obj["sessions"]] if obj.get("sessions") 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/session_service_otp_email_send_code.py b/zitadel_client/models/session_service_otp_email_send_code.py index 73f2b655..a81a6a05 100644 --- a/zitadel_client/models/session_service_otp_email_send_code.py +++ b/zitadel_client/models/session_service_otp_email_send_code.py @@ -28,6 +28,8 @@ class SessionServiceOTPEmailSendCode(BaseModel): SessionServiceOTPEmailSendCode """ # noqa: E501 url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: Code, UserID, LoginName, DisplayName, PreferredLanguage, SessionID", alias="urlTemplate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "urlTemplate": obj.get("urlTemplate") }) + # 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/session_service_otp_factor.py b/zitadel_client/models/session_service_otp_factor.py index e75c3396..fe523b4a 100644 --- a/zitadel_client/models/session_service_otp_factor.py +++ b/zitadel_client/models/session_service_otp_factor.py @@ -28,6 +28,8 @@ class SessionServiceOTPFactor(BaseModel): SessionServiceOTPFactor """ # noqa: E501 verified_at: Optional[datetime] = Field(default=None, description="\"time when the One-Time Password was last checked\"", alias="verifiedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verifiedAt": obj.get("verifiedAt") }) + # 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/session_service_password_factor.py b/zitadel_client/models/session_service_password_factor.py index d9cce51b..0ace2b7a 100644 --- a/zitadel_client/models/session_service_password_factor.py +++ b/zitadel_client/models/session_service_password_factor.py @@ -28,6 +28,8 @@ class SessionServicePasswordFactor(BaseModel): SessionServicePasswordFactor """ # noqa: E501 verified_at: Optional[datetime] = Field(default=None, description="\"time when the password was last checked\"", alias="verifiedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verifiedAt": obj.get("verifiedAt") }) + # 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/session_service_protobuf_any.py b/zitadel_client/models/session_service_protobuf_any.py index e62c32ef..108901c3 100644 --- a/zitadel_client/models/session_service_protobuf_any.py +++ b/zitadel_client/models/session_service_protobuf_any.py @@ -27,6 +27,8 @@ class SessionServiceProtobufAny(BaseModel): SessionServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/session_service_request_challenges.py b/zitadel_client/models/session_service_request_challenges.py index fecee268..816e5208 100644 --- a/zitadel_client/models/session_service_request_challenges.py +++ b/zitadel_client/models/session_service_request_challenges.py @@ -32,6 +32,8 @@ class SessionServiceRequestChallenges(BaseModel): web_auth_n: Optional[SessionServiceRequestChallengesWebAuthN] = Field(default=None, alias="webAuthN") otp_sms: Optional[SessionServiceRequestChallengesOTPSMS] = Field(default=None, alias="otpSms") otp_email: Optional[SessionServiceRequestChallengesOTPEmail] = Field(default=None, alias="otpEmail") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["webAuthN", "otpSms", "otpEmail"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -81,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of otp_email if self.otp_email: _dict['otpEmail'] = self.otp_email.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 @@ -97,6 +106,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "otpSms": SessionServiceRequestChallengesOTPSMS.from_dict(obj["otpSms"]) if obj.get("otpSms") is not None else None, "otpEmail": SessionServiceRequestChallengesOTPEmail.from_dict(obj["otpEmail"]) if obj.get("otpEmail") 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/session_service_request_challenges_otp_email.py b/zitadel_client/models/session_service_request_challenges_otp_email.py index d7bf15a5..f0130f9d 100644 --- a/zitadel_client/models/session_service_request_challenges_otp_email.py +++ b/zitadel_client/models/session_service_request_challenges_otp_email.py @@ -29,6 +29,8 @@ class SessionServiceRequestChallengesOTPEmail(BaseModel): """ # noqa: E501 send_code: Optional[SessionServiceOTPEmailSendCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": SessionServiceOTPEmailSendCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") }) + # 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/session_service_request_challenges_otpsms.py b/zitadel_client/models/session_service_request_challenges_otpsms.py index 1d969cd5..4eeeac54 100644 --- a/zitadel_client/models/session_service_request_challenges_otpsms.py +++ b/zitadel_client/models/session_service_request_challenges_otpsms.py @@ -27,6 +27,8 @@ class SessionServiceRequestChallengesOTPSMS(BaseModel): SessionServiceRequestChallengesOTPSMS """ # noqa: E501 return_code: Optional[StrictBool] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["returnCode"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "returnCode": obj.get("returnCode") }) + # 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/session_service_request_challenges_web_auth_n.py b/zitadel_client/models/session_service_request_challenges_web_auth_n.py index 22909f0e..a8d19228 100644 --- a/zitadel_client/models/session_service_request_challenges_web_auth_n.py +++ b/zitadel_client/models/session_service_request_challenges_web_auth_n.py @@ -29,6 +29,8 @@ class SessionServiceRequestChallengesWebAuthN(BaseModel): """ # noqa: E501 domain: StrictStr = Field(description="\"Domain on which the session was created. Will be used in the WebAuthN challenge.\"") user_verification_requirement: SessionServiceUserVerificationRequirement = Field(alias="userVerificationRequirement") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain", "userVerificationRequirement"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "domain": obj.get("domain"), "userVerificationRequirement": obj.get("userVerificationRequirement") if obj.get("userVerificationRequirement") is not None else SessionServiceUserVerificationRequirement.USER_VERIFICATION_REQUIREMENT_UNSPECIFIED }) + # 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/session_service_rpc_status.py b/zitadel_client/models/session_service_rpc_status.py index 1b4c1621..54af8edc 100644 --- a/zitadel_client/models/session_service_rpc_status.py +++ b/zitadel_client/models/session_service_rpc_status.py @@ -30,6 +30,8 @@ class SessionServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[SessionServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [SessionServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/session_service_search_query.py b/zitadel_client/models/session_service_search_query.py index 17cbfc9a..9fc93252 100644 --- a/zitadel_client/models/session_service_search_query.py +++ b/zitadel_client/models/session_service_search_query.py @@ -36,6 +36,8 @@ class SessionServiceSearchQuery(BaseModel): creation_date_query: Optional[SessionServiceCreationDateQuery] = Field(default=None, alias="creationDateQuery") creator_query: Optional[SessionServiceCreatorQuery] = Field(default=None, alias="creatorQuery") user_agent_query: Optional[SessionServiceUserAgentQuery] = Field(default=None, alias="userAgentQuery") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,12 +97,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "idsQuery": SessionServiceIDsQuery.from_dict(obj["idsQuery"]) if obj.get("idsQuery") is not None else None, - "userIdQuery": SessionServiceUserIDQuery.from_dict(obj["userIdQuery"]) if obj.get("userIdQuery") is not None else None, - "creationDateQuery": SessionServiceCreationDateQuery.from_dict(obj["creationDateQuery"]) if obj.get("creationDateQuery") is not None else None, - "creatorQuery": SessionServiceCreatorQuery.from_dict(obj["creatorQuery"]) if obj.get("creatorQuery") is not None else None, - "userAgentQuery": SessionServiceUserAgentQuery.from_dict(obj["userAgentQuery"]) if obj.get("userAgentQuery") 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/session_service_session.py b/zitadel_client/models/session_service_session.py index 675d77ec..b3b330b1 100644 --- a/zitadel_client/models/session_service_session.py +++ b/zitadel_client/models/session_service_session.py @@ -37,6 +37,8 @@ class SessionServiceSession(BaseModel): metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list\"") user_agent: Optional[SessionServiceUserAgent] = Field(default=None, alias="userAgent") expiration_date: Optional[datetime] = Field(default=None, description="\"time the session will be automatically invalidated\"", alias="expirationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate", "changeDate", "sequence", "factors", "metadata", "userAgent", "expirationDate"] model_config = ConfigDict( populate_by_name=True, @@ -68,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -83,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of user_agent if self.user_agent: _dict['userAgent'] = self.user_agent.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 @@ -104,6 +113,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userAgent": SessionServiceUserAgent.from_dict(obj["userAgent"]) if obj.get("userAgent") is not None else None, "expirationDate": obj.get("expirationDate") }) + # 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/session_service_set_session_request.py b/zitadel_client/models/session_service_set_session_request.py index f91634f8..da8f1be8 100644 --- a/zitadel_client/models/session_service_set_session_request.py +++ b/zitadel_client/models/session_service_set_session_request.py @@ -34,6 +34,8 @@ class SessionServiceSetSessionRequest(BaseModel): metadata: Optional[Dict[str, Union[StrictBytes, StrictStr]]] = Field(default=None, description="\"custom key value list to be stored on the session\"") challenges: Optional[SessionServiceRequestChallenges] = None lifetime: Optional[StrictStr] = Field(default=None, description="\"duration (in seconds) after which the session will be automatically invalidated\"") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sessionToken", "checks", "metadata", "challenges", "lifetime"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of challenges if self.challenges: _dict['challenges'] = self.challenges.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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "challenges": SessionServiceRequestChallenges.from_dict(obj["challenges"]) if obj.get("challenges") is not None else None, "lifetime": obj.get("lifetime") }) + # 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/session_service_set_session_response.py b/zitadel_client/models/session_service_set_session_response.py index 32e2a013..daf2428c 100644 --- a/zitadel_client/models/session_service_set_session_response.py +++ b/zitadel_client/models/session_service_set_session_response.py @@ -31,6 +31,8 @@ class SessionServiceSetSessionResponse(BaseModel): details: Optional[SessionServiceDetails] = None session_token: Optional[StrictStr] = Field(default=None, description="\"The current token of the session, which is required for delete session, get session or the request of other resources.\"", alias="sessionToken") challenges: Optional[SessionServiceChallenges] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "sessionToken", "challenges"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of challenges if self.challenges: _dict['challenges'] = self.challenges.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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sessionToken": obj.get("sessionToken"), "challenges": SessionServiceChallenges.from_dict(obj["challenges"]) if obj.get("challenges") 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/session_service_totp_factor.py b/zitadel_client/models/session_service_totp_factor.py index 31fb72db..9b2eb3b1 100644 --- a/zitadel_client/models/session_service_totp_factor.py +++ b/zitadel_client/models/session_service_totp_factor.py @@ -28,6 +28,8 @@ class SessionServiceTOTPFactor(BaseModel): SessionServiceTOTPFactor """ # noqa: E501 verified_at: Optional[datetime] = Field(default=None, description="\"time when the Time-based One-Time Password was last checked\"", alias="verifiedAt") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verifiedAt"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verifiedAt": obj.get("verifiedAt") }) + # 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/session_service_user_agent.py b/zitadel_client/models/session_service_user_agent.py index d30cd1e9..ca72cce5 100644 --- a/zitadel_client/models/session_service_user_agent.py +++ b/zitadel_client/models/session_service_user_agent.py @@ -31,6 +31,8 @@ class SessionServiceUserAgent(BaseModel): ip: Optional[StrictStr] = None description: Optional[StrictStr] = None header: Optional[Dict[str, SessionServiceUserAgentHeaderValues]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fingerprintId", "ip", "description", "header"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -78,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: if self.header[_key_header]: _field_dict[_key_header] = self.header[_key_header].to_dict() _dict['header'] = _field_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 @@ -100,6 +109,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("header") 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/session_service_user_agent_header_values.py b/zitadel_client/models/session_service_user_agent_header_values.py index cf1b1660..ff1812a3 100644 --- a/zitadel_client/models/session_service_user_agent_header_values.py +++ b/zitadel_client/models/session_service_user_agent_header_values.py @@ -27,6 +27,8 @@ class SessionServiceUserAgentHeaderValues(BaseModel): A header may have multiple values. In Go, headers are defined as map[string][]string, but protobuf doesn't allow this scheme. """ # noqa: E501 values: Optional[List[StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["values"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "values": obj.get("values") }) + # 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/session_service_user_agent_query.py b/zitadel_client/models/session_service_user_agent_query.py index 7b3f8796..1a4d0fe1 100644 --- a/zitadel_client/models/session_service_user_agent_query.py +++ b/zitadel_client/models/session_service_user_agent_query.py @@ -28,6 +28,8 @@ class SessionServiceUserAgentQuery(BaseModel): SessionServiceUserAgentQuery """ # noqa: E501 fingerprint_id: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="Finger print id of the user agent used for the session. Set an empty fingerprint_id to use the user agent from the call. If the user agent is not available from the current token, an error will be returned.", alias="fingerprintId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["fingerprintId"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "fingerprintId": obj.get("fingerprintId") }) + # 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/session_service_user_factor.py b/zitadel_client/models/session_service_user_factor.py index 02ec4303..7fb56dd4 100644 --- a/zitadel_client/models/session_service_user_factor.py +++ b/zitadel_client/models/session_service_user_factor.py @@ -32,6 +32,8 @@ class SessionServiceUserFactor(BaseModel): login_name: Optional[StrictStr] = Field(default=None, description="\"login name of the checked user\"", alias="loginName") display_name: Optional[StrictStr] = Field(default=None, description="\"display name of the checked user\"", alias="displayName") organization_id: Optional[StrictStr] = Field(default=None, description="\"organization id of the checked user\"", alias="organizationId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verifiedAt", "id", "loginName", "displayName", "organizationId"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -90,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "displayName": obj.get("displayName"), "organizationId": obj.get("organizationId") }) + # 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/session_service_user_id_query.py b/zitadel_client/models/session_service_user_id_query.py index cafed3f4..db4fe79c 100644 --- a/zitadel_client/models/session_service_user_id_query.py +++ b/zitadel_client/models/session_service_user_id_query.py @@ -27,6 +27,8 @@ class SessionServiceUserIDQuery(BaseModel): SessionServiceUserIDQuery """ # noqa: E501 id: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id") }) + # 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/session_service_web_auth_n_factor.py b/zitadel_client/models/session_service_web_auth_n_factor.py index fddf779c..a6de1a5d 100644 --- a/zitadel_client/models/session_service_web_auth_n_factor.py +++ b/zitadel_client/models/session_service_web_auth_n_factor.py @@ -29,6 +29,8 @@ class SessionServiceWebAuthNFactor(BaseModel): """ # noqa: E501 verified_at: Optional[datetime] = Field(default=None, description="\"time when the passkey challenge was last checked\"", alias="verifiedAt") user_verified: Optional[StrictBool] = Field(default=None, alias="userVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verifiedAt", "userVerified"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "verifiedAt": obj.get("verifiedAt"), "userVerified": obj.get("userVerified") }) + # 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/settings_service_branding_settings.py b/zitadel_client/models/settings_service_branding_settings.py index 37e0f8d2..fa91c44f 100644 --- a/zitadel_client/models/settings_service_branding_settings.py +++ b/zitadel_client/models/settings_service_branding_settings.py @@ -36,6 +36,8 @@ class SettingsServiceBrandingSettings(BaseModel): disable_watermark: Optional[StrictBool] = Field(default=None, description="boolean to disable the watermark", alias="disableWatermark") resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") theme_mode: Optional[SettingsServiceThemeMode] = Field(default=SettingsServiceThemeMode.THEME_MODE_UNSPECIFIED, alias="themeMode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lightTheme", "darkTheme", "fontUrl", "hideLoginNameSuffix", "disableWatermark", "resourceOwnerType", "themeMode"] model_config = ConfigDict( populate_by_name=True, @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of dark_theme if self.dark_theme: _dict['darkTheme'] = self.dark_theme.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 @@ -102,6 +111,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, "themeMode": obj.get("themeMode") if obj.get("themeMode") is not None else SettingsServiceThemeMode.THEME_MODE_UNSPECIFIED }) + # 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/settings_service_details.py b/zitadel_client/models/settings_service_details.py index 933616c5..ce19309c 100644 --- a/zitadel_client/models/settings_service_details.py +++ b/zitadel_client/models/settings_service_details.py @@ -31,6 +31,8 @@ class SettingsServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/settings_service_domain_settings.py b/zitadel_client/models/settings_service_domain_settings.py index 23c62109..4862c822 100644 --- a/zitadel_client/models/settings_service_domain_settings.py +++ b/zitadel_client/models/settings_service_domain_settings.py @@ -31,6 +31,8 @@ class SettingsServiceDomainSettings(BaseModel): require_org_domain_verification: Optional[StrictBool] = Field(default=None, description="defines if organization domains should be verified upon creation, otherwise will be created already verified", alias="requireOrgDomainVerification") smtp_sender_address_matches_instance_domain: Optional[StrictBool] = Field(default=None, description="defines if the SMTP sender address domain should match an existing domain on the instance", alias="smtpSenderAddressMatchesInstanceDomain") resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["loginNameIncludesDomain", "requireOrgDomainVerification", "smtpSenderAddressMatchesInstanceDomain", "resourceOwnerType"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "smtpSenderAddressMatchesInstanceDomain": obj.get("smtpSenderAddressMatchesInstanceDomain"), "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED }) + # 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/settings_service_embedded_iframe_settings.py b/zitadel_client/models/settings_service_embedded_iframe_settings.py index d3bf8581..3287b46c 100644 --- a/zitadel_client/models/settings_service_embedded_iframe_settings.py +++ b/zitadel_client/models/settings_service_embedded_iframe_settings.py @@ -28,6 +28,8 @@ class SettingsServiceEmbeddedIframeSettings(BaseModel): """ # noqa: E501 enabled: Optional[StrictBool] = Field(default=None, description="states if iframe embedding is enabled or disabled") allowed_origins: Optional[List[StrictStr]] = Field(default=None, description="origins allowed loading ZITADEL in an iframe if enabled.", alias="allowedOrigins") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["enabled", "allowedOrigins"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "enabled": obj.get("enabled"), "allowedOrigins": obj.get("allowedOrigins") }) + # 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/settings_service_get_active_identity_providers_response.py b/zitadel_client/models/settings_service_get_active_identity_providers_response.py index 45f5266e..50a29e88 100644 --- a/zitadel_client/models/settings_service_get_active_identity_providers_response.py +++ b/zitadel_client/models/settings_service_get_active_identity_providers_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetActiveIdentityProvidersResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceListDetails] = None identity_providers: Optional[List[SettingsServiceIdentityProvider]] = Field(default=None, alias="identityProviders") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "identityProviders"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_identity_providers: _items.append(_item_identity_providers.to_dict()) _dict['identityProviders'] = _items + # 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "identityProviders": [SettingsServiceIdentityProvider.from_dict(_item) for _item in obj["identityProviders"]] if obj.get("identityProviders") 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/settings_service_get_branding_settings_response.py b/zitadel_client/models/settings_service_get_branding_settings_response.py index cdc2ca09..d9598933 100644 --- a/zitadel_client/models/settings_service_get_branding_settings_response.py +++ b/zitadel_client/models/settings_service_get_branding_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetBrandingSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceBrandingSettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServiceBrandingSettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_domain_settings_response.py b/zitadel_client/models/settings_service_get_domain_settings_response.py index 2d23981d..aef43f20 100644 --- a/zitadel_client/models/settings_service_get_domain_settings_response.py +++ b/zitadel_client/models/settings_service_get_domain_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetDomainSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceDomainSettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServiceDomainSettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_general_settings_response.py b/zitadel_client/models/settings_service_get_general_settings_response.py index 78c889d4..ab35337a 100644 --- a/zitadel_client/models/settings_service_get_general_settings_response.py +++ b/zitadel_client/models/settings_service_get_general_settings_response.py @@ -29,6 +29,8 @@ class SettingsServiceGetGeneralSettingsResponse(BaseModel): default_org_id: Optional[StrictStr] = Field(default=None, description="default organization for the current context", alias="defaultOrgId") default_language: Optional[StrictStr] = Field(default=None, description="default language for the current context", alias="defaultLanguage") supported_languages: Optional[List[StrictStr]] = Field(default=None, alias="supportedLanguages") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["defaultOrgId", "defaultLanguage", "supportedLanguages"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "defaultLanguage": obj.get("defaultLanguage"), "supportedLanguages": obj.get("supportedLanguages") }) + # 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/settings_service_get_legal_and_support_settings_response.py b/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py index 2bc1bfa3..3d333984 100644 --- a/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py +++ b/zitadel_client/models/settings_service_get_legal_and_support_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetLegalAndSupportSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceLegalAndSupportSettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServiceLegalAndSupportSettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_lockout_settings_response.py b/zitadel_client/models/settings_service_get_lockout_settings_response.py index 0d9d2d58..bb4cdc4c 100644 --- a/zitadel_client/models/settings_service_get_lockout_settings_response.py +++ b/zitadel_client/models/settings_service_get_lockout_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetLockoutSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceLockoutSettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServiceLockoutSettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_login_settings_response.py b/zitadel_client/models/settings_service_get_login_settings_response.py index 2376e8c6..1b3b4b19 100644 --- a/zitadel_client/models/settings_service_get_login_settings_response.py +++ b/zitadel_client/models/settings_service_get_login_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetLoginSettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceLoginSettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServiceLoginSettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_password_complexity_settings_response.py b/zitadel_client/models/settings_service_get_password_complexity_settings_response.py index 52df2fac..553002ff 100644 --- a/zitadel_client/models/settings_service_get_password_complexity_settings_response.py +++ b/zitadel_client/models/settings_service_get_password_complexity_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetPasswordComplexitySettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServicePasswordComplexitySettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServicePasswordComplexitySettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_password_expiry_settings_response.py b/zitadel_client/models/settings_service_get_password_expiry_settings_response.py index b495d235..2c4d953b 100644 --- a/zitadel_client/models/settings_service_get_password_expiry_settings_response.py +++ b/zitadel_client/models/settings_service_get_password_expiry_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetPasswordExpirySettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServicePasswordExpirySettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServicePasswordExpirySettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_get_security_settings_response.py b/zitadel_client/models/settings_service_get_security_settings_response.py index d7ceb3ef..4af51cb6 100644 --- a/zitadel_client/models/settings_service_get_security_settings_response.py +++ b/zitadel_client/models/settings_service_get_security_settings_response.py @@ -30,6 +30,8 @@ class SettingsServiceGetSecuritySettingsResponse(BaseModel): """ # noqa: E501 details: Optional[SettingsServiceDetails] = None settings: Optional[SettingsServiceSecuritySettings] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "settings"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of settings if self.settings: _dict['settings'] = self.settings.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "settings": SettingsServiceSecuritySettings.from_dict(obj["settings"]) if obj.get("settings") 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/settings_service_identity_provider.py b/zitadel_client/models/settings_service_identity_provider.py index 06609aee..15f4db88 100644 --- a/zitadel_client/models/settings_service_identity_provider.py +++ b/zitadel_client/models/settings_service_identity_provider.py @@ -32,6 +32,8 @@ class SettingsServiceIdentityProvider(BaseModel): name: Optional[StrictStr] = None type: Optional[SettingsServiceIdentityProviderType] = SettingsServiceIdentityProviderType.IDENTITY_PROVIDER_TYPE_UNSPECIFIED options: Optional[SettingsServiceOptions] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name", "type", "options"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of options if self.options: _dict['options'] = self.options.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 @@ -92,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "type": obj.get("type") if obj.get("type") is not None else SettingsServiceIdentityProviderType.IDENTITY_PROVIDER_TYPE_UNSPECIFIED, "options": SettingsServiceOptions.from_dict(obj["options"]) if obj.get("options") 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/settings_service_legal_and_support_settings.py b/zitadel_client/models/settings_service_legal_and_support_settings.py index 566b1493..ee0163fa 100644 --- a/zitadel_client/models/settings_service_legal_and_support_settings.py +++ b/zitadel_client/models/settings_service_legal_and_support_settings.py @@ -35,6 +35,8 @@ class SettingsServiceLegalAndSupportSettings(BaseModel): docs_link: Optional[StrictStr] = Field(default=None, description="Link to documentation to be shown in the console.", alias="docsLink") custom_link: Optional[StrictStr] = Field(default=None, description="Link to an external resource that will be available to users in the console.", alias="customLink") custom_link_text: Optional[StrictStr] = Field(default=None, description="The button text that would be shown in console pointing to custom link.", alias="customLinkText") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["tosLink", "privacyPolicyLink", "helpLink", "supportEmail", "resourceOwnerType", "docsLink", "customLink", "customLinkText"] model_config = ConfigDict( populate_by_name=True, @@ -66,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -96,6 +105,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "customLink": obj.get("customLink"), "customLinkText": obj.get("customLinkText") }) + # 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/settings_service_list_details.py b/zitadel_client/models/settings_service_list_details.py index 467697fb..54d37c2e 100644 --- a/zitadel_client/models/settings_service_list_details.py +++ b/zitadel_client/models/settings_service_list_details.py @@ -30,6 +30,8 @@ class SettingsServiceListDetails(BaseModel): total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "processedSequence": obj.get("processedSequence"), "timestamp": obj.get("timestamp") }) + # 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/settings_service_lockout_settings.py b/zitadel_client/models/settings_service_lockout_settings.py index 85be74f6..803d0664 100644 --- a/zitadel_client/models/settings_service_lockout_settings.py +++ b/zitadel_client/models/settings_service_lockout_settings.py @@ -30,6 +30,8 @@ class SettingsServiceLockoutSettings(BaseModel): max_password_attempts: Optional[StrictStr] = Field(default=None, description="Maximum password check attempts before the account gets locked. Attempts are reset as soon as the password is entered correctly or the password is reset. If set to 0 the account will never be locked.", alias="maxPasswordAttempts") resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") max_otp_attempts: Optional[StrictStr] = Field(default=None, description="Maximum failed attempts for a single OTP type (TOTP, SMS, Email) before the account gets locked. Attempts are reset as soon as the OTP is entered correctly. If set to 0 the account will never be locked.", alias="maxOtpAttempts") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["maxPasswordAttempts", "resourceOwnerType", "maxOtpAttempts"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, "maxOtpAttempts": obj.get("maxOtpAttempts") }) + # 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/settings_service_login_settings.py b/zitadel_client/models/settings_service_login_settings.py index 66208aa0..635a128d 100644 --- a/zitadel_client/models/settings_service_login_settings.py +++ b/zitadel_client/models/settings_service_login_settings.py @@ -50,6 +50,8 @@ class SettingsServiceLoginSettings(BaseModel): disable_login_with_phone: Optional[StrictBool] = Field(default=None, description="defines if the user can additionally (to the login name) be identified by their verified phone number", alias="disableLoginWithPhone") resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") force_mfa_local_only: Optional[StrictBool] = Field(default=None, description="if activated, only local authenticated users are forced to use MFA. Authentication through IDPs won't prompt a MFA step in the login.", alias="forceMfaLocalOnly") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["allowUsernamePassword", "allowRegister", "allowExternalIdp", "forceMfa", "passkeysType", "hidePasswordReset", "ignoreUnknownUsernames", "defaultRedirectUri", "passwordCheckLifetime", "externalLoginCheckLifetime", "mfaInitSkipLifetime", "secondFactorCheckLifetime", "multiFactorCheckLifetime", "secondFactors", "multiFactors", "allowDomainDiscovery", "disableLoginWithEmail", "disableLoginWithPhone", "resourceOwnerType", "forceMfaLocalOnly"] model_config = ConfigDict( populate_by_name=True, @@ -81,8 +83,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -90,6 +94,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -123,6 +132,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, "forceMfaLocalOnly": obj.get("forceMfaLocalOnly") }) + # 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/settings_service_options.py b/zitadel_client/models/settings_service_options.py index 7ac77c08..5230dd99 100644 --- a/zitadel_client/models/settings_service_options.py +++ b/zitadel_client/models/settings_service_options.py @@ -32,6 +32,8 @@ class SettingsServiceOptions(BaseModel): is_auto_creation: Optional[StrictBool] = Field(default=None, description="Enable if a new account in ZITADEL should be created automatically when login with an external account.", alias="isAutoCreation") is_auto_update: Optional[StrictBool] = Field(default=None, description="Enable if a the ZITADEL account fields should be updated automatically on each login.", alias="isAutoUpdate") auto_linking: Optional[SettingsServiceAutoLinkingOption] = Field(default=SettingsServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED, alias="autoLinking") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["isLinkingAllowed", "isCreationAllowed", "isAutoCreation", "isAutoUpdate", "autoLinking"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -90,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "isAutoUpdate": obj.get("isAutoUpdate"), "autoLinking": obj.get("autoLinking") if obj.get("autoLinking") is not None else SettingsServiceAutoLinkingOption.AUTO_LINKING_OPTION_UNSPECIFIED }) + # 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/settings_service_password_complexity_settings.py b/zitadel_client/models/settings_service_password_complexity_settings.py index de6ecb90..99a5f6cd 100644 --- a/zitadel_client/models/settings_service_password_complexity_settings.py +++ b/zitadel_client/models/settings_service_password_complexity_settings.py @@ -33,6 +33,8 @@ class SettingsServicePasswordComplexitySettings(BaseModel): requires_number: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain a number", alias="requiresNumber") requires_symbol: Optional[StrictBool] = Field(default=None, description="defines if the password MUST contain a symbol. E.g. \"$\"", alias="requiresSymbol") resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["minLength", "requiresUppercase", "requiresLowercase", "requiresNumber", "requiresSymbol", "resourceOwnerType"] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -92,6 +101,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "requiresSymbol": obj.get("requiresSymbol"), "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED }) + # 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/settings_service_password_expiry_settings.py b/zitadel_client/models/settings_service_password_expiry_settings.py index 1c20a8eb..17ae17cd 100644 --- a/zitadel_client/models/settings_service_password_expiry_settings.py +++ b/zitadel_client/models/settings_service_password_expiry_settings.py @@ -30,6 +30,8 @@ class SettingsServicePasswordExpirySettings(BaseModel): max_age_days: Optional[StrictStr] = Field(default=None, description="Amount of days after which a password will expire. The user will be forced to change the password on the following authentication.", alias="maxAgeDays") expire_warn_days: Optional[StrictStr] = Field(default=None, description="Amount of days after which the user should be notified of the upcoming expiry. ZITADEL will not notify the user.", alias="expireWarnDays") resource_owner_type: Optional[SettingsServiceResourceOwnerType] = Field(default=SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED, alias="resourceOwnerType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["maxAgeDays", "expireWarnDays", "resourceOwnerType"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "expireWarnDays": obj.get("expireWarnDays"), "resourceOwnerType": obj.get("resourceOwnerType") if obj.get("resourceOwnerType") is not None else SettingsServiceResourceOwnerType.RESOURCE_OWNER_TYPE_UNSPECIFIED }) + # 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/settings_service_protobuf_any.py b/zitadel_client/models/settings_service_protobuf_any.py index 1a5eca25..f4644a29 100644 --- a/zitadel_client/models/settings_service_protobuf_any.py +++ b/zitadel_client/models/settings_service_protobuf_any.py @@ -27,6 +27,8 @@ class SettingsServiceProtobufAny(BaseModel): SettingsServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/settings_service_rpc_status.py b/zitadel_client/models/settings_service_rpc_status.py index 4c028548..aad35140 100644 --- a/zitadel_client/models/settings_service_rpc_status.py +++ b/zitadel_client/models/settings_service_rpc_status.py @@ -30,6 +30,8 @@ class SettingsServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[SettingsServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [SettingsServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/settings_service_security_settings.py b/zitadel_client/models/settings_service_security_settings.py index c6130792..0ed0326c 100644 --- a/zitadel_client/models/settings_service_security_settings.py +++ b/zitadel_client/models/settings_service_security_settings.py @@ -29,6 +29,8 @@ class SettingsServiceSecuritySettings(BaseModel): """ # noqa: E501 embedded_iframe: Optional[SettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") enable_impersonation: Optional[StrictBool] = Field(default=None, description="default language for the current context", alias="enableImpersonation") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["embeddedIframe", "enableImpersonation"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of embedded_iframe if self.embedded_iframe: _dict['embeddedIframe'] = self.embedded_iframe.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "embeddedIframe": SettingsServiceEmbeddedIframeSettings.from_dict(obj["embeddedIframe"]) if obj.get("embeddedIframe") is not None else None, "enableImpersonation": obj.get("enableImpersonation") }) + # 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/settings_service_set_security_settings_request.py b/zitadel_client/models/settings_service_set_security_settings_request.py index 130431ff..4737af03 100644 --- a/zitadel_client/models/settings_service_set_security_settings_request.py +++ b/zitadel_client/models/settings_service_set_security_settings_request.py @@ -29,6 +29,8 @@ class SettingsServiceSetSecuritySettingsRequest(BaseModel): """ # noqa: E501 embedded_iframe: Optional[SettingsServiceEmbeddedIframeSettings] = Field(default=None, alias="embeddedIframe") enable_impersonation: Optional[StrictBool] = Field(default=None, description="allows users to impersonate other users. The impersonator needs the appropriate `*_IMPERSONATOR` roles assigned as well", alias="enableImpersonation") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["embeddedIframe", "enableImpersonation"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of embedded_iframe if self.embedded_iframe: _dict['embeddedIframe'] = self.embedded_iframe.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "embeddedIframe": SettingsServiceEmbeddedIframeSettings.from_dict(obj["embeddedIframe"]) if obj.get("embeddedIframe") is not None else None, "enableImpersonation": obj.get("enableImpersonation") }) + # 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/settings_service_set_security_settings_response.py b/zitadel_client/models/settings_service_set_security_settings_response.py index 2d554420..3285b9f3 100644 --- a/zitadel_client/models/settings_service_set_security_settings_response.py +++ b/zitadel_client/models/settings_service_set_security_settings_response.py @@ -28,6 +28,8 @@ class SettingsServiceSetSecuritySettingsResponse(BaseModel): SettingsServiceSetSecuritySettingsResponse """ # noqa: E501 details: Optional[SettingsServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": SettingsServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/settings_service_theme.py b/zitadel_client/models/settings_service_theme.py index af0bb065..2124e9a0 100644 --- a/zitadel_client/models/settings_service_theme.py +++ b/zitadel_client/models/settings_service_theme.py @@ -32,6 +32,8 @@ class SettingsServiceTheme(BaseModel): font_color: Optional[StrictStr] = Field(default=None, description="hex value for font color", alias="fontColor") logo_url: Optional[StrictStr] = Field(default=None, description="url to the logo", alias="logoUrl") icon_url: Optional[StrictStr] = Field(default=None, description="url to the icon", alias="iconUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["primaryColor", "backgroundColor", "warnColor", "fontColor", "logoUrl", "iconUrl"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "logoUrl": obj.get("logoUrl"), "iconUrl": obj.get("iconUrl") }) + # 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/user_service_add_human_user_request.py b/zitadel_client/models/user_service_add_human_user_request.py index 6aa22857..dcdf249d 100644 --- a/zitadel_client/models/user_service_add_human_user_request.py +++ b/zitadel_client/models/user_service_add_human_user_request.py @@ -46,6 +46,8 @@ class UserServiceAddHumanUserRequest(BaseModel): hashed_password: Optional[UserServiceHashedPassword] = Field(default=None, alias="hashedPassword") idp_links: Optional[List[UserServiceIDPLink]] = Field(default=None, alias="idpLinks") totp_secret: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds. Currently no other options are supported, and if anything different is used the validation will fail.", alias="totpSecret") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -77,8 +79,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -86,6 +90,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -98,18 +107,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), - "username": obj.get("username"), - "organization": UserServiceOrganization.from_dict(obj["organization"]) if obj.get("organization") is not None else None, - "profile": UserServiceSetHumanProfile.from_dict(obj["profile"]) if obj.get("profile") is not None else None, - "email": UserServiceSetHumanEmail.from_dict(obj["email"]) if obj.get("email") is not None else None, - "phone": UserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, - "metadata": [UserServiceSetMetadataEntry.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None, - "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, - "hashedPassword": UserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, - "idpLinks": [UserServiceIDPLink.from_dict(_item) for _item in obj["idpLinks"]] if obj.get("idpLinks") is not None else None, - "totpSecret": obj.get("totpSecret") }) + # 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/user_service_add_human_user_response.py b/zitadel_client/models/user_service_add_human_user_response.py index 3b4ceaf2..03b88d4a 100644 --- a/zitadel_client/models/user_service_add_human_user_response.py +++ b/zitadel_client/models/user_service_add_human_user_response.py @@ -31,6 +31,8 @@ class UserServiceAddHumanUserResponse(BaseModel): details: Optional[UserServiceDetails] = None email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userId", "details", "emailCode", "phoneCode"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "emailCode": obj.get("emailCode"), "phoneCode": obj.get("phoneCode") }) + # 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/user_service_add_idp_link_request.py b/zitadel_client/models/user_service_add_idp_link_request.py index 28af233b..6220a24e 100644 --- a/zitadel_client/models/user_service_add_idp_link_request.py +++ b/zitadel_client/models/user_service_add_idp_link_request.py @@ -28,6 +28,8 @@ class UserServiceAddIDPLinkRequest(BaseModel): UserServiceAddIDPLinkRequest """ # noqa: E501 idp_link: Optional[UserServiceIDPLink] = Field(default=None, alias="idpLink") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idpLink"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of idp_link if self.idp_link: _dict['idpLink'] = self.idp_link.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "idpLink": UserServiceIDPLink.from_dict(obj["idpLink"]) if obj.get("idpLink") 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/user_service_add_idp_link_response.py b/zitadel_client/models/user_service_add_idp_link_response.py index a1c22621..0fde9e94 100644 --- a/zitadel_client/models/user_service_add_idp_link_response.py +++ b/zitadel_client/models/user_service_add_idp_link_response.py @@ -28,6 +28,8 @@ class UserServiceAddIDPLinkResponse(BaseModel): UserServiceAddIDPLinkResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_add_otp_email_response.py b/zitadel_client/models/user_service_add_otp_email_response.py index f813e928..dfb92464 100644 --- a/zitadel_client/models/user_service_add_otp_email_response.py +++ b/zitadel_client/models/user_service_add_otp_email_response.py @@ -28,6 +28,8 @@ class UserServiceAddOTPEmailResponse(BaseModel): UserServiceAddOTPEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_add_otpsms_response.py b/zitadel_client/models/user_service_add_otpsms_response.py index 94885a9f..5b26d67c 100644 --- a/zitadel_client/models/user_service_add_otpsms_response.py +++ b/zitadel_client/models/user_service_add_otpsms_response.py @@ -28,6 +28,8 @@ class UserServiceAddOTPSMSResponse(BaseModel): UserServiceAddOTPSMSResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_and_query.py b/zitadel_client/models/user_service_and_query.py index a9d4a58b..76b3b055 100644 --- a/zitadel_client/models/user_service_and_query.py +++ b/zitadel_client/models/user_service_and_query.py @@ -27,6 +27,8 @@ class UserServiceAndQuery(BaseModel): Connect multiple sub-condition with and AND operator. """ # noqa: E501 queries: Optional[List[UserServiceSearchQuery]] = Field(default=None, description="the sub queries to 'AND'") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_queries: _items.append(_item_queries.to_dict()) _dict['queries'] = _items + # 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "queries": [UserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") 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 from zitadel_client.models.user_service_search_query import UserServiceSearchQuery diff --git a/zitadel_client/models/user_service_auth_factor.py b/zitadel_client/models/user_service_auth_factor.py index 224880aa..a725f22e 100644 --- a/zitadel_client/models/user_service_auth_factor.py +++ b/zitadel_client/models/user_service_auth_factor.py @@ -33,6 +33,8 @@ class UserServiceAuthFactor(BaseModel): u2f: Optional[UserServiceAuthFactorU2F] = None otp_sms: Optional[Dict[str, Any]] = Field(default=None, alias="otpSms") otp_email: Optional[Dict[str, Any]] = Field(default=None, alias="otpEmail") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,12 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "state": obj.get("state") if obj.get("state") is not None else UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED, - "otp": obj.get("otp"), - "u2f": UserServiceAuthFactorU2F.from_dict(obj["u2f"]) if obj.get("u2f") is not None else None, - "otpSms": obj.get("otpSms"), - "otpEmail": obj.get("otpEmail") }) + # 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/user_service_auth_factor_u2_f.py b/zitadel_client/models/user_service_auth_factor_u2_f.py index ae99c449..72d4ab9b 100644 --- a/zitadel_client/models/user_service_auth_factor_u2_f.py +++ b/zitadel_client/models/user_service_auth_factor_u2_f.py @@ -28,6 +28,8 @@ class UserServiceAuthFactorU2F(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = None name: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "name"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "name": obj.get("name") }) + # 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/user_service_create_invite_code_request.py b/zitadel_client/models/user_service_create_invite_code_request.py index 6281598b..adf8b494 100644 --- a/zitadel_client/models/user_service_create_invite_code_request.py +++ b/zitadel_client/models/user_service_create_invite_code_request.py @@ -29,6 +29,8 @@ class UserServiceCreateInviteCodeRequest(BaseModel): """ # noqa: E501 send_code: Optional[UserServiceSendInviteCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": UserServiceSendInviteCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") }) + # 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/user_service_create_invite_code_response.py b/zitadel_client/models/user_service_create_invite_code_response.py index 31bbd97f..08c9ad82 100644 --- a/zitadel_client/models/user_service_create_invite_code_response.py +++ b/zitadel_client/models/user_service_create_invite_code_response.py @@ -29,6 +29,8 @@ class UserServiceCreateInviteCodeResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None invite_code: Optional[StrictStr] = Field(default=None, description="The invite code is returned if the verification was set to return_code.", alias="inviteCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "inviteCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "inviteCode": obj.get("inviteCode") }) + # 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/user_service_create_passkey_registration_link_request.py b/zitadel_client/models/user_service_create_passkey_registration_link_request.py index c25c3bed..c122ca0c 100644 --- a/zitadel_client/models/user_service_create_passkey_registration_link_request.py +++ b/zitadel_client/models/user_service_create_passkey_registration_link_request.py @@ -29,6 +29,8 @@ class UserServiceCreatePasskeyRegistrationLinkRequest(BaseModel): """ # noqa: E501 send_link: Optional[UserServiceSendPasskeyRegistrationLink] = Field(default=None, alias="sendLink") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendLink": UserServiceSendPasskeyRegistrationLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None, - "returnCode": obj.get("returnCode") }) + # 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/user_service_create_passkey_registration_link_response.py b/zitadel_client/models/user_service_create_passkey_registration_link_response.py index 602e88cf..d278081f 100644 --- a/zitadel_client/models/user_service_create_passkey_registration_link_response.py +++ b/zitadel_client/models/user_service_create_passkey_registration_link_response.py @@ -30,6 +30,8 @@ class UserServiceCreatePasskeyRegistrationLinkResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None code: Optional[UserServicePasskeyRegistrationCode] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "code"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of code if self.code: _dict['code'] = self.code.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "code": UserServicePasskeyRegistrationCode.from_dict(obj["code"]) if obj.get("code") 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/user_service_deactivate_user_response.py b/zitadel_client/models/user_service_deactivate_user_response.py index ff9753f1..9cf52adb 100644 --- a/zitadel_client/models/user_service_deactivate_user_response.py +++ b/zitadel_client/models/user_service_deactivate_user_response.py @@ -28,6 +28,8 @@ class UserServiceDeactivateUserResponse(BaseModel): UserServiceDeactivateUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_delete_user_response.py b/zitadel_client/models/user_service_delete_user_response.py index 0b47a2ab..850c1437 100644 --- a/zitadel_client/models/user_service_delete_user_response.py +++ b/zitadel_client/models/user_service_delete_user_response.py @@ -28,6 +28,8 @@ class UserServiceDeleteUserResponse(BaseModel): UserServiceDeleteUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_details.py b/zitadel_client/models/user_service_details.py index d72de17f..da6f3db7 100644 --- a/zitadel_client/models/user_service_details.py +++ b/zitadel_client/models/user_service_details.py @@ -31,6 +31,8 @@ class UserServiceDetails(BaseModel): change_date: Optional[datetime] = Field(default=None, description="on read: the timestamp of the last event reduced by the projection on manipulation: the timestamp of the event(s) added by the manipulation", alias="changeDate") resource_owner: Optional[StrictStr] = Field(default=None, alias="resourceOwner") creation_date: Optional[datetime] = Field(default=None, alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["sequence", "changeDate", "resourceOwner", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "resourceOwner": obj.get("resourceOwner"), "creationDate": obj.get("creationDate") }) + # 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/user_service_display_name_query.py b/zitadel_client/models/user_service_display_name_query.py index 7f86be71..25790c5a 100644 --- a/zitadel_client/models/user_service_display_name_query.py +++ b/zitadel_client/models/user_service_display_name_query.py @@ -30,6 +30,8 @@ class UserServiceDisplayNameQuery(BaseModel): """ # noqa: E501 display_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="displayName") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["displayName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "displayName": obj.get("displayName"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_email_query.py b/zitadel_client/models/user_service_email_query.py index 19e8f410..98c51a40 100644 --- a/zitadel_client/models/user_service_email_query.py +++ b/zitadel_client/models/user_service_email_query.py @@ -30,6 +30,8 @@ class UserServiceEmailQuery(BaseModel): """ # noqa: E501 email_address: Annotated[str, Field(strict=True, max_length=200)] = Field(description="email address of the user", alias="emailAddress") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["emailAddress", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "emailAddress": obj.get("emailAddress"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_first_name_query.py b/zitadel_client/models/user_service_first_name_query.py index bcec901b..554255a7 100644 --- a/zitadel_client/models/user_service_first_name_query.py +++ b/zitadel_client/models/user_service_first_name_query.py @@ -30,6 +30,8 @@ class UserServiceFirstNameQuery(BaseModel): """ # noqa: E501 first_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="firstName") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["firstName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "firstName": obj.get("firstName"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_get_user_by_id_response.py b/zitadel_client/models/user_service_get_user_by_id_response.py index b7583988..efb0d212 100644 --- a/zitadel_client/models/user_service_get_user_by_id_response.py +++ b/zitadel_client/models/user_service_get_user_by_id_response.py @@ -30,6 +30,8 @@ class UserServiceGetUserByIDResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None user: Optional[UserServiceUser] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "user"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of user if self.user: _dict['user'] = self.user.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 @@ -91,6 +100,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "user": UserServiceUser.from_dict(obj["user"]) if obj.get("user") 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/user_service_hashed_password.py b/zitadel_client/models/user_service_hashed_password.py index dceead31..24fc1c7a 100644 --- a/zitadel_client/models/user_service_hashed_password.py +++ b/zitadel_client/models/user_service_hashed_password.py @@ -29,6 +29,8 @@ class UserServiceHashedPassword(BaseModel): """ # noqa: E501 hash: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(description="\"Encoded hash of a password in Modular Crypt Format: https://zitadel.com/docs/concepts/architecture/secrets#hashed-secrets\"") change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["hash", "changeRequired"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "hash": obj.get("hash"), "changeRequired": obj.get("changeRequired") }) + # 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/user_service_human_email.py b/zitadel_client/models/user_service_human_email.py index 1ab98c08..18fdc357 100644 --- a/zitadel_client/models/user_service_human_email.py +++ b/zitadel_client/models/user_service_human_email.py @@ -29,6 +29,8 @@ class UserServiceHumanEmail(BaseModel): """ # noqa: E501 email: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["email", "isVerified"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "email": obj.get("email"), "isVerified": obj.get("isVerified") }) + # 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/user_service_human_mfa_init_skipped_response.py b/zitadel_client/models/user_service_human_mfa_init_skipped_response.py index 843e9a68..ed2f6629 100644 --- a/zitadel_client/models/user_service_human_mfa_init_skipped_response.py +++ b/zitadel_client/models/user_service_human_mfa_init_skipped_response.py @@ -28,6 +28,8 @@ class UserServiceHumanMFAInitSkippedResponse(BaseModel): UserServiceHumanMFAInitSkippedResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_human_phone.py b/zitadel_client/models/user_service_human_phone.py index e17bf8cf..91f05b45 100644 --- a/zitadel_client/models/user_service_human_phone.py +++ b/zitadel_client/models/user_service_human_phone.py @@ -29,6 +29,8 @@ class UserServiceHumanPhone(BaseModel): """ # noqa: E501 phone: Optional[Annotated[str, Field(strict=True, max_length=200)]] = None is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["phone", "isVerified"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "phone": obj.get("phone"), "isVerified": obj.get("isVerified") }) + # 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/user_service_human_profile.py b/zitadel_client/models/user_service_human_profile.py index 925f00de..60ccc2a6 100644 --- a/zitadel_client/models/user_service_human_profile.py +++ b/zitadel_client/models/user_service_human_profile.py @@ -35,6 +35,8 @@ class UserServiceHumanProfile(BaseModel): preferred_language: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, alias="preferredLanguage") gender: Optional[UserServiceGender] = UserServiceGender.GENDER_UNSPECIFIED avatar_url: Optional[StrictStr] = Field(default=None, description="avatar URL of the user", alias="avatarUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender", "avatarUrl"] model_config = ConfigDict( populate_by_name=True, @@ -66,8 +68,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "gender": obj.get("gender") if obj.get("gender") is not None else UserServiceGender.GENDER_UNSPECIFIED, "avatarUrl": obj.get("avatarUrl") }) + # 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/user_service_human_user.py b/zitadel_client/models/user_service_human_user.py index 7493564e..e18e9071 100644 --- a/zitadel_client/models/user_service_human_user.py +++ b/zitadel_client/models/user_service_human_user.py @@ -42,6 +42,8 @@ class UserServiceHumanUser(BaseModel): password_change_required: Optional[StrictBool] = Field(default=None, description="User is required to change the used password on the next login.", alias="passwordChangeRequired") password_changed: Optional[datetime] = Field(default=None, description="The time the user last changed their password.", alias="passwordChanged") mfa_init_skipped: Optional[datetime] = Field(default=None, description="The time the user last skipped MFA initialization.", alias="mfaInitSkipped") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userId", "state", "username", "loginNames", "preferredLoginName", "profile", "email", "phone", "passwordChangeRequired", "passwordChanged", "mfaInitSkipped"] model_config = ConfigDict( populate_by_name=True, @@ -73,8 +75,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -91,6 +95,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of phone if self.phone: _dict['phone'] = self.phone.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 @@ -115,6 +124,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "passwordChanged": obj.get("passwordChanged"), "mfaInitSkipped": obj.get("mfaInitSkipped") }) + # 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/user_service_idp_information.py b/zitadel_client/models/user_service_idp_information.py index 9eae7d52..7babb4e3 100644 --- a/zitadel_client/models/user_service_idp_information.py +++ b/zitadel_client/models/user_service_idp_information.py @@ -36,6 +36,8 @@ class UserServiceIDPInformation(BaseModel): user_id: Optional[StrictStr] = Field(default=None, description="ID of the user of the identity provider", alias="userId") user_name: Optional[StrictStr] = Field(default=None, description="username of the user of the identity provider", alias="userName") raw_information: Optional[Dict[str, Any]] = Field(default=None, description="complete information returned by the identity provider", alias="rawInformation") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,14 +97,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "oauth": UserServiceIDPOAuthAccessInformation.from_dict(obj["oauth"]) if obj.get("oauth") is not None else None, - "ldap": UserServiceIDPLDAPAccessInformation.from_dict(obj["ldap"]) if obj.get("ldap") is not None else None, - "saml": UserServiceIDPSAMLAccessInformation.from_dict(obj["saml"]) if obj.get("saml") is not None else None, - "idpId": obj.get("idpId"), - "userId": obj.get("userId"), - "userName": obj.get("userName"), - "rawInformation": obj.get("rawInformation") }) + # 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/user_service_idp_intent.py b/zitadel_client/models/user_service_idp_intent.py index 399da171..79d7c80c 100644 --- a/zitadel_client/models/user_service_idp_intent.py +++ b/zitadel_client/models/user_service_idp_intent.py @@ -30,6 +30,8 @@ class UserServiceIDPIntent(BaseModel): idp_intent_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the IDP intent", alias="idpIntentId") idp_intent_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="token of the IDP intent", alias="idpIntentToken") user_id: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, description="ID of the ZITADEL user if external user already linked", alias="userId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idpIntentId", "idpIntentToken", "userId"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "idpIntentToken": obj.get("idpIntentToken"), "userId": obj.get("userId") }) + # 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/user_service_idp_link.py b/zitadel_client/models/user_service_idp_link.py index ec8ab841..a01a1d53 100644 --- a/zitadel_client/models/user_service_idp_link.py +++ b/zitadel_client/models/user_service_idp_link.py @@ -30,6 +30,8 @@ class UserServiceIDPLink(BaseModel): idp_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the identity provider", alias="idpId") user_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID of the user of the identity provider", alias="userId") user_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="username of the user of the identity provider", alias="userName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idpId", "userId", "userName"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userId": obj.get("userId"), "userName": obj.get("userName") }) + # 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/user_service_idpldap_access_information.py b/zitadel_client/models/user_service_idpldap_access_information.py index 1c938e3c..b57c04ba 100644 --- a/zitadel_client/models/user_service_idpldap_access_information.py +++ b/zitadel_client/models/user_service_idpldap_access_information.py @@ -27,6 +27,8 @@ class UserServiceIDPLDAPAccessInformation(BaseModel): UserServiceIDPLDAPAccessInformation """ # noqa: E501 attributes: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["attributes"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "attributes": obj.get("attributes") }) + # 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/user_service_idpo_auth_access_information.py b/zitadel_client/models/user_service_idpo_auth_access_information.py index d92af674..544b740b 100644 --- a/zitadel_client/models/user_service_idpo_auth_access_information.py +++ b/zitadel_client/models/user_service_idpo_auth_access_information.py @@ -28,6 +28,8 @@ class UserServiceIDPOAuthAccessInformation(BaseModel): """ # noqa: E501 access_token: Optional[StrictStr] = Field(default=None, alias="accessToken") id_token: Optional[StrictStr] = Field(default=None, alias="idToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["accessToken", "idToken"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,6 +92,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "accessToken": obj.get("accessToken"), "idToken": obj.get("idToken") }) + # 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/user_service_idpsaml_access_information.py b/zitadel_client/models/user_service_idpsaml_access_information.py index 05faaf8f..ce5e6d20 100644 --- a/zitadel_client/models/user_service_idpsaml_access_information.py +++ b/zitadel_client/models/user_service_idpsaml_access_information.py @@ -27,6 +27,8 @@ class UserServiceIDPSAMLAccessInformation(BaseModel): UserServiceIDPSAMLAccessInformation """ # noqa: E501 assertion: Optional[Union[StrictBytes, StrictStr]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["assertion"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "assertion": obj.get("assertion") }) + # 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/user_service_in_user_emails_query.py b/zitadel_client/models/user_service_in_user_emails_query.py index 939e6547..af969897 100644 --- a/zitadel_client/models/user_service_in_user_emails_query.py +++ b/zitadel_client/models/user_service_in_user_emails_query.py @@ -27,6 +27,8 @@ class UserServiceInUserEmailsQuery(BaseModel): Query for users with email in list of emails. """ # noqa: E501 user_emails: Optional[List[StrictStr]] = Field(default=None, description="the emails of the users to include", alias="userEmails") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userEmails"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userEmails": obj.get("userEmails") }) + # 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/user_service_in_user_id_query.py b/zitadel_client/models/user_service_in_user_id_query.py index 0f61c5f6..bb81b7d8 100644 --- a/zitadel_client/models/user_service_in_user_id_query.py +++ b/zitadel_client/models/user_service_in_user_id_query.py @@ -27,6 +27,8 @@ class UserServiceInUserIDQuery(BaseModel): Query for users with ID in list of IDs. """ # noqa: E501 user_ids: Optional[List[StrictStr]] = Field(default=None, description="the ids of the users to include", alias="userIds") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userIds"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "userIds": obj.get("userIds") }) + # 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/user_service_last_name_query.py b/zitadel_client/models/user_service_last_name_query.py index 132c0d21..ddab39c0 100644 --- a/zitadel_client/models/user_service_last_name_query.py +++ b/zitadel_client/models/user_service_last_name_query.py @@ -30,6 +30,8 @@ class UserServiceLastNameQuery(BaseModel): """ # noqa: E501 last_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="lastName") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["lastName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "lastName": obj.get("lastName"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_ldap_credentials.py b/zitadel_client/models/user_service_ldap_credentials.py index c72633ca..c33e179d 100644 --- a/zitadel_client/models/user_service_ldap_credentials.py +++ b/zitadel_client/models/user_service_ldap_credentials.py @@ -29,6 +29,8 @@ class UserServiceLDAPCredentials(BaseModel): """ # noqa: E501 username: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Username used to login through LDAP") password: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Password used to login through LDAP") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "password"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "username": obj.get("username"), "password": obj.get("password") }) + # 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/user_service_list_authentication_factors_response.py b/zitadel_client/models/user_service_list_authentication_factors_response.py index d4eaa298..7b30af8d 100644 --- a/zitadel_client/models/user_service_list_authentication_factors_response.py +++ b/zitadel_client/models/user_service_list_authentication_factors_response.py @@ -28,6 +28,8 @@ class UserServiceListAuthenticationFactorsResponse(BaseModel): UserServiceListAuthenticationFactorsResponse """ # noqa: E501 result: Optional[List[UserServiceAuthFactor]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["result"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "result": [UserServiceAuthFactor.from_dict(_item) for _item in obj["result"]] if obj.get("result") 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/user_service_list_authentication_method_types_response.py b/zitadel_client/models/user_service_list_authentication_method_types_response.py index 99129a1a..0ec96b0e 100644 --- a/zitadel_client/models/user_service_list_authentication_method_types_response.py +++ b/zitadel_client/models/user_service_list_authentication_method_types_response.py @@ -30,6 +30,8 @@ class UserServiceListAuthenticationMethodTypesResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceListDetails] = None auth_method_types: Optional[List[UserServiceAuthenticationMethodType]] = Field(default=None, alias="authMethodTypes") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "authMethodTypes"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "authMethodTypes": obj.get("authMethodTypes") }) + # 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/user_service_list_details.py b/zitadel_client/models/user_service_list_details.py index a84374f9..ce13566f 100644 --- a/zitadel_client/models/user_service_list_details.py +++ b/zitadel_client/models/user_service_list_details.py @@ -30,6 +30,8 @@ class UserServiceListDetails(BaseModel): total_result: Optional[StrictStr] = Field(default=None, alias="totalResult") processed_sequence: Optional[StrictStr] = Field(default=None, alias="processedSequence") timestamp: Optional[datetime] = Field(default=None, description="the last time the projection got updated") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["totalResult", "processedSequence", "timestamp"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -86,6 +95,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "processedSequence": obj.get("processedSequence"), "timestamp": obj.get("timestamp") }) + # 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/user_service_list_idp_links_request.py b/zitadel_client/models/user_service_list_idp_links_request.py index 52fbf1eb..7ac60f37 100644 --- a/zitadel_client/models/user_service_list_idp_links_request.py +++ b/zitadel_client/models/user_service_list_idp_links_request.py @@ -28,6 +28,8 @@ class UserServiceListIDPLinksRequest(BaseModel): UserServiceListIDPLinksRequest """ # noqa: E501 query: Optional[UserServiceListQuery] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["query"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of query if self.query: _dict['query'] = self.query.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": UserServiceListQuery.from_dict(obj["query"]) if obj.get("query") 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/user_service_list_idp_links_response.py b/zitadel_client/models/user_service_list_idp_links_response.py index b3fad5dd..3b42f563 100644 --- a/zitadel_client/models/user_service_list_idp_links_response.py +++ b/zitadel_client/models/user_service_list_idp_links_response.py @@ -30,6 +30,8 @@ class UserServiceListIDPLinksResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceListDetails] = None result: Optional[List[UserServiceIDPLink]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "result"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "result": [UserServiceIDPLink.from_dict(_item) for _item in obj["result"]] if obj.get("result") 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/user_service_list_passkeys_response.py b/zitadel_client/models/user_service_list_passkeys_response.py index ee169eeb..fda89616 100644 --- a/zitadel_client/models/user_service_list_passkeys_response.py +++ b/zitadel_client/models/user_service_list_passkeys_response.py @@ -30,6 +30,8 @@ class UserServiceListPasskeysResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceListDetails] = None result: Optional[List[UserServicePasskey]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "result"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -80,6 +84,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -95,6 +104,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceListDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "result": [UserServicePasskey.from_dict(_item) for _item in obj["result"]] if obj.get("result") 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/user_service_list_query.py b/zitadel_client/models/user_service_list_query.py index 70efb20f..680c7343 100644 --- a/zitadel_client/models/user_service_list_query.py +++ b/zitadel_client/models/user_service_list_query.py @@ -29,6 +29,8 @@ class UserServiceListQuery(BaseModel): offset: Optional[StrictStr] = None limit: Optional[StrictInt] = Field(default=None, description="Maximum amount of events returned. The default is set to 1000 in https://github.com/zitadel/zitadel/blob/new-eventstore/cmd/zitadel/startup.yaml. 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="default is descending") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["offset", "limit", "asc"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "limit": obj.get("limit"), "asc": obj.get("asc") }) + # 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/user_service_list_users_request.py b/zitadel_client/models/user_service_list_users_request.py index 163c2436..4f1ef44f 100644 --- a/zitadel_client/models/user_service_list_users_request.py +++ b/zitadel_client/models/user_service_list_users_request.py @@ -32,6 +32,8 @@ class UserServiceListUsersRequest(BaseModel): query: Optional[UserServiceListQuery] = None sorting_column: Optional[UserServiceUserFieldName] = Field(default=UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") queries: Optional[List[UserServiceSearchQuery]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["query", "sortingColumn", "queries"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_queries: _items.append(_item_queries.to_dict()) _dict['queries'] = _items + # 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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, "queries": [UserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") 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/user_service_list_users_response.py b/zitadel_client/models/user_service_list_users_response.py index 3533851c..c90fded1 100644 --- a/zitadel_client/models/user_service_list_users_response.py +++ b/zitadel_client/models/user_service_list_users_response.py @@ -32,6 +32,8 @@ class UserServiceListUsersResponse(BaseModel): details: Optional[UserServiceListDetails] = None sorting_column: Optional[UserServiceUserFieldName] = Field(default=UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, alias="sortingColumn") result: Optional[List[UserServiceUser]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "sortingColumn", "result"] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_result: _items.append(_item_result.to_dict()) _dict['result'] = _items + # 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 @@ -98,6 +107,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "sortingColumn": obj.get("sortingColumn") if obj.get("sortingColumn") is not None else UserServiceUserFieldName.USER_FIELD_NAME_UNSPECIFIED, "result": [UserServiceUser.from_dict(_item) for _item in obj["result"]] if obj.get("result") 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/user_service_lock_user_response.py b/zitadel_client/models/user_service_lock_user_response.py index bdac6ea9..46879122 100644 --- a/zitadel_client/models/user_service_lock_user_response.py +++ b/zitadel_client/models/user_service_lock_user_response.py @@ -28,6 +28,8 @@ class UserServiceLockUserResponse(BaseModel): UserServiceLockUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_login_name_query.py b/zitadel_client/models/user_service_login_name_query.py index a2280e57..3ccbde29 100644 --- a/zitadel_client/models/user_service_login_name_query.py +++ b/zitadel_client/models/user_service_login_name_query.py @@ -30,6 +30,8 @@ class UserServiceLoginNameQuery(BaseModel): """ # noqa: E501 login_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="loginName") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["loginName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "loginName": obj.get("loginName"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_machine_user.py b/zitadel_client/models/user_service_machine_user.py index 8fdc9c9a..95965c42 100644 --- a/zitadel_client/models/user_service_machine_user.py +++ b/zitadel_client/models/user_service_machine_user.py @@ -31,6 +31,8 @@ class UserServiceMachineUser(BaseModel): description: Optional[StrictStr] = None has_secret: Optional[StrictBool] = Field(default=None, alias="hasSecret") access_token_type: Optional[UserServiceAccessTokenType] = Field(default=UserServiceAccessTokenType.ACCESS_TOKEN_TYPE_BEARER, alias="accessTokenType") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["name", "description", "hasSecret", "accessTokenType"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "hasSecret": obj.get("hasSecret"), "accessTokenType": obj.get("accessTokenType") if obj.get("accessTokenType") is not None else UserServiceAccessTokenType.ACCESS_TOKEN_TYPE_BEARER }) + # 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/user_service_nick_name_query.py b/zitadel_client/models/user_service_nick_name_query.py index 08f61b7c..eaee513d 100644 --- a/zitadel_client/models/user_service_nick_name_query.py +++ b/zitadel_client/models/user_service_nick_name_query.py @@ -30,6 +30,8 @@ class UserServiceNickNameQuery(BaseModel): """ # noqa: E501 nick_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="nickName") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["nickName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "nickName": obj.get("nickName"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_not_query.py b/zitadel_client/models/user_service_not_query.py index 8842f113..12ebe40b 100644 --- a/zitadel_client/models/user_service_not_query.py +++ b/zitadel_client/models/user_service_not_query.py @@ -27,6 +27,8 @@ class UserServiceNotQuery(BaseModel): Negate the sub-condition. """ # noqa: E501 query: Optional[UserServiceSearchQuery] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["query"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of query if self.query: _dict['query'] = self.query.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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "query": UserServiceSearchQuery.from_dict(obj["query"]) if obj.get("query") 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 from zitadel_client.models.user_service_search_query import UserServiceSearchQuery diff --git a/zitadel_client/models/user_service_or_query.py b/zitadel_client/models/user_service_or_query.py index 2c289daf..bf2216af 100644 --- a/zitadel_client/models/user_service_or_query.py +++ b/zitadel_client/models/user_service_or_query.py @@ -27,6 +27,8 @@ class UserServiceOrQuery(BaseModel): Connect multiple sub-condition with and OR operator. """ # noqa: E501 queries: Optional[List[UserServiceSearchQuery]] = Field(default=None, description="the sub queries to 'OR'") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["queries"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_queries: _items.append(_item_queries.to_dict()) _dict['queries'] = _items + # 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 @@ -88,6 +97,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "queries": [UserServiceSearchQuery.from_dict(_item) for _item in obj["queries"]] if obj.get("queries") 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 from zitadel_client.models.user_service_search_query import UserServiceSearchQuery diff --git a/zitadel_client/models/user_service_organization.py b/zitadel_client/models/user_service_organization.py index 65dfd534..67711bfc 100644 --- a/zitadel_client/models/user_service_organization.py +++ b/zitadel_client/models/user_service_organization.py @@ -28,6 +28,8 @@ class UserServiceOrganization(BaseModel): """ # noqa: E501 org_id: Optional[StrictStr] = Field(default=None, alias="orgId") org_domain: Optional[StrictStr] = Field(default=None, alias="orgDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -80,9 +89,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgDomain": obj.get("orgDomain") }) + # 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/user_service_organization_id_query.py b/zitadel_client/models/user_service_organization_id_query.py index a7121a62..72910ce4 100644 --- a/zitadel_client/models/user_service_organization_id_query.py +++ b/zitadel_client/models/user_service_organization_id_query.py @@ -28,6 +28,8 @@ class UserServiceOrganizationIdQuery(BaseModel): Query for users under a specific organization as resource owner. """ # noqa: E501 organization_id: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="organizationId") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["organizationId"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "organizationId": obj.get("organizationId") }) + # 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/user_service_passkey.py b/zitadel_client/models/user_service_passkey.py index 6ebab941..031d9227 100644 --- a/zitadel_client/models/user_service_passkey.py +++ b/zitadel_client/models/user_service_passkey.py @@ -31,6 +31,8 @@ class UserServicePasskey(BaseModel): id: Optional[StrictStr] = None state: Optional[UserServiceAuthFactorState] = UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "state", "name"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "state": obj.get("state") if obj.get("state") is not None else UserServiceAuthFactorState.AUTH_FACTOR_STATE_UNSPECIFIED, "name": obj.get("name") }) + # 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/user_service_passkey_registration_code.py b/zitadel_client/models/user_service_passkey_registration_code.py index 0e671fd4..9db41a7e 100644 --- a/zitadel_client/models/user_service_passkey_registration_code.py +++ b/zitadel_client/models/user_service_passkey_registration_code.py @@ -29,6 +29,8 @@ class UserServicePasskeyRegistrationCode(BaseModel): """ # noqa: E501 id: Annotated[str, Field(strict=True, max_length=200)] = Field(description="\"id to the one time code generated by ZITADEL\"") code: Annotated[str, Field(strict=True, max_length=200)] = Field(description="\"one time code generated by ZITADEL\"") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "code"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "code": obj.get("code") }) + # 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/user_service_password.py b/zitadel_client/models/user_service_password.py index 6ffe00d3..d8db01cf 100644 --- a/zitadel_client/models/user_service_password.py +++ b/zitadel_client/models/user_service_password.py @@ -29,6 +29,8 @@ class UserServicePassword(BaseModel): """ # noqa: E501 password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] change_required: Optional[StrictBool] = Field(default=None, alias="changeRequired") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["password", "changeRequired"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "password": obj.get("password"), "changeRequired": obj.get("changeRequired") }) + # 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/user_service_password_reset_request.py b/zitadel_client/models/user_service_password_reset_request.py index 5e1cf6bf..48d71732 100644 --- a/zitadel_client/models/user_service_password_reset_request.py +++ b/zitadel_client/models/user_service_password_reset_request.py @@ -29,6 +29,8 @@ class UserServicePasswordResetRequest(BaseModel): """ # noqa: E501 send_link: Optional[UserServiceSendPasswordResetLink] = Field(default=None, alias="sendLink") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendLink": UserServiceSendPasswordResetLink.from_dict(obj["sendLink"]) if obj.get("sendLink") is not None else None, - "returnCode": obj.get("returnCode") }) + # 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/user_service_password_reset_response.py b/zitadel_client/models/user_service_password_reset_response.py index 7c0b5340..238602ab 100644 --- a/zitadel_client/models/user_service_password_reset_response.py +++ b/zitadel_client/models/user_service_password_reset_response.py @@ -29,6 +29,8 @@ class UserServicePasswordResetResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "verificationCode": obj.get("verificationCode") }) + # 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/user_service_phone_query.py b/zitadel_client/models/user_service_phone_query.py index 5b2befff..d6ea8eda 100644 --- a/zitadel_client/models/user_service_phone_query.py +++ b/zitadel_client/models/user_service_phone_query.py @@ -30,6 +30,8 @@ class UserServicePhoneQuery(BaseModel): """ # noqa: E501 number: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="Phone number of the user") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["number", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "number": obj.get("number"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_protobuf_any.py b/zitadel_client/models/user_service_protobuf_any.py index 31027872..f8bf8681 100644 --- a/zitadel_client/models/user_service_protobuf_any.py +++ b/zitadel_client/models/user_service_protobuf_any.py @@ -27,6 +27,8 @@ class UserServiceProtobufAny(BaseModel): UserServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/user_service_reactivate_user_response.py b/zitadel_client/models/user_service_reactivate_user_response.py index 3e8215d1..03ba1159 100644 --- a/zitadel_client/models/user_service_reactivate_user_response.py +++ b/zitadel_client/models/user_service_reactivate_user_response.py @@ -28,6 +28,8 @@ class UserServiceReactivateUserResponse(BaseModel): UserServiceReactivateUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_redirect_urls.py b/zitadel_client/models/user_service_redirect_urls.py index 91d8be0f..230019c6 100644 --- a/zitadel_client/models/user_service_redirect_urls.py +++ b/zitadel_client/models/user_service_redirect_urls.py @@ -29,6 +29,8 @@ class UserServiceRedirectURLs(BaseModel): """ # noqa: E501 success_url: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2048)]] = Field(default=None, description="URL on which the user will be redirected after a successful login", alias="successUrl") failure_url: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=2048)]] = Field(default=None, description="URL on which the user will be redirected after a failed login", alias="failureUrl") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["successUrl", "failureUrl"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "successUrl": obj.get("successUrl"), "failureUrl": obj.get("failureUrl") }) + # 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/user_service_register_passkey_request.py b/zitadel_client/models/user_service_register_passkey_request.py index 31484169..4d382400 100644 --- a/zitadel_client/models/user_service_register_passkey_request.py +++ b/zitadel_client/models/user_service_register_passkey_request.py @@ -31,6 +31,8 @@ class UserServiceRegisterPasskeyRequest(BaseModel): code: Optional[UserServicePasskeyRegistrationCode] = None authenticator: Optional[UserServicePasskeyAuthenticator] = UserServicePasskeyAuthenticator.PASSKEY_AUTHENTICATOR_UNSPECIFIED domain: Optional[StrictStr] = Field(default=None, description="\"Domain on which the user is authenticated.\"") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "authenticator", "domain"] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of code if self.code: _dict['code'] = self.code.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 @@ -90,6 +99,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "authenticator": obj.get("authenticator") if obj.get("authenticator") is not None else UserServicePasskeyAuthenticator.PASSKEY_AUTHENTICATOR_UNSPECIFIED, "domain": obj.get("domain") }) + # 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/user_service_register_passkey_response.py b/zitadel_client/models/user_service_register_passkey_response.py index 3100ab3f..e11039a0 100644 --- a/zitadel_client/models/user_service_register_passkey_response.py +++ b/zitadel_client/models/user_service_register_passkey_response.py @@ -30,6 +30,8 @@ class UserServiceRegisterPasskeyResponse(BaseModel): details: Optional[UserServiceDetails] = None passkey_id: Optional[StrictStr] = Field(default=None, alias="passkeyId") public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="Options for Credential Creation (dictionary PublicKeyCredentialCreationOptions). Generated helper methods transform the field to JSON, for use in a WebauthN client. See also: https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialcreationoptions", alias="publicKeyCredentialCreationOptions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "passkeyId", "publicKeyCredentialCreationOptions"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "passkeyId": obj.get("passkeyId"), "publicKeyCredentialCreationOptions": obj.get("publicKeyCredentialCreationOptions") }) + # 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/user_service_register_totp_response.py b/zitadel_client/models/user_service_register_totp_response.py index ade605f0..a954abdd 100644 --- a/zitadel_client/models/user_service_register_totp_response.py +++ b/zitadel_client/models/user_service_register_totp_response.py @@ -30,6 +30,8 @@ class UserServiceRegisterTOTPResponse(BaseModel): details: Optional[UserServiceDetails] = None uri: Optional[StrictStr] = None secret: Optional[StrictStr] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "uri", "secret"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "uri": obj.get("uri"), "secret": obj.get("secret") }) + # 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/user_service_register_u2_f_request.py b/zitadel_client/models/user_service_register_u2_f_request.py index f735ae3b..45017f9d 100644 --- a/zitadel_client/models/user_service_register_u2_f_request.py +++ b/zitadel_client/models/user_service_register_u2_f_request.py @@ -27,6 +27,8 @@ class UserServiceRegisterU2FRequest(BaseModel): UserServiceRegisterU2FRequest """ # noqa: E501 domain: Optional[StrictStr] = Field(default=None, description="\"Domain on which the user is authenticated.\"") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["domain"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "domain": obj.get("domain") }) + # 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/user_service_register_u2_f_response.py b/zitadel_client/models/user_service_register_u2_f_response.py index d370521b..e5e700be 100644 --- a/zitadel_client/models/user_service_register_u2_f_response.py +++ b/zitadel_client/models/user_service_register_u2_f_response.py @@ -30,6 +30,8 @@ class UserServiceRegisterU2FResponse(BaseModel): details: Optional[UserServiceDetails] = None u2f_id: Optional[StrictStr] = Field(default=None, alias="u2fId") public_key_credential_creation_options: Optional[Dict[str, Any]] = Field(default=None, description="Options for Credential Creation (dictionary PublicKeyCredentialCreationOptions). Generated helper methods transform the field to JSON, for use in a WebauthN client. See also: https://www.w3.org/TR/webauthn/#dictdef-publickeycredentialcreationoptions", alias="publicKeyCredentialCreationOptions") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "u2fId", "publicKeyCredentialCreationOptions"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "u2fId": obj.get("u2fId"), "publicKeyCredentialCreationOptions": obj.get("publicKeyCredentialCreationOptions") }) + # 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/user_service_remove_idp_link_response.py b/zitadel_client/models/user_service_remove_idp_link_response.py index 81d71189..bcab0403 100644 --- a/zitadel_client/models/user_service_remove_idp_link_response.py +++ b/zitadel_client/models/user_service_remove_idp_link_response.py @@ -28,6 +28,8 @@ class UserServiceRemoveIDPLinkResponse(BaseModel): UserServiceRemoveIDPLinkResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_remove_otp_email_response.py b/zitadel_client/models/user_service_remove_otp_email_response.py index 636c88d6..b516615e 100644 --- a/zitadel_client/models/user_service_remove_otp_email_response.py +++ b/zitadel_client/models/user_service_remove_otp_email_response.py @@ -28,6 +28,8 @@ class UserServiceRemoveOTPEmailResponse(BaseModel): UserServiceRemoveOTPEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_remove_otpsms_response.py b/zitadel_client/models/user_service_remove_otpsms_response.py index b7fec456..4c44ff70 100644 --- a/zitadel_client/models/user_service_remove_otpsms_response.py +++ b/zitadel_client/models/user_service_remove_otpsms_response.py @@ -28,6 +28,8 @@ class UserServiceRemoveOTPSMSResponse(BaseModel): UserServiceRemoveOTPSMSResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_remove_passkey_response.py b/zitadel_client/models/user_service_remove_passkey_response.py index 606d3b9d..42d367ef 100644 --- a/zitadel_client/models/user_service_remove_passkey_response.py +++ b/zitadel_client/models/user_service_remove_passkey_response.py @@ -28,6 +28,8 @@ class UserServiceRemovePasskeyResponse(BaseModel): UserServiceRemovePasskeyResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_remove_phone_response.py b/zitadel_client/models/user_service_remove_phone_response.py index 4849f1f7..07f60f45 100644 --- a/zitadel_client/models/user_service_remove_phone_response.py +++ b/zitadel_client/models/user_service_remove_phone_response.py @@ -28,6 +28,8 @@ class UserServiceRemovePhoneResponse(BaseModel): UserServiceRemovePhoneResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_remove_totp_response.py b/zitadel_client/models/user_service_remove_totp_response.py index cc52debd..29140f29 100644 --- a/zitadel_client/models/user_service_remove_totp_response.py +++ b/zitadel_client/models/user_service_remove_totp_response.py @@ -28,6 +28,8 @@ class UserServiceRemoveTOTPResponse(BaseModel): UserServiceRemoveTOTPResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_remove_u2_f_response.py b/zitadel_client/models/user_service_remove_u2_f_response.py index 1da26bf4..3355feb1 100644 --- a/zitadel_client/models/user_service_remove_u2_f_response.py +++ b/zitadel_client/models/user_service_remove_u2_f_response.py @@ -28,6 +28,8 @@ class UserServiceRemoveU2FResponse(BaseModel): UserServiceRemoveU2FResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_resend_email_code_request.py b/zitadel_client/models/user_service_resend_email_code_request.py index 87f47c0e..fd2b1f16 100644 --- a/zitadel_client/models/user_service_resend_email_code_request.py +++ b/zitadel_client/models/user_service_resend_email_code_request.py @@ -29,6 +29,8 @@ class UserServiceResendEmailCodeRequest(BaseModel): """ # noqa: E501 send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") }) + # 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/user_service_resend_email_code_response.py b/zitadel_client/models/user_service_resend_email_code_response.py index 008936c7..accc55c3 100644 --- a/zitadel_client/models/user_service_resend_email_code_response.py +++ b/zitadel_client/models/user_service_resend_email_code_response.py @@ -29,6 +29,8 @@ class UserServiceResendEmailCodeResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "verificationCode": obj.get("verificationCode") }) + # 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/user_service_resend_invite_code_response.py b/zitadel_client/models/user_service_resend_invite_code_response.py index 26e1a6ed..61c7f6b1 100644 --- a/zitadel_client/models/user_service_resend_invite_code_response.py +++ b/zitadel_client/models/user_service_resend_invite_code_response.py @@ -28,6 +28,8 @@ class UserServiceResendInviteCodeResponse(BaseModel): UserServiceResendInviteCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_resend_phone_code_request.py b/zitadel_client/models/user_service_resend_phone_code_request.py index 63af82ff..2471183d 100644 --- a/zitadel_client/models/user_service_resend_phone_code_request.py +++ b/zitadel_client/models/user_service_resend_phone_code_request.py @@ -28,6 +28,8 @@ class UserServiceResendPhoneCodeRequest(BaseModel): """ # noqa: E501 send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -80,9 +89,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode") }) + # 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/user_service_resend_phone_code_response.py b/zitadel_client/models/user_service_resend_phone_code_response.py index 9d67dbb2..53b92c58 100644 --- a/zitadel_client/models/user_service_resend_phone_code_response.py +++ b/zitadel_client/models/user_service_resend_phone_code_response.py @@ -29,6 +29,8 @@ class UserServiceResendPhoneCodeResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "verificationCode": obj.get("verificationCode") }) + # 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/user_service_retrieve_identity_provider_intent_request.py b/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py index 599a6e45..8e96d0ba 100644 --- a/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py +++ b/zitadel_client/models/user_service_retrieve_identity_provider_intent_request.py @@ -28,6 +28,8 @@ class UserServiceRetrieveIdentityProviderIntentRequest(BaseModel): UserServiceRetrieveIdentityProviderIntentRequest """ # noqa: E501 idp_intent_token: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="token of the idp intent, previously returned on the success response of the IDP callback", alias="idpIntentToken") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["idpIntentToken"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "idpIntentToken": obj.get("idpIntentToken") }) + # 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/user_service_retrieve_identity_provider_intent_response.py b/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py index 56586413..4460ba1d 100644 --- a/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py +++ b/zitadel_client/models/user_service_retrieve_identity_provider_intent_response.py @@ -33,6 +33,8 @@ class UserServiceRetrieveIdentityProviderIntentResponse(BaseModel): idp_information: Optional[UserServiceIDPInformation] = Field(default=None, alias="idpInformation") user_id: Optional[StrictStr] = Field(default=None, description="ID of the user in ZITADEL if external user is linked", alias="userId") add_human_user: Optional[UserServiceAddHumanUserRequest] = Field(default=None, alias="addHumanUser") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "idpInformation", "userId", "addHumanUser"] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -82,6 +86,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of add_human_user if self.add_human_user: _dict['addHumanUser'] = self.add_human_user.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 @@ -99,6 +108,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userId": obj.get("userId"), "addHumanUser": UserServiceAddHumanUserRequest.from_dict(obj["addHumanUser"]) if obj.get("addHumanUser") 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/user_service_rpc_status.py b/zitadel_client/models/user_service_rpc_status.py index 7fde756c..29ad639d 100644 --- a/zitadel_client/models/user_service_rpc_status.py +++ b/zitadel_client/models/user_service_rpc_status.py @@ -30,6 +30,8 @@ class UserServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[UserServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [UserServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/user_service_search_query.py b/zitadel_client/models/user_service_search_query.py index 7a66876b..36dfa856 100644 --- a/zitadel_client/models/user_service_search_query.py +++ b/zitadel_client/models/user_service_search_query.py @@ -55,6 +55,8 @@ class UserServiceSearchQuery(BaseModel): in_user_emails_query: Optional[UserServiceInUserEmailsQuery] = Field(default=None, alias="inUserEmailsQuery") organization_id_query: Optional[UserServiceOrganizationIdQuery] = Field(default=None, alias="organizationIdQuery") phone_query: Optional[UserServicePhoneQuery] = Field(default=None, alias="phoneQuery") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -86,8 +88,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -95,6 +99,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -107,23 +116,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userNameQuery": UserServiceUserNameQuery.from_dict(obj["userNameQuery"]) if obj.get("userNameQuery") is not None else None, - "firstNameQuery": UserServiceFirstNameQuery.from_dict(obj["firstNameQuery"]) if obj.get("firstNameQuery") is not None else None, - "lastNameQuery": UserServiceLastNameQuery.from_dict(obj["lastNameQuery"]) if obj.get("lastNameQuery") is not None else None, - "nickNameQuery": UserServiceNickNameQuery.from_dict(obj["nickNameQuery"]) if obj.get("nickNameQuery") is not None else None, - "displayNameQuery": UserServiceDisplayNameQuery.from_dict(obj["displayNameQuery"]) if obj.get("displayNameQuery") is not None else None, - "emailQuery": UserServiceEmailQuery.from_dict(obj["emailQuery"]) if obj.get("emailQuery") is not None else None, - "stateQuery": UserServiceStateQuery.from_dict(obj["stateQuery"]) if obj.get("stateQuery") is not None else None, - "typeQuery": UserServiceTypeQuery.from_dict(obj["typeQuery"]) if obj.get("typeQuery") is not None else None, - "loginNameQuery": UserServiceLoginNameQuery.from_dict(obj["loginNameQuery"]) if obj.get("loginNameQuery") is not None else None, - "inUserIdsQuery": UserServiceInUserIDQuery.from_dict(obj["inUserIdsQuery"]) if obj.get("inUserIdsQuery") is not None else None, - "orQuery": UserServiceOrQuery.from_dict(obj["orQuery"]) if obj.get("orQuery") is not None else None, - "andQuery": UserServiceAndQuery.from_dict(obj["andQuery"]) if obj.get("andQuery") is not None else None, - "notQuery": UserServiceNotQuery.from_dict(obj["notQuery"]) if obj.get("notQuery") is not None else None, - "inUserEmailsQuery": UserServiceInUserEmailsQuery.from_dict(obj["inUserEmailsQuery"]) if obj.get("inUserEmailsQuery") is not None else None, - "organizationIdQuery": UserServiceOrganizationIdQuery.from_dict(obj["organizationIdQuery"]) if obj.get("organizationIdQuery") is not None else None, - "phoneQuery": UserServicePhoneQuery.from_dict(obj["phoneQuery"]) if obj.get("phoneQuery") 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 from zitadel_client.models.user_service_and_query import UserServiceAndQuery diff --git a/zitadel_client/models/user_service_send_email_code_request.py b/zitadel_client/models/user_service_send_email_code_request.py index b156f1aa..ff6615e1 100644 --- a/zitadel_client/models/user_service_send_email_code_request.py +++ b/zitadel_client/models/user_service_send_email_code_request.py @@ -29,6 +29,8 @@ class UserServiceSendEmailCodeRequest(BaseModel): """ # noqa: E501 send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,9 +90,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode") }) + # 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/user_service_send_email_code_response.py b/zitadel_client/models/user_service_send_email_code_response.py index f0dc4ba2..ead4b5a7 100644 --- a/zitadel_client/models/user_service_send_email_code_response.py +++ b/zitadel_client/models/user_service_send_email_code_response.py @@ -29,6 +29,8 @@ class UserServiceSendEmailCodeResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "verificationCode": obj.get("verificationCode") }) + # 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/user_service_send_email_verification_code.py b/zitadel_client/models/user_service_send_email_verification_code.py index 65c6ad14..83d4e7cb 100644 --- a/zitadel_client/models/user_service_send_email_verification_code.py +++ b/zitadel_client/models/user_service_send_email_verification_code.py @@ -28,6 +28,8 @@ class UserServiceSendEmailVerificationCode(BaseModel): UserServiceSendEmailVerificationCode """ # noqa: E501 url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the verification mail sent by ZITADEL to guide the user to your verification page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "urlTemplate": obj.get("urlTemplate") }) + # 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/user_service_send_invite_code.py b/zitadel_client/models/user_service_send_invite_code.py index 5a6c571c..8878adb9 100644 --- a/zitadel_client/models/user_service_send_invite_code.py +++ b/zitadel_client/models/user_service_send_invite_code.py @@ -29,6 +29,8 @@ class UserServiceSendInviteCode(BaseModel): """ # noqa: E501 url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the invite mail sent by ZITADEL to guide the user to your invitation page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") application_name: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set an application name, which will be used in the invite mail sent by ZITADEL. If no application name is set, ZITADEL will be used as default.", alias="applicationName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["urlTemplate", "applicationName"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "urlTemplate": obj.get("urlTemplate"), "applicationName": obj.get("applicationName") }) + # 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/user_service_send_passkey_registration_link.py b/zitadel_client/models/user_service_send_passkey_registration_link.py index c1a9e4e9..7bbbd219 100644 --- a/zitadel_client/models/user_service_send_passkey_registration_link.py +++ b/zitadel_client/models/user_service_send_passkey_registration_link.py @@ -28,6 +28,8 @@ class UserServiceSendPasskeyRegistrationLink(BaseModel): UserServiceSendPasskeyRegistrationLink """ # noqa: E501 url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the mail sent by ZITADEL to guide the user to your passkey registration page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, CodeID, Code", alias="urlTemplate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "urlTemplate": obj.get("urlTemplate") }) + # 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/user_service_send_password_reset_link.py b/zitadel_client/models/user_service_send_password_reset_link.py index f720b783..8e5f1e2a 100644 --- a/zitadel_client/models/user_service_send_password_reset_link.py +++ b/zitadel_client/models/user_service_send_password_reset_link.py @@ -30,6 +30,8 @@ class UserServiceSendPasswordResetLink(BaseModel): """ # noqa: E501 notification_type: Optional[UserServiceNotificationType] = Field(default=UserServiceNotificationType.NOTIFICATION_TYPE_UNSPECIFIED, alias="notificationType") url_template: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="Optionally set a url_template, which will be used in the password reset mail sent by ZITADEL to guide the user to your password change page. If no template is set, the default ZITADEL url will be used. The following placeholders can be used: UserID, OrgID, Code", alias="urlTemplate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["notificationType", "urlTemplate"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "notificationType": obj.get("notificationType") if obj.get("notificationType") is not None else UserServiceNotificationType.NOTIFICATION_TYPE_UNSPECIFIED, "urlTemplate": obj.get("urlTemplate") }) + # 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/user_service_set_email_request.py b/zitadel_client/models/user_service_set_email_request.py index 73ffb7f8..547ce1d6 100644 --- a/zitadel_client/models/user_service_set_email_request.py +++ b/zitadel_client/models/user_service_set_email_request.py @@ -32,6 +32,8 @@ class UserServiceSetEmailRequest(BaseModel): send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,11 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "email": obj.get("email"), - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") }) + # 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/user_service_set_email_response.py b/zitadel_client/models/user_service_set_email_response.py index 5e838779..d36e4f41 100644 --- a/zitadel_client/models/user_service_set_email_response.py +++ b/zitadel_client/models/user_service_set_email_response.py @@ -29,6 +29,8 @@ class UserServiceSetEmailResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "verificationCode": obj.get("verificationCode") }) + # 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/user_service_set_human_email.py b/zitadel_client/models/user_service_set_human_email.py index b556de16..de2ed99e 100644 --- a/zitadel_client/models/user_service_set_human_email.py +++ b/zitadel_client/models/user_service_set_human_email.py @@ -32,6 +32,8 @@ class UserServiceSetHumanEmail(BaseModel): send_code: Optional[UserServiceSendEmailVerificationCode] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,11 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "email": obj.get("email"), - "sendCode": UserServiceSendEmailVerificationCode.from_dict(obj["sendCode"]) if obj.get("sendCode") is not None else None, - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") }) + # 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/user_service_set_human_phone.py b/zitadel_client/models/user_service_set_human_phone.py index c24484f4..b30be800 100644 --- a/zitadel_client/models/user_service_set_human_phone.py +++ b/zitadel_client/models/user_service_set_human_phone.py @@ -31,6 +31,8 @@ class UserServiceSetHumanPhone(BaseModel): send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,11 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") }) + # 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/user_service_set_human_profile.py b/zitadel_client/models/user_service_set_human_profile.py index 7da0a092..abfc5ed8 100644 --- a/zitadel_client/models/user_service_set_human_profile.py +++ b/zitadel_client/models/user_service_set_human_profile.py @@ -34,6 +34,8 @@ class UserServiceSetHumanProfile(BaseModel): display_name: Optional[Annotated[str, Field(strict=True, max_length=200)]] = Field(default=None, alias="displayName") preferred_language: Optional[Annotated[str, Field(strict=True, max_length=10)]] = Field(default=None, alias="preferredLanguage") gender: Optional[UserServiceGender] = UserServiceGender.GENDER_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["givenName", "familyName", "nickName", "displayName", "preferredLanguage", "gender"] model_config = ConfigDict( populate_by_name=True, @@ -65,8 +67,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -74,6 +78,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "preferredLanguage": obj.get("preferredLanguage"), "gender": obj.get("gender") if obj.get("gender") is not None else UserServiceGender.GENDER_UNSPECIFIED }) + # 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/user_service_set_metadata_entry.py b/zitadel_client/models/user_service_set_metadata_entry.py index 259dfba1..2c469cbd 100644 --- a/zitadel_client/models/user_service_set_metadata_entry.py +++ b/zitadel_client/models/user_service_set_metadata_entry.py @@ -29,6 +29,8 @@ class UserServiceSetMetadataEntry(BaseModel): """ # noqa: E501 key: Annotated[str, Field(min_length=1, strict=True, max_length=200)] value: Union[Annotated[bytes, Field(min_length=1, strict=True, max_length=500000)], Annotated[str, Field(min_length=1, strict=True, max_length=500000)]] = Field(description="The value has to be base64 encoded.") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["key", "value"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "key": obj.get("key"), "value": obj.get("value") }) + # 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/user_service_set_password.py b/zitadel_client/models/user_service_set_password.py index 7f88c236..4030eb5a 100644 --- a/zitadel_client/models/user_service_set_password.py +++ b/zitadel_client/models/user_service_set_password.py @@ -33,6 +33,8 @@ class UserServiceSetPassword(BaseModel): hashed_password: Optional[UserServiceHashedPassword] = Field(default=None, alias="hashedPassword") current_password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="currentPassword") verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during password reset request\"", alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,11 +94,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "password": UserServicePassword.from_dict(obj["password"]) if obj.get("password") is not None else None, - "hashedPassword": UserServiceHashedPassword.from_dict(obj["hashedPassword"]) if obj.get("hashedPassword") is not None else None, - "currentPassword": obj.get("currentPassword"), - "verificationCode": obj.get("verificationCode") }) + # 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/user_service_set_password_request.py b/zitadel_client/models/user_service_set_password_request.py index 0c6dc3a4..b5ecf0b2 100644 --- a/zitadel_client/models/user_service_set_password_request.py +++ b/zitadel_client/models/user_service_set_password_request.py @@ -31,6 +31,8 @@ class UserServiceSetPasswordRequest(BaseModel): new_password: Optional[UserServicePassword] = Field(default=None, alias="newPassword") current_password: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="currentPassword") verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during password reset request\"", alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,10 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "newPassword": UserServicePassword.from_dict(obj["newPassword"]) if obj.get("newPassword") is not None else None, - "currentPassword": obj.get("currentPassword"), - "verificationCode": obj.get("verificationCode") }) + # 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/user_service_set_password_response.py b/zitadel_client/models/user_service_set_password_response.py index 4399d060..39ceae2c 100644 --- a/zitadel_client/models/user_service_set_password_response.py +++ b/zitadel_client/models/user_service_set_password_response.py @@ -28,6 +28,8 @@ class UserServiceSetPasswordResponse(BaseModel): UserServiceSetPasswordResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_set_phone_request.py b/zitadel_client/models/user_service_set_phone_request.py index c9620f94..a4e2cff4 100644 --- a/zitadel_client/models/user_service_set_phone_request.py +++ b/zitadel_client/models/user_service_set_phone_request.py @@ -31,6 +31,8 @@ class UserServiceSetPhoneRequest(BaseModel): send_code: Optional[Dict[str, Any]] = Field(default=None, alias="sendCode") return_code: Optional[Dict[str, Any]] = Field(default=None, alias="returnCode") is_verified: Optional[StrictBool] = Field(default=None, alias="isVerified") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,11 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "phone": obj.get("phone"), - "sendCode": obj.get("sendCode"), - "returnCode": obj.get("returnCode"), - "isVerified": obj.get("isVerified") }) + # 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/user_service_set_phone_response.py b/zitadel_client/models/user_service_set_phone_response.py index fb4d58ac..3dafd03a 100644 --- a/zitadel_client/models/user_service_set_phone_response.py +++ b/zitadel_client/models/user_service_set_phone_response.py @@ -29,6 +29,8 @@ class UserServiceSetPhoneResponse(BaseModel): """ # noqa: E501 details: Optional[UserServiceDetails] = None verification_code: Optional[StrictStr] = Field(default=None, alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -87,6 +96,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, "verificationCode": obj.get("verificationCode") }) + # 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/user_service_start_identity_provider_intent_request.py b/zitadel_client/models/user_service_start_identity_provider_intent_request.py index 862c36f4..27f9fa31 100644 --- a/zitadel_client/models/user_service_start_identity_provider_intent_request.py +++ b/zitadel_client/models/user_service_start_identity_provider_intent_request.py @@ -32,6 +32,8 @@ class UserServiceStartIdentityProviderIntentRequest(BaseModel): idp_id: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=200)]] = Field(default=None, description="ID for existing identity provider", alias="idpId") urls: Optional[UserServiceRedirectURLs] = None ldap: Optional[UserServiceLDAPCredentials] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,10 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "idpId": obj.get("idpId"), - "urls": UserServiceRedirectURLs.from_dict(obj["urls"]) if obj.get("urls") is not None else None, - "ldap": UserServiceLDAPCredentials.from_dict(obj["ldap"]) if obj.get("ldap") 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/user_service_start_identity_provider_intent_response.py b/zitadel_client/models/user_service_start_identity_provider_intent_response.py index eebf2021..cd1ca480 100644 --- a/zitadel_client/models/user_service_start_identity_provider_intent_response.py +++ b/zitadel_client/models/user_service_start_identity_provider_intent_response.py @@ -32,6 +32,8 @@ class UserServiceStartIdentityProviderIntentResponse(BaseModel): auth_url: Optional[StrictStr] = Field(default=None, description="URL to which the client should redirect", alias="authUrl") idp_intent: Optional[UserServiceIDPIntent] = Field(default=None, alias="idpIntent") post_form: Optional[Union[StrictBytes, StrictStr]] = Field(default=None, description="POST call information", alias="postForm") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -63,8 +65,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -72,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,11 +93,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "authUrl": obj.get("authUrl"), - "idpIntent": UserServiceIDPIntent.from_dict(obj["idpIntent"]) if obj.get("idpIntent") is not None else None, - "postForm": obj.get("postForm") }) + # 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/user_service_state_query.py b/zitadel_client/models/user_service_state_query.py index bee9785f..6586bd67 100644 --- a/zitadel_client/models/user_service_state_query.py +++ b/zitadel_client/models/user_service_state_query.py @@ -28,6 +28,8 @@ class UserServiceStateQuery(BaseModel): Query for users with a specific state. """ # noqa: E501 state: UserServiceUserState + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["state"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "state": obj.get("state") if obj.get("state") is not None else UserServiceUserState.USER_STATE_UNSPECIFIED }) + # 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/user_service_type_query.py b/zitadel_client/models/user_service_type_query.py index 822503ef..dc4ee08b 100644 --- a/zitadel_client/models/user_service_type_query.py +++ b/zitadel_client/models/user_service_type_query.py @@ -28,6 +28,8 @@ class UserServiceTypeQuery(BaseModel): Query for users with a specific type. """ # noqa: E501 type: UserServiceType + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["type"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "type": obj.get("type") if obj.get("type") is not None else UserServiceType.TYPE_UNSPECIFIED }) + # 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/user_service_unlock_user_response.py b/zitadel_client/models/user_service_unlock_user_response.py index 70da444e..7f2c9988 100644 --- a/zitadel_client/models/user_service_unlock_user_response.py +++ b/zitadel_client/models/user_service_unlock_user_response.py @@ -28,6 +28,8 @@ class UserServiceUnlockUserResponse(BaseModel): UserServiceUnlockUserResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_update_human_user_request.py b/zitadel_client/models/user_service_update_human_user_request.py index 6327a7aa..eadedd3c 100644 --- a/zitadel_client/models/user_service_update_human_user_request.py +++ b/zitadel_client/models/user_service_update_human_user_request.py @@ -36,6 +36,8 @@ class UserServiceUpdateHumanUserRequest(BaseModel): email: Optional[UserServiceSetHumanEmail] = None phone: Optional[UserServiceSetHumanPhone] = None password: Optional[UserServiceSetPassword] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["username", "profile", "email", "phone", "password"] model_config = ConfigDict( populate_by_name=True, @@ -67,8 +69,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -88,6 +92,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of password if self.password: _dict['password'] = self.password.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 @@ -106,6 +115,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "phone": UserServiceSetHumanPhone.from_dict(obj["phone"]) if obj.get("phone") is not None else None, "password": UserServiceSetPassword.from_dict(obj["password"]) if obj.get("password") 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/user_service_update_human_user_response.py b/zitadel_client/models/user_service_update_human_user_response.py index 8c946ab6..33844a84 100644 --- a/zitadel_client/models/user_service_update_human_user_response.py +++ b/zitadel_client/models/user_service_update_human_user_response.py @@ -30,6 +30,8 @@ class UserServiceUpdateHumanUserResponse(BaseModel): details: Optional[UserServiceDetails] = None email_code: Optional[StrictStr] = Field(default=None, alias="emailCode") phone_code: Optional[StrictStr] = Field(default=None, alias="phoneCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details", "emailCode", "phoneCode"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -73,6 +77,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "emailCode": obj.get("emailCode"), "phoneCode": obj.get("phoneCode") }) + # 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/user_service_user.py b/zitadel_client/models/user_service_user.py index c48f1712..dacc7ca8 100644 --- a/zitadel_client/models/user_service_user.py +++ b/zitadel_client/models/user_service_user.py @@ -38,6 +38,8 @@ class UserServiceUser(BaseModel): preferred_login_name: Optional[StrictStr] = Field(default=None, alias="preferredLoginName") human: Optional[UserServiceHumanUser] = None machine: Optional[UserServiceMachineUser] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -69,8 +71,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -78,6 +82,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -90,15 +99,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "userId": obj.get("userId"), - "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") is not None else None, - "state": obj.get("state") if obj.get("state") is not None else UserServiceUserState.USER_STATE_UNSPECIFIED, - "username": obj.get("username"), - "loginNames": obj.get("loginNames"), - "preferredLoginName": obj.get("preferredLoginName"), - "human": UserServiceHumanUser.from_dict(obj["human"]) if obj.get("human") is not None else None, - "machine": UserServiceMachineUser.from_dict(obj["machine"]) if obj.get("machine") 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/user_service_user_name_query.py b/zitadel_client/models/user_service_user_name_query.py index 59f5f161..f6ab1c4d 100644 --- a/zitadel_client/models/user_service_user_name_query.py +++ b/zitadel_client/models/user_service_user_name_query.py @@ -30,6 +30,8 @@ class UserServiceUserNameQuery(BaseModel): """ # noqa: E501 user_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="userName") method: Optional[UserServiceTextQueryMethod] = UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["userName", "method"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "userName": obj.get("userName"), "method": obj.get("method") if obj.get("method") is not None else UserServiceTextQueryMethod.TEXT_QUERY_METHOD_EQUALS }) + # 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/user_service_verify_email_request.py b/zitadel_client/models/user_service_verify_email_request.py index 44e368eb..b2c5272d 100644 --- a/zitadel_client/models/user_service_verify_email_request.py +++ b/zitadel_client/models/user_service_verify_email_request.py @@ -28,6 +28,8 @@ class UserServiceVerifyEmailRequest(BaseModel): UserServiceVerifyEmailRequest """ # noqa: E501 verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during the set email request\"", alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verificationCode": obj.get("verificationCode") }) + # 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/user_service_verify_email_response.py b/zitadel_client/models/user_service_verify_email_response.py index e151bb2e..b752bf66 100644 --- a/zitadel_client/models/user_service_verify_email_response.py +++ b/zitadel_client/models/user_service_verify_email_response.py @@ -28,6 +28,8 @@ class UserServiceVerifyEmailResponse(BaseModel): UserServiceVerifyEmailResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_verify_invite_code_request.py b/zitadel_client/models/user_service_verify_invite_code_request.py index ae071c25..ed51a981 100644 --- a/zitadel_client/models/user_service_verify_invite_code_request.py +++ b/zitadel_client/models/user_service_verify_invite_code_request.py @@ -28,6 +28,8 @@ class UserServiceVerifyInviteCodeRequest(BaseModel): UserServiceVerifyInviteCodeRequest """ # noqa: E501 verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during the invite code request\"", alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verificationCode": obj.get("verificationCode") }) + # 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/user_service_verify_invite_code_response.py b/zitadel_client/models/user_service_verify_invite_code_response.py index d25e0814..db36687b 100644 --- a/zitadel_client/models/user_service_verify_invite_code_response.py +++ b/zitadel_client/models/user_service_verify_invite_code_response.py @@ -28,6 +28,8 @@ class UserServiceVerifyInviteCodeResponse(BaseModel): UserServiceVerifyInviteCodeResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_verify_passkey_registration_request.py b/zitadel_client/models/user_service_verify_passkey_registration_request.py index c0526cfe..02c0cc81 100644 --- a/zitadel_client/models/user_service_verify_passkey_registration_request.py +++ b/zitadel_client/models/user_service_verify_passkey_registration_request.py @@ -29,6 +29,8 @@ class UserServiceVerifyPasskeyRegistrationRequest(BaseModel): """ # noqa: E501 public_key_credential: Dict[str, Any] = Field(description="PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential", alias="publicKeyCredential") passkey_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="passkeyName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["publicKeyCredential", "passkeyName"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "publicKeyCredential": obj.get("publicKeyCredential"), "passkeyName": obj.get("passkeyName") }) + # 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/user_service_verify_passkey_registration_response.py b/zitadel_client/models/user_service_verify_passkey_registration_response.py index b9cfd53d..28edc04d 100644 --- a/zitadel_client/models/user_service_verify_passkey_registration_response.py +++ b/zitadel_client/models/user_service_verify_passkey_registration_response.py @@ -28,6 +28,8 @@ class UserServiceVerifyPasskeyRegistrationResponse(BaseModel): UserServiceVerifyPasskeyRegistrationResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_verify_phone_request.py b/zitadel_client/models/user_service_verify_phone_request.py index 3c4a798d..354d8666 100644 --- a/zitadel_client/models/user_service_verify_phone_request.py +++ b/zitadel_client/models/user_service_verify_phone_request.py @@ -28,6 +28,8 @@ class UserServiceVerifyPhoneRequest(BaseModel): UserServiceVerifyPhoneRequest """ # noqa: E501 verification_code: Annotated[str, Field(min_length=1, strict=True, max_length=20)] = Field(description="\"the verification code generated during the set phone request\"", alias="verificationCode") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["verificationCode"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "verificationCode": obj.get("verificationCode") }) + # 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/user_service_verify_phone_response.py b/zitadel_client/models/user_service_verify_phone_response.py index a0e91052..391c7859 100644 --- a/zitadel_client/models/user_service_verify_phone_response.py +++ b/zitadel_client/models/user_service_verify_phone_response.py @@ -28,6 +28,8 @@ class UserServiceVerifyPhoneResponse(BaseModel): UserServiceVerifyPhoneResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_verify_totp_registration_request.py b/zitadel_client/models/user_service_verify_totp_registration_request.py index e9e2731c..358a7b62 100644 --- a/zitadel_client/models/user_service_verify_totp_registration_request.py +++ b/zitadel_client/models/user_service_verify_totp_registration_request.py @@ -27,6 +27,8 @@ class UserServiceVerifyTOTPRegistrationRequest(BaseModel): UserServiceVerifyTOTPRegistrationRequest """ # noqa: E501 code: StrictStr = Field(description="Code generated by TOTP app or device") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "code": obj.get("code") }) + # 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/user_service_verify_totp_registration_response.py b/zitadel_client/models/user_service_verify_totp_registration_response.py index 65245d50..66c5f837 100644 --- a/zitadel_client/models/user_service_verify_totp_registration_response.py +++ b/zitadel_client/models/user_service_verify_totp_registration_response.py @@ -28,6 +28,8 @@ class UserServiceVerifyTOTPRegistrationResponse(BaseModel): UserServiceVerifyTOTPRegistrationResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/user_service_verify_u2_f_registration_request.py b/zitadel_client/models/user_service_verify_u2_f_registration_request.py index bc215227..4e6bc48a 100644 --- a/zitadel_client/models/user_service_verify_u2_f_registration_request.py +++ b/zitadel_client/models/user_service_verify_u2_f_registration_request.py @@ -29,6 +29,8 @@ class UserServiceVerifyU2FRegistrationRequest(BaseModel): """ # noqa: E501 public_key_credential: Dict[str, Any] = Field(description="PublicKeyCredential Interface. Generated helper methods populate the field from JSON created by a WebauthN client. See also: https://www.w3.org/TR/webauthn/#publickeycredential", alias="publicKeyCredential") token_name: Annotated[str, Field(min_length=1, strict=True, max_length=200)] = Field(alias="tokenName") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["publicKeyCredential", "tokenName"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "publicKeyCredential": obj.get("publicKeyCredential"), "tokenName": obj.get("tokenName") }) + # 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/user_service_verify_u2_f_registration_response.py b/zitadel_client/models/user_service_verify_u2_f_registration_response.py index b41cd7e2..88bfd75c 100644 --- a/zitadel_client/models/user_service_verify_u2_f_registration_response.py +++ b/zitadel_client/models/user_service_verify_u2_f_registration_response.py @@ -28,6 +28,8 @@ class UserServiceVerifyU2FRegistrationResponse(BaseModel): UserServiceVerifyU2FRegistrationResponse """ # noqa: E501 details: Optional[UserServiceDetails] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["details"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "details": UserServiceDetails.from_dict(obj["details"]) if obj.get("details") 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/web_key_service_beta_activate_web_key_response.py b/zitadel_client/models/web_key_service_beta_activate_web_key_response.py index 5ebc1a51..bd80fb89 100644 --- a/zitadel_client/models/web_key_service_beta_activate_web_key_response.py +++ b/zitadel_client/models/web_key_service_beta_activate_web_key_response.py @@ -28,6 +28,8 @@ class WebKeyServiceBetaActivateWebKeyResponse(BaseModel): WebKeyServiceBetaActivateWebKeyResponse """ # noqa: E501 change_date: Optional[datetime] = Field(default=None, description="The timestamp of the activation of the key.", alias="changeDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["changeDate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "changeDate": obj.get("changeDate") }) + # 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/web_key_service_beta_create_web_key_response.py b/zitadel_client/models/web_key_service_beta_create_web_key_response.py index 6fac779d..e87403de 100644 --- a/zitadel_client/models/web_key_service_beta_create_web_key_response.py +++ b/zitadel_client/models/web_key_service_beta_create_web_key_response.py @@ -29,6 +29,8 @@ class WebKeyServiceBetaCreateWebKeyResponse(BaseModel): """ # noqa: E501 id: Optional[StrictStr] = Field(default=None, description="The unique identifier of the newly created key.") creation_date: Optional[datetime] = Field(default=None, description="The timestamp of the key creation.", alias="creationDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "creationDate"] model_config = ConfigDict( populate_by_name=True, @@ -60,8 +62,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -69,6 +73,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -84,6 +93,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "id": obj.get("id"), "creationDate": obj.get("creationDate") }) + # 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/web_key_service_beta_delete_web_key_response.py b/zitadel_client/models/web_key_service_beta_delete_web_key_response.py index b8e96839..8ad0956b 100644 --- a/zitadel_client/models/web_key_service_beta_delete_web_key_response.py +++ b/zitadel_client/models/web_key_service_beta_delete_web_key_response.py @@ -28,6 +28,8 @@ class WebKeyServiceBetaDeleteWebKeyResponse(BaseModel): WebKeyServiceBetaDeleteWebKeyResponse """ # noqa: E501 deletion_date: Optional[datetime] = Field(default=None, description="The timestamp of the deletion of the key. Note that the deletion date is only guaranteed to be set if the deletion was successful during the request. In case the deletion occurred in a previous request, the deletion date might be empty.", alias="deletionDate") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["deletionDate"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "deletionDate": obj.get("deletionDate") }) + # 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/web_key_service_beta_ecdsa.py b/zitadel_client/models/web_key_service_beta_ecdsa.py index 5ec0c13b..6d540b09 100644 --- a/zitadel_client/models/web_key_service_beta_ecdsa.py +++ b/zitadel_client/models/web_key_service_beta_ecdsa.py @@ -28,6 +28,8 @@ class WebKeyServiceBetaECDSA(BaseModel): WebKeyServiceBetaECDSA """ # noqa: E501 curve: Optional[WebKeyServiceBetaECDSACurve] = WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["curve"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -82,6 +91,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "curve": obj.get("curve") if obj.get("curve") is not None else WebKeyServiceBetaECDSACurve.ECDSA_CURVE_UNSPECIFIED }) + # 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/web_key_service_beta_list_web_keys_response.py b/zitadel_client/models/web_key_service_beta_list_web_keys_response.py index ac899644..f00c4a35 100644 --- a/zitadel_client/models/web_key_service_beta_list_web_keys_response.py +++ b/zitadel_client/models/web_key_service_beta_list_web_keys_response.py @@ -28,6 +28,8 @@ class WebKeyServiceBetaListWebKeysResponse(BaseModel): WebKeyServiceBetaListWebKeysResponse """ # noqa: E501 web_keys: Optional[List[WebKeyServiceBetaWebKey]] = Field(default=None, alias="webKeys") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["webKeys"] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -75,6 +79,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_web_keys: _items.append(_item_web_keys.to_dict()) _dict['webKeys'] = _items + # 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 @@ -89,6 +98,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "webKeys": [WebKeyServiceBetaWebKey.from_dict(_item) for _item in obj["webKeys"]] if obj.get("webKeys") 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/web_key_service_beta_rsa.py b/zitadel_client/models/web_key_service_beta_rsa.py index 732ce677..62d2e713 100644 --- a/zitadel_client/models/web_key_service_beta_rsa.py +++ b/zitadel_client/models/web_key_service_beta_rsa.py @@ -30,6 +30,8 @@ class WebKeyServiceBetaRSA(BaseModel): """ # noqa: E501 bits: Optional[WebKeyServiceBetaRSABits] = WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED hasher: Optional[WebKeyServiceBetaRSAHasher] = WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["bits", "hasher"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -70,6 +74,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -85,6 +94,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "bits": obj.get("bits") if obj.get("bits") is not None else WebKeyServiceBetaRSABits.RSA_BITS_UNSPECIFIED, "hasher": obj.get("hasher") if obj.get("hasher") is not None else WebKeyServiceBetaRSAHasher.RSA_HASHER_UNSPECIFIED }) + # 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/web_key_service_beta_web_key.py b/zitadel_client/models/web_key_service_beta_web_key.py index 584e3a84..93ce8dc0 100644 --- a/zitadel_client/models/web_key_service_beta_web_key.py +++ b/zitadel_client/models/web_key_service_beta_web_key.py @@ -37,6 +37,8 @@ class WebKeyServiceBetaWebKey(BaseModel): rsa: Optional[WebKeyServiceBetaRSA] = None ecdsa: Optional[WebKeyServiceBetaECDSA] = None ed25519: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -68,8 +70,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -89,14 +98,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "id": obj.get("id"), - "creationDate": obj.get("creationDate"), - "changeDate": obj.get("changeDate"), - "state": obj.get("state") if obj.get("state") is not None else WebKeyServiceBetaState.STATE_UNSPECIFIED, - "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, - "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, - "ed25519": obj.get("ed25519") }) + # 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/web_key_service_create_web_key_request.py b/zitadel_client/models/web_key_service_create_web_key_request.py index 0e416a5b..bce33d15 100644 --- a/zitadel_client/models/web_key_service_create_web_key_request.py +++ b/zitadel_client/models/web_key_service_create_web_key_request.py @@ -31,6 +31,8 @@ class WebKeyServiceCreateWebKeyRequest(BaseModel): rsa: Optional[WebKeyServiceBetaRSA] = None ecdsa: Optional[WebKeyServiceBetaECDSA] = None ed25519: Optional[Dict[str, Any]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -62,8 +64,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -71,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -83,10 +92,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "rsa": WebKeyServiceBetaRSA.from_dict(obj["rsa"]) if obj.get("rsa") is not None else None, - "ecdsa": WebKeyServiceBetaECDSA.from_dict(obj["ecdsa"]) if obj.get("ecdsa") is not None else None, - "ed25519": obj.get("ed25519") }) + # 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/web_key_service_protobuf_any.py b/zitadel_client/models/web_key_service_protobuf_any.py index ac83c98a..e67f333a 100644 --- a/zitadel_client/models/web_key_service_protobuf_any.py +++ b/zitadel_client/models/web_key_service_protobuf_any.py @@ -27,6 +27,8 @@ class WebKeyServiceProtobufAny(BaseModel): WebKeyServiceProtobufAny """ # noqa: E501 type: Optional[StrictStr] = Field(default=None, alias="@type") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["@type"] model_config = ConfigDict( populate_by_name=True, @@ -58,8 +60,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -67,6 +71,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -81,6 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "@type": obj.get("@type") }) + # 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/web_key_service_rpc_status.py b/zitadel_client/models/web_key_service_rpc_status.py index 79ce9b53..cac7ae8e 100644 --- a/zitadel_client/models/web_key_service_rpc_status.py +++ b/zitadel_client/models/web_key_service_rpc_status.py @@ -30,6 +30,8 @@ class WebKeyServiceRpcStatus(BaseModel): code: Optional[StrictInt] = None message: Optional[StrictStr] = None details: Optional[List[WebKeyServiceProtobufAny]] = None + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["code", "message", "details"] model_config = ConfigDict( populate_by_name=True, @@ -61,8 +63,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -77,6 +81,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_details: _items.append(_item_details.to_dict()) _dict['details'] = _items + # 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 @@ -93,6 +102,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "message": obj.get("message"), "details": [WebKeyServiceProtobufAny.from_dict(_item) for _item in obj["details"]] if obj.get("details") 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/zitadelobjectv2_organization.py b/zitadel_client/models/zitadelobjectv2_organization.py index aa0d7b48..3b673e83 100644 --- a/zitadel_client/models/zitadelobjectv2_organization.py +++ b/zitadel_client/models/zitadelobjectv2_organization.py @@ -28,6 +28,8 @@ class Zitadelobjectv2Organization(BaseModel): """ # noqa: E501 org_id: Optional[StrictStr] = Field(default=None, alias="orgId") org_domain: Optional[StrictStr] = Field(default=None, alias="orgDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = [] model_config = ConfigDict( populate_by_name=True, @@ -59,8 +61,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -68,6 +72,11 @@ def to_dict(self) -> Dict[str, Any]: 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 @@ -80,9 +89,12 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "orgId": obj.get("orgId"), - "orgDomain": obj.get("orgDomain") }) + # 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/zitadelorgv2_organization.py b/zitadel_client/models/zitadelorgv2_organization.py index 3657dd26..bed3d46e 100644 --- a/zitadel_client/models/zitadelorgv2_organization.py +++ b/zitadel_client/models/zitadelorgv2_organization.py @@ -33,6 +33,8 @@ class Zitadelorgv2Organization(BaseModel): state: Optional[OrganizationServiceOrganizationState] = OrganizationServiceOrganizationState.ORGANIZATION_STATE_UNSPECIFIED name: Optional[StrictStr] = Field(default=None, description="Name of the organization.") primary_domain: Optional[StrictStr] = Field(default=None, description="Primary domain used in the organization.", alias="primaryDomain") + additional_properties: Dict[str, Any] = {} + __properties: ClassVar[List[str]] = ["id", "details", "state", "name", "primaryDomain"] model_config = ConfigDict( populate_by_name=True, @@ -64,8 +66,10 @@ def to_dict(self) -> Dict[str, Any]: * `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( @@ -76,6 +80,11 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of details if self.details: _dict['details'] = self.details.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 @@ -94,6 +103,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "name": obj.get("name"), "primaryDomain": obj.get("primaryDomain") }) + # 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